From b30d193948be5a7794d7ae3ba0ed9c2f72c88e0f Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Sun, 27 Dec 2020 17:47:37 +0000 Subject: 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 Reviewed by: Hans Rosenfeld Reviewed by: Dominik Hassler Approved by: Rich Lowe --- usr/src/Makefile.ast | 82 - usr/src/cmd/Makefile | 8 +- usr/src/cmd/ast/Makefile | 81 +- usr/src/cmd/ast/Makefile.ast | 165 + usr/src/cmd/ast/Makefile.asthdr | 82 + usr/src/cmd/ast/Makefile.astmsg | 98 + usr/src/cmd/ast/Makefile.iffe | 71 + usr/src/cmd/ast/README.ast | 18 + usr/src/cmd/ast/THIRDPARTYLICENSE | 245 - usr/src/cmd/ast/THIRDPARTYLICENSE.descrip | 1 - usr/src/cmd/ast/ksh/Makefile | 93 + usr/src/cmd/ast/ksh/Makefile.com | 117 + usr/src/cmd/ast/ksh/Makefile.testshell | 173 + usr/src/cmd/ast/ksh/amd64/Makefile | 40 + usr/src/cmd/ast/ksh/builtins/Makefile | 148 + usr/src/cmd/ast/ksh/builtins/alias.c | 246 + usr/src/cmd/ast/ksh/i386/Makefile | 39 + usr/src/cmd/ast/ksh/sparc/Makefile | 39 + usr/src/cmd/ast/ksh/sparcv9/Makefile | 40 + usr/src/cmd/ast/libast/Makefile | 63 + usr/src/cmd/ast/libast/Makefile.com | 157 + usr/src/cmd/ast/libast/Makefile.defs | 654 + usr/src/cmd/ast/libast/Makefile.iffe | 38 + usr/src/cmd/ast/libast/amd64/FEATURE/align | 32 + usr/src/cmd/ast/libast/amd64/FEATURE/api | 89 + usr/src/cmd/ast/libast/amd64/FEATURE/aso | 24 + usr/src/cmd/ast/libast/amd64/FEATURE/asometh | 7 + usr/src/cmd/ast/libast/amd64/FEATURE/botch | 5 + usr/src/cmd/ast/libast/amd64/FEATURE/ccode | 29 + usr/src/cmd/ast/libast/amd64/FEATURE/common | 212 + usr/src/cmd/ast/libast/amd64/FEATURE/dirent | 82 + usr/src/cmd/ast/libast/amd64/FEATURE/eaccess | 5 + usr/src/cmd/ast/libast/amd64/FEATURE/errno | 7 + usr/src/cmd/ast/libast/amd64/FEATURE/fcntl | 116 + usr/src/cmd/ast/libast/amd64/FEATURE/float | 209 + usr/src/cmd/ast/libast/amd64/FEATURE/fs | 143 + usr/src/cmd/ast/libast/amd64/FEATURE/hack | 5 + usr/src/cmd/ast/libast/amd64/FEATURE/iconv | 150 + usr/src/cmd/ast/libast/amd64/FEATURE/lib | 166 + usr/src/cmd/ast/libast/amd64/FEATURE/libpath | 6 + usr/src/cmd/ast/libast/amd64/FEATURE/limits | 107 + usr/src/cmd/ast/libast/amd64/FEATURE/locale | 6 + usr/src/cmd/ast/libast/amd64/FEATURE/map | 466 + usr/src/cmd/ast/libast/amd64/FEATURE/mmap | 26 + usr/src/cmd/ast/libast/amd64/FEATURE/mode | 14 + usr/src/cmd/ast/libast/amd64/FEATURE/ndbm | 9 + usr/src/cmd/ast/libast/amd64/FEATURE/nl_types | 102 + usr/src/cmd/ast/libast/amd64/FEATURE/omitted | 5 + usr/src/cmd/ast/libast/amd64/FEATURE/options | 5 + usr/src/cmd/ast/libast/amd64/FEATURE/param | 9 + usr/src/cmd/ast/libast/amd64/FEATURE/preroot | 6 + usr/src/cmd/ast/libast/amd64/FEATURE/prog | 7 + usr/src/cmd/ast/libast/amd64/FEATURE/sfinit | 5332 +++++ usr/src/cmd/ast/libast/amd64/FEATURE/sfio | 17 + usr/src/cmd/ast/libast/amd64/FEATURE/sig | 138 + usr/src/cmd/ast/libast/amd64/FEATURE/siglist | 131 + usr/src/cmd/ast/libast/amd64/FEATURE/signal | 225 + usr/src/cmd/ast/libast/amd64/FEATURE/sizeof | 10 + usr/src/cmd/ast/libast/amd64/FEATURE/standards | 45 + usr/src/cmd/ast/libast/amd64/FEATURE/stdio | 587 + usr/src/cmd/ast/libast/amd64/FEATURE/sys | 159 + usr/src/cmd/ast/libast/amd64/FEATURE/syscall | 10 + usr/src/cmd/ast/libast/amd64/FEATURE/time | 83 + usr/src/cmd/ast/libast/amd64/FEATURE/tmlib | 71 + usr/src/cmd/ast/libast/amd64/FEATURE/tmx | 130 + usr/src/cmd/ast/libast/amd64/FEATURE/tty | 134 + usr/src/cmd/ast/libast/amd64/FEATURE/tv | 111 + usr/src/cmd/ast/libast/amd64/FEATURE/tvlib | 19 + usr/src/cmd/ast/libast/amd64/FEATURE/uwin | 37 + usr/src/cmd/ast/libast/amd64/FEATURE/vfork | 68 + usr/src/cmd/ast/libast/amd64/FEATURE/vmalloc | 36 + usr/src/cmd/ast/libast/amd64/FEATURE/wait | 11 + usr/src/cmd/ast/libast/amd64/FEATURE/wchar | 198 + usr/src/cmd/ast/libast/amd64/FEATURE/wctype | 75 + usr/src/cmd/ast/libast/amd64/Makefile | 43 + usr/src/cmd/ast/libast/amd64/Makefile.iffe | 17 + usr/src/cmd/ast/libast/amd64/conflim.h | 105 + usr/src/cmd/ast/libast/amd64/conftab.c | 393 + usr/src/cmd/ast/libast/amd64/conftab.h | 94 + usr/src/cmd/ast/libast/amd64/lc.h | 131 + usr/src/cmd/ast/libast/amd64/lctab.c | 2635 +++ usr/src/cmd/ast/libast/i386/FEATURE/align | 32 + usr/src/cmd/ast/libast/i386/FEATURE/api | 89 + usr/src/cmd/ast/libast/i386/FEATURE/aso | 24 + usr/src/cmd/ast/libast/i386/FEATURE/asometh | 7 + usr/src/cmd/ast/libast/i386/FEATURE/botch | 5 + usr/src/cmd/ast/libast/i386/FEATURE/ccode | 29 + usr/src/cmd/ast/libast/i386/FEATURE/common | 211 + usr/src/cmd/ast/libast/i386/FEATURE/dirent | 106 + usr/src/cmd/ast/libast/i386/FEATURE/eaccess | 5 + usr/src/cmd/ast/libast/i386/FEATURE/errno | 7 + usr/src/cmd/ast/libast/i386/FEATURE/fcntl | 116 + usr/src/cmd/ast/libast/i386/FEATURE/float | 219 + usr/src/cmd/ast/libast/i386/FEATURE/fs | 148 + usr/src/cmd/ast/libast/i386/FEATURE/hack | 5 + usr/src/cmd/ast/libast/i386/FEATURE/iconv | 150 + usr/src/cmd/ast/libast/i386/FEATURE/lib | 177 + usr/src/cmd/ast/libast/i386/FEATURE/libpath | 6 + usr/src/cmd/ast/libast/i386/FEATURE/limits | 107 + usr/src/cmd/ast/libast/i386/FEATURE/locale | 6 + usr/src/cmd/ast/libast/i386/FEATURE/map | 466 + usr/src/cmd/ast/libast/i386/FEATURE/mmap | 26 + usr/src/cmd/ast/libast/i386/FEATURE/mode | 14 + usr/src/cmd/ast/libast/i386/FEATURE/ndbm | 9 + usr/src/cmd/ast/libast/i386/FEATURE/nl_types | 102 + usr/src/cmd/ast/libast/i386/FEATURE/omitted | 5 + usr/src/cmd/ast/libast/i386/FEATURE/options | 5 + usr/src/cmd/ast/libast/i386/FEATURE/param | 9 + usr/src/cmd/ast/libast/i386/FEATURE/preroot | 6 + usr/src/cmd/ast/libast/i386/FEATURE/prog | 7 + usr/src/cmd/ast/libast/i386/FEATURE/sfinit | 5332 +++++ usr/src/cmd/ast/libast/i386/FEATURE/sfio | 15 + usr/src/cmd/ast/libast/i386/FEATURE/sig | 138 + usr/src/cmd/ast/libast/i386/FEATURE/siglist | 131 + usr/src/cmd/ast/libast/i386/FEATURE/signal | 225 + usr/src/cmd/ast/libast/i386/FEATURE/sizeof | 10 + usr/src/cmd/ast/libast/i386/FEATURE/standards | 45 + usr/src/cmd/ast/libast/i386/FEATURE/stdio | 587 + usr/src/cmd/ast/libast/i386/FEATURE/sys | 159 + usr/src/cmd/ast/libast/i386/FEATURE/syscall | 10 + usr/src/cmd/ast/libast/i386/FEATURE/time | 83 + usr/src/cmd/ast/libast/i386/FEATURE/tmlib | 71 + usr/src/cmd/ast/libast/i386/FEATURE/tmx | 130 + usr/src/cmd/ast/libast/i386/FEATURE/tty | 134 + usr/src/cmd/ast/libast/i386/FEATURE/tv | 111 + usr/src/cmd/ast/libast/i386/FEATURE/tvlib | 19 + usr/src/cmd/ast/libast/i386/FEATURE/uwin | 37 + usr/src/cmd/ast/libast/i386/FEATURE/vfork | 68 + usr/src/cmd/ast/libast/i386/FEATURE/vmalloc | 36 + usr/src/cmd/ast/libast/i386/FEATURE/wait | 11 + usr/src/cmd/ast/libast/i386/FEATURE/wchar | 198 + usr/src/cmd/ast/libast/i386/FEATURE/wctype | 75 + usr/src/cmd/ast/libast/i386/Makefile | 42 + usr/src/cmd/ast/libast/i386/Makefile.iffe | 16 + usr/src/cmd/ast/libast/i386/conflim.h | 105 + usr/src/cmd/ast/libast/i386/conftab.c | 393 + usr/src/cmd/ast/libast/i386/conftab.h | 94 + usr/src/cmd/ast/libast/i386/lc.h | 131 + usr/src/cmd/ast/libast/i386/lctab.c | 2635 +++ usr/src/cmd/ast/libast/mapfile-vers | 750 + usr/src/cmd/ast/libast/sparc/FEATURE/align | 32 + usr/src/cmd/ast/libast/sparc/FEATURE/api | 89 + usr/src/cmd/ast/libast/sparc/FEATURE/aso | 25 + usr/src/cmd/ast/libast/sparc/FEATURE/asometh | 7 + usr/src/cmd/ast/libast/sparc/FEATURE/botch | 5 + usr/src/cmd/ast/libast/sparc/FEATURE/ccode | 29 + usr/src/cmd/ast/libast/sparc/FEATURE/common | 211 + usr/src/cmd/ast/libast/sparc/FEATURE/dirent | 106 + usr/src/cmd/ast/libast/sparc/FEATURE/eaccess | 5 + usr/src/cmd/ast/libast/sparc/FEATURE/errno | 7 + usr/src/cmd/ast/libast/sparc/FEATURE/fcntl | 116 + usr/src/cmd/ast/libast/sparc/FEATURE/float | 219 + usr/src/cmd/ast/libast/sparc/FEATURE/fs | 144 + usr/src/cmd/ast/libast/sparc/FEATURE/hack | 5 + usr/src/cmd/ast/libast/sparc/FEATURE/iconv | 150 + usr/src/cmd/ast/libast/sparc/FEATURE/lib | 177 + usr/src/cmd/ast/libast/sparc/FEATURE/libpath | 6 + usr/src/cmd/ast/libast/sparc/FEATURE/limits | 107 + usr/src/cmd/ast/libast/sparc/FEATURE/locale | 6 + usr/src/cmd/ast/libast/sparc/FEATURE/map | 466 + usr/src/cmd/ast/libast/sparc/FEATURE/mmap | 26 + usr/src/cmd/ast/libast/sparc/FEATURE/mode | 14 + usr/src/cmd/ast/libast/sparc/FEATURE/ndbm | 9 + usr/src/cmd/ast/libast/sparc/FEATURE/nl_types | 102 + usr/src/cmd/ast/libast/sparc/FEATURE/omitted | 5 + usr/src/cmd/ast/libast/sparc/FEATURE/options | 5 + usr/src/cmd/ast/libast/sparc/FEATURE/param | 9 + usr/src/cmd/ast/libast/sparc/FEATURE/preroot | 6 + usr/src/cmd/ast/libast/sparc/FEATURE/prog | 7 + usr/src/cmd/ast/libast/sparc/FEATURE/sfinit | 5332 +++++ usr/src/cmd/ast/libast/sparc/FEATURE/sfio | 15 + usr/src/cmd/ast/libast/sparc/FEATURE/sig | 138 + usr/src/cmd/ast/libast/sparc/FEATURE/siglist | 131 + usr/src/cmd/ast/libast/sparc/FEATURE/signal | 225 + usr/src/cmd/ast/libast/sparc/FEATURE/sizeof | 10 + usr/src/cmd/ast/libast/sparc/FEATURE/standards | 45 + usr/src/cmd/ast/libast/sparc/FEATURE/stdio | 587 + usr/src/cmd/ast/libast/sparc/FEATURE/sys | 159 + usr/src/cmd/ast/libast/sparc/FEATURE/syscall | 10 + usr/src/cmd/ast/libast/sparc/FEATURE/time | 83 + usr/src/cmd/ast/libast/sparc/FEATURE/tmlib | 71 + usr/src/cmd/ast/libast/sparc/FEATURE/tmx | 130 + usr/src/cmd/ast/libast/sparc/FEATURE/tty | 134 + usr/src/cmd/ast/libast/sparc/FEATURE/tv | 111 + usr/src/cmd/ast/libast/sparc/FEATURE/tvlib | 19 + usr/src/cmd/ast/libast/sparc/FEATURE/uwin | 37 + usr/src/cmd/ast/libast/sparc/FEATURE/vfork | 68 + usr/src/cmd/ast/libast/sparc/FEATURE/vmalloc | 36 + usr/src/cmd/ast/libast/sparc/FEATURE/wait | 11 + usr/src/cmd/ast/libast/sparc/FEATURE/wchar | 198 + usr/src/cmd/ast/libast/sparc/FEATURE/wctype | 75 + usr/src/cmd/ast/libast/sparc/Makefile | 42 + usr/src/cmd/ast/libast/sparc/Makefile.iffe | 16 + usr/src/cmd/ast/libast/sparc/conflim.h | 105 + usr/src/cmd/ast/libast/sparc/conftab.c | 393 + usr/src/cmd/ast/libast/sparc/conftab.h | 94 + usr/src/cmd/ast/libast/sparc/lc.h | 131 + usr/src/cmd/ast/libast/sparc/lctab.c | 2635 +++ usr/src/cmd/ast/libast/sparcv9/FEATURE/align | 32 + usr/src/cmd/ast/libast/sparcv9/FEATURE/api | 89 + usr/src/cmd/ast/libast/sparcv9/FEATURE/aso | 24 + usr/src/cmd/ast/libast/sparcv9/FEATURE/asometh | 7 + usr/src/cmd/ast/libast/sparcv9/FEATURE/botch | 5 + usr/src/cmd/ast/libast/sparcv9/FEATURE/ccode | 29 + usr/src/cmd/ast/libast/sparcv9/FEATURE/common | 212 + usr/src/cmd/ast/libast/sparcv9/FEATURE/dirent | 82 + usr/src/cmd/ast/libast/sparcv9/FEATURE/eaccess | 5 + usr/src/cmd/ast/libast/sparcv9/FEATURE/errno | 7 + usr/src/cmd/ast/libast/sparcv9/FEATURE/fcntl | 116 + usr/src/cmd/ast/libast/sparcv9/FEATURE/float | 218 + usr/src/cmd/ast/libast/sparcv9/FEATURE/fs | 143 + usr/src/cmd/ast/libast/sparcv9/FEATURE/hack | 5 + usr/src/cmd/ast/libast/sparcv9/FEATURE/iconv | 150 + usr/src/cmd/ast/libast/sparcv9/FEATURE/lib | 166 + usr/src/cmd/ast/libast/sparcv9/FEATURE/libpath | 6 + usr/src/cmd/ast/libast/sparcv9/FEATURE/limits | 107 + usr/src/cmd/ast/libast/sparcv9/FEATURE/locale | 6 + usr/src/cmd/ast/libast/sparcv9/FEATURE/map | 466 + usr/src/cmd/ast/libast/sparcv9/FEATURE/mmap | 26 + usr/src/cmd/ast/libast/sparcv9/FEATURE/mode | 14 + usr/src/cmd/ast/libast/sparcv9/FEATURE/ndbm | 9 + usr/src/cmd/ast/libast/sparcv9/FEATURE/nl_types | 102 + usr/src/cmd/ast/libast/sparcv9/FEATURE/omitted | 5 + usr/src/cmd/ast/libast/sparcv9/FEATURE/options | 5 + usr/src/cmd/ast/libast/sparcv9/FEATURE/param | 9 + usr/src/cmd/ast/libast/sparcv9/FEATURE/preroot | 6 + usr/src/cmd/ast/libast/sparcv9/FEATURE/prog | 7 + usr/src/cmd/ast/libast/sparcv9/FEATURE/sfinit | 5332 +++++ usr/src/cmd/ast/libast/sparcv9/FEATURE/sfio | 17 + usr/src/cmd/ast/libast/sparcv9/FEATURE/sig | 138 + usr/src/cmd/ast/libast/sparcv9/FEATURE/siglist | 131 + usr/src/cmd/ast/libast/sparcv9/FEATURE/signal | 225 + usr/src/cmd/ast/libast/sparcv9/FEATURE/sizeof | 10 + usr/src/cmd/ast/libast/sparcv9/FEATURE/standards | 45 + usr/src/cmd/ast/libast/sparcv9/FEATURE/stdio | 587 + usr/src/cmd/ast/libast/sparcv9/FEATURE/sys | 159 + usr/src/cmd/ast/libast/sparcv9/FEATURE/syscall | 10 + usr/src/cmd/ast/libast/sparcv9/FEATURE/time | 83 + usr/src/cmd/ast/libast/sparcv9/FEATURE/tmlib | 71 + usr/src/cmd/ast/libast/sparcv9/FEATURE/tmx | 130 + usr/src/cmd/ast/libast/sparcv9/FEATURE/tty | 134 + usr/src/cmd/ast/libast/sparcv9/FEATURE/tv | 111 + usr/src/cmd/ast/libast/sparcv9/FEATURE/tvlib | 19 + usr/src/cmd/ast/libast/sparcv9/FEATURE/uwin | 37 + usr/src/cmd/ast/libast/sparcv9/FEATURE/vfork | 68 + usr/src/cmd/ast/libast/sparcv9/FEATURE/vmalloc | 36 + usr/src/cmd/ast/libast/sparcv9/FEATURE/wait | 11 + usr/src/cmd/ast/libast/sparcv9/FEATURE/wchar | 198 + usr/src/cmd/ast/libast/sparcv9/FEATURE/wctype | 75 + usr/src/cmd/ast/libast/sparcv9/Makefile | 43 + usr/src/cmd/ast/libast/sparcv9/Makefile.iffe | 17 + usr/src/cmd/ast/libast/sparcv9/conflim.h | 105 + usr/src/cmd/ast/libast/sparcv9/conftab.c | 393 + usr/src/cmd/ast/libast/sparcv9/conftab.h | 94 + usr/src/cmd/ast/libast/sparcv9/lc.h | 131 + usr/src/cmd/ast/libast/sparcv9/lctab.c | 2635 +++ usr/src/cmd/ast/libcmd/Makefile | 63 + usr/src/cmd/ast/libcmd/Makefile.com | 122 + usr/src/cmd/ast/libcmd/Makefile.defs | 35 + usr/src/cmd/ast/libcmd/Makefile.iffe | 22 + usr/src/cmd/ast/libcmd/amd64/FEATURE/ids | 15 + usr/src/cmd/ast/libcmd/amd64/FEATURE/sockets | 11 + usr/src/cmd/ast/libcmd/amd64/FEATURE/symlink | 6 + usr/src/cmd/ast/libcmd/amd64/FEATURE/utsname | 15 + usr/src/cmd/ast/libcmd/amd64/Makefile | 32 + usr/src/cmd/ast/libcmd/amd64/Makefile.iffe | 17 + usr/src/cmd/ast/libcmd/i386/FEATURE/ids | 15 + usr/src/cmd/ast/libcmd/i386/FEATURE/sockets | 11 + usr/src/cmd/ast/libcmd/i386/FEATURE/symlink | 6 + usr/src/cmd/ast/libcmd/i386/FEATURE/utsname | 15 + usr/src/cmd/ast/libcmd/i386/Makefile | 31 + usr/src/cmd/ast/libcmd/i386/Makefile.iffe | 16 + usr/src/cmd/ast/libcmd/mapfile-vers | 105 + usr/src/cmd/ast/libcmd/sparc/FEATURE/ids | 15 + usr/src/cmd/ast/libcmd/sparc/FEATURE/sockets | 11 + usr/src/cmd/ast/libcmd/sparc/FEATURE/symlink | 6 + usr/src/cmd/ast/libcmd/sparc/FEATURE/utsname | 15 + usr/src/cmd/ast/libcmd/sparc/Makefile | 29 + usr/src/cmd/ast/libcmd/sparc/Makefile.iffe | 16 + usr/src/cmd/ast/libcmd/sparcv9/FEATURE/ids | 15 + usr/src/cmd/ast/libcmd/sparcv9/FEATURE/sockets | 11 + usr/src/cmd/ast/libcmd/sparcv9/FEATURE/symlink | 6 + usr/src/cmd/ast/libcmd/sparcv9/FEATURE/utsname | 15 + usr/src/cmd/ast/libcmd/sparcv9/Makefile | 30 + usr/src/cmd/ast/libcmd/sparcv9/Makefile.iffe | 17 + usr/src/cmd/ast/libdll/Makefile | 63 + usr/src/cmd/ast/libdll/Makefile.com | 102 + usr/src/cmd/ast/libdll/Makefile.defs | 31 + usr/src/cmd/ast/libdll/Makefile.iffe | 22 + usr/src/cmd/ast/libdll/amd64/FEATURE/dll | 148 + usr/src/cmd/ast/libdll/amd64/Makefile | 36 + usr/src/cmd/ast/libdll/amd64/Makefile.iffe | 17 + usr/src/cmd/ast/libdll/i386/FEATURE/dll | 148 + usr/src/cmd/ast/libdll/i386/Makefile | 35 + usr/src/cmd/ast/libdll/i386/Makefile.iffe | 16 + usr/src/cmd/ast/libdll/mapfile-vers | 57 + usr/src/cmd/ast/libdll/sparc/FEATURE/dll | 148 + usr/src/cmd/ast/libdll/sparc/Makefile | 35 + usr/src/cmd/ast/libdll/sparc/Makefile.iffe | 16 + usr/src/cmd/ast/libdll/sparcv9/FEATURE/dll | 148 + usr/src/cmd/ast/libdll/sparcv9/Makefile | 36 + usr/src/cmd/ast/libdll/sparcv9/Makefile.iffe | 17 + usr/src/cmd/ast/libpp/Makefile | 60 + usr/src/cmd/ast/libpp/Makefile.com | 91 + usr/src/cmd/ast/libpp/Makefile.defs | 32 + usr/src/cmd/ast/libpp/i386/Makefile | 29 + usr/src/cmd/ast/libpp/mapfile-vers | 53 + usr/src/cmd/ast/libpp/sparc/Makefile | 31 + usr/src/cmd/ast/libshell/Makefile | 67 + usr/src/cmd/ast/libshell/Makefile.com | 100 + usr/src/cmd/ast/libshell/Makefile.defs | 96 + usr/src/cmd/ast/libshell/Makefile.demo | 188 + usr/src/cmd/ast/libshell/Makefile.doc | 80 + usr/src/cmd/ast/libshell/Makefile.iffe | 27 + usr/src/cmd/ast/libshell/amd64/FEATURE/acct | 8 + usr/src/cmd/ast/libshell/amd64/FEATURE/cmds | 22 + usr/src/cmd/ast/libshell/amd64/FEATURE/dynamic | 16 + usr/src/cmd/ast/libshell/amd64/FEATURE/execargs | 5 + usr/src/cmd/ast/libshell/amd64/FEATURE/externs | 80 + usr/src/cmd/ast/libshell/amd64/FEATURE/locale | 42 + usr/src/cmd/ast/libshell/amd64/FEATURE/math | 171 + usr/src/cmd/ast/libshell/amd64/FEATURE/options | 21 + usr/src/cmd/ast/libshell/amd64/FEATURE/poll | 117 + usr/src/cmd/ast/libshell/amd64/FEATURE/pstat | 5 + usr/src/cmd/ast/libshell/amd64/FEATURE/rlimits | 37 + usr/src/cmd/ast/libshell/amd64/FEATURE/setjmp | 30 + usr/src/cmd/ast/libshell/amd64/FEATURE/sigfeatures | 48 + usr/src/cmd/ast/libshell/amd64/FEATURE/time | 23 + usr/src/cmd/ast/libshell/amd64/FEATURE/ttys | 14 + usr/src/cmd/ast/libshell/amd64/Makefile | 30 + usr/src/cmd/ast/libshell/amd64/Makefile.iffe | 17 + usr/src/cmd/ast/libshell/common/illumos_cmdlist.h | 186 + .../cmd/ast/libshell/common/scripts/cpvprint.sh | 184 + .../libshell/common/scripts/crawlsrccomments.sh | 1241 + .../ast/libshell/common/scripts/filemutexdemo1.sh | 266 + .../cmd/ast/libshell/common/scripts/filetree1.sh | 231 + usr/src/cmd/ast/libshell/common/scripts/gnaw.sh | 1044 + .../ast/libshell/common/scripts/mandelbrotset1.sh | 292 + .../cmd/ast/libshell/common/scripts/multifollow.sh | 147 + .../cmd/ast/libshell/common/scripts/numtree1.sh | 237 + .../ast/libshell/common/scripts/primenumbers1.sh | 114 + usr/src/cmd/ast/libshell/common/scripts/rssread.sh | 674 + usr/src/cmd/ast/libshell/common/scripts/shcalc.sh | 150 + .../cmd/ast/libshell/common/scripts/shircbot.sh | 428 + usr/src/cmd/ast/libshell/common/scripts/shlint.sh | 95 + usr/src/cmd/ast/libshell/common/scripts/shman.sh | 395 + usr/src/cmd/ast/libshell/common/scripts/shnote.sh | 413 + usr/src/cmd/ast/libshell/common/scripts/shpiano.sh | 1414 ++ .../cmd/ast/libshell/common/scripts/shtinyurl.sh | 265 + .../cmd/ast/libshell/common/scripts/shtwitter.sh | 355 + .../common/scripts/simplefileattributetree1.sh | 276 + .../ast/libshell/common/scripts/simplefiletree1.sh | 129 + .../ast/libshell/common/scripts/svcproptree1.sh | 172 + .../cmd/ast/libshell/common/scripts/termclock.sh | 311 + .../ast/libshell/common/scripts/test_net_sctp.sh | 64 + .../libshell/common/scripts/xmldocumenttree1.sh | 358 + usr/src/cmd/ast/libshell/common/tests/README.tests | 51 + .../common/tests/illumos_13434_chunked_heredoc.sh | 157 + .../tests/sun_solaris_array_default_datatype.sh | 302 + .../common/tests/sun_solaris_builtin_poll.sh | 72 + .../common/tests/sun_solaris_builtin_sum.sh | 110 + .../common/tests/sun_solaris_builtin_tail.sh | 497 + .../tests/sun_solaris_command_substitution.sh | 290 + .../common/tests/sun_solaris_compound_misc.sh | 163 + .../common/tests/sun_solaris_compound_nameref.sh | 214 + .../common/tests/sun_solaris_compoundvario.sh | 334 + ...ubstitution_exec_redirection_allocation_loop.sh | 214 + ...6713682_compound_var_bleeds_through_subshell.sh | 111 + .../sun_solaris_cr_6722134_background_CHLD_trap.sh | 122 + .../sun_solaris_cr_6753538_subshell_leaks_umask.sh | 100 + ...is_cr_6754020_weird_square_bracket_expansion.sh | 80 + ...laris_cr_6763594_command_failure_execs_twice.sh | 98 + .../sun_solaris_cr_6766246_pattern_matching_bug.sh | 174 + ...tutions_terminate_shell_after_257_iterations.sh | 123 + ...cr_6777491_lacks_arithmetric_function_iszero.sh | 94 + .../tests/sun_solaris_cr_6778077_sigthaw_trap.sh | 82 + ..._solaris_cr_6789247_printf_hexfloat_rounding.sh | 129 + ...s_cr_6800929_large_command_substitution_hang.sh | 211 + .../tests/sun_solaris_cr_6805792_varmovetest1.sh | 151 + ...is_cr_6805794_character_to_wchar_not_working.sh | 105 + .../tests/sun_solaris_cr_6805795_negative_zero.sh | 169 + ...olaris_cr_6807179_shellpattern_uses_getpwnam.sh | 88 + .../sun_solaris_cr_6835835_builtin_cat_n_broken.sh | 138 + ...st_with_test_undefined_executes_test_builtin.sh | 93 + ..._6855875_typeset_hexfloat_has_too_few_digits.sh | 144 + ...s_cr_6862121_shbinexec_kernel_module_defunct.sh | 110 + ..._background_process_in_subshell_hangs_caller.sh | 81 + ...mishandles_return_value_of_its_child_process.sh | 183 + ...c_no_longer_counts_number_of_bytes_correctly.sh | 174 + ..._-d_with_multibyte_character_no_longer_works.sh | 193 + ...o_longer_works_with_multibyte_char_separator.sh | 190 + ...T_trap_handlers_are_sometimes_executed_twice.sh | 221 + .../tests/sun_solaris_cr_xxxxxxxx_template.sh | 66 + .../libshell/common/tests/sun_solaris_getconf.sh | 175 + .../tests/sun_solaris_local_compound_nameref001.sh | 68 + .../common/tests/sun_solaris_locale_misc.sh | 188 + .../common/tests/sun_solaris_staticvariables.sh | 113 + .../common/tests/sun_solaris_vartree001.sh | 192 + .../common/tests/sun_solaris_vartree002.sh | 358 + .../common/tests/sun_solaris_vartree003.sh | 199 + usr/src/cmd/ast/libshell/i386/FEATURE/acct | 8 + usr/src/cmd/ast/libshell/i386/FEATURE/cmds | 22 + usr/src/cmd/ast/libshell/i386/FEATURE/dynamic | 16 + usr/src/cmd/ast/libshell/i386/FEATURE/execargs | 5 + usr/src/cmd/ast/libshell/i386/FEATURE/externs | 80 + usr/src/cmd/ast/libshell/i386/FEATURE/locale | 42 + usr/src/cmd/ast/libshell/i386/FEATURE/math | 171 + usr/src/cmd/ast/libshell/i386/FEATURE/options | 21 + usr/src/cmd/ast/libshell/i386/FEATURE/poll | 117 + usr/src/cmd/ast/libshell/i386/FEATURE/pstat | 5 + usr/src/cmd/ast/libshell/i386/FEATURE/rlimits | 38 + usr/src/cmd/ast/libshell/i386/FEATURE/setjmp | 30 + usr/src/cmd/ast/libshell/i386/FEATURE/sigfeatures | 48 + usr/src/cmd/ast/libshell/i386/FEATURE/time | 23 + usr/src/cmd/ast/libshell/i386/FEATURE/ttys | 14 + usr/src/cmd/ast/libshell/i386/Makefile | 29 + usr/src/cmd/ast/libshell/i386/Makefile.iffe | 16 + usr/src/cmd/ast/libshell/mapfile-vers | 185 + .../cmd/ast/libshell/misc/images/callouts/1.png | Bin 0 -> 236 bytes .../cmd/ast/libshell/misc/images/callouts/10.png | Bin 0 -> 284 bytes .../cmd/ast/libshell/misc/images/callouts/2.png | Bin 0 -> 261 bytes .../cmd/ast/libshell/misc/images/callouts/3.png | Bin 0 -> 265 bytes .../cmd/ast/libshell/misc/images/callouts/4.png | Bin 0 -> 260 bytes .../cmd/ast/libshell/misc/images/callouts/5.png | Bin 0 -> 261 bytes .../cmd/ast/libshell/misc/images/callouts/6.png | Bin 0 -> 278 bytes .../cmd/ast/libshell/misc/images/callouts/7.png | Bin 0 -> 253 bytes .../cmd/ast/libshell/misc/images/callouts/8.png | Bin 0 -> 275 bytes .../cmd/ast/libshell/misc/images/callouts/9.png | Bin 0 -> 284 bytes .../cmd/ast/libshell/misc/images/tag_bourne.png | Bin 0 -> 130 bytes usr/src/cmd/ast/libshell/misc/images/tag_i18n.png | Bin 0 -> 124 bytes usr/src/cmd/ast/libshell/misc/images/tag_ksh.png | Bin 0 -> 122 bytes usr/src/cmd/ast/libshell/misc/images/tag_ksh88.png | Bin 0 -> 124 bytes usr/src/cmd/ast/libshell/misc/images/tag_ksh93.png | Bin 0 -> 140 bytes usr/src/cmd/ast/libshell/misc/images/tag_l10n.png | Bin 0 -> 118 bytes usr/src/cmd/ast/libshell/misc/images/tag_perf.png | Bin 0 -> 127 bytes .../cmd/ast/libshell/misc/shell_styleguide.docbook | 1464 ++ usr/src/cmd/ast/libshell/sparc/FEATURE/acct | 8 + usr/src/cmd/ast/libshell/sparc/FEATURE/cmds | 22 + usr/src/cmd/ast/libshell/sparc/FEATURE/dynamic | 16 + usr/src/cmd/ast/libshell/sparc/FEATURE/execargs | 5 + usr/src/cmd/ast/libshell/sparc/FEATURE/externs | 80 + usr/src/cmd/ast/libshell/sparc/FEATURE/locale | 42 + usr/src/cmd/ast/libshell/sparc/FEATURE/math | 171 + usr/src/cmd/ast/libshell/sparc/FEATURE/options | 21 + usr/src/cmd/ast/libshell/sparc/FEATURE/poll | 117 + usr/src/cmd/ast/libshell/sparc/FEATURE/pstat | 5 + usr/src/cmd/ast/libshell/sparc/FEATURE/rlimits | 38 + usr/src/cmd/ast/libshell/sparc/FEATURE/setjmp | 30 + usr/src/cmd/ast/libshell/sparc/FEATURE/sigfeatures | 48 + usr/src/cmd/ast/libshell/sparc/FEATURE/time | 23 + usr/src/cmd/ast/libshell/sparc/FEATURE/ttys | 14 + usr/src/cmd/ast/libshell/sparc/Makefile | 33 + usr/src/cmd/ast/libshell/sparc/Makefile.iffe | 16 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/acct | 8 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/cmds | 22 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/dynamic | 16 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/execargs | 5 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/externs | 80 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/locale | 42 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/math | 171 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/options | 21 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/poll | 117 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/pstat | 5 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/rlimits | 37 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/setjmp | 30 + .../cmd/ast/libshell/sparcv9/FEATURE/sigfeatures | 48 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/time | 23 + usr/src/cmd/ast/libshell/sparcv9/FEATURE/ttys | 14 + usr/src/cmd/ast/libshell/sparcv9/Makefile | 34 + usr/src/cmd/ast/libshell/sparcv9/Makefile.iffe | 17 + usr/src/cmd/ast/libsum/Makefile | 63 + usr/src/cmd/ast/libsum/Makefile.com | 98 + usr/src/cmd/ast/libsum/Makefile.defs | 29 + usr/src/cmd/ast/libsum/Makefile.iffe | 22 + usr/src/cmd/ast/libsum/amd64/FEATURE/sum | 14 + usr/src/cmd/ast/libsum/amd64/Makefile | 30 + usr/src/cmd/ast/libsum/amd64/Makefile.iffe | 17 + usr/src/cmd/ast/libsum/i386/FEATURE/sum | 14 + usr/src/cmd/ast/libsum/i386/Makefile | 29 + usr/src/cmd/ast/libsum/i386/Makefile.iffe | 16 + usr/src/cmd/ast/libsum/mapfile-vers | 55 + usr/src/cmd/ast/libsum/sparc/FEATURE/sum | 14 + usr/src/cmd/ast/libsum/sparc/Makefile | 29 + usr/src/cmd/ast/libsum/sparc/Makefile.iffe | 16 + usr/src/cmd/ast/libsum/sparcv9/FEATURE/sum | 14 + usr/src/cmd/ast/libsum/sparcv9/Makefile | 30 + usr/src/cmd/ast/libsum/sparcv9/Makefile.iffe | 17 + usr/src/cmd/ast/msgcc/Makefile | 47 +- usr/src/cmd/ast/msgcc/NOTES | 65 - usr/src/cmd/ast/msgcc/PROMO.mm | 22 - usr/src/cmd/ast/msgcc/msgcc.sh | 405 - usr/src/cmd/ast/msgcc/msgcc.tst | 28 - usr/src/cmd/ast/msgcc/msgcpp.c | 289 - usr/src/cmd/ast/msgcc/msgcvt.c | 691 - usr/src/cmd/ast/msgcc/msggen.c | 522 - usr/src/cmd/ast/msgcc/msgget.c | 109 - usr/src/cmd/ast/shcomp/Makefile | 94 + usr/src/cmd/ast/tools/Makefile | 90 + usr/src/cmd/ksh/Makefile | 93 - usr/src/cmd/ksh/Makefile.com | 131 - usr/src/cmd/ksh/Makefile.testshell | 173 - usr/src/cmd/ksh/amd64/Makefile | 38 - usr/src/cmd/ksh/builtins/Makefile | 151 - usr/src/cmd/ksh/builtins/alias.c | 259 - usr/src/cmd/ksh/i386/Makefile | 37 - usr/src/cmd/ksh/sparc/Makefile | 37 - usr/src/cmd/ksh/sparcv9/Makefile | 38 - usr/src/cmd/shcomp/Makefile | 99 - usr/src/contrib/ast/LICENSE | 210 + usr/src/contrib/ast/LICENSE.descrip | 1 + usr/src/contrib/ast/README | 6 + usr/src/contrib/ast/lib/package/INIT.pkg | 12 + usr/src/contrib/ast/lib/package/INIT.req | 0 usr/src/contrib/ast/lib/package/INIT.ver | 1 + usr/src/contrib/ast/lib/package/ast-ast.pkg | 11 + usr/src/contrib/ast/lib/package/ast-base.pkg | 22 + usr/src/contrib/ast/lib/package/ast-base.req | 0 usr/src/contrib/ast/lib/package/ast-base.ver | 1 + usr/src/contrib/ast/lib/package/ast-dss.pkg | 13 + usr/src/contrib/ast/lib/package/ast-ksh.pkg | 89 + usr/src/contrib/ast/lib/package/ast-ksh.req | 0 usr/src/contrib/ast/lib/package/ast-ksh.ver | 1 + usr/src/contrib/ast/lib/package/ast-make.pkg | 19 + usr/src/contrib/ast/lib/package/ast-open.pkg | 20 + usr/src/contrib/ast/lib/package/ast-open.req | 0 usr/src/contrib/ast/lib/package/ast-open.ver | 1 + usr/src/contrib/ast/lib/package/ast.def | 49 + usr/src/contrib/ast/lib/package/ast.lic | 5 + usr/src/contrib/ast/lib/package/bsd.def | 45 + usr/src/contrib/ast/lib/package/bsd.lic | 1 + usr/src/contrib/ast/lib/package/epl.def | 8 + usr/src/contrib/ast/lib/package/ksh.pkg | 14 + usr/src/contrib/ast/lib/package/package.mk | 1537 ++ usr/src/contrib/ast/lib/package/zlib.def | 39 + usr/src/contrib/ast/lib/package/zlib.lic | 1 + usr/src/contrib/ast/src/cmd/INIT/C+probe | 870 + usr/src/contrib/ast/src/cmd/INIT/CONVERT.mk | 260 + usr/src/contrib/ast/src/cmd/INIT/MAPLIB.mk | 45 + usr/src/contrib/ast/src/cmd/INIT/MSGFUN.mk | 2 + usr/src/contrib/ast/src/cmd/INIT/MSGKEY.mk | 2 + usr/src/contrib/ast/src/cmd/INIT/Makefile | 346 + usr/src/contrib/ast/src/cmd/INIT/Mamfile | 1383 ++ usr/src/contrib/ast/src/cmd/INIT/PROBE.mk | 13 + usr/src/contrib/ast/src/cmd/INIT/RELEASE | 934 + usr/src/contrib/ast/src/cmd/INIT/TEST.mk | 197 + usr/src/contrib/ast/src/cmd/INIT/WWW.mk | 450 + usr/src/contrib/ast/src/cmd/INIT/crossexec.sh | 139 + usr/src/contrib/ast/src/cmd/INIT/db.c | 37 + usr/src/contrib/ast/src/cmd/INIT/ditto.sh | 460 + usr/src/contrib/ast/src/cmd/INIT/dl.c | 33 + usr/src/contrib/ast/src/cmd/INIT/execrate.sh | 179 + usr/src/contrib/ast/src/cmd/INIT/filter.sh | 98 + usr/src/contrib/ast/src/cmd/INIT/gdbm.c | 37 + usr/src/contrib/ast/src/cmd/INIT/gdbm1.c | 37 + usr/src/contrib/ast/src/cmd/INIT/gdbm2.c | 37 + usr/src/contrib/ast/src/cmd/INIT/hello.c | 23 + usr/src/contrib/ast/src/cmd/INIT/hosttype.tst | 6 + usr/src/contrib/ast/src/cmd/INIT/hurl.sh | 207 + usr/src/contrib/ast/src/cmd/INIT/iconv.c | 29 + usr/src/contrib/ast/src/cmd/INIT/iffe.sh | 4676 ++++ usr/src/contrib/ast/src/cmd/INIT/iffe.tst | 1945 ++ usr/src/contrib/ast/src/cmd/INIT/ignore.sh | 43 + usr/src/contrib/ast/src/cmd/INIT/intl.c | 29 + usr/src/contrib/ast/src/cmd/INIT/m.c | 34 + usr/src/contrib/ast/src/cmd/INIT/m2.c | 36 + usr/src/contrib/ast/src/cmd/INIT/m3.c | 36 + usr/src/contrib/ast/src/cmd/INIT/m4.c | 32 + usr/src/contrib/ast/src/cmd/INIT/m5.c | 32 + usr/src/contrib/ast/src/cmd/INIT/m6.c | 34 + usr/src/contrib/ast/src/cmd/INIT/make.probe | 2242 ++ usr/src/contrib/ast/src/cmd/INIT/mamake.c | 2375 ++ usr/src/contrib/ast/src/cmd/INIT/mamake.rt | 40 + usr/src/contrib/ast/src/cmd/INIT/mamake.tst | 63 + usr/src/contrib/ast/src/cmd/INIT/mamprobe.sh | 267 + usr/src/contrib/ast/src/cmd/INIT/mkdir.sh | 80 + usr/src/contrib/ast/src/cmd/INIT/mktest.sh | 641 + usr/src/contrib/ast/src/cmd/INIT/mprobe.sh | 30 + usr/src/contrib/ast/src/cmd/INIT/nsl.c | 31 + usr/src/contrib/ast/src/cmd/INIT/p.c | 24 + usr/src/contrib/ast/src/cmd/INIT/package.mk | 1537 ++ usr/src/contrib/ast/src/cmd/INIT/package.sh | 7347 ++++++ usr/src/contrib/ast/src/cmd/INIT/probe.win32 | 283 + usr/src/contrib/ast/src/cmd/INIT/proto.c | 5286 +++++ usr/src/contrib/ast/src/cmd/INIT/ratz.c | 5311 +++++ usr/src/contrib/ast/src/cmd/INIT/regress.sh | 1463 ++ usr/src/contrib/ast/src/cmd/INIT/release.c | 366 + usr/src/contrib/ast/src/cmd/INIT/rt.sh | 479 + usr/src/contrib/ast/src/cmd/INIT/silent.sh | 42 + usr/src/contrib/ast/src/cmd/INIT/socket.c | 33 + usr/src/contrib/ast/src/cmd/INIT/w.c | 30 + usr/src/contrib/ast/src/cmd/INIT/w2.c | 27 + usr/src/contrib/ast/src/cmd/ksh93/COMPATIBILITY | 136 + usr/src/contrib/ast/src/cmd/ksh93/DESIGN | 180 + usr/src/contrib/ast/src/cmd/ksh93/Makefile | 251 + usr/src/contrib/ast/src/cmd/ksh93/Mamfile | 1525 ++ usr/src/contrib/ast/src/cmd/ksh93/OBSOLETE | 152 + usr/src/contrib/ast/src/cmd/ksh93/PROMO.mm | 141 + usr/src/contrib/ast/src/cmd/ksh93/README | 232 + usr/src/contrib/ast/src/cmd/ksh93/RELEASE | 3110 +++ usr/src/contrib/ast/src/cmd/ksh93/RELEASE88 | 422 + usr/src/contrib/ast/src/cmd/ksh93/RELEASE93 | 455 + usr/src/contrib/ast/src/cmd/ksh93/TYPES | 182 + usr/src/contrib/ast/src/cmd/ksh93/bltins/alarm.c | 276 + usr/src/contrib/ast/src/cmd/ksh93/bltins/cd_pwd.c | 258 + usr/src/contrib/ast/src/cmd/ksh93/bltins/cflow.c | 119 + usr/src/contrib/ast/src/cmd/ksh93/bltins/enum.c | 284 + usr/src/contrib/ast/src/cmd/ksh93/bltins/getopts.c | 203 + usr/src/contrib/ast/src/cmd/ksh93/bltins/hist.c | 313 + usr/src/contrib/ast/src/cmd/ksh93/bltins/lib.c | 25 + usr/src/contrib/ast/src/cmd/ksh93/bltins/misc.c | 593 + .../contrib/ast/src/cmd/ksh93/bltins/mkservice.c | 494 + .../ast/src/cmd/ksh93/bltins/poll_solaris.c | 390 + usr/src/contrib/ast/src/cmd/ksh93/bltins/print.c | 1118 + usr/src/contrib/ast/src/cmd/ksh93/bltins/read.c | 817 + usr/src/contrib/ast/src/cmd/ksh93/bltins/regress.c | 343 + .../ast/src/cmd/ksh93/bltins/shiocmd_solaris.c | 906 + usr/src/contrib/ast/src/cmd/ksh93/bltins/sleep.c | 183 + usr/src/contrib/ast/src/cmd/ksh93/bltins/test.c | 671 + usr/src/contrib/ast/src/cmd/ksh93/bltins/trap.c | 457 + usr/src/contrib/ast/src/cmd/ksh93/bltins/typeset.c | 1499 ++ usr/src/contrib/ast/src/cmd/ksh93/bltins/ulimit.c | 216 + usr/src/contrib/ast/src/cmd/ksh93/bltins/umask.c | 98 + usr/src/contrib/ast/src/cmd/ksh93/bltins/whence.c | 294 + usr/src/contrib/ast/src/cmd/ksh93/builtins.mm | 648 + usr/src/contrib/ast/src/cmd/ksh93/data/aliases.c | 57 + .../contrib/ast/src/cmd/ksh93/data/bash_pre_rc.sh | 255 + usr/src/contrib/ast/src/cmd/ksh93/data/builtins.c | 1919 ++ usr/src/contrib/ast/src/cmd/ksh93/data/keywords.c | 62 + usr/src/contrib/ast/src/cmd/ksh93/data/lexstates.c | 417 + usr/src/contrib/ast/src/cmd/ksh93/data/limits.c | 62 + usr/src/contrib/ast/src/cmd/ksh93/data/math.tab | 75 + usr/src/contrib/ast/src/cmd/ksh93/data/msg.c | 215 + usr/src/contrib/ast/src/cmd/ksh93/data/options.c | 149 + usr/src/contrib/ast/src/cmd/ksh93/data/signals.c | 250 + usr/src/contrib/ast/src/cmd/ksh93/data/strdata.c | 104 + usr/src/contrib/ast/src/cmd/ksh93/data/testops.c | 174 + usr/src/contrib/ast/src/cmd/ksh93/data/variables.c | 136 + .../contrib/ast/src/cmd/ksh93/edit/completion.c | 574 + usr/src/contrib/ast/src/cmd/ksh93/edit/edit.c | 1873 ++ usr/src/contrib/ast/src/cmd/ksh93/edit/emacs.c | 1579 ++ usr/src/contrib/ast/src/cmd/ksh93/edit/hexpand.c | 737 + usr/src/contrib/ast/src/cmd/ksh93/edit/history.c | 1222 + usr/src/contrib/ast/src/cmd/ksh93/edit/vi.c | 2764 +++ usr/src/contrib/ast/src/cmd/ksh93/features/cmds | 27 + usr/src/contrib/ast/src/cmd/ksh93/features/dynamic | 12 + usr/src/contrib/ast/src/cmd/ksh93/features/externs | 13 + usr/src/contrib/ast/src/cmd/ksh93/features/locale | 27 + usr/src/contrib/ast/src/cmd/ksh93/features/math.sh | 308 + usr/src/contrib/ast/src/cmd/ksh93/features/options | 47 + usr/src/contrib/ast/src/cmd/ksh93/features/poll | 157 + usr/src/contrib/ast/src/cmd/ksh93/features/rlimits | 27 + usr/src/contrib/ast/src/cmd/ksh93/features/setjmp | 18 + .../contrib/ast/src/cmd/ksh93/features/sigfeatures | 49 + usr/src/contrib/ast/src/cmd/ksh93/features/time | 35 + usr/src/contrib/ast/src/cmd/ksh93/features/ttys | 3 + usr/src/contrib/ast/src/cmd/ksh93/fun/dirs | 108 + usr/src/contrib/ast/src/cmd/ksh93/fun/popd | 111 + usr/src/contrib/ast/src/cmd/ksh93/fun/pushd | 111 + usr/src/contrib/ast/src/cmd/ksh93/include/argnod.h | 145 + .../contrib/ast/src/cmd/ksh93/include/builtins.h | 202 + usr/src/contrib/ast/src/cmd/ksh93/include/defs.h | 515 + usr/src/contrib/ast/src/cmd/ksh93/include/edit.h | 286 + usr/src/contrib/ast/src/cmd/ksh93/include/env.h | 50 + usr/src/contrib/ast/src/cmd/ksh93/include/fault.h | 127 + usr/src/contrib/ast/src/cmd/ksh93/include/fcin.h | 71 + .../contrib/ast/src/cmd/ksh93/include/history.h | 75 + usr/src/contrib/ast/src/cmd/ksh93/include/io.h | 140 + usr/src/contrib/ast/src/cmd/ksh93/include/jobs.h | 217 + .../contrib/ast/src/cmd/ksh93/include/lexstates.h | 157 + usr/src/contrib/ast/src/cmd/ksh93/include/name.h | 269 + .../contrib/ast/src/cmd/ksh93/include/national.h | 37 + usr/src/contrib/ast/src/cmd/ksh93/include/nval.h | 322 + usr/src/contrib/ast/src/cmd/ksh93/include/path.h | 149 + .../contrib/ast/src/cmd/ksh93/include/regress.h | 66 + usr/src/contrib/ast/src/cmd/ksh93/include/shell.h | 259 + usr/src/contrib/ast/src/cmd/ksh93/include/shlex.h | 171 + .../contrib/ast/src/cmd/ksh93/include/shnodes.h | 221 + .../contrib/ast/src/cmd/ksh93/include/shtable.h | 65 + .../contrib/ast/src/cmd/ksh93/include/streval.h | 207 + .../contrib/ast/src/cmd/ksh93/include/terminal.h | 203 + usr/src/contrib/ast/src/cmd/ksh93/include/test.h | 72 + .../contrib/ast/src/cmd/ksh93/include/timeout.h | 30 + usr/src/contrib/ast/src/cmd/ksh93/include/ulimit.h | 174 + .../contrib/ast/src/cmd/ksh93/include/variables.h | 111 + .../contrib/ast/src/cmd/ksh93/include/version.h | 20 + usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.rt | 71 + usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.tst | 22544 +++++++++++++++++++ usr/src/contrib/ast/src/cmd/ksh93/mamexec | 307 + usr/src/contrib/ast/src/cmd/ksh93/mamstate.c | 73 + usr/src/contrib/ast/src/cmd/ksh93/nval.3 | 688 + usr/src/contrib/ast/src/cmd/ksh93/sh.1 | 8195 +++++++ usr/src/contrib/ast/src/cmd/ksh93/sh.memo | 3248 +++ usr/src/contrib/ast/src/cmd/ksh93/sh/args.c | 884 + usr/src/contrib/ast/src/cmd/ksh93/sh/arith.c | 558 + usr/src/contrib/ast/src/cmd/ksh93/sh/array.c | 1843 ++ usr/src/contrib/ast/src/cmd/ksh93/sh/bash.c | 423 + usr/src/contrib/ast/src/cmd/ksh93/sh/defs.c | 48 + usr/src/contrib/ast/src/cmd/ksh93/sh/deparse.c | 603 + usr/src/contrib/ast/src/cmd/ksh93/sh/env.c | 255 + usr/src/contrib/ast/src/cmd/ksh93/sh/expand.c | 468 + usr/src/contrib/ast/src/cmd/ksh93/sh/fault.c | 673 + usr/src/contrib/ast/src/cmd/ksh93/sh/fcin.c | 214 + usr/src/contrib/ast/src/cmd/ksh93/sh/init.c | 2260 ++ usr/src/contrib/ast/src/cmd/ksh93/sh/io.c | 2784 +++ usr/src/contrib/ast/src/cmd/ksh93/sh/jobs.c | 2118 ++ usr/src/contrib/ast/src/cmd/ksh93/sh/lex.c | 2547 +++ usr/src/contrib/ast/src/cmd/ksh93/sh/macro.c | 2818 +++ usr/src/contrib/ast/src/cmd/ksh93/sh/main.c | 777 + usr/src/contrib/ast/src/cmd/ksh93/sh/name.c | 3775 ++++ usr/src/contrib/ast/src/cmd/ksh93/sh/nvdisc.c | 1498 ++ usr/src/contrib/ast/src/cmd/ksh93/sh/nvtree.c | 1170 + usr/src/contrib/ast/src/cmd/ksh93/sh/nvtype.c | 1713 ++ usr/src/contrib/ast/src/cmd/ksh93/sh/parse.c | 2094 ++ usr/src/contrib/ast/src/cmd/ksh93/sh/path.c | 1821 ++ usr/src/contrib/ast/src/cmd/ksh93/sh/pmain.c | 46 + usr/src/contrib/ast/src/cmd/ksh93/sh/shcomp.c | 177 + usr/src/contrib/ast/src/cmd/ksh93/sh/streval.c | 1032 + usr/src/contrib/ast/src/cmd/ksh93/sh/string.c | 741 + usr/src/contrib/ast/src/cmd/ksh93/sh/subshell.c | 838 + usr/src/contrib/ast/src/cmd/ksh93/sh/suid_exec.c | 509 + usr/src/contrib/ast/src/cmd/ksh93/sh/tdump.c | 262 + usr/src/contrib/ast/src/cmd/ksh93/sh/timers.c | 248 + usr/src/contrib/ast/src/cmd/ksh93/sh/trestore.c | 353 + usr/src/contrib/ast/src/cmd/ksh93/sh/waitevent.c | 54 + usr/src/contrib/ast/src/cmd/ksh93/sh/xec.c | 4095 ++++ usr/src/contrib/ast/src/cmd/ksh93/shell.3 | 414 + usr/src/contrib/ast/src/cmd/ksh93/tests/alias.sh | 102 + usr/src/contrib/ast/src/cmd/ksh93/tests/append.sh | 116 + usr/src/contrib/ast/src/cmd/ksh93/tests/arith.sh | 765 + usr/src/contrib/ast/src/cmd/ksh93/tests/arrays.sh | 670 + usr/src/contrib/ast/src/cmd/ksh93/tests/arrays2.sh | 224 + .../contrib/ast/src/cmd/ksh93/tests/attributes.sh | 472 + usr/src/contrib/ast/src/cmd/ksh93/tests/basic.sh | 517 + usr/src/contrib/ast/src/cmd/ksh93/tests/bracket.sh | 353 + .../contrib/ast/src/cmd/ksh93/tests/builtins.sh | 642 + usr/src/contrib/ast/src/cmd/ksh93/tests/case.sh | 85 + usr/src/contrib/ast/src/cmd/ksh93/tests/comvar.sh | 694 + .../contrib/ast/src/cmd/ksh93/tests/comvario.sh | 686 + .../contrib/ast/src/cmd/ksh93/tests/coprocess.sh | 368 + .../contrib/ast/src/cmd/ksh93/tests/cubetype.sh | 213 + usr/src/contrib/ast/src/cmd/ksh93/tests/enum.sh | 74 + usr/src/contrib/ast/src/cmd/ksh93/tests/exit.sh | 80 + usr/src/contrib/ast/src/cmd/ksh93/tests/expand.sh | 126 + .../contrib/ast/src/cmd/ksh93/tests/functions.sh | 1210 + usr/src/contrib/ast/src/cmd/ksh93/tests/glob.sh | 374 + usr/src/contrib/ast/src/cmd/ksh93/tests/grep.sh | 105 + usr/src/contrib/ast/src/cmd/ksh93/tests/heredoc.sh | 500 + usr/src/contrib/ast/src/cmd/ksh93/tests/io.sh | 499 + usr/src/contrib/ast/src/cmd/ksh93/tests/leaks.sh | 87 + usr/src/contrib/ast/src/cmd/ksh93/tests/locale.sh | 345 + usr/src/contrib/ast/src/cmd/ksh93/tests/math.sh | 202 + usr/src/contrib/ast/src/cmd/ksh93/tests/nameref.sh | 697 + .../contrib/ast/src/cmd/ksh93/tests/namespace.sh | 106 + usr/src/contrib/ast/src/cmd/ksh93/tests/options.sh | 544 + usr/src/contrib/ast/src/cmd/ksh93/tests/path.sh | 395 + .../contrib/ast/src/cmd/ksh93/tests/pointtype.sh | 138 + usr/src/contrib/ast/src/cmd/ksh93/tests/pty.sh | 442 + usr/src/contrib/ast/src/cmd/ksh93/tests/quoting.sh | 369 + .../contrib/ast/src/cmd/ksh93/tests/quoting2.sh | 215 + usr/src/contrib/ast/src/cmd/ksh93/tests/readcsv.sh | 70 + .../contrib/ast/src/cmd/ksh93/tests/recttype.sh | 70 + .../contrib/ast/src/cmd/ksh93/tests/restricted.sh | 83 + usr/src/contrib/ast/src/cmd/ksh93/tests/return.sh | 183 + usr/src/contrib/ast/src/cmd/ksh93/tests/select.sh | 67 + usr/src/contrib/ast/src/cmd/ksh93/tests/shtests | 369 + usr/src/contrib/ast/src/cmd/ksh93/tests/sigchld.sh | 160 + usr/src/contrib/ast/src/cmd/ksh93/tests/signal.sh | 435 + usr/src/contrib/ast/src/cmd/ksh93/tests/statics.sh | 690 + .../contrib/ast/src/cmd/ksh93/tests/subshell.sh | 669 + .../contrib/ast/src/cmd/ksh93/tests/substring.sh | 664 + usr/src/contrib/ast/src/cmd/ksh93/tests/tilde.sh | 101 + .../contrib/ast/src/cmd/ksh93/tests/timetype.sh | 81 + .../contrib/ast/src/cmd/ksh93/tests/treemove.sh | 163 + usr/src/contrib/ast/src/cmd/ksh93/tests/types.sh | 642 + .../contrib/ast/src/cmd/ksh93/tests/variables.sh | 677 + .../contrib/ast/src/cmd/ksh93/tests/vartree1.sh | 215 + .../contrib/ast/src/cmd/ksh93/tests/vartree2.sh | 335 + usr/src/contrib/ast/src/cmd/msgcc/Makefile | 19 + usr/src/contrib/ast/src/cmd/msgcc/Mamfile | 314 + usr/src/contrib/ast/src/cmd/msgcc/NOTES | 65 + usr/src/contrib/ast/src/cmd/msgcc/PROMO.mm | 22 + usr/src/contrib/ast/src/cmd/msgcc/RELEASE | 14 + usr/src/contrib/ast/src/cmd/msgcc/msgadmin.sh | 180 + usr/src/contrib/ast/src/cmd/msgcc/msgcc.sh | 417 + usr/src/contrib/ast/src/cmd/msgcc/msgcc.tst | 28 + usr/src/contrib/ast/src/cmd/msgcc/msgcpp.c | 289 + usr/src/contrib/ast/src/cmd/msgcc/msgcvt.c | 691 + usr/src/contrib/ast/src/cmd/msgcc/msggen.c | 522 + usr/src/contrib/ast/src/cmd/msgcc/msgget.c | 109 + usr/src/contrib/ast/src/lib/libast/Makefile | 434 + usr/src/contrib/ast/src/lib/libast/Mamfile | 7348 ++++++ usr/src/contrib/ast/src/lib/libast/README | 95 + usr/src/contrib/ast/src/lib/libast/RELEASE | 1808 ++ usr/src/contrib/ast/src/lib/libast/aso/aso-fcntl.c | 188 + usr/src/contrib/ast/src/lib/libast/aso/aso-sem.c | 193 + usr/src/contrib/ast/src/lib/libast/aso/aso.c | 867 + usr/src/contrib/ast/src/lib/libast/aso/asohdr.h | 71 + usr/src/contrib/ast/src/lib/libast/aso/asolock.c | 55 + usr/src/contrib/ast/src/lib/libast/aso/asometh.c | 43 + usr/src/contrib/ast/src/lib/libast/aso/asorelax.c | 56 + .../contrib/ast/src/lib/libast/astsa/README-astsa | 15 + usr/src/contrib/ast/src/lib/libast/astsa/aso.c | 56 + usr/src/contrib/ast/src/lib/libast/astsa/aso.h | 32 + usr/src/contrib/ast/src/lib/libast/astsa/ast.c | 85 + usr/src/contrib/ast/src/lib/libast/astsa/ast.h | 156 + .../contrib/ast/src/lib/libast/astsa/ast_common.h | 49 + .../ast/src/lib/libast/astsa/astsa.manifest | 50 + usr/src/contrib/ast/src/lib/libast/astsa/astsa.mm | 33 + usr/src/contrib/ast/src/lib/libast/astsa/astsa.omk | 82 + usr/src/contrib/ast/src/lib/libast/astsa/ccode.h | 34 + usr/src/contrib/ast/src/lib/libast/astsa/debug.h | 29 + usr/src/contrib/ast/src/lib/libast/astsa/error.c | 103 + usr/src/contrib/ast/src/lib/libast/astsa/error.h | 66 + usr/src/contrib/ast/src/lib/libast/astsa/hashkey.h | 61 + usr/src/contrib/ast/src/lib/libast/astsa/mkast_sa | 150 + usr/src/contrib/ast/src/lib/libast/astsa/option.h | 106 + usr/src/contrib/ast/src/lib/libast/astsa/optlib.h | 105 + usr/src/contrib/ast/src/lib/libast/astsa/sfstr.c | 246 + usr/src/contrib/ast/src/lib/libast/astsa/sfstr.h | 60 + usr/src/contrib/ast/src/lib/libast/astsa/strdup.c | 37 + .../contrib/ast/src/lib/libast/astsa/strmatch.c | 597 + usr/src/contrib/ast/src/lib/libast/astsa/times.h | 27 + usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.c | 102 + usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.h | 61 + usr/src/contrib/ast/src/lib/libast/cdt/cdtlib.h | 183 + usr/src/contrib/ast/src/lib/libast/cdt/dtclose.c | 66 + usr/src/contrib/ast/src/lib/libast/cdt/dtcomp.c | 60 + usr/src/contrib/ast/src/lib/libast/cdt/dtdisc.c | 88 + usr/src/contrib/ast/src/lib/libast/cdt/dthash.c | 429 + usr/src/contrib/ast/src/lib/libast/cdt/dthdr.h | 37 + usr/src/contrib/ast/src/lib/libast/cdt/dtlist.c | 383 + usr/src/contrib/ast/src/lib/libast/cdt/dtmethod.c | 107 + usr/src/contrib/ast/src/lib/libast/cdt/dtnew.c | 81 + usr/src/contrib/ast/src/lib/libast/cdt/dtopen.c | 177 + usr/src/contrib/ast/src/lib/libast/cdt/dtstrhash.c | 61 + usr/src/contrib/ast/src/lib/libast/cdt/dttree.c | 694 + usr/src/contrib/ast/src/lib/libast/cdt/dtview.c | 157 + usr/src/contrib/ast/src/lib/libast/cdt/dtwalk.c | 53 + usr/src/contrib/ast/src/lib/libast/comp/atexit.c | 115 + usr/src/contrib/ast/src/lib/libast/comp/basename.c | 55 + usr/src/contrib/ast/src/lib/libast/comp/catopen.c | 182 + usr/src/contrib/ast/src/lib/libast/comp/closelog.c | 51 + usr/src/contrib/ast/src/lib/libast/comp/conf.sh | 1636 ++ usr/src/contrib/ast/src/lib/libast/comp/conf.tab | 601 + usr/src/contrib/ast/src/lib/libast/comp/creat64.c | 38 + usr/src/contrib/ast/src/lib/libast/comp/dirname.c | 61 + usr/src/contrib/ast/src/lib/libast/comp/dup2.c | 46 + usr/src/contrib/ast/src/lib/libast/comp/eaccess.c | 139 + usr/src/contrib/ast/src/lib/libast/comp/errno.c | 40 + usr/src/contrib/ast/src/lib/libast/comp/execlp.c | 50 + usr/src/contrib/ast/src/lib/libast/comp/execve.c | 70 + usr/src/contrib/ast/src/lib/libast/comp/execvp.c | 50 + usr/src/contrib/ast/src/lib/libast/comp/execvpe.c | 78 + usr/src/contrib/ast/src/lib/libast/comp/fakelink.h | 34 + usr/src/contrib/ast/src/lib/libast/comp/fcntl.c | 98 + usr/src/contrib/ast/src/lib/libast/comp/fmtmsg.h | 141 + .../contrib/ast/src/lib/libast/comp/fmtmsglib.c | 335 + usr/src/contrib/ast/src/lib/libast/comp/fnmatch.c | 79 + usr/src/contrib/ast/src/lib/libast/comp/fnmatch.h | 61 + usr/src/contrib/ast/src/lib/libast/comp/frexp.c | 153 + usr/src/contrib/ast/src/lib/libast/comp/frexpl.c | 161 + usr/src/contrib/ast/src/lib/libast/comp/fsync.c | 46 + usr/src/contrib/ast/src/lib/libast/comp/ftw.c | 50 + usr/src/contrib/ast/src/lib/libast/comp/ftw.h | 60 + usr/src/contrib/ast/src/lib/libast/comp/getdate.c | 83 + .../contrib/ast/src/lib/libast/comp/getgroups.c | 78 + usr/src/contrib/ast/src/lib/libast/comp/getlogin.c | 42 + usr/src/contrib/ast/src/lib/libast/comp/getopt.c | 78 + usr/src/contrib/ast/src/lib/libast/comp/getopt.h | 51 + usr/src/contrib/ast/src/lib/libast/comp/getoptl.c | 151 + usr/src/contrib/ast/src/lib/libast/comp/getpgrp.c | 47 + .../contrib/ast/src/lib/libast/comp/getsubopt.c | 84 + usr/src/contrib/ast/src/lib/libast/comp/getwd.c | 37 + usr/src/contrib/ast/src/lib/libast/comp/gross.c | 99 + .../contrib/ast/src/lib/libast/comp/gross_sgi.h | 188 + usr/src/contrib/ast/src/lib/libast/comp/hsearch.c | 138 + usr/src/contrib/ast/src/lib/libast/comp/iconv.c | 1599 ++ usr/src/contrib/ast/src/lib/libast/comp/killpg.c | 40 + usr/src/contrib/ast/src/lib/libast/comp/libgen.h | 52 + usr/src/contrib/ast/src/lib/libast/comp/link.c | 47 + .../contrib/ast/src/lib/libast/comp/localeconv.c | 100 + usr/src/contrib/ast/src/lib/libast/comp/lstat.c | 39 + usr/src/contrib/ast/src/lib/libast/comp/memccpy.c | 51 + usr/src/contrib/ast/src/lib/libast/comp/memchr.c | 49 + usr/src/contrib/ast/src/lib/libast/comp/memcmp.c | 45 + usr/src/contrib/ast/src/lib/libast/comp/memcpy.c | 60 + usr/src/contrib/ast/src/lib/libast/comp/memmove.c | 53 + usr/src/contrib/ast/src/lib/libast/comp/memset.c | 42 + usr/src/contrib/ast/src/lib/libast/comp/mkdir.c | 62 + usr/src/contrib/ast/src/lib/libast/comp/mkfifo.c | 50 + usr/src/contrib/ast/src/lib/libast/comp/mknod.c | 50 + usr/src/contrib/ast/src/lib/libast/comp/mktemp.c | 85 + usr/src/contrib/ast/src/lib/libast/comp/mktime.c | 77 + usr/src/contrib/ast/src/lib/libast/comp/mount.c | 49 + usr/src/contrib/ast/src/lib/libast/comp/nftw.c | 61 + usr/src/contrib/ast/src/lib/libast/comp/omitted.c | 1152 + usr/src/contrib/ast/src/lib/libast/comp/open.c | 119 + usr/src/contrib/ast/src/lib/libast/comp/openlog.c | 58 + usr/src/contrib/ast/src/lib/libast/comp/putenv.c | 53 + usr/src/contrib/ast/src/lib/libast/comp/re_comp.c | 81 + usr/src/contrib/ast/src/lib/libast/comp/re_comp.h | 41 + usr/src/contrib/ast/src/lib/libast/comp/readlink.c | 61 + usr/src/contrib/ast/src/lib/libast/comp/realpath.c | 48 + usr/src/contrib/ast/src/lib/libast/comp/regcmp.c | 224 + usr/src/contrib/ast/src/lib/libast/comp/regexp.c | 123 + usr/src/contrib/ast/src/lib/libast/comp/regexp.h | 129 + usr/src/contrib/ast/src/lib/libast/comp/remove.c | 49 + usr/src/contrib/ast/src/lib/libast/comp/rename.c | 98 + .../contrib/ast/src/lib/libast/comp/resolvepath.c | 72 + usr/src/contrib/ast/src/lib/libast/comp/rmdir.c | 66 + usr/src/contrib/ast/src/lib/libast/comp/setenv.c | 58 + .../contrib/ast/src/lib/libast/comp/setlocale.c | 2876 +++ .../contrib/ast/src/lib/libast/comp/setlogmask.c | 48 + usr/src/contrib/ast/src/lib/libast/comp/setpgid.c | 80 + usr/src/contrib/ast/src/lib/libast/comp/setsid.c | 90 + usr/src/contrib/ast/src/lib/libast/comp/sigflag.c | 52 + .../contrib/ast/src/lib/libast/comp/sigunblock.c | 63 + usr/src/contrib/ast/src/lib/libast/comp/spawnveg.c | 296 + usr/src/contrib/ast/src/lib/libast/comp/statvfs.c | 163 + .../contrib/ast/src/lib/libast/comp/strcasecmp.c | 58 + usr/src/contrib/ast/src/lib/libast/comp/strchr.c | 57 + usr/src/contrib/ast/src/lib/libast/comp/strftime.c | 104 + .../contrib/ast/src/lib/libast/comp/strncasecmp.c | 62 + usr/src/contrib/ast/src/lib/libast/comp/strptime.c | 82 + usr/src/contrib/ast/src/lib/libast/comp/strrchr.c | 60 + usr/src/contrib/ast/src/lib/libast/comp/strstr.c | 76 + usr/src/contrib/ast/src/lib/libast/comp/strtod.c | 31 + usr/src/contrib/ast/src/lib/libast/comp/strtol.c | 34 + usr/src/contrib/ast/src/lib/libast/comp/strtold.c | 52 + usr/src/contrib/ast/src/lib/libast/comp/strtoll.c | 44 + usr/src/contrib/ast/src/lib/libast/comp/strtoul.c | 35 + usr/src/contrib/ast/src/lib/libast/comp/strtoull.c | 45 + usr/src/contrib/ast/src/lib/libast/comp/swab.c | 60 + usr/src/contrib/ast/src/lib/libast/comp/symlink.c | 59 + usr/src/contrib/ast/src/lib/libast/comp/syslog.c | 369 + usr/src/contrib/ast/src/lib/libast/comp/syslog.h | 132 + .../contrib/ast/src/lib/libast/comp/sysloglib.h | 54 + usr/src/contrib/ast/src/lib/libast/comp/system.c | 55 + usr/src/contrib/ast/src/lib/libast/comp/tempnam.c | 58 + usr/src/contrib/ast/src/lib/libast/comp/tmpnam.c | 51 + .../contrib/ast/src/lib/libast/comp/transition.c | 86 + usr/src/contrib/ast/src/lib/libast/comp/tsearch.c | 240 + usr/src/contrib/ast/src/lib/libast/comp/unlink.c | 38 + usr/src/contrib/ast/src/lib/libast/comp/unsetenv.c | 50 + usr/src/contrib/ast/src/lib/libast/comp/vfork.c | 55 + usr/src/contrib/ast/src/lib/libast/comp/waitpid.c | 199 + usr/src/contrib/ast/src/lib/libast/comp/wc.c | 139 + usr/src/contrib/ast/src/lib/libast/comp/wordexp.c | 217 + usr/src/contrib/ast/src/lib/libast/comp/wordexp.h | 63 + usr/src/contrib/ast/src/lib/libast/dir/dirlib.h | 174 + usr/src/contrib/ast/src/lib/libast/dir/dirstd.h | 63 + usr/src/contrib/ast/src/lib/libast/dir/getdents.c | 166 + usr/src/contrib/ast/src/lib/libast/dir/opendir.c | 97 + usr/src/contrib/ast/src/lib/libast/dir/readdir.c | 61 + usr/src/contrib/ast/src/lib/libast/dir/rewinddir.c | 46 + usr/src/contrib/ast/src/lib/libast/dir/seekdir.c | 56 + usr/src/contrib/ast/src/lib/libast/dir/telldir.c | 43 + usr/src/contrib/ast/src/lib/libast/disc/memfatal.c | 82 + usr/src/contrib/ast/src/lib/libast/disc/sfdcdio.c | 229 + usr/src/contrib/ast/src/lib/libast/disc/sfdcdos.c | 416 + .../contrib/ast/src/lib/libast/disc/sfdcfilter.c | 186 + usr/src/contrib/ast/src/lib/libast/disc/sfdchdr.h | 28 + usr/src/contrib/ast/src/lib/libast/disc/sfdcmore.c | 369 + .../contrib/ast/src/lib/libast/disc/sfdcprefix.c | 153 + .../contrib/ast/src/lib/libast/disc/sfdcseekable.c | 227 + usr/src/contrib/ast/src/lib/libast/disc/sfdcslow.c | 84 + .../contrib/ast/src/lib/libast/disc/sfdcsubstr.c | 217 + usr/src/contrib/ast/src/lib/libast/disc/sfdctee.c | 102 + .../contrib/ast/src/lib/libast/disc/sfdcunion.c | 203 + .../contrib/ast/src/lib/libast/disc/sfkeyprintf.c | 392 + usr/src/contrib/ast/src/lib/libast/disc/sfstrtmp.c | 62 + .../contrib/ast/src/lib/libast/features/align.c | 188 + usr/src/contrib/ast/src/lib/libast/features/api | 15 + usr/src/contrib/ast/src/lib/libast/features/aso | 628 + .../contrib/ast/src/lib/libast/features/asometh | 44 + .../contrib/ast/src/lib/libast/features/botch.c | 72 + usr/src/contrib/ast/src/lib/libast/features/ccode | 81 + usr/src/contrib/ast/src/lib/libast/features/common | 624 + usr/src/contrib/ast/src/lib/libast/features/dirent | 275 + .../contrib/ast/src/lib/libast/features/eaccess | 11 + usr/src/contrib/ast/src/lib/libast/features/errno | 31 + .../contrib/ast/src/lib/libast/features/fcntl.c | 370 + usr/src/contrib/ast/src/lib/libast/features/float | 1226 + usr/src/contrib/ast/src/lib/libast/features/fs | 251 + usr/src/contrib/ast/src/lib/libast/features/hack | 1 + usr/src/contrib/ast/src/lib/libast/features/iconv | 116 + usr/src/contrib/ast/src/lib/libast/features/lib | 725 + .../contrib/ast/src/lib/libast/features/libpath.sh | 73 + .../contrib/ast/src/lib/libast/features/limits.c | 339 + usr/src/contrib/ast/src/lib/libast/features/locale | 28 + usr/src/contrib/ast/src/lib/libast/features/map.c | 565 + usr/src/contrib/ast/src/lib/libast/features/mmap | 342 + usr/src/contrib/ast/src/lib/libast/features/mode.c | 218 + usr/src/contrib/ast/src/lib/libast/features/ndbm | 29 + .../contrib/ast/src/lib/libast/features/nl_types | 64 + .../contrib/ast/src/lib/libast/features/omitted | 110 + .../contrib/ast/src/lib/libast/features/options | 1 + .../contrib/ast/src/lib/libast/features/param.sh | 47 + .../contrib/ast/src/lib/libast/features/preroot.sh | 46 + usr/src/contrib/ast/src/lib/libast/features/prog | 12 + .../contrib/ast/src/lib/libast/features/sfinit.c | 94 + usr/src/contrib/ast/src/lib/libast/features/sfio | 170 + usr/src/contrib/ast/src/lib/libast/features/sig.sh | 132 + .../contrib/ast/src/lib/libast/features/siglist | 14 + .../contrib/ast/src/lib/libast/features/signal.c | 375 + usr/src/contrib/ast/src/lib/libast/features/sizeof | 13 + .../contrib/ast/src/lib/libast/features/standards | 171 + usr/src/contrib/ast/src/lib/libast/features/stdio | 568 + usr/src/contrib/ast/src/lib/libast/features/sys | 280 + .../contrib/ast/src/lib/libast/features/syscall | 18 + usr/src/contrib/ast/src/lib/libast/features/time | 46 + usr/src/contrib/ast/src/lib/libast/features/tmlib | 45 + usr/src/contrib/ast/src/lib/libast/features/tmx | 106 + usr/src/contrib/ast/src/lib/libast/features/tty | 127 + usr/src/contrib/ast/src/lib/libast/features/tv | 81 + usr/src/contrib/ast/src/lib/libast/features/tvlib | 80 + usr/src/contrib/ast/src/lib/libast/features/uwin | 10 + usr/src/contrib/ast/src/lib/libast/features/vfork | 13 + .../contrib/ast/src/lib/libast/features/vmalloc | 220 + usr/src/contrib/ast/src/lib/libast/features/wait | 9 + usr/src/contrib/ast/src/lib/libast/features/wchar | 158 + usr/src/contrib/ast/src/lib/libast/features/wctype | 14 + .../contrib/ast/src/lib/libast/hash/hashalloc.c | 200 + usr/src/contrib/ast/src/lib/libast/hash/hashdump.c | 173 + usr/src/contrib/ast/src/lib/libast/hash/hashfree.c | 144 + usr/src/contrib/ast/src/lib/libast/hash/hashlast.c | 43 + usr/src/contrib/ast/src/lib/libast/hash/hashlib.h | 104 + usr/src/contrib/ast/src/lib/libast/hash/hashlook.c | 367 + usr/src/contrib/ast/src/lib/libast/hash/hashscan.c | 139 + usr/src/contrib/ast/src/lib/libast/hash/hashsize.c | 84 + usr/src/contrib/ast/src/lib/libast/hash/hashview.c | 88 + usr/src/contrib/ast/src/lib/libast/hash/hashwalk.c | 51 + usr/src/contrib/ast/src/lib/libast/hash/memhash.c | 45 + usr/src/contrib/ast/src/lib/libast/hash/memsum.c | 53 + usr/src/contrib/ast/src/lib/libast/hash/strhash.c | 45 + usr/src/contrib/ast/src/lib/libast/hash/strkey.c | 49 + usr/src/contrib/ast/src/lib/libast/hash/strsum.c | 53 + usr/src/contrib/ast/src/lib/libast/include/aso.h | 183 + usr/src/contrib/ast/src/lib/libast/include/ast.h | 406 + .../contrib/ast/src/lib/libast/include/ast_dir.h | 77 + .../ast/src/lib/libast/include/ast_getopt.h | 42 + .../contrib/ast/src/lib/libast/include/ast_std.h | 366 + .../ast/src/lib/libast/include/ast_windows.h | 39 + usr/src/contrib/ast/src/lib/libast/include/ccode.h | 90 + usr/src/contrib/ast/src/lib/libast/include/cdt.h | 354 + .../contrib/ast/src/lib/libast/include/cmdarg.h | 92 + usr/src/contrib/ast/src/lib/libast/include/debug.h | 109 + usr/src/contrib/ast/src/lib/libast/include/dt.h | 41 + usr/src/contrib/ast/src/lib/libast/include/error.h | 188 + usr/src/contrib/ast/src/lib/libast/include/find.h | 86 + usr/src/contrib/ast/src/lib/libast/include/fnv.h | 72 + usr/src/contrib/ast/src/lib/libast/include/fs3d.h | 117 + usr/src/contrib/ast/src/lib/libast/include/fts.h | 162 + .../contrib/ast/src/lib/libast/include/ftwalk.h | 124 + usr/src/contrib/ast/src/lib/libast/include/glob.h | 146 + usr/src/contrib/ast/src/lib/libast/include/hash.h | 202 + .../contrib/ast/src/lib/libast/include/hashkey.h | 62 + .../contrib/ast/src/lib/libast/include/hashpart.h | 51 + usr/src/contrib/ast/src/lib/libast/include/ip6.h | 40 + usr/src/contrib/ast/src/lib/libast/include/ls.h | 88 + usr/src/contrib/ast/src/lib/libast/include/magic.h | 86 + .../contrib/ast/src/lib/libast/include/magicid.h | 46 + usr/src/contrib/ast/src/lib/libast/include/mc.h | 96 + usr/src/contrib/ast/src/lib/libast/include/mime.h | 91 + usr/src/contrib/ast/src/lib/libast/include/mnt.h | 58 + .../contrib/ast/src/lib/libast/include/modecanon.h | 65 + usr/src/contrib/ast/src/lib/libast/include/modex.h | 51 + .../contrib/ast/src/lib/libast/include/namval.h | 42 + .../contrib/ast/src/lib/libast/include/option.h | 106 + usr/src/contrib/ast/src/lib/libast/include/proc.h | 108 + .../contrib/ast/src/lib/libast/include/recfmt.h | 83 + usr/src/contrib/ast/src/lib/libast/include/regex.h | 254 + .../contrib/ast/src/lib/libast/include/sfdisc.h | 70 + usr/src/contrib/ast/src/lib/libast/include/sfio.h | 457 + .../contrib/ast/src/lib/libast/include/sfio_s.h | 51 + .../contrib/ast/src/lib/libast/include/sfio_t.h | 133 + usr/src/contrib/ast/src/lib/libast/include/shcmd.h | 112 + usr/src/contrib/ast/src/lib/libast/include/stack.h | 83 + usr/src/contrib/ast/src/lib/libast/include/stak.h | 55 + usr/src/contrib/ast/src/lib/libast/include/stk.h | 78 + usr/src/contrib/ast/src/lib/libast/include/swap.h | 53 + usr/src/contrib/ast/src/lib/libast/include/tar.h | 118 + usr/src/contrib/ast/src/lib/libast/include/times.h | 54 + usr/src/contrib/ast/src/lib/libast/include/tm.h | 192 + usr/src/contrib/ast/src/lib/libast/include/tok.h | 47 + usr/src/contrib/ast/src/lib/libast/include/usage.h | 37 + usr/src/contrib/ast/src/lib/libast/include/vdb.h | 46 + .../contrib/ast/src/lib/libast/include/vecargs.h | 45 + .../contrib/ast/src/lib/libast/include/vmalloc.h | 335 + usr/src/contrib/ast/src/lib/libast/include/wait.h | 98 + usr/src/contrib/ast/src/lib/libast/man/LIBAST.3 | 98 + usr/src/contrib/ast/src/lib/libast/man/aso.3 | 357 + usr/src/contrib/ast/src/lib/libast/man/ast.3 | 283 + usr/src/contrib/ast/src/lib/libast/man/astsa.3 | 161 + usr/src/contrib/ast/src/lib/libast/man/cdt.3 | 617 + usr/src/contrib/ast/src/lib/libast/man/chr.3 | 126 + usr/src/contrib/ast/src/lib/libast/man/compat.3 | 103 + usr/src/contrib/ast/src/lib/libast/man/error.3 | 283 + usr/src/contrib/ast/src/lib/libast/man/find.3 | 89 + usr/src/contrib/ast/src/lib/libast/man/fmt.3 | 213 + usr/src/contrib/ast/src/lib/libast/man/fmtls.3 | 143 + usr/src/contrib/ast/src/lib/libast/man/fs3d.3 | 92 + usr/src/contrib/ast/src/lib/libast/man/ftwalk.3 | 235 + usr/src/contrib/ast/src/lib/libast/man/getcwd.3 | 67 + usr/src/contrib/ast/src/lib/libast/man/hash.3 | 644 + usr/src/contrib/ast/src/lib/libast/man/iblocks.3 | 62 + usr/src/contrib/ast/src/lib/libast/man/int.3 | 68 + usr/src/contrib/ast/src/lib/libast/man/ip6.3 | 85 + usr/src/contrib/ast/src/lib/libast/man/magic.3 | 493 + usr/src/contrib/ast/src/lib/libast/man/mem.3 | 98 + usr/src/contrib/ast/src/lib/libast/man/mime.3 | 117 + usr/src/contrib/ast/src/lib/libast/man/modecanon.3 | 104 + usr/src/contrib/ast/src/lib/libast/man/optget.3 | 68 + usr/src/contrib/ast/src/lib/libast/man/path.3 | 391 + usr/src/contrib/ast/src/lib/libast/man/preroot.3 | 151 + usr/src/contrib/ast/src/lib/libast/man/proc.3 | 319 + usr/src/contrib/ast/src/lib/libast/man/re.3 | 214 + usr/src/contrib/ast/src/lib/libast/man/regex.3 | 163 + .../contrib/ast/src/lib/libast/man/setenviron.3 | 79 + usr/src/contrib/ast/src/lib/libast/man/sfdisc.3 | 118 + usr/src/contrib/ast/src/lib/libast/man/sfio.3 | 2373 ++ usr/src/contrib/ast/src/lib/libast/man/sig.3 | 75 + usr/src/contrib/ast/src/lib/libast/man/spawnveg.3 | 97 + usr/src/contrib/ast/src/lib/libast/man/stak.3 | 169 + usr/src/contrib/ast/src/lib/libast/man/stk.3 | 165 + usr/src/contrib/ast/src/lib/libast/man/strcopy.3 | 54 + usr/src/contrib/ast/src/lib/libast/man/strdup.3 | 55 + .../contrib/ast/src/lib/libast/man/strelapsed.3 | 77 + usr/src/contrib/ast/src/lib/libast/man/strerror.3 | 53 + usr/src/contrib/ast/src/lib/libast/man/stresc.3 | 53 + usr/src/contrib/ast/src/lib/libast/man/streval.3 | 83 + usr/src/contrib/ast/src/lib/libast/man/strgid.3 | 53 + usr/src/contrib/ast/src/lib/libast/man/strmatch.3 | 101 + usr/src/contrib/ast/src/lib/libast/man/stropt.3 | 130 + usr/src/contrib/ast/src/lib/libast/man/strperm.3 | 109 + usr/src/contrib/ast/src/lib/libast/man/strsignal.3 | 53 + usr/src/contrib/ast/src/lib/libast/man/strsort.3 | 73 + usr/src/contrib/ast/src/lib/libast/man/strtape.3 | 86 + usr/src/contrib/ast/src/lib/libast/man/strton.3 | 97 + usr/src/contrib/ast/src/lib/libast/man/struid.3 | 53 + usr/src/contrib/ast/src/lib/libast/man/swap.3 | 138 + usr/src/contrib/ast/src/lib/libast/man/tab.3 | 74 + usr/src/contrib/ast/src/lib/libast/man/tm.3 | 775 + usr/src/contrib/ast/src/lib/libast/man/tmx.3 | 576 + usr/src/contrib/ast/src/lib/libast/man/tok.3 | 217 + usr/src/contrib/ast/src/lib/libast/man/touch.3 | 68 + usr/src/contrib/ast/src/lib/libast/man/tv.3 | 173 + usr/src/contrib/ast/src/lib/libast/man/vecargs.3 | 126 + usr/src/contrib/ast/src/lib/libast/man/vmalloc.3 | 658 + .../contrib/ast/src/lib/libast/misc/astintercept.c | 53 + usr/src/contrib/ast/src/lib/libast/misc/cmdarg.c | 412 + usr/src/contrib/ast/src/lib/libast/misc/cmdlib.h | 57 + .../contrib/ast/src/lib/libast/misc/conformance.c | 151 + usr/src/contrib/ast/src/lib/libast/misc/debug.c | 66 + usr/src/contrib/ast/src/lib/libast/misc/error.c | 659 + usr/src/contrib/ast/src/lib/libast/misc/errorf.c | 41 + usr/src/contrib/ast/src/lib/libast/misc/errormsg.c | 41 + usr/src/contrib/ast/src/lib/libast/misc/errorx.c | 50 + usr/src/contrib/ast/src/lib/libast/misc/fastfind.c | 1282 ++ usr/src/contrib/ast/src/lib/libast/misc/findlib.h | 123 + usr/src/contrib/ast/src/lib/libast/misc/fmtrec.c | 102 + usr/src/contrib/ast/src/lib/libast/misc/fs3d.c | 116 + usr/src/contrib/ast/src/lib/libast/misc/fts.c | 1605 ++ usr/src/contrib/ast/src/lib/libast/misc/ftwalk.c | 156 + usr/src/contrib/ast/src/lib/libast/misc/ftwflags.c | 35 + usr/src/contrib/ast/src/lib/libast/misc/getcwd.c | 334 + usr/src/contrib/ast/src/lib/libast/misc/getenv.c | 113 + usr/src/contrib/ast/src/lib/libast/misc/glob.c | 836 + .../contrib/ast/src/lib/libast/misc/intercepts.h | 40 + usr/src/contrib/ast/src/lib/libast/misc/magic.c | 2500 ++ usr/src/contrib/ast/src/lib/libast/misc/magic.tab | 1723 ++ usr/src/contrib/ast/src/lib/libast/misc/mime.c | 845 + usr/src/contrib/ast/src/lib/libast/misc/mimelib.h | 52 + usr/src/contrib/ast/src/lib/libast/misc/mimetype.c | 69 + usr/src/contrib/ast/src/lib/libast/misc/optctx.c | 70 + usr/src/contrib/ast/src/lib/libast/misc/optesc.c | 93 + usr/src/contrib/ast/src/lib/libast/misc/optget.c | 5753 +++++ usr/src/contrib/ast/src/lib/libast/misc/optjoin.c | 129 + usr/src/contrib/ast/src/lib/libast/misc/optlib.h | 115 + .../contrib/ast/src/lib/libast/misc/procclose.c | 98 + usr/src/contrib/ast/src/lib/libast/misc/procfree.c | 43 + usr/src/contrib/ast/src/lib/libast/misc/proclib.h | 65 + usr/src/contrib/ast/src/lib/libast/misc/procopen.c | 942 + usr/src/contrib/ast/src/lib/libast/misc/procrun.c | 49 + usr/src/contrib/ast/src/lib/libast/misc/recfmt.c | 165 + usr/src/contrib/ast/src/lib/libast/misc/reclen.c | 71 + usr/src/contrib/ast/src/lib/libast/misc/recstr.c | 206 + .../contrib/ast/src/lib/libast/misc/setenviron.c | 147 + usr/src/contrib/ast/src/lib/libast/misc/sigcrit.c | 199 + usr/src/contrib/ast/src/lib/libast/misc/sigdata.c | 40 + usr/src/contrib/ast/src/lib/libast/misc/signal.c | 136 + usr/src/contrib/ast/src/lib/libast/misc/stack.c | 172 + usr/src/contrib/ast/src/lib/libast/misc/state.c | 42 + usr/src/contrib/ast/src/lib/libast/misc/stk.c | 560 + usr/src/contrib/ast/src/lib/libast/misc/systrace.c | 68 + .../contrib/ast/src/lib/libast/misc/translate.c | 434 + usr/src/contrib/ast/src/lib/libast/misc/univdata.c | 58 + usr/src/contrib/ast/src/lib/libast/misc/univlib.h | 93 + .../contrib/ast/src/lib/libast/obsolete/spawn.c | 152 + .../contrib/ast/src/lib/libast/path/pathaccess.c | 69 + usr/src/contrib/ast/src/lib/libast/path/pathbin.c | 46 + .../contrib/ast/src/lib/libast/path/pathcanon.c | 222 + usr/src/contrib/ast/src/lib/libast/path/pathcat.c | 98 + usr/src/contrib/ast/src/lib/libast/path/pathcd.c | 142 + .../contrib/ast/src/lib/libast/path/pathcheck.c | 91 + .../contrib/ast/src/lib/libast/path/pathexists.c | 134 + usr/src/contrib/ast/src/lib/libast/path/pathfind.c | 168 + .../contrib/ast/src/lib/libast/path/pathgetlink.c | 102 + usr/src/contrib/ast/src/lib/libast/path/pathkey.c | 320 + .../contrib/ast/src/lib/libast/path/pathnative.c | 126 + usr/src/contrib/ast/src/lib/libast/path/pathpath.c | 127 + .../contrib/ast/src/lib/libast/path/pathposix.c | 128 + .../contrib/ast/src/lib/libast/path/pathprobe.c | 326 + usr/src/contrib/ast/src/lib/libast/path/pathprog.c | 128 + usr/src/contrib/ast/src/lib/libast/path/pathrepl.c | 93 + .../contrib/ast/src/lib/libast/path/pathsetlink.c | 72 + .../contrib/ast/src/lib/libast/path/pathshell.c | 112 + usr/src/contrib/ast/src/lib/libast/path/pathstat.c | 45 + usr/src/contrib/ast/src/lib/libast/path/pathtemp.c | 337 + usr/src/contrib/ast/src/lib/libast/path/pathtmp.c | 41 + usr/src/contrib/ast/src/lib/libast/port/astconf.c | 1723 ++ usr/src/contrib/ast/src/lib/libast/port/astcopy.c | 90 + .../contrib/ast/src/lib/libast/port/astdynamic.c | 132 + .../contrib/ast/src/lib/libast/port/astlicense.c | 1303 ++ usr/src/contrib/ast/src/lib/libast/port/astmath.c | 72 + usr/src/contrib/ast/src/lib/libast/port/astquery.c | 114 + .../contrib/ast/src/lib/libast/port/aststatic.c | 44 + .../contrib/ast/src/lib/libast/port/astwinsize.c | 143 + usr/src/contrib/ast/src/lib/libast/port/atmain.C | 37 + usr/src/contrib/ast/src/lib/libast/port/iblocks.c | 95 + usr/src/contrib/ast/src/lib/libast/port/lc.c | 883 + usr/src/contrib/ast/src/lib/libast/port/lc.tab | 275 + usr/src/contrib/ast/src/lib/libast/port/lcgen.c | 791 + usr/src/contrib/ast/src/lib/libast/port/lclang.h | 120 + usr/src/contrib/ast/src/lib/libast/port/lclib.h | 71 + usr/src/contrib/ast/src/lib/libast/port/mc.c | 675 + usr/src/contrib/ast/src/lib/libast/port/mnt.c | 811 + usr/src/contrib/ast/src/lib/libast/port/touch.c | 74 + .../ast/src/lib/libast/preroot/getpreroot.c | 165 + .../contrib/ast/src/lib/libast/preroot/ispreroot.c | 71 + .../contrib/ast/src/lib/libast/preroot/realopen.c | 47 + .../ast/src/lib/libast/preroot/setpreroot.c | 75 + .../contrib/ast/src/lib/libast/regex/regalloc.c | 36 + .../contrib/ast/src/lib/libast/regex/regcache.c | 198 + .../contrib/ast/src/lib/libast/regex/regclass.c | 298 + usr/src/contrib/ast/src/lib/libast/regex/regcoll.c | 120 + usr/src/contrib/ast/src/lib/libast/regex/regcomp.c | 3564 +++ .../contrib/ast/src/lib/libast/regex/regdecomp.c | 448 + .../contrib/ast/src/lib/libast/regex/regerror.c | 95 + usr/src/contrib/ast/src/lib/libast/regex/regexec.c | 90 + .../contrib/ast/src/lib/libast/regex/regfatal.c | 49 + usr/src/contrib/ast/src/lib/libast/regex/reginit.c | 412 + usr/src/contrib/ast/src/lib/libast/regex/reglib.h | 588 + .../contrib/ast/src/lib/libast/regex/regnexec.c | 2082 ++ .../contrib/ast/src/lib/libast/regex/regrecord.c | 34 + .../contrib/ast/src/lib/libast/regex/regrexec.c | 181 + usr/src/contrib/ast/src/lib/libast/regex/regstat.c | 53 + usr/src/contrib/ast/src/lib/libast/regex/regsub.c | 269 + .../contrib/ast/src/lib/libast/regex/regsubcomp.c | 377 + .../contrib/ast/src/lib/libast/regex/regsubexec.c | 237 + .../contrib/ast/src/lib/libast/sfio/_sfclrerr.c | 34 + usr/src/contrib/ast/src/lib/libast/sfio/_sfdlen.c | 34 + usr/src/contrib/ast/src/lib/libast/sfio/_sfeof.c | 34 + usr/src/contrib/ast/src/lib/libast/sfio/_sferror.c | 34 + .../contrib/ast/src/lib/libast/sfio/_sffileno.c | 34 + usr/src/contrib/ast/src/lib/libast/sfio/_sfgetc.c | 34 + usr/src/contrib/ast/src/lib/libast/sfio/_sfgetl.c | 42 + usr/src/contrib/ast/src/lib/libast/sfio/_sfgetl2.c | 50 + usr/src/contrib/ast/src/lib/libast/sfio/_sfgetu.c | 42 + usr/src/contrib/ast/src/lib/libast/sfio/_sfgetu2.c | 50 + usr/src/contrib/ast/src/lib/libast/sfio/_sfllen.c | 34 + usr/src/contrib/ast/src/lib/libast/sfio/_sfopen.c | 232 + usr/src/contrib/ast/src/lib/libast/sfio/_sfputc.c | 35 + usr/src/contrib/ast/src/lib/libast/sfio/_sfputd.c | 96 + usr/src/contrib/ast/src/lib/libast/sfio/_sfputl.c | 89 + usr/src/contrib/ast/src/lib/libast/sfio/_sfputm.c | 85 + usr/src/contrib/ast/src/lib/libast/sfio/_sfputu.c | 82 + usr/src/contrib/ast/src/lib/libast/sfio/_sfslen.c | 33 + .../contrib/ast/src/lib/libast/sfio/_sfstacked.c | 34 + usr/src/contrib/ast/src/lib/libast/sfio/_sfulen.c | 34 + usr/src/contrib/ast/src/lib/libast/sfio/_sfvalue.c | 34 + usr/src/contrib/ast/src/lib/libast/sfio/sfclose.c | 178 + .../contrib/ast/src/lib/libast/sfio/sfclrlock.c | 63 + usr/src/contrib/ast/src/lib/libast/sfio/sfcvt.c | 533 + usr/src/contrib/ast/src/lib/libast/sfio/sfdisc.c | 271 + usr/src/contrib/ast/src/lib/libast/sfio/sfdlen.c | 58 + usr/src/contrib/ast/src/lib/libast/sfio/sfecvt.c | 38 + usr/src/contrib/ast/src/lib/libast/sfio/sfexcept.c | 133 + usr/src/contrib/ast/src/lib/libast/sfio/sfextern.c | 99 + usr/src/contrib/ast/src/lib/libast/sfio/sffcvt.c | 38 + usr/src/contrib/ast/src/lib/libast/sfio/sffilbuf.c | 116 + usr/src/contrib/ast/src/lib/libast/sfio/sfflsbuf.c | 126 + usr/src/contrib/ast/src/lib/libast/sfio/sfgetd.c | 79 + usr/src/contrib/ast/src/lib/libast/sfio/sfgetl.c | 70 + usr/src/contrib/ast/src/lib/libast/sfio/sfgetm.c | 68 + usr/src/contrib/ast/src/lib/libast/sfio/sfgetr.c | 169 + usr/src/contrib/ast/src/lib/libast/sfio/sfgetu.c | 67 + usr/src/contrib/ast/src/lib/libast/sfio/sfhdr.h | 1290 ++ usr/src/contrib/ast/src/lib/libast/sfio/sfllen.c | 39 + usr/src/contrib/ast/src/lib/libast/sfio/sfmode.c | 600 + usr/src/contrib/ast/src/lib/libast/sfio/sfmove.c | 242 + usr/src/contrib/ast/src/lib/libast/sfio/sfmutex.c | 69 + usr/src/contrib/ast/src/lib/libast/sfio/sfnew.c | 129 + usr/src/contrib/ast/src/lib/libast/sfio/sfnotify.c | 38 + usr/src/contrib/ast/src/lib/libast/sfio/sfnputc.c | 81 + usr/src/contrib/ast/src/lib/libast/sfio/sfopen.c | 40 + usr/src/contrib/ast/src/lib/libast/sfio/sfpeek.c | 89 + usr/src/contrib/ast/src/lib/libast/sfio/sfpkrd.c | 325 + usr/src/contrib/ast/src/lib/libast/sfio/sfpoll.c | 250 + usr/src/contrib/ast/src/lib/libast/sfio/sfpool.c | 370 + usr/src/contrib/ast/src/lib/libast/sfio/sfpopen.c | 293 + usr/src/contrib/ast/src/lib/libast/sfio/sfprintf.c | 119 + usr/src/contrib/ast/src/lib/libast/sfio/sfprints.c | 128 + usr/src/contrib/ast/src/lib/libast/sfio/sfpurge.c | 98 + usr/src/contrib/ast/src/lib/libast/sfio/sfputd.c | 35 + usr/src/contrib/ast/src/lib/libast/sfio/sfputl.c | 35 + usr/src/contrib/ast/src/lib/libast/sfio/sfputm.c | 36 + usr/src/contrib/ast/src/lib/libast/sfio/sfputr.c | 136 + usr/src/contrib/ast/src/lib/libast/sfio/sfputu.c | 35 + usr/src/contrib/ast/src/lib/libast/sfio/sfraise.c | 107 + usr/src/contrib/ast/src/lib/libast/sfio/sfrd.c | 317 + usr/src/contrib/ast/src/lib/libast/sfio/sfread.c | 140 + .../contrib/ast/src/lib/libast/sfio/sfreserve.c | 210 + usr/src/contrib/ast/src/lib/libast/sfio/sfresize.c | 83 + usr/src/contrib/ast/src/lib/libast/sfio/sfscanf.c | 102 + usr/src/contrib/ast/src/lib/libast/sfio/sfseek.c | 281 + usr/src/contrib/ast/src/lib/libast/sfio/sfset.c | 99 + usr/src/contrib/ast/src/lib/libast/sfio/sfsetbuf.c | 426 + usr/src/contrib/ast/src/lib/libast/sfio/sfsetfd.c | 136 + usr/src/contrib/ast/src/lib/libast/sfio/sfsize.c | 109 + usr/src/contrib/ast/src/lib/libast/sfio/sfsk.c | 106 + usr/src/contrib/ast/src/lib/libast/sfio/sfstack.c | 115 + usr/src/contrib/ast/src/lib/libast/sfio/sfstrtod.c | 157 + usr/src/contrib/ast/src/lib/libast/sfio/sfstrtof.h | 568 + usr/src/contrib/ast/src/lib/libast/sfio/sfswap.c | 119 + usr/src/contrib/ast/src/lib/libast/sfio/sfsync.c | 172 + usr/src/contrib/ast/src/lib/libast/sfio/sftable.c | 541 + usr/src/contrib/ast/src/lib/libast/sfio/sftell.c | 59 + usr/src/contrib/ast/src/lib/libast/sfio/sftmp.c | 416 + usr/src/contrib/ast/src/lib/libast/sfio/sfungetc.c | 108 + .../contrib/ast/src/lib/libast/sfio/sfvprintf.c | 1450 ++ usr/src/contrib/ast/src/lib/libast/sfio/sfvscanf.c | 1097 + usr/src/contrib/ast/src/lib/libast/sfio/sfwalk.c | 67 + usr/src/contrib/ast/src/lib/libast/sfio/sfwr.c | 252 + usr/src/contrib/ast/src/lib/libast/sfio/sfwrite.c | 171 + usr/src/contrib/ast/src/lib/libast/sfio/vthread.h | 219 + usr/src/contrib/ast/src/lib/libast/std/bytesex.h | 43 + usr/src/contrib/ast/src/lib/libast/std/dirent.h | 22 + usr/src/contrib/ast/src/lib/libast/std/endian.h | 54 + usr/src/contrib/ast/src/lib/libast/std/iconv.h | 22 + usr/src/contrib/ast/src/lib/libast/std/nl_types.h | 22 + usr/src/contrib/ast/src/lib/libast/std/stdio.h | 22 + usr/src/contrib/ast/src/lib/libast/std/wchar.h | 22 + usr/src/contrib/ast/src/lib/libast/std/wctype.h | 22 + usr/src/contrib/ast/src/lib/libast/stdio/_doprnt.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/_doscan.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/_filbuf.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/_flsbuf.c | 44 + usr/src/contrib/ast/src/lib/libast/stdio/_stdfun.c | 80 + .../contrib/ast/src/lib/libast/stdio/_stdopen.c | 32 + .../contrib/ast/src/lib/libast/stdio/_stdprintf.c | 38 + .../contrib/ast/src/lib/libast/stdio/_stdscanf.c | 38 + .../contrib/ast/src/lib/libast/stdio/_stdsprnt.c | 38 + .../contrib/ast/src/lib/libast/stdio/_stdvbuf.c | 32 + .../contrib/ast/src/lib/libast/stdio/_stdvsnprnt.c | 32 + .../contrib/ast/src/lib/libast/stdio/_stdvsprnt.c | 32 + .../contrib/ast/src/lib/libast/stdio/_stdvsscn.c | 32 + .../contrib/ast/src/lib/libast/stdio/asprintf.c | 36 + .../contrib/ast/src/lib/libast/stdio/clearerr.c | 33 + usr/src/contrib/ast/src/lib/libast/stdio/fclose.c | 32 + .../contrib/ast/src/lib/libast/stdio/fcloseall.c | 57 + usr/src/contrib/ast/src/lib/libast/stdio/fdopen.c | 34 + usr/src/contrib/ast/src/lib/libast/stdio/feof.c | 42 + usr/src/contrib/ast/src/lib/libast/stdio/ferror.c | 42 + usr/src/contrib/ast/src/lib/libast/stdio/fflush.c | 41 + usr/src/contrib/ast/src/lib/libast/stdio/fgetc.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/fgetpos.c | 48 + usr/src/contrib/ast/src/lib/libast/stdio/fgets.c | 110 + usr/src/contrib/ast/src/lib/libast/stdio/fgetwc.c | 35 + usr/src/contrib/ast/src/lib/libast/stdio/fgetws.c | 52 + usr/src/contrib/ast/src/lib/libast/stdio/fileno.c | 42 + .../contrib/ast/src/lib/libast/stdio/flockfile.c | 32 + .../contrib/ast/src/lib/libast/stdio/fmemopen.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/fopen.c | 30 + usr/src/contrib/ast/src/lib/libast/stdio/fprintf.c | 39 + usr/src/contrib/ast/src/lib/libast/stdio/fpurge.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/fputc.c | 42 + usr/src/contrib/ast/src/lib/libast/stdio/fputs.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/fputwc.c | 33 + usr/src/contrib/ast/src/lib/libast/stdio/fputws.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/fread.c | 34 + usr/src/contrib/ast/src/lib/libast/stdio/freopen.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/fscanf.c | 39 + usr/src/contrib/ast/src/lib/libast/stdio/fseek.c | 48 + usr/src/contrib/ast/src/lib/libast/stdio/fseeko.c | 48 + usr/src/contrib/ast/src/lib/libast/stdio/fsetpos.c | 48 + usr/src/contrib/ast/src/lib/libast/stdio/ftell.c | 48 + usr/src/contrib/ast/src/lib/libast/stdio/ftello.c | 48 + .../ast/src/lib/libast/stdio/ftrylockfile.c | 32 + .../contrib/ast/src/lib/libast/stdio/funlockfile.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/fwide.c | 51 + .../contrib/ast/src/lib/libast/stdio/fwprintf.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/fwrite.c | 34 + usr/src/contrib/ast/src/lib/libast/stdio/fwscanf.c | 39 + usr/src/contrib/ast/src/lib/libast/stdio/getc.c | 42 + usr/src/contrib/ast/src/lib/libast/stdio/getchar.c | 40 + .../contrib/ast/src/lib/libast/stdio/getdelim.c | 96 + usr/src/contrib/ast/src/lib/libast/stdio/getline.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/getw.c | 34 + usr/src/contrib/ast/src/lib/libast/stdio/getwc.c | 31 + .../contrib/ast/src/lib/libast/stdio/getwchar.c | 31 + usr/src/contrib/ast/src/lib/libast/stdio/pclose.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/popen.c | 30 + usr/src/contrib/ast/src/lib/libast/stdio/printf.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/putc.c | 42 + usr/src/contrib/ast/src/lib/libast/stdio/putchar.c | 40 + usr/src/contrib/ast/src/lib/libast/stdio/puts.c | 30 + usr/src/contrib/ast/src/lib/libast/stdio/putw.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/putwc.c | 31 + .../contrib/ast/src/lib/libast/stdio/putwchar.c | 31 + usr/src/contrib/ast/src/lib/libast/stdio/rewind.c | 33 + usr/src/contrib/ast/src/lib/libast/stdio/scanf.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/setbuf.c | 32 + .../contrib/ast/src/lib/libast/stdio/setbuffer.c | 32 + .../contrib/ast/src/lib/libast/stdio/setlinebuf.c | 33 + usr/src/contrib/ast/src/lib/libast/stdio/setvbuf.c | 48 + .../contrib/ast/src/lib/libast/stdio/snprintf.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/sprintf.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/sscanf.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/stdhdr.h | 115 + .../contrib/ast/src/lib/libast/stdio/stdio_c99.c | 118 + .../contrib/ast/src/lib/libast/stdio/swprintf.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/swscanf.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/tmpfile.c | 30 + usr/src/contrib/ast/src/lib/libast/stdio/ungetc.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/ungetwc.c | 39 + .../contrib/ast/src/lib/libast/stdio/vasprintf.c | 45 + .../contrib/ast/src/lib/libast/stdio/vfprintf.c | 32 + usr/src/contrib/ast/src/lib/libast/stdio/vfscanf.c | 32 + .../contrib/ast/src/lib/libast/stdio/vfwprintf.c | 68 + .../contrib/ast/src/lib/libast/stdio/vfwscanf.c | 129 + usr/src/contrib/ast/src/lib/libast/stdio/vprintf.c | 30 + usr/src/contrib/ast/src/lib/libast/stdio/vscanf.c | 30 + .../contrib/ast/src/lib/libast/stdio/vsnprintf.c | 52 + .../contrib/ast/src/lib/libast/stdio/vsprintf.c | 30 + usr/src/contrib/ast/src/lib/libast/stdio/vsscanf.c | 30 + .../contrib/ast/src/lib/libast/stdio/vswprintf.c | 55 + .../contrib/ast/src/lib/libast/stdio/vswscanf.c | 51 + .../contrib/ast/src/lib/libast/stdio/vwprintf.c | 30 + usr/src/contrib/ast/src/lib/libast/stdio/vwscanf.c | 30 + usr/src/contrib/ast/src/lib/libast/stdio/wprintf.c | 36 + usr/src/contrib/ast/src/lib/libast/stdio/wscanf.c | 36 + usr/src/contrib/ast/src/lib/libast/string/base64.c | 312 + usr/src/contrib/ast/src/lib/libast/string/ccmap.c | 746 + .../contrib/ast/src/lib/libast/string/ccmapid.c | 173 + .../contrib/ast/src/lib/libast/string/ccnative.c | 56 + usr/src/contrib/ast/src/lib/libast/string/chresc.c | 237 + usr/src/contrib/ast/src/lib/libast/string/chrtoi.c | 55 + .../contrib/ast/src/lib/libast/string/fmtbase.c | 70 + usr/src/contrib/ast/src/lib/libast/string/fmtbuf.c | 69 + .../contrib/ast/src/lib/libast/string/fmtclock.c | 63 + usr/src/contrib/ast/src/lib/libast/string/fmtdev.c | 60 + .../contrib/ast/src/lib/libast/string/fmtelapsed.c | 61 + .../contrib/ast/src/lib/libast/string/fmterror.c | 37 + usr/src/contrib/ast/src/lib/libast/string/fmtesc.c | 248 + usr/src/contrib/ast/src/lib/libast/string/fmtfmt.c | 205 + usr/src/contrib/ast/src/lib/libast/string/fmtfs.c | 100 + usr/src/contrib/ast/src/lib/libast/string/fmtgid.c | 101 + .../contrib/ast/src/lib/libast/string/fmtident.c | 77 + usr/src/contrib/ast/src/lib/libast/string/fmtint.c | 122 + usr/src/contrib/ast/src/lib/libast/string/fmtip4.c | 43 + usr/src/contrib/ast/src/lib/libast/string/fmtip6.c | 175 + usr/src/contrib/ast/src/lib/libast/string/fmtls.c | 120 + .../contrib/ast/src/lib/libast/string/fmtmatch.c | 286 + .../contrib/ast/src/lib/libast/string/fmtmode.c | 47 + usr/src/contrib/ast/src/lib/libast/string/fmtnum.c | 92 + .../contrib/ast/src/lib/libast/string/fmtperm.c | 91 + usr/src/contrib/ast/src/lib/libast/string/fmtre.c | 226 + .../contrib/ast/src/lib/libast/string/fmtscale.c | 94 + .../contrib/ast/src/lib/libast/string/fmtsignal.c | 62 + .../contrib/ast/src/lib/libast/string/fmttime.c | 41 + usr/src/contrib/ast/src/lib/libast/string/fmttmx.c | 45 + usr/src/contrib/ast/src/lib/libast/string/fmttv.c | 44 + usr/src/contrib/ast/src/lib/libast/string/fmtuid.c | 101 + .../contrib/ast/src/lib/libast/string/fmtversion.c | 53 + usr/src/contrib/ast/src/lib/libast/string/memdup.c | 44 + .../contrib/ast/src/lib/libast/string/modedata.c | 69 + usr/src/contrib/ast/src/lib/libast/string/modei.c | 55 + .../contrib/ast/src/lib/libast/string/modelib.h | 55 + usr/src/contrib/ast/src/lib/libast/string/modex.c | 75 + .../contrib/ast/src/lib/libast/string/stracmp.c | 62 + .../contrib/ast/src/lib/libast/string/strcopy.c | 36 + usr/src/contrib/ast/src/lib/libast/string/strdup.c | 60 + .../contrib/ast/src/lib/libast/string/strelapsed.c | 154 + .../contrib/ast/src/lib/libast/string/strerror.c | 148 + usr/src/contrib/ast/src/lib/libast/string/stresc.c | 67 + .../contrib/ast/src/lib/libast/string/streval.c | 50 + .../contrib/ast/src/lib/libast/string/strexpr.c | 294 + usr/src/contrib/ast/src/lib/libast/string/strgid.c | 121 + .../contrib/ast/src/lib/libast/string/strlcat.c | 83 + .../contrib/ast/src/lib/libast/string/strlcpy.c | 71 + .../contrib/ast/src/lib/libast/string/strlook.c | 50 + .../contrib/ast/src/lib/libast/string/strmatch.c | 207 + .../contrib/ast/src/lib/libast/string/strmode.c | 51 + .../contrib/ast/src/lib/libast/string/strnacmp.c | 66 + .../contrib/ast/src/lib/libast/string/strncopy.c | 46 + .../contrib/ast/src/lib/libast/string/strnpcmp.c | 51 + .../contrib/ast/src/lib/libast/string/strntod.c | 32 + .../contrib/ast/src/lib/libast/string/strntol.c | 31 + .../contrib/ast/src/lib/libast/string/strntold.c | 32 + .../contrib/ast/src/lib/libast/string/strntoll.c | 31 + .../contrib/ast/src/lib/libast/string/strnton.c | 32 + .../contrib/ast/src/lib/libast/string/strntonll.c | 32 + .../contrib/ast/src/lib/libast/string/strntoul.c | 32 + .../contrib/ast/src/lib/libast/string/strntoull.c | 32 + .../contrib/ast/src/lib/libast/string/strnvcmp.c | 86 + usr/src/contrib/ast/src/lib/libast/string/stropt.c | 188 + .../contrib/ast/src/lib/libast/string/strpcmp.c | 44 + .../contrib/ast/src/lib/libast/string/strperm.c | 267 + .../contrib/ast/src/lib/libast/string/strpsearch.c | 125 + .../contrib/ast/src/lib/libast/string/strsearch.c | 58 + .../contrib/ast/src/lib/libast/string/strsort.c | 57 + .../contrib/ast/src/lib/libast/string/strtape.c | 148 + usr/src/contrib/ast/src/lib/libast/string/strtoi.h | 640 + .../contrib/ast/src/lib/libast/string/strtoip4.c | 150 + .../contrib/ast/src/lib/libast/string/strtoip6.c | 204 + usr/src/contrib/ast/src/lib/libast/string/strton.c | 31 + .../contrib/ast/src/lib/libast/string/strtonll.c | 31 + usr/src/contrib/ast/src/lib/libast/string/struid.c | 109 + .../contrib/ast/src/lib/libast/string/struniq.c | 51 + .../contrib/ast/src/lib/libast/string/strvcmp.c | 74 + .../contrib/ast/src/lib/libast/string/swapget.c | 57 + .../contrib/ast/src/lib/libast/string/swapmem.c | 109 + usr/src/contrib/ast/src/lib/libast/string/swapop.c | 59 + .../contrib/ast/src/lib/libast/string/swapput.c | 50 + usr/src/contrib/ast/src/lib/libast/string/tok.c | 190 + .../contrib/ast/src/lib/libast/string/tokline.c | 193 + .../contrib/ast/src/lib/libast/string/tokscan.c | 360 + .../contrib/ast/src/lib/libast/string/wc2utf8.c | 78 + usr/src/contrib/ast/src/lib/libast/tm/tmdata.c | 288 + usr/src/contrib/ast/src/lib/libast/tm/tmdate.c | 41 + usr/src/contrib/ast/src/lib/libast/tm/tmequiv.c | 57 + usr/src/contrib/ast/src/lib/libast/tm/tmfix.c | 173 + usr/src/contrib/ast/src/lib/libast/tm/tmfmt.c | 41 + usr/src/contrib/ast/src/lib/libast/tm/tmform.c | 44 + usr/src/contrib/ast/src/lib/libast/tm/tmgoff.c | 77 + usr/src/contrib/ast/src/lib/libast/tm/tminit.c | 460 + usr/src/contrib/ast/src/lib/libast/tm/tmleap.c | 41 + usr/src/contrib/ast/src/lib/libast/tm/tmlex.c | 67 + usr/src/contrib/ast/src/lib/libast/tm/tmlocale.c | 644 + usr/src/contrib/ast/src/lib/libast/tm/tmmake.c | 41 + usr/src/contrib/ast/src/lib/libast/tm/tmpoff.c | 62 + usr/src/contrib/ast/src/lib/libast/tm/tmscan.c | 41 + usr/src/contrib/ast/src/lib/libast/tm/tmsleep.c | 42 + usr/src/contrib/ast/src/lib/libast/tm/tmtime.c | 41 + usr/src/contrib/ast/src/lib/libast/tm/tmtype.c | 57 + usr/src/contrib/ast/src/lib/libast/tm/tmweek.c | 87 + usr/src/contrib/ast/src/lib/libast/tm/tmword.c | 89 + usr/src/contrib/ast/src/lib/libast/tm/tmxdate.c | 1745 ++ .../contrib/ast/src/lib/libast/tm/tmxduration.c | 80 + usr/src/contrib/ast/src/lib/libast/tm/tmxfmt.c | 703 + usr/src/contrib/ast/src/lib/libast/tm/tmxgettime.c | 44 + usr/src/contrib/ast/src/lib/libast/tm/tmxleap.c | 51 + usr/src/contrib/ast/src/lib/libast/tm/tmxmake.c | 140 + usr/src/contrib/ast/src/lib/libast/tm/tmxscan.c | 534 + usr/src/contrib/ast/src/lib/libast/tm/tmxsettime.c | 45 + usr/src/contrib/ast/src/lib/libast/tm/tmxsleep.c | 41 + usr/src/contrib/ast/src/lib/libast/tm/tmxtime.c | 137 + usr/src/contrib/ast/src/lib/libast/tm/tmxtouch.c | 81 + usr/src/contrib/ast/src/lib/libast/tm/tmzone.c | 95 + usr/src/contrib/ast/src/lib/libast/tm/tvcmp.c | 46 + usr/src/contrib/ast/src/lib/libast/tm/tvgettime.c | 70 + usr/src/contrib/ast/src/lib/libast/tm/tvsettime.c | 72 + usr/src/contrib/ast/src/lib/libast/tm/tvsleep.c | 48 + usr/src/contrib/ast/src/lib/libast/tm/tvtouch.c | 295 + usr/src/contrib/ast/src/lib/libast/uwin/a64l.c | 76 + usr/src/contrib/ast/src/lib/libast/uwin/acosh.c | 108 + usr/src/contrib/ast/src/lib/libast/uwin/asinh.c | 107 + usr/src/contrib/ast/src/lib/libast/uwin/atanh.c | 89 + usr/src/contrib/ast/src/lib/libast/uwin/cbrt.c | 38 + usr/src/contrib/ast/src/lib/libast/uwin/crypt.c | 959 + usr/src/contrib/ast/src/lib/libast/uwin/erf.c | 403 + usr/src/contrib/ast/src/lib/libast/uwin/err.c | 124 + usr/src/contrib/ast/src/lib/libast/uwin/exp.c | 213 + usr/src/contrib/ast/src/lib/libast/uwin/exp__E.c | 142 + usr/src/contrib/ast/src/lib/libast/uwin/expm1.c | 173 + usr/src/contrib/ast/src/lib/libast/uwin/gamma.c | 343 + usr/src/contrib/ast/src/lib/libast/uwin/getpass.c | 79 + usr/src/contrib/ast/src/lib/libast/uwin/lgamma.c | 316 + usr/src/contrib/ast/src/lib/libast/uwin/log.c | 496 + usr/src/contrib/ast/src/lib/libast/uwin/log1p.c | 176 + usr/src/contrib/ast/src/lib/libast/uwin/log__L.c | 116 + usr/src/contrib/ast/src/lib/libast/uwin/mathimpl.h | 103 + usr/src/contrib/ast/src/lib/libast/uwin/mini.sym | 84 + usr/src/contrib/ast/src/lib/libast/uwin/rand48.c | 177 + usr/src/contrib/ast/src/lib/libast/uwin/random.c | 381 + usr/src/contrib/ast/src/lib/libast/uwin/rcmd.c | 571 + usr/src/contrib/ast/src/lib/libast/uwin/rint.c | 41 + usr/src/contrib/ast/src/lib/libast/uwin/rlib.h | 80 + usr/src/contrib/ast/src/lib/libast/uwin/support.c | 605 + usr/src/contrib/ast/src/lib/libast/vec/vecargs.c | 76 + usr/src/contrib/ast/src/lib/libast/vec/vecfile.c | 62 + usr/src/contrib/ast/src/lib/libast/vec/vecfree.c | 48 + usr/src/contrib/ast/src/lib/libast/vec/vecload.c | 96 + usr/src/contrib/ast/src/lib/libast/vec/vecstring.c | 46 + .../contrib/ast/src/lib/libast/vmalloc/malloc.c | 1476 ++ .../contrib/ast/src/lib/libast/vmalloc/vmbest.c | 1395 ++ .../contrib/ast/src/lib/libast/vmalloc/vmclear.c | 85 + .../contrib/ast/src/lib/libast/vmalloc/vmclose.c | 91 + .../contrib/ast/src/lib/libast/vmalloc/vmdcheap.c | 63 + .../contrib/ast/src/lib/libast/vmalloc/vmdebug.c | 745 + .../contrib/ast/src/lib/libast/vmalloc/vmdisc.c | 55 + .../contrib/ast/src/lib/libast/vmalloc/vmexit.c | 100 + .../contrib/ast/src/lib/libast/vmalloc/vmgetmem.c | 51 + usr/src/contrib/ast/src/lib/libast/vmalloc/vmhdr.h | 532 + .../contrib/ast/src/lib/libast/vmalloc/vmlast.c | 431 + .../contrib/ast/src/lib/libast/vmalloc/vmmopen.c | 515 + .../contrib/ast/src/lib/libast/vmalloc/vmopen.c | 180 + .../contrib/ast/src/lib/libast/vmalloc/vmpool.c | 316 + .../contrib/ast/src/lib/libast/vmalloc/vmprivate.c | 290 + .../contrib/ast/src/lib/libast/vmalloc/vmprofile.c | 709 + .../contrib/ast/src/lib/libast/vmalloc/vmregion.c | 61 + .../contrib/ast/src/lib/libast/vmalloc/vmsegment.c | 58 + usr/src/contrib/ast/src/lib/libast/vmalloc/vmset.c | 62 + .../contrib/ast/src/lib/libast/vmalloc/vmstat.c | 144 + .../contrib/ast/src/lib/libast/vmalloc/vmstrdup.c | 48 + .../contrib/ast/src/lib/libast/vmalloc/vmtrace.c | 286 + .../contrib/ast/src/lib/libast/vmalloc/vmwalk.c | 69 + usr/src/contrib/ast/src/lib/libcmd/Makefile | 90 + usr/src/contrib/ast/src/lib/libcmd/Mamfile | 916 + usr/src/contrib/ast/src/lib/libcmd/RELEASE | 334 + usr/src/contrib/ast/src/lib/libcmd/basename.c | 139 + usr/src/contrib/ast/src/lib/libcmd/cat.c | 557 + usr/src/contrib/ast/src/lib/libcmd/chgrp.c | 501 + usr/src/contrib/ast/src/lib/libcmd/chmod.c | 325 + usr/src/contrib/ast/src/lib/libcmd/chown.c | 39 + usr/src/contrib/ast/src/lib/libcmd/cksum.c | 632 + usr/src/contrib/ast/src/lib/libcmd/cmd.h | 163 + usr/src/contrib/ast/src/lib/libcmd/cmdinit.c | 75 + usr/src/contrib/ast/src/lib/libcmd/cmp.c | 399 + usr/src/contrib/ast/src/lib/libcmd/comm.c | 203 + usr/src/contrib/ast/src/lib/libcmd/cp.c | 1013 + usr/src/contrib/ast/src/lib/libcmd/cut.c | 700 + usr/src/contrib/ast/src/lib/libcmd/date.c | 515 + usr/src/contrib/ast/src/lib/libcmd/dirname.c | 139 + usr/src/contrib/ast/src/lib/libcmd/expr.c | 535 + usr/src/contrib/ast/src/lib/libcmd/fds.c | 360 + usr/src/contrib/ast/src/lib/libcmd/features/ids | 9 + .../contrib/ast/src/lib/libcmd/features/sockets | 3 + .../contrib/ast/src/lib/libcmd/features/symlink | 23 + .../contrib/ast/src/lib/libcmd/features/utsname | 15 + usr/src/contrib/ast/src/lib/libcmd/fmt.c | 635 + usr/src/contrib/ast/src/lib/libcmd/fold.c | 240 + usr/src/contrib/ast/src/lib/libcmd/fts_fix.c | 57 + usr/src/contrib/ast/src/lib/libcmd/fts_fix.h | 49 + usr/src/contrib/ast/src/lib/libcmd/getconf.c | 405 + usr/src/contrib/ast/src/lib/libcmd/head.c | 150 + usr/src/contrib/ast/src/lib/libcmd/id.c | 472 + usr/src/contrib/ast/src/lib/libcmd/join.c | 984 + usr/src/contrib/ast/src/lib/libcmd/lib.c | 25 + usr/src/contrib/ast/src/lib/libcmd/ln.c | 35 + usr/src/contrib/ast/src/lib/libcmd/logname.c | 78 + usr/src/contrib/ast/src/lib/libcmd/md5sum.c | 35 + usr/src/contrib/ast/src/lib/libcmd/mkdir.c | 189 + usr/src/contrib/ast/src/lib/libcmd/mkfifo.c | 96 + usr/src/contrib/ast/src/lib/libcmd/mktemp.c | 169 + usr/src/contrib/ast/src/lib/libcmd/mv.c | 35 + usr/src/contrib/ast/src/lib/libcmd/paste.c | 288 + usr/src/contrib/ast/src/lib/libcmd/pathchk.c | 265 + usr/src/contrib/ast/src/lib/libcmd/pids.c | 124 + usr/src/contrib/ast/src/lib/libcmd/rev.c | 168 + usr/src/contrib/ast/src/lib/libcmd/rev.h | 34 + usr/src/contrib/ast/src/lib/libcmd/revlib.c | 112 + usr/src/contrib/ast/src/lib/libcmd/rm.c | 417 + usr/src/contrib/ast/src/lib/libcmd/rmdir.c | 126 + usr/src/contrib/ast/src/lib/libcmd/stty.c | 971 + usr/src/contrib/ast/src/lib/libcmd/sum.c | 35 + usr/src/contrib/ast/src/lib/libcmd/sync.c | 79 + usr/src/contrib/ast/src/lib/libcmd/tail.c | 787 + usr/src/contrib/ast/src/lib/libcmd/tee.c | 204 + usr/src/contrib/ast/src/lib/libcmd/tty.c | 105 + usr/src/contrib/ast/src/lib/libcmd/uname.c | 514 + usr/src/contrib/ast/src/lib/libcmd/uniq.c | 342 + usr/src/contrib/ast/src/lib/libcmd/vmstate.c | 198 + usr/src/contrib/ast/src/lib/libcmd/wc.c | 188 + usr/src/contrib/ast/src/lib/libcmd/wc.h | 59 + usr/src/contrib/ast/src/lib/libcmd/wclib.c | 523 + usr/src/contrib/ast/src/lib/libdll/Makefile | 17 + usr/src/contrib/ast/src/lib/libdll/Mamfile | 322 + usr/src/contrib/ast/src/lib/libdll/RELEASE | 53 + usr/src/contrib/ast/src/lib/libdll/dlfcn.c | 534 + usr/src/contrib/ast/src/lib/libdll/dll_lib.c | 188 + usr/src/contrib/ast/src/lib/libdll/dllcheck.c | 85 + usr/src/contrib/ast/src/lib/libdll/dllerror.c | 52 + usr/src/contrib/ast/src/lib/libdll/dllfind.c | 46 + usr/src/contrib/ast/src/lib/libdll/dlllib.h | 34 + usr/src/contrib/ast/src/lib/libdll/dlllook.c | 49 + usr/src/contrib/ast/src/lib/libdll/dllnext.c | 223 + usr/src/contrib/ast/src/lib/libdll/dllopen.c | 93 + usr/src/contrib/ast/src/lib/libdll/dllplug.c | 126 + usr/src/contrib/ast/src/lib/libdll/dllscan.c | 526 + usr/src/contrib/ast/src/lib/libdll/features/dll | 263 + usr/src/contrib/ast/src/lib/libpp/BUGS | 6 + usr/src/contrib/ast/src/lib/libpp/HISTORY | 220 + usr/src/contrib/ast/src/lib/libpp/Makefile | 196 + usr/src/contrib/ast/src/lib/libpp/Mamfile | 811 + usr/src/contrib/ast/src/lib/libpp/NOTES | 83 + usr/src/contrib/ast/src/lib/libpp/RELEASE | 460 + usr/src/contrib/ast/src/lib/libpp/gentab.sh | 234 + usr/src/contrib/ast/src/lib/libpp/pp.3 | 890 + usr/src/contrib/ast/src/lib/libpp/pp.def | 283 + usr/src/contrib/ast/src/lib/libpp/pp.h | 452 + usr/src/contrib/ast/src/lib/libpp/pp.key | 117 + usr/src/contrib/ast/src/lib/libpp/pp.probe | 1237 + usr/src/contrib/ast/src/lib/libpp/pp.tab | 233 + usr/src/contrib/ast/src/lib/libpp/ppargs.c | 611 + usr/src/contrib/ast/src/lib/libpp/ppbuiltin.c | 405 + usr/src/contrib/ast/src/lib/libpp/ppcall.c | 458 + usr/src/contrib/ast/src/lib/libpp/ppcomment.c | 35 + usr/src/contrib/ast/src/lib/libpp/ppcontext.c | 65 + usr/src/contrib/ast/src/lib/libpp/ppcontrol.c | 2315 ++ usr/src/contrib/ast/src/lib/libpp/ppcpp.c | 30 + usr/src/contrib/ast/src/lib/libpp/ppdata.c | 180 + usr/src/contrib/ast/src/lib/libpp/pperror.c | 38 + usr/src/contrib/ast/src/lib/libpp/ppexpr.c | 697 + usr/src/contrib/ast/src/lib/libpp/ppfsm.c | 946 + usr/src/contrib/ast/src/lib/libpp/ppfsm.h | 278 + usr/src/contrib/ast/src/lib/libpp/ppincref.c | 49 + usr/src/contrib/ast/src/lib/libpp/ppinput.c | 716 + usr/src/contrib/ast/src/lib/libpp/ppkey.c | 118 + usr/src/contrib/ast/src/lib/libpp/ppkey.h | 146 + usr/src/contrib/ast/src/lib/libpp/pplex.c | 2447 ++ usr/src/contrib/ast/src/lib/libpp/pplib.h | 857 + usr/src/contrib/ast/src/lib/libpp/ppline.c | 86 + usr/src/contrib/ast/src/lib/libpp/ppmacref.c | 58 + usr/src/contrib/ast/src/lib/libpp/ppmisc.c | 242 + usr/src/contrib/ast/src/lib/libpp/ppop.c | 1607 ++ usr/src/contrib/ast/src/lib/libpp/pppragma.c | 66 + usr/src/contrib/ast/src/lib/libpp/ppprintf.c | 45 + usr/src/contrib/ast/src/lib/libpp/ppproto.c | 2617 +++ usr/src/contrib/ast/src/lib/libpp/ppsearch.c | 836 + usr/src/contrib/ast/src/lib/libpp/ppsym.c | 94 + usr/src/contrib/ast/src/lib/libpp/pptrace.c | 264 + usr/src/contrib/ast/src/lib/libpp/probe.win32 | 412 + usr/src/contrib/ast/src/lib/libsum/Makefile | 11 + usr/src/contrib/ast/src/lib/libsum/Mamfile | 247 + usr/src/contrib/ast/src/lib/libsum/RELEASE | 16 + usr/src/contrib/ast/src/lib/libsum/features/sum | 4 + usr/src/contrib/ast/src/lib/libsum/sum-ast4.c | 120 + usr/src/contrib/ast/src/lib/libsum/sum-att.c | 124 + usr/src/contrib/ast/src/lib/libsum/sum-bsd.c | 48 + usr/src/contrib/ast/src/lib/libsum/sum-crc.c | 333 + usr/src/contrib/ast/src/lib/libsum/sum-lmd.c | 330 + usr/src/contrib/ast/src/lib/libsum/sum-md5.c | 355 + usr/src/contrib/ast/src/lib/libsum/sum-prng.c | 113 + usr/src/contrib/ast/src/lib/libsum/sum-sha1.c | 323 + usr/src/contrib/ast/src/lib/libsum/sum-sha2.c | 1229 + usr/src/contrib/ast/src/lib/libsum/sum.h | 65 + usr/src/contrib/ast/src/lib/libsum/sumlib.c | 374 + usr/src/lib/Makefile | 27 +- usr/src/lib/Makefile.asthdr | 85 - usr/src/lib/Makefile.astmsg | 95 - usr/src/lib/libast/Makefile | 159 - usr/src/lib/libast/Makefile.com | 767 - usr/src/lib/libast/THIRDPARTYLICENSE | 245 - usr/src/lib/libast/THIRDPARTYLICENSE.descrip | 1 - usr/src/lib/libast/amd64/Makefile | 45 - usr/src/lib/libast/amd64/include/ast/align.h | 54 - usr/src/lib/libast/amd64/include/ast/ast.h | 388 - usr/src/lib/libast/amd64/include/ast/ast_botch.h | 26 - usr/src/lib/libast/amd64/include/ast/ast_ccode.h | 50 - usr/src/lib/libast/amd64/include/ast/ast_common.h | 220 - usr/src/lib/libast/amd64/include/ast/ast_dir.h | 86 - usr/src/lib/libast/amd64/include/ast/ast_dirent.h | 103 - usr/src/lib/libast/amd64/include/ast/ast_fcntl.h | 135 - usr/src/lib/libast/amd64/include/ast/ast_float.h | 236 - usr/src/lib/libast/amd64/include/ast/ast_fs.h | 163 - usr/src/lib/libast/amd64/include/ast/ast_getopt.h | 25 - usr/src/lib/libast/amd64/include/ast/ast_iconv.h | 153 - usr/src/lib/libast/amd64/include/ast/ast_lib.h | 182 - usr/src/lib/libast/amd64/include/ast/ast_limits.h | 128 - usr/src/lib/libast/amd64/include/ast/ast_map.h | 471 - usr/src/lib/libast/amd64/include/ast/ast_mmap.h | 48 - usr/src/lib/libast/amd64/include/ast/ast_mode.h | 35 - usr/src/lib/libast/amd64/include/ast/ast_namval.h | 51 - usr/src/lib/libast/amd64/include/ast/ast_ndbm.h | 30 - .../lib/libast/amd64/include/ast/ast_nl_types.h | 123 - usr/src/lib/libast/amd64/include/ast/ast_param.h | 30 - .../lib/libast/amd64/include/ast/ast_standards.h | 31 - usr/src/lib/libast/amd64/include/ast/ast_std.h | 374 - usr/src/lib/libast/amd64/include/ast/ast_stdio.h | 608 - usr/src/lib/libast/amd64/include/ast/ast_sys.h | 171 - usr/src/lib/libast/amd64/include/ast/ast_time.h | 104 - usr/src/lib/libast/amd64/include/ast/ast_tty.h | 155 - usr/src/lib/libast/amd64/include/ast/ast_version.h | 10 - usr/src/lib/libast/amd64/include/ast/ast_vfork.h | 89 - usr/src/lib/libast/amd64/include/ast/ast_wait.h | 32 - usr/src/lib/libast/amd64/include/ast/ast_wchar.h | 208 - usr/src/lib/libast/amd64/include/ast/ast_windows.h | 48 - usr/src/lib/libast/amd64/include/ast/bytesex.h | 43 - usr/src/lib/libast/amd64/include/ast/ccode.h | 101 - usr/src/lib/libast/amd64/include/ast/cdt.h | 311 - usr/src/lib/libast/amd64/include/ast/debug.h | 120 - usr/src/lib/libast/amd64/include/ast/dirent.h | 22 - usr/src/lib/libast/amd64/include/ast/dt.h | 49 - usr/src/lib/libast/amd64/include/ast/endian.h | 54 - usr/src/lib/libast/amd64/include/ast/error.h | 196 - usr/src/lib/libast/amd64/include/ast/find.h | 97 - usr/src/lib/libast/amd64/include/ast/fnmatch.h | 71 - usr/src/lib/libast/amd64/include/ast/fnv.h | 81 - usr/src/lib/libast/amd64/include/ast/fs3d.h | 123 - usr/src/lib/libast/amd64/include/ast/fts.h | 173 - usr/src/lib/libast/amd64/include/ast/ftw.h | 71 - usr/src/lib/libast/amd64/include/ast/ftwalk.h | 135 - usr/src/lib/libast/amd64/include/ast/getopt.h | 60 - usr/src/lib/libast/amd64/include/ast/glob.h | 155 - usr/src/lib/libast/amd64/include/ast/hash.h | 213 - usr/src/lib/libast/amd64/include/ast/hashkey.h | 73 - usr/src/lib/libast/amd64/include/ast/hashpart.h | 60 - usr/src/lib/libast/amd64/include/ast/iconv.h | 22 - usr/src/lib/libast/amd64/include/ast/ip6.h | 28 - usr/src/lib/libast/amd64/include/ast/lc.h | 162 - usr/src/lib/libast/amd64/include/ast/ls.h | 99 - usr/src/lib/libast/amd64/include/ast/magic.h | 96 - usr/src/lib/libast/amd64/include/ast/magicid.h | 55 - usr/src/lib/libast/amd64/include/ast/mc.h | 107 - usr/src/lib/libast/amd64/include/ast/mime.h | 102 - usr/src/lib/libast/amd64/include/ast/mnt.h | 69 - usr/src/lib/libast/amd64/include/ast/modecanon.h | 74 - usr/src/lib/libast/amd64/include/ast/modex.h | 62 - usr/src/lib/libast/amd64/include/ast/namval.h | 51 - usr/src/lib/libast/amd64/include/ast/nl_types.h | 22 - usr/src/lib/libast/amd64/include/ast/option.h | 120 - usr/src/lib/libast/amd64/include/ast/preroot.h | 27 - usr/src/lib/libast/amd64/include/ast/proc.h | 115 - usr/src/lib/libast/amd64/include/ast/prototyped.h | 59 - usr/src/lib/libast/amd64/include/ast/re_comp.h | 52 - usr/src/lib/libast/amd64/include/ast/recfmt.h | 94 - usr/src/lib/libast/amd64/include/ast/regex.h | 230 - usr/src/lib/libast/amd64/include/ast/regexp.h | 139 - usr/src/lib/libast/amd64/include/ast/sfdisc.h | 82 - usr/src/lib/libast/amd64/include/ast/sfio.h | 455 - usr/src/lib/libast/amd64/include/ast/sfio_s.h | 51 - usr/src/lib/libast/amd64/include/ast/sfio_t.h | 126 - usr/src/lib/libast/amd64/include/ast/shcmd.h | 104 - usr/src/lib/libast/amd64/include/ast/sig.h | 159 - usr/src/lib/libast/amd64/include/ast/stack.h | 94 - usr/src/lib/libast/amd64/include/ast/stak.h | 64 - usr/src/lib/libast/amd64/include/ast/stdio.h | 22 - usr/src/lib/libast/amd64/include/ast/stk.h | 92 - usr/src/lib/libast/amd64/include/ast/swap.h | 64 - usr/src/lib/libast/amd64/include/ast/tar.h | 127 - usr/src/lib/libast/amd64/include/ast/times.h | 65 - usr/src/lib/libast/amd64/include/ast/tm.h | 206 - usr/src/lib/libast/amd64/include/ast/tmx.h | 151 - usr/src/lib/libast/amd64/include/ast/tok.h | 58 - usr/src/lib/libast/amd64/include/ast/tv.h | 132 - usr/src/lib/libast/amd64/include/ast/usage.h | 37 - usr/src/lib/libast/amd64/include/ast/vdb.h | 55 - usr/src/lib/libast/amd64/include/ast/vecargs.h | 56 - usr/src/lib/libast/amd64/include/ast/vmalloc.h | 321 - usr/src/lib/libast/amd64/include/ast/wait.h | 107 - usr/src/lib/libast/amd64/include/ast/wchar.h | 22 - usr/src/lib/libast/amd64/include/ast/wordexp.h | 74 - .../lib/libast/amd64/src/lib/libast/FEATURE/align | 33 - .../lib/libast/amd64/src/lib/libast/FEATURE/botch | 5 - .../lib/libast/amd64/src/lib/libast/FEATURE/ccode | 29 - .../lib/libast/amd64/src/lib/libast/FEATURE/common | 200 - .../lib/libast/amd64/src/lib/libast/FEATURE/dirent | 82 - .../libast/amd64/src/lib/libast/FEATURE/eaccess | 5 - .../lib/libast/amd64/src/lib/libast/FEATURE/errno | 7 - .../lib/libast/amd64/src/lib/libast/FEATURE/fcntl | 114 - .../lib/libast/amd64/src/lib/libast/FEATURE/float | 215 - usr/src/lib/libast/amd64/src/lib/libast/FEATURE/fs | 142 - .../lib/libast/amd64/src/lib/libast/FEATURE/hack | 5 - .../lib/libast/amd64/src/lib/libast/FEATURE/iconv | 132 - .../lib/libast/amd64/src/lib/libast/FEATURE/isoc99 | 11 - .../lib/libast/amd64/src/lib/libast/FEATURE/lib | 161 - .../libast/amd64/src/lib/libast/FEATURE/libpath | 6 - .../lib/libast/amd64/src/lib/libast/FEATURE/limits | 107 - .../lib/libast/amd64/src/lib/libast/FEATURE/map | 450 - .../lib/libast/amd64/src/lib/libast/FEATURE/mmap | 27 - .../lib/libast/amd64/src/lib/libast/FEATURE/mode | 14 - .../lib/libast/amd64/src/lib/libast/FEATURE/ndbm | 9 - .../libast/amd64/src/lib/libast/FEATURE/nl_types | 102 - .../libast/amd64/src/lib/libast/FEATURE/omitted | 5 - .../libast/amd64/src/lib/libast/FEATURE/options | 5 - .../lib/libast/amd64/src/lib/libast/FEATURE/param | 9 - .../libast/amd64/src/lib/libast/FEATURE/preroot | 6 - .../lib/libast/amd64/src/lib/libast/FEATURE/prog | 7 - .../lib/libast/amd64/src/lib/libast/FEATURE/sfinit | 5332 ----- .../lib/libast/amd64/src/lib/libast/FEATURE/sfio | 16 - .../lib/libast/amd64/src/lib/libast/FEATURE/sig | 138 - .../libast/amd64/src/lib/libast/FEATURE/siglist | 128 - .../lib/libast/amd64/src/lib/libast/FEATURE/signal | 175 - .../libast/amd64/src/lib/libast/FEATURE/standards | 10 - .../lib/libast/amd64/src/lib/libast/FEATURE/stdio | 587 - .../lib/libast/amd64/src/lib/libast/FEATURE/sys | 150 - .../lib/libast/amd64/src/lib/libast/FEATURE/time | 83 - .../lib/libast/amd64/src/lib/libast/FEATURE/tmlib | 71 - .../lib/libast/amd64/src/lib/libast/FEATURE/tmx | 130 - .../lib/libast/amd64/src/lib/libast/FEATURE/tty | 134 - usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tv | 111 - .../lib/libast/amd64/src/lib/libast/FEATURE/tvlib | 19 - .../lib/libast/amd64/src/lib/libast/FEATURE/uwin | 17 - .../lib/libast/amd64/src/lib/libast/FEATURE/vfork | 68 - .../libast/amd64/src/lib/libast/FEATURE/vmalloc | 36 - .../lib/libast/amd64/src/lib/libast/FEATURE/wait | 11 - .../lib/libast/amd64/src/lib/libast/FEATURE/wchar | 187 - usr/src/lib/libast/amd64/src/lib/libast/align.h | 33 - .../lib/libast/amd64/src/lib/libast/ast_botch.h | 5 - .../lib/libast/amd64/src/lib/libast/ast_ccode.h | 29 - .../lib/libast/amd64/src/lib/libast/ast_common.h | 199 - .../lib/libast/amd64/src/lib/libast/ast_dirent.h | 82 - .../lib/libast/amd64/src/lib/libast/ast_fcntl.h | 114 - .../lib/libast/amd64/src/lib/libast/ast_float.h | 215 - usr/src/lib/libast/amd64/src/lib/libast/ast_fs.h | 142 - .../lib/libast/amd64/src/lib/libast/ast_iconv.h | 132 - usr/src/lib/libast/amd64/src/lib/libast/ast_lib.h | 161 - .../lib/libast/amd64/src/lib/libast/ast_limits.h | 107 - usr/src/lib/libast/amd64/src/lib/libast/ast_map.h | 450 - usr/src/lib/libast/amd64/src/lib/libast/ast_mmap.h | 27 - usr/src/lib/libast/amd64/src/lib/libast/ast_mode.h | 14 - .../lib/libast/amd64/src/lib/libast/ast_namval.h | 42 - usr/src/lib/libast/amd64/src/lib/libast/ast_ndbm.h | 9 - .../lib/libast/amd64/src/lib/libast/ast_nl_types.h | 102 - .../lib/libast/amd64/src/lib/libast/ast_param.h | 9 - .../libast/amd64/src/lib/libast/ast_standards.h | 10 - .../lib/libast/amd64/src/lib/libast/ast_stdio.h | 587 - usr/src/lib/libast/amd64/src/lib/libast/ast_sys.h | 150 - usr/src/lib/libast/amd64/src/lib/libast/ast_time.h | 83 - usr/src/lib/libast/amd64/src/lib/libast/ast_tty.h | 134 - .../lib/libast/amd64/src/lib/libast/ast_vfork.h | 68 - usr/src/lib/libast/amd64/src/lib/libast/ast_wait.h | 11 - .../lib/libast/amd64/src/lib/libast/ast_wchar.h | 187 - usr/src/lib/libast/amd64/src/lib/libast/conftab.c | 392 - usr/src/lib/libast/amd64/src/lib/libast/conftab.h | 94 - usr/src/lib/libast/amd64/src/lib/libast/lc.h | 162 - usr/src/lib/libast/amd64/src/lib/libast/lctab.c | 2634 --- usr/src/lib/libast/amd64/src/lib/libast/preroot.h | 6 - usr/src/lib/libast/amd64/src/lib/libast/sig.h | 138 - usr/src/lib/libast/amd64/src/lib/libast/tmx.h | 130 - usr/src/lib/libast/amd64/src/lib/libast/tv.h | 111 - usr/src/lib/libast/common/README | 95 - usr/src/lib/libast/common/RELEASE | 1620 -- usr/src/lib/libast/common/cdt/dtclose.c | 69 - usr/src/lib/libast/common/cdt/dtdisc.c | 129 - usr/src/lib/libast/common/cdt/dtextract.c | 55 - usr/src/lib/libast/common/cdt/dtflatten.c | 75 - usr/src/lib/libast/common/cdt/dthash.c | 368 - usr/src/lib/libast/common/cdt/dthdr.h | 84 - usr/src/lib/libast/common/cdt/dtlist.c | 196 - usr/src/lib/libast/common/cdt/dtmethod.c | 107 - usr/src/lib/libast/common/cdt/dtnew.c | 73 - usr/src/lib/libast/common/cdt/dtopen.c | 109 - usr/src/lib/libast/common/cdt/dtrenew.c | 79 - usr/src/lib/libast/common/cdt/dtrestore.c | 88 - usr/src/lib/libast/common/cdt/dtsize.c | 61 - usr/src/lib/libast/common/cdt/dtstat.c | 132 - usr/src/lib/libast/common/cdt/dtstrhash.c | 61 - usr/src/lib/libast/common/cdt/dttree.c | 391 - usr/src/lib/libast/common/cdt/dttreeset.c | 83 - usr/src/lib/libast/common/cdt/dtview.c | 155 - usr/src/lib/libast/common/cdt/dtwalk.c | 52 - usr/src/lib/libast/common/comp/atexit.c | 115 - usr/src/lib/libast/common/comp/basename.c | 55 - usr/src/lib/libast/common/comp/catopen.c | 178 - usr/src/lib/libast/common/comp/closelog.c | 51 - usr/src/lib/libast/common/comp/conf.sh | 1609 -- usr/src/lib/libast/common/comp/conf.tab | 587 - usr/src/lib/libast/common/comp/creat64.c | 38 - usr/src/lib/libast/common/comp/dirname.c | 61 - usr/src/lib/libast/common/comp/dup2.c | 46 - usr/src/lib/libast/common/comp/eaccess.c | 139 - usr/src/lib/libast/common/comp/errno.c | 40 - usr/src/lib/libast/common/comp/execlp.c | 50 - usr/src/lib/libast/common/comp/execve.c | 70 - usr/src/lib/libast/common/comp/execvp.c | 50 - usr/src/lib/libast/common/comp/execvpe.c | 78 - usr/src/lib/libast/common/comp/fcntl.c | 98 - usr/src/lib/libast/common/comp/fmtmsglib.c | 335 - usr/src/lib/libast/common/comp/fnmatch.c | 79 - usr/src/lib/libast/common/comp/fnmatch.h | 60 - usr/src/lib/libast/common/comp/frexp.c | 153 - usr/src/lib/libast/common/comp/frexpl.c | 161 - usr/src/lib/libast/common/comp/fsync.c | 46 - usr/src/lib/libast/common/comp/ftw.c | 50 - usr/src/lib/libast/common/comp/ftw.h | 60 - usr/src/lib/libast/common/comp/getdate.c | 83 - usr/src/lib/libast/common/comp/getgroups.c | 78 - usr/src/lib/libast/common/comp/getlogin.c | 42 - usr/src/lib/libast/common/comp/getopt.c | 78 - usr/src/lib/libast/common/comp/getopt.h | 51 - usr/src/lib/libast/common/comp/getoptl.c | 151 - usr/src/lib/libast/common/comp/getpgrp.c | 47 - usr/src/lib/libast/common/comp/getsubopt.c | 84 - usr/src/lib/libast/common/comp/getwd.c | 37 - usr/src/lib/libast/common/comp/gross.c | 99 - usr/src/lib/libast/common/comp/hsearch.c | 138 - usr/src/lib/libast/common/comp/iconv.c | 1496 -- usr/src/lib/libast/common/comp/killpg.c | 40 - usr/src/lib/libast/common/comp/libgen.h | 52 - usr/src/lib/libast/common/comp/link.c | 47 - usr/src/lib/libast/common/comp/localeconv.c | 96 - usr/src/lib/libast/common/comp/lstat.c | 39 - usr/src/lib/libast/common/comp/memccpy.c | 51 - usr/src/lib/libast/common/comp/memchr.c | 49 - usr/src/lib/libast/common/comp/memcmp.c | 45 - usr/src/lib/libast/common/comp/memcpy.c | 60 - usr/src/lib/libast/common/comp/memmove.c | 53 - usr/src/lib/libast/common/comp/memset.c | 42 - usr/src/lib/libast/common/comp/mkdir.c | 62 - usr/src/lib/libast/common/comp/mkfifo.c | 50 - usr/src/lib/libast/common/comp/mknod.c | 50 - usr/src/lib/libast/common/comp/mktemp.c | 85 - usr/src/lib/libast/common/comp/mktime.c | 77 - usr/src/lib/libast/common/comp/mount.c | 49 - usr/src/lib/libast/common/comp/nftw.c | 61 - usr/src/lib/libast/common/comp/omitted.c | 1069 - usr/src/lib/libast/common/comp/open.c | 119 - usr/src/lib/libast/common/comp/openlog.c | 58 - usr/src/lib/libast/common/comp/putenv.c | 53 - usr/src/lib/libast/common/comp/re_comp.c | 81 - usr/src/lib/libast/common/comp/re_comp.h | 41 - usr/src/lib/libast/common/comp/readlink.c | 61 - usr/src/lib/libast/common/comp/realpath.c | 48 - usr/src/lib/libast/common/comp/regcmp.c | 211 - usr/src/lib/libast/common/comp/regexp.c | 123 - usr/src/lib/libast/common/comp/regexp.h | 129 - usr/src/lib/libast/common/comp/remove.c | 49 - usr/src/lib/libast/common/comp/rename.c | 98 - usr/src/lib/libast/common/comp/resolvepath.c | 70 - usr/src/lib/libast/common/comp/rmdir.c | 66 - usr/src/lib/libast/common/comp/setenv.c | 58 - usr/src/lib/libast/common/comp/setlocale.c | 1184 - usr/src/lib/libast/common/comp/setlogmask.c | 48 - usr/src/lib/libast/common/comp/setpgid.c | 80 - usr/src/lib/libast/common/comp/setsid.c | 90 - usr/src/lib/libast/common/comp/sigflag.c | 52 - usr/src/lib/libast/common/comp/sigunblock.c | 63 - usr/src/lib/libast/common/comp/spawnveg.c | 274 - usr/src/lib/libast/common/comp/statvfs.c | 163 - usr/src/lib/libast/common/comp/strcasecmp.c | 58 - usr/src/lib/libast/common/comp/strchr.c | 57 - usr/src/lib/libast/common/comp/strftime.c | 104 - usr/src/lib/libast/common/comp/strncasecmp.c | 62 - usr/src/lib/libast/common/comp/strptime.c | 82 - usr/src/lib/libast/common/comp/strrchr.c | 60 - usr/src/lib/libast/common/comp/strstr.c | 76 - usr/src/lib/libast/common/comp/strtod.c | 31 - usr/src/lib/libast/common/comp/strtol.c | 34 - usr/src/lib/libast/common/comp/strtold.c | 50 - usr/src/lib/libast/common/comp/strtoll.c | 44 - usr/src/lib/libast/common/comp/strtoul.c | 35 - usr/src/lib/libast/common/comp/strtoull.c | 45 - usr/src/lib/libast/common/comp/swab.c | 60 - usr/src/lib/libast/common/comp/symlink.c | 59 - usr/src/lib/libast/common/comp/syslog.c | 367 - usr/src/lib/libast/common/comp/system.c | 55 - usr/src/lib/libast/common/comp/tempnam.c | 58 - usr/src/lib/libast/common/comp/tmpnam.c | 51 - usr/src/lib/libast/common/comp/transition.c | 86 - usr/src/lib/libast/common/comp/tsearch.c | 238 - usr/src/lib/libast/common/comp/unlink.c | 38 - usr/src/lib/libast/common/comp/unsetenv.c | 50 - usr/src/lib/libast/common/comp/vfork.c | 55 - usr/src/lib/libast/common/comp/waitpid.c | 199 - usr/src/lib/libast/common/comp/wc.c | 139 - usr/src/lib/libast/common/comp/wordexp.c | 217 - usr/src/lib/libast/common/comp/wordexp.h | 63 - usr/src/lib/libast/common/dir/dirlib.h | 174 - usr/src/lib/libast/common/dir/getdents.c | 166 - usr/src/lib/libast/common/dir/opendir.c | 95 - usr/src/lib/libast/common/dir/readdir.c | 61 - usr/src/lib/libast/common/dir/rewinddir.c | 46 - usr/src/lib/libast/common/dir/seekdir.c | 56 - usr/src/lib/libast/common/dir/telldir.c | 43 - usr/src/lib/libast/common/disc/memfatal.c | 80 - usr/src/lib/libast/common/disc/sfdcdio.c | 229 - usr/src/lib/libast/common/disc/sfdcdos.c | 416 - usr/src/lib/libast/common/disc/sfdcfilter.c | 186 - usr/src/lib/libast/common/disc/sfdchdr.h | 28 - usr/src/lib/libast/common/disc/sfdcmore.c | 369 - usr/src/lib/libast/common/disc/sfdcprefix.c | 153 - usr/src/lib/libast/common/disc/sfdcseekable.c | 227 - usr/src/lib/libast/common/disc/sfdcslow.c | 83 - usr/src/lib/libast/common/disc/sfdcsubstr.c | 217 - usr/src/lib/libast/common/disc/sfdctee.c | 102 - usr/src/lib/libast/common/disc/sfdcunion.c | 203 - usr/src/lib/libast/common/disc/sfkeyprintf.c | 388 - usr/src/lib/libast/common/disc/sfstrtmp.c | 62 - usr/src/lib/libast/common/features/align.c | 167 - usr/src/lib/libast/common/features/botch.c | 72 - usr/src/lib/libast/common/features/ccode | 81 - usr/src/lib/libast/common/features/common | 540 - usr/src/lib/libast/common/features/dirent | 275 - usr/src/lib/libast/common/features/eaccess | 11 - usr/src/lib/libast/common/features/errno | 31 - usr/src/lib/libast/common/features/fcntl.c | 360 - usr/src/lib/libast/common/features/float | 1191 - usr/src/lib/libast/common/features/fs | 237 - usr/src/lib/libast/common/features/hack | 1 - usr/src/lib/libast/common/features/iconv | 98 - usr/src/lib/libast/common/features/isoc99 | 13 - usr/src/lib/libast/common/features/lib | 663 - usr/src/lib/libast/common/features/libpath.sh | 73 - usr/src/lib/libast/common/features/limits.c | 339 - usr/src/lib/libast/common/features/map.c | 543 - usr/src/lib/libast/common/features/mmap | 342 - usr/src/lib/libast/common/features/mode.c | 218 - usr/src/lib/libast/common/features/ndbm | 29 - usr/src/lib/libast/common/features/nl_types | 64 - usr/src/lib/libast/common/features/omitted | 110 - usr/src/lib/libast/common/features/options | 1 - usr/src/lib/libast/common/features/param.sh | 47 - usr/src/lib/libast/common/features/preroot.sh | 46 - usr/src/lib/libast/common/features/sfinit.c | 94 - usr/src/lib/libast/common/features/sfio | 160 - usr/src/lib/libast/common/features/sig.sh | 132 - usr/src/lib/libast/common/features/siglist | 14 - usr/src/lib/libast/common/features/signal.c | 371 - usr/src/lib/libast/common/features/standards | 153 - usr/src/lib/libast/common/features/stdio | 568 - usr/src/lib/libast/common/features/sys | 272 - usr/src/lib/libast/common/features/time | 46 - usr/src/lib/libast/common/features/tmlib | 45 - usr/src/lib/libast/common/features/tmx | 106 - usr/src/lib/libast/common/features/tty | 127 - usr/src/lib/libast/common/features/tv | 81 - usr/src/lib/libast/common/features/tvlib | 80 - usr/src/lib/libast/common/features/uwin | 6 - usr/src/lib/libast/common/features/vfork | 13 - usr/src/lib/libast/common/features/vmalloc | 167 - usr/src/lib/libast/common/features/wait | 9 - usr/src/lib/libast/common/features/wchar | 111 - usr/src/lib/libast/common/hash/hashalloc.c | 200 - usr/src/lib/libast/common/hash/hashdump.c | 173 - usr/src/lib/libast/common/hash/hashfree.c | 144 - usr/src/lib/libast/common/hash/hashlast.c | 43 - usr/src/lib/libast/common/hash/hashlib.h | 104 - usr/src/lib/libast/common/hash/hashlook.c | 367 - usr/src/lib/libast/common/hash/hashscan.c | 139 - usr/src/lib/libast/common/hash/hashsize.c | 84 - usr/src/lib/libast/common/hash/hashview.c | 88 - usr/src/lib/libast/common/hash/hashwalk.c | 51 - usr/src/lib/libast/common/hash/memhash.c | 45 - usr/src/lib/libast/common/hash/memsum.c | 53 - usr/src/lib/libast/common/hash/strhash.c | 45 - usr/src/lib/libast/common/hash/strkey.c | 49 - usr/src/lib/libast/common/hash/strsum.c | 53 - usr/src/lib/libast/common/include/ast.h | 369 - usr/src/lib/libast/common/include/ast_dir.h | 77 - usr/src/lib/libast/common/include/ast_getopt.h | 42 - usr/src/lib/libast/common/include/ast_std.h | 358 - usr/src/lib/libast/common/include/ast_version.h | 28 - usr/src/lib/libast/common/include/ast_windows.h | 39 - usr/src/lib/libast/common/include/ccode.h | 90 - usr/src/lib/libast/common/include/cdt.h | 311 - usr/src/lib/libast/common/include/cmdarg.h | 84 - usr/src/lib/libast/common/include/debug.h | 109 - usr/src/lib/libast/common/include/dt.h | 38 - usr/src/lib/libast/common/include/error.h | 182 - usr/src/lib/libast/common/include/find.h | 86 - usr/src/lib/libast/common/include/fnv.h | 72 - usr/src/lib/libast/common/include/fs3d.h | 112 - usr/src/lib/libast/common/include/fts.h | 162 - usr/src/lib/libast/common/include/ftwalk.h | 124 - usr/src/lib/libast/common/include/glob.h | 144 - usr/src/lib/libast/common/include/hash.h | 202 - usr/src/lib/libast/common/include/hashkey.h | 62 - usr/src/lib/libast/common/include/hashpart.h | 51 - usr/src/lib/libast/common/include/ip6.h | 40 - usr/src/lib/libast/common/include/ls.h | 88 - usr/src/lib/libast/common/include/magic.h | 85 - usr/src/lib/libast/common/include/magicid.h | 46 - usr/src/lib/libast/common/include/mc.h | 96 - usr/src/lib/libast/common/include/mime.h | 91 - usr/src/lib/libast/common/include/mnt.h | 58 - usr/src/lib/libast/common/include/modecanon.h | 65 - usr/src/lib/libast/common/include/modex.h | 51 - usr/src/lib/libast/common/include/namval.h | 42 - usr/src/lib/libast/common/include/option.h | 106 - usr/src/lib/libast/common/include/proc.h | 104 - usr/src/lib/libast/common/include/recfmt.h | 83 - usr/src/lib/libast/common/include/regex.h | 246 - usr/src/lib/libast/common/include/sfdisc.h | 71 - usr/src/lib/libast/common/include/sfio.h | 455 - usr/src/lib/libast/common/include/sfio_s.h | 51 - usr/src/lib/libast/common/include/sfio_t.h | 126 - usr/src/lib/libast/common/include/shcmd.h | 93 - usr/src/lib/libast/common/include/stack.h | 83 - usr/src/lib/libast/common/include/stak.h | 55 - usr/src/lib/libast/common/include/stk.h | 78 - usr/src/lib/libast/common/include/swap.h | 53 - usr/src/lib/libast/common/include/tar.h | 118 - usr/src/lib/libast/common/include/times.h | 54 - usr/src/lib/libast/common/include/tm.h | 192 - usr/src/lib/libast/common/include/tok.h | 47 - usr/src/lib/libast/common/include/usage.h | 37 - usr/src/lib/libast/common/include/vdb.h | 46 - usr/src/lib/libast/common/include/vecargs.h | 45 - usr/src/lib/libast/common/include/vmalloc.h | 321 - usr/src/lib/libast/common/include/wait.h | 98 - usr/src/lib/libast/common/man/LIBAST.3 | 98 - usr/src/lib/libast/common/man/ast.3 | 283 - usr/src/lib/libast/common/man/astsa.3 | 161 - usr/src/lib/libast/common/man/cdt.3 | 593 - usr/src/lib/libast/common/man/chr.3 | 126 - usr/src/lib/libast/common/man/compat.3 | 103 - usr/src/lib/libast/common/man/error.3 | 283 - usr/src/lib/libast/common/man/find.3 | 89 - usr/src/lib/libast/common/man/fmt.3 | 213 - usr/src/lib/libast/common/man/fmtls.3 | 143 - usr/src/lib/libast/common/man/fs3d.3 | 92 - usr/src/lib/libast/common/man/ftwalk.3 | 235 - usr/src/lib/libast/common/man/getcwd.3 | 67 - usr/src/lib/libast/common/man/hash.3 | 644 - usr/src/lib/libast/common/man/iblocks.3 | 62 - usr/src/lib/libast/common/man/int.3 | 68 - usr/src/lib/libast/common/man/ip6.3 | 85 - usr/src/lib/libast/common/man/magic.3 | 493 - usr/src/lib/libast/common/man/mem.3 | 98 - usr/src/lib/libast/common/man/mime.3 | 117 - usr/src/lib/libast/common/man/modecanon.3 | 104 - usr/src/lib/libast/common/man/optget.3 | 68 - usr/src/lib/libast/common/man/path.3 | 391 - usr/src/lib/libast/common/man/preroot.3 | 151 - usr/src/lib/libast/common/man/proc.3 | 319 - usr/src/lib/libast/common/man/re.3 | 214 - usr/src/lib/libast/common/man/regex.3 | 163 - usr/src/lib/libast/common/man/setenviron.3 | 79 - usr/src/lib/libast/common/man/sfdisc.3 | 118 - usr/src/lib/libast/common/man/sfio.3 | 2360 -- usr/src/lib/libast/common/man/sig.3 | 75 - usr/src/lib/libast/common/man/spawnveg.3 | 97 - usr/src/lib/libast/common/man/stak.3 | 169 - usr/src/lib/libast/common/man/stk.3 | 165 - usr/src/lib/libast/common/man/strcopy.3 | 54 - usr/src/lib/libast/common/man/strdup.3 | 55 - usr/src/lib/libast/common/man/strelapsed.3 | 77 - usr/src/lib/libast/common/man/strerror.3 | 53 - usr/src/lib/libast/common/man/stresc.3 | 53 - usr/src/lib/libast/common/man/streval.3 | 83 - usr/src/lib/libast/common/man/strgid.3 | 53 - usr/src/lib/libast/common/man/strmatch.3 | 101 - usr/src/lib/libast/common/man/stropt.3 | 130 - usr/src/lib/libast/common/man/strperm.3 | 109 - usr/src/lib/libast/common/man/strsignal.3 | 53 - usr/src/lib/libast/common/man/strsort.3 | 73 - usr/src/lib/libast/common/man/strtape.3 | 86 - usr/src/lib/libast/common/man/strton.3 | 97 - usr/src/lib/libast/common/man/struid.3 | 53 - usr/src/lib/libast/common/man/swap.3 | 138 - usr/src/lib/libast/common/man/tab.3 | 74 - usr/src/lib/libast/common/man/tm.3 | 775 - usr/src/lib/libast/common/man/tmx.3 | 576 - usr/src/lib/libast/common/man/tok.3 | 217 - usr/src/lib/libast/common/man/touch.3 | 68 - usr/src/lib/libast/common/man/tv.3 | 173 - usr/src/lib/libast/common/man/vecargs.3 | 126 - usr/src/lib/libast/common/man/vmalloc.3 | 607 - usr/src/lib/libast/common/misc/astintercept.c | 53 - usr/src/lib/libast/common/misc/cmdarg.c | 353 - usr/src/lib/libast/common/misc/debug.c | 66 - usr/src/lib/libast/common/misc/error.c | 659 - usr/src/lib/libast/common/misc/errorf.c | 41 - usr/src/lib/libast/common/misc/errormsg.c | 41 - usr/src/lib/libast/common/misc/errorx.c | 49 - usr/src/lib/libast/common/misc/fastfind.c | 1303 -- usr/src/lib/libast/common/misc/findlib.h | 123 - usr/src/lib/libast/common/misc/fmtrec.c | 102 - usr/src/lib/libast/common/misc/fs3d.c | 116 - usr/src/lib/libast/common/misc/fts.c | 1588 -- usr/src/lib/libast/common/misc/ftwalk.c | 154 - usr/src/lib/libast/common/misc/ftwflags.c | 35 - usr/src/lib/libast/common/misc/getcwd.c | 290 - usr/src/lib/libast/common/misc/getenv.c | 113 - usr/src/lib/libast/common/misc/glob.c | 821 - usr/src/lib/libast/common/misc/intercepts.h | 40 - usr/src/lib/libast/common/misc/magic.c | 2462 -- usr/src/lib/libast/common/misc/mime.c | 813 - usr/src/lib/libast/common/misc/mimelib.h | 52 - usr/src/lib/libast/common/misc/mimetype.c | 69 - usr/src/lib/libast/common/misc/optctx.c | 70 - usr/src/lib/libast/common/misc/optesc.c | 93 - usr/src/lib/libast/common/misc/optget.c | 5347 ----- usr/src/lib/libast/common/misc/optjoin.c | 123 - usr/src/lib/libast/common/misc/optlib.h | 108 - usr/src/lib/libast/common/misc/procclose.c | 95 - usr/src/lib/libast/common/misc/procfree.c | 43 - usr/src/lib/libast/common/misc/proclib.h | 63 - usr/src/lib/libast/common/misc/procopen.c | 869 - usr/src/lib/libast/common/misc/procrun.c | 49 - usr/src/lib/libast/common/misc/recfmt.c | 165 - usr/src/lib/libast/common/misc/reclen.c | 71 - usr/src/lib/libast/common/misc/recstr.c | 206 - usr/src/lib/libast/common/misc/setenviron.c | 147 - usr/src/lib/libast/common/misc/sigcrit.c | 199 - usr/src/lib/libast/common/misc/sigdata.c | 40 - usr/src/lib/libast/common/misc/signal.c | 136 - usr/src/lib/libast/common/misc/stack.c | 172 - usr/src/lib/libast/common/misc/state.c | 42 - usr/src/lib/libast/common/misc/stk.c | 542 - usr/src/lib/libast/common/misc/systrace.c | 68 - usr/src/lib/libast/common/misc/translate.c | 420 - usr/src/lib/libast/common/misc/univdata.c | 58 - usr/src/lib/libast/common/misc/univlib.h | 93 - usr/src/lib/libast/common/obsolete/spawn.c | 152 - usr/src/lib/libast/common/path/pathaccess.c | 57 - usr/src/lib/libast/common/path/pathbin.c | 46 - usr/src/lib/libast/common/path/pathcanon.c | 207 - usr/src/lib/libast/common/path/pathcat.c | 54 - usr/src/lib/libast/common/path/pathcd.c | 142 - usr/src/lib/libast/common/path/pathcheck.c | 91 - usr/src/lib/libast/common/path/pathexists.c | 134 - usr/src/lib/libast/common/path/pathfind.c | 168 - usr/src/lib/libast/common/path/pathgetlink.c | 102 - usr/src/lib/libast/common/path/pathkey.c | 295 - usr/src/lib/libast/common/path/pathnative.c | 126 - usr/src/lib/libast/common/path/pathpath.c | 111 - usr/src/lib/libast/common/path/pathposix.c | 128 - usr/src/lib/libast/common/path/pathprobe.c | 301 - usr/src/lib/libast/common/path/pathprog.c | 119 - usr/src/lib/libast/common/path/pathrepl.c | 77 - usr/src/lib/libast/common/path/pathsetlink.c | 72 - usr/src/lib/libast/common/path/pathshell.c | 112 - usr/src/lib/libast/common/path/pathstat.c | 45 - usr/src/lib/libast/common/path/pathtemp.c | 337 - usr/src/lib/libast/common/path/pathtmp.c | 41 - usr/src/lib/libast/common/port/astconf.c | 1652 -- usr/src/lib/libast/common/port/astcopy.c | 90 - usr/src/lib/libast/common/port/astdynamic.c | 132 - usr/src/lib/libast/common/port/astlicense.c | 1169 - usr/src/lib/libast/common/port/astmath.c | 72 - usr/src/lib/libast/common/port/astquery.c | 109 - usr/src/lib/libast/common/port/aststatic.c | 44 - usr/src/lib/libast/common/port/astwinsize.c | 143 - usr/src/lib/libast/common/port/iblocks.c | 95 - usr/src/lib/libast/common/port/lc.c | 796 - usr/src/lib/libast/common/port/lc.tab | 275 - usr/src/lib/libast/common/port/lcgen.c | 783 - usr/src/lib/libast/common/port/lclang.h | 62 - usr/src/lib/libast/common/port/lclib.h | 71 - usr/src/lib/libast/common/port/mc.c | 677 - usr/src/lib/libast/common/port/mnt.c | 792 - usr/src/lib/libast/common/port/touch.c | 74 - usr/src/lib/libast/common/preroot/getpreroot.c | 165 - usr/src/lib/libast/common/preroot/ispreroot.c | 71 - usr/src/lib/libast/common/preroot/realopen.c | 47 - usr/src/lib/libast/common/preroot/setpreroot.c | 75 - usr/src/lib/libast/common/regex/regalloc.c | 36 - usr/src/lib/libast/common/regex/regcache.c | 198 - usr/src/lib/libast/common/regex/regclass.c | 243 - usr/src/lib/libast/common/regex/regcoll.c | 304 - usr/src/lib/libast/common/regex/regcomp.c | 3519 --- usr/src/lib/libast/common/regex/regdecomp.c | 448 - usr/src/lib/libast/common/regex/regerror.c | 95 - usr/src/lib/libast/common/regex/regexec.c | 54 - usr/src/lib/libast/common/regex/regfatal.c | 49 - usr/src/lib/libast/common/regex/reginit.c | 412 - usr/src/lib/libast/common/regex/reglib.h | 582 - usr/src/lib/libast/common/regex/regnexec.c | 2046 -- usr/src/lib/libast/common/regex/regrecord.c | 34 - usr/src/lib/libast/common/regex/regrexec.c | 145 - usr/src/lib/libast/common/regex/regstat.c | 46 - usr/src/lib/libast/common/regex/regsub.c | 269 - usr/src/lib/libast/common/regex/regsubcomp.c | 377 - usr/src/lib/libast/common/regex/regsubexec.c | 196 - usr/src/lib/libast/common/regex/ucs_names.h | 6426 ------ usr/src/lib/libast/common/sfio/_sfclrerr.c | 34 - usr/src/lib/libast/common/sfio/_sfdlen.c | 34 - usr/src/lib/libast/common/sfio/_sfeof.c | 34 - usr/src/lib/libast/common/sfio/_sferror.c | 34 - usr/src/lib/libast/common/sfio/_sffileno.c | 34 - usr/src/lib/libast/common/sfio/_sfgetc.c | 34 - usr/src/lib/libast/common/sfio/_sfgetl.c | 42 - usr/src/lib/libast/common/sfio/_sfgetl2.c | 50 - usr/src/lib/libast/common/sfio/_sfgetu.c | 42 - usr/src/lib/libast/common/sfio/_sfgetu2.c | 50 - usr/src/lib/libast/common/sfio/_sfllen.c | 34 - usr/src/lib/libast/common/sfio/_sfopen.c | 219 - usr/src/lib/libast/common/sfio/_sfputc.c | 35 - usr/src/lib/libast/common/sfio/_sfputd.c | 96 - usr/src/lib/libast/common/sfio/_sfputl.c | 89 - usr/src/lib/libast/common/sfio/_sfputm.c | 85 - usr/src/lib/libast/common/sfio/_sfputu.c | 82 - usr/src/lib/libast/common/sfio/_sfslen.c | 33 - usr/src/lib/libast/common/sfio/_sfstacked.c | 34 - usr/src/lib/libast/common/sfio/_sfulen.c | 34 - usr/src/lib/libast/common/sfio/_sfvalue.c | 34 - usr/src/lib/libast/common/sfio/sfclose.c | 170 - usr/src/lib/libast/common/sfio/sfclrlock.c | 63 - usr/src/lib/libast/common/sfio/sfcvt.c | 532 - usr/src/lib/libast/common/sfio/sfdisc.c | 271 - usr/src/lib/libast/common/sfio/sfdlen.c | 58 - usr/src/lib/libast/common/sfio/sfecvt.c | 38 - usr/src/lib/libast/common/sfio/sfexcept.c | 133 - usr/src/lib/libast/common/sfio/sfextern.c | 103 - usr/src/lib/libast/common/sfio/sffcvt.c | 38 - usr/src/lib/libast/common/sfio/sffilbuf.c | 116 - usr/src/lib/libast/common/sfio/sfflsbuf.c | 125 - usr/src/lib/libast/common/sfio/sfgetd.c | 79 - usr/src/lib/libast/common/sfio/sfgetl.c | 70 - usr/src/lib/libast/common/sfio/sfgetm.c | 68 - usr/src/lib/libast/common/sfio/sfgetr.c | 169 - usr/src/lib/libast/common/sfio/sfgetu.c | 67 - usr/src/lib/libast/common/sfio/sfhdr.h | 1272 -- usr/src/lib/libast/common/sfio/sfllen.c | 39 - usr/src/lib/libast/common/sfio/sfmode.c | 595 - usr/src/lib/libast/common/sfio/sfmove.c | 242 - usr/src/lib/libast/common/sfio/sfmutex.c | 69 - usr/src/lib/libast/common/sfio/sfnew.c | 129 - usr/src/lib/libast/common/sfio/sfnotify.c | 38 - usr/src/lib/libast/common/sfio/sfnputc.c | 81 - usr/src/lib/libast/common/sfio/sfopen.c | 40 - usr/src/lib/libast/common/sfio/sfpeek.c | 89 - usr/src/lib/libast/common/sfio/sfpkrd.c | 291 - usr/src/lib/libast/common/sfio/sfpoll.c | 245 - usr/src/lib/libast/common/sfio/sfpool.c | 370 - usr/src/lib/libast/common/sfio/sfpopen.c | 293 - usr/src/lib/libast/common/sfio/sfprintf.c | 115 - usr/src/lib/libast/common/sfio/sfprints.c | 125 - usr/src/lib/libast/common/sfio/sfpurge.c | 98 - usr/src/lib/libast/common/sfio/sfputd.c | 35 - usr/src/lib/libast/common/sfio/sfputl.c | 35 - usr/src/lib/libast/common/sfio/sfputm.c | 36 - usr/src/lib/libast/common/sfio/sfputr.c | 123 - usr/src/lib/libast/common/sfio/sfputu.c | 35 - usr/src/lib/libast/common/sfio/sfraise.c | 107 - usr/src/lib/libast/common/sfio/sfrd.c | 317 - usr/src/lib/libast/common/sfio/sfread.c | 140 - usr/src/lib/libast/common/sfio/sfreserve.c | 210 - usr/src/lib/libast/common/sfio/sfresize.c | 83 - usr/src/lib/libast/common/sfio/sfscanf.c | 102 - usr/src/lib/libast/common/sfio/sfseek.c | 281 - usr/src/lib/libast/common/sfio/sfset.c | 89 - usr/src/lib/libast/common/sfio/sfsetbuf.c | 404 - usr/src/lib/libast/common/sfio/sfsetfd.c | 136 - usr/src/lib/libast/common/sfio/sfsize.c | 109 - usr/src/lib/libast/common/sfio/sfsk.c | 106 - usr/src/lib/libast/common/sfio/sfstack.c | 115 - usr/src/lib/libast/common/sfio/sfstrtod.c | 157 - usr/src/lib/libast/common/sfio/sfstrtof.h | 551 - usr/src/lib/libast/common/sfio/sfswap.c | 119 - usr/src/lib/libast/common/sfio/sfsync.c | 172 - usr/src/lib/libast/common/sfio/sftable.c | 543 - usr/src/lib/libast/common/sfio/sftell.c | 59 - usr/src/lib/libast/common/sfio/sftmp.c | 402 - usr/src/lib/libast/common/sfio/sfungetc.c | 108 - usr/src/lib/libast/common/sfio/sfvprintf.c | 1401 -- usr/src/lib/libast/common/sfio/sfvscanf.c | 1100 - usr/src/lib/libast/common/sfio/sfwalk.c | 67 - usr/src/lib/libast/common/sfio/sfwr.c | 249 - usr/src/lib/libast/common/sfio/sfwrite.c | 171 - usr/src/lib/libast/common/sfio/vthread.h | 219 - usr/src/lib/libast/common/std/bytesex.h | 43 - usr/src/lib/libast/common/std/dirent.h | 22 - usr/src/lib/libast/common/std/endian.h | 54 - usr/src/lib/libast/common/std/iconv.h | 22 - usr/src/lib/libast/common/std/nl_types.h | 22 - usr/src/lib/libast/common/std/stdio.h | 22 - usr/src/lib/libast/common/std/wchar.h | 22 - usr/src/lib/libast/common/stdio/_doprnt.c | 32 - usr/src/lib/libast/common/stdio/_doscan.c | 32 - usr/src/lib/libast/common/stdio/_filbuf.c | 36 - usr/src/lib/libast/common/stdio/_flsbuf.c | 44 - usr/src/lib/libast/common/stdio/_stdfun.c | 80 - usr/src/lib/libast/common/stdio/_stdopen.c | 32 - usr/src/lib/libast/common/stdio/_stdprintf.c | 38 - usr/src/lib/libast/common/stdio/_stdscanf.c | 38 - usr/src/lib/libast/common/stdio/_stdsprnt.c | 38 - usr/src/lib/libast/common/stdio/_stdvbuf.c | 32 - usr/src/lib/libast/common/stdio/_stdvsnprnt.c | 32 - usr/src/lib/libast/common/stdio/_stdvsprnt.c | 32 - usr/src/lib/libast/common/stdio/_stdvsscn.c | 32 - usr/src/lib/libast/common/stdio/asprintf.c | 36 - usr/src/lib/libast/common/stdio/clearerr.c | 33 - usr/src/lib/libast/common/stdio/fclose.c | 32 - usr/src/lib/libast/common/stdio/fcloseall.c | 57 - usr/src/lib/libast/common/stdio/fdopen.c | 34 - usr/src/lib/libast/common/stdio/feof.c | 42 - usr/src/lib/libast/common/stdio/ferror.c | 42 - usr/src/lib/libast/common/stdio/fflush.c | 41 - usr/src/lib/libast/common/stdio/fgetc.c | 32 - usr/src/lib/libast/common/stdio/fgetpos.c | 48 - usr/src/lib/libast/common/stdio/fgets.c | 110 - usr/src/lib/libast/common/stdio/fgetwc.c | 35 - usr/src/lib/libast/common/stdio/fgetws.c | 52 - usr/src/lib/libast/common/stdio/fileno.c | 42 - usr/src/lib/libast/common/stdio/flockfile.c | 32 - usr/src/lib/libast/common/stdio/fmemopen.c | 32 - usr/src/lib/libast/common/stdio/fopen.c | 30 - usr/src/lib/libast/common/stdio/fprintf.c | 39 - usr/src/lib/libast/common/stdio/fpurge.c | 32 - usr/src/lib/libast/common/stdio/fputc.c | 42 - usr/src/lib/libast/common/stdio/fputs.c | 32 - usr/src/lib/libast/common/stdio/fputwc.c | 33 - usr/src/lib/libast/common/stdio/fputws.c | 36 - usr/src/lib/libast/common/stdio/fread.c | 34 - usr/src/lib/libast/common/stdio/freopen.c | 32 - usr/src/lib/libast/common/stdio/fscanf.c | 39 - usr/src/lib/libast/common/stdio/fseek.c | 48 - usr/src/lib/libast/common/stdio/fseeko.c | 48 - usr/src/lib/libast/common/stdio/fsetpos.c | 48 - usr/src/lib/libast/common/stdio/ftell.c | 48 - usr/src/lib/libast/common/stdio/ftello.c | 48 - usr/src/lib/libast/common/stdio/ftrylockfile.c | 32 - usr/src/lib/libast/common/stdio/funlockfile.c | 32 - usr/src/lib/libast/common/stdio/fwide.c | 51 - usr/src/lib/libast/common/stdio/fwprintf.c | 36 - usr/src/lib/libast/common/stdio/fwrite.c | 34 - usr/src/lib/libast/common/stdio/fwscanf.c | 39 - usr/src/lib/libast/common/stdio/getc.c | 42 - usr/src/lib/libast/common/stdio/getchar.c | 40 - usr/src/lib/libast/common/stdio/getdelim.c | 96 - usr/src/lib/libast/common/stdio/getline.c | 36 - usr/src/lib/libast/common/stdio/getw.c | 34 - usr/src/lib/libast/common/stdio/getwc.c | 30 - usr/src/lib/libast/common/stdio/getwchar.c | 30 - usr/src/lib/libast/common/stdio/pclose.c | 32 - usr/src/lib/libast/common/stdio/popen.c | 30 - usr/src/lib/libast/common/stdio/printf.c | 36 - usr/src/lib/libast/common/stdio/putc.c | 42 - usr/src/lib/libast/common/stdio/putchar.c | 40 - usr/src/lib/libast/common/stdio/puts.c | 30 - usr/src/lib/libast/common/stdio/putw.c | 32 - usr/src/lib/libast/common/stdio/putwc.c | 30 - usr/src/lib/libast/common/stdio/putwchar.c | 30 - usr/src/lib/libast/common/stdio/rewind.c | 33 - usr/src/lib/libast/common/stdio/scanf.c | 36 - usr/src/lib/libast/common/stdio/setbuf.c | 32 - usr/src/lib/libast/common/stdio/setbuffer.c | 32 - usr/src/lib/libast/common/stdio/setlinebuf.c | 33 - usr/src/lib/libast/common/stdio/setvbuf.c | 48 - usr/src/lib/libast/common/stdio/snprintf.c | 36 - usr/src/lib/libast/common/stdio/sprintf.c | 36 - usr/src/lib/libast/common/stdio/sscanf.c | 36 - usr/src/lib/libast/common/stdio/stdhdr.h | 115 - usr/src/lib/libast/common/stdio/stdio_c99.c | 118 - usr/src/lib/libast/common/stdio/swprintf.c | 36 - usr/src/lib/libast/common/stdio/swscanf.c | 36 - usr/src/lib/libast/common/stdio/tmpfile.c | 30 - usr/src/lib/libast/common/stdio/ungetc.c | 32 - usr/src/lib/libast/common/stdio/ungetwc.c | 39 - usr/src/lib/libast/common/stdio/vasprintf.c | 45 - usr/src/lib/libast/common/stdio/vfprintf.c | 32 - usr/src/lib/libast/common/stdio/vfscanf.c | 32 - usr/src/lib/libast/common/stdio/vfwprintf.c | 65 - usr/src/lib/libast/common/stdio/vfwscanf.c | 129 - usr/src/lib/libast/common/stdio/vprintf.c | 30 - usr/src/lib/libast/common/stdio/vscanf.c | 30 - usr/src/lib/libast/common/stdio/vsnprintf.c | 55 - usr/src/lib/libast/common/stdio/vsprintf.c | 30 - usr/src/lib/libast/common/stdio/vsscanf.c | 30 - usr/src/lib/libast/common/stdio/vswprintf.c | 55 - usr/src/lib/libast/common/stdio/vswscanf.c | 51 - usr/src/lib/libast/common/stdio/vwprintf.c | 30 - usr/src/lib/libast/common/stdio/vwscanf.c | 30 - usr/src/lib/libast/common/stdio/wprintf.c | 36 - usr/src/lib/libast/common/stdio/wscanf.c | 36 - usr/src/lib/libast/common/string/base64.c | 312 - usr/src/lib/libast/common/string/ccmap.c | 746 - usr/src/lib/libast/common/string/ccmapid.c | 173 - usr/src/lib/libast/common/string/ccnative.c | 56 - usr/src/lib/libast/common/string/chresc.c | 181 - usr/src/lib/libast/common/string/chrtoi.c | 55 - usr/src/lib/libast/common/string/fmtbase.c | 56 - usr/src/lib/libast/common/string/fmtbuf.c | 69 - usr/src/lib/libast/common/string/fmtclock.c | 63 - usr/src/lib/libast/common/string/fmtdev.c | 57 - usr/src/lib/libast/common/string/fmtelapsed.c | 61 - usr/src/lib/libast/common/string/fmterror.c | 37 - usr/src/lib/libast/common/string/fmtesc.c | 237 - usr/src/lib/libast/common/string/fmtfmt.c | 205 - usr/src/lib/libast/common/string/fmtfs.c | 100 - usr/src/lib/libast/common/string/fmtgid.c | 101 - usr/src/lib/libast/common/string/fmtident.c | 77 - usr/src/lib/libast/common/string/fmtip4.c | 43 - usr/src/lib/libast/common/string/fmtip6.c | 175 - usr/src/lib/libast/common/string/fmtls.c | 120 - usr/src/lib/libast/common/string/fmtmatch.c | 286 - usr/src/lib/libast/common/string/fmtmode.c | 47 - usr/src/lib/libast/common/string/fmtnum.c | 92 - usr/src/lib/libast/common/string/fmtperm.c | 91 - usr/src/lib/libast/common/string/fmtre.c | 226 - usr/src/lib/libast/common/string/fmtscale.c | 94 - usr/src/lib/libast/common/string/fmtsignal.c | 62 - usr/src/lib/libast/common/string/fmttime.c | 41 - usr/src/lib/libast/common/string/fmttmx.c | 45 - usr/src/lib/libast/common/string/fmttv.c | 44 - usr/src/lib/libast/common/string/fmtuid.c | 101 - usr/src/lib/libast/common/string/fmtversion.c | 53 - usr/src/lib/libast/common/string/memdup.c | 44 - usr/src/lib/libast/common/string/modedata.c | 69 - usr/src/lib/libast/common/string/modei.c | 55 - usr/src/lib/libast/common/string/modelib.h | 55 - usr/src/lib/libast/common/string/modex.c | 75 - usr/src/lib/libast/common/string/stracmp.c | 62 - usr/src/lib/libast/common/string/strcopy.c | 36 - usr/src/lib/libast/common/string/strdup.c | 44 - usr/src/lib/libast/common/string/strelapsed.c | 154 - usr/src/lib/libast/common/string/strerror.c | 148 - usr/src/lib/libast/common/string/stresc.c | 58 - usr/src/lib/libast/common/string/streval.c | 50 - usr/src/lib/libast/common/string/strexpr.c | 294 - usr/src/lib/libast/common/string/strgid.c | 121 - usr/src/lib/libast/common/string/strlcat.c | 83 - usr/src/lib/libast/common/string/strlcpy.c | 71 - usr/src/lib/libast/common/string/strlook.c | 50 - usr/src/lib/libast/common/string/strmatch.c | 171 - usr/src/lib/libast/common/string/strmode.c | 51 - usr/src/lib/libast/common/string/strnacmp.c | 66 - usr/src/lib/libast/common/string/strncopy.c | 46 - usr/src/lib/libast/common/string/strnpcmp.c | 51 - usr/src/lib/libast/common/string/strntod.c | 32 - usr/src/lib/libast/common/string/strntol.c | 31 - usr/src/lib/libast/common/string/strntold.c | 32 - usr/src/lib/libast/common/string/strntoll.c | 31 - usr/src/lib/libast/common/string/strnton.c | 32 - usr/src/lib/libast/common/string/strntonll.c | 32 - usr/src/lib/libast/common/string/strntoul.c | 32 - usr/src/lib/libast/common/string/strntoull.c | 32 - usr/src/lib/libast/common/string/strnvcmp.c | 86 - usr/src/lib/libast/common/string/stropt.c | 188 - usr/src/lib/libast/common/string/strpcmp.c | 44 - usr/src/lib/libast/common/string/strperm.c | 267 - usr/src/lib/libast/common/string/strpsearch.c | 125 - usr/src/lib/libast/common/string/strsearch.c | 58 - usr/src/lib/libast/common/string/strsort.c | 57 - usr/src/lib/libast/common/string/strtape.c | 148 - usr/src/lib/libast/common/string/strtoi.h | 614 - usr/src/lib/libast/common/string/strtoip4.c | 150 - usr/src/lib/libast/common/string/strtoip6.c | 200 - usr/src/lib/libast/common/string/strton.c | 31 - usr/src/lib/libast/common/string/strtonll.c | 31 - usr/src/lib/libast/common/string/struid.c | 109 - usr/src/lib/libast/common/string/struniq.c | 51 - usr/src/lib/libast/common/string/strvcmp.c | 74 - usr/src/lib/libast/common/string/swapget.c | 57 - usr/src/lib/libast/common/string/swapmem.c | 109 - usr/src/lib/libast/common/string/swapop.c | 59 - usr/src/lib/libast/common/string/swapput.c | 50 - usr/src/lib/libast/common/string/tok.c | 190 - usr/src/lib/libast/common/string/tokline.c | 193 - usr/src/lib/libast/common/string/tokscan.c | 360 - usr/src/lib/libast/common/tm/tmdata.c | 288 - usr/src/lib/libast/common/tm/tmdate.c | 41 - usr/src/lib/libast/common/tm/tmequiv.c | 57 - usr/src/lib/libast/common/tm/tmfix.c | 173 - usr/src/lib/libast/common/tm/tmfmt.c | 41 - usr/src/lib/libast/common/tm/tmform.c | 44 - usr/src/lib/libast/common/tm/tmgoff.c | 77 - usr/src/lib/libast/common/tm/tminit.c | 459 - usr/src/lib/libast/common/tm/tmleap.c | 41 - usr/src/lib/libast/common/tm/tmlex.c | 67 - usr/src/lib/libast/common/tm/tmlocale.c | 628 - usr/src/lib/libast/common/tm/tmmake.c | 41 - usr/src/lib/libast/common/tm/tmpoff.c | 62 - usr/src/lib/libast/common/tm/tmscan.c | 41 - usr/src/lib/libast/common/tm/tmsleep.c | 42 - usr/src/lib/libast/common/tm/tmtime.c | 41 - usr/src/lib/libast/common/tm/tmtype.c | 57 - usr/src/lib/libast/common/tm/tmweek.c | 87 - usr/src/lib/libast/common/tm/tmword.c | 89 - usr/src/lib/libast/common/tm/tmxdate.c | 1729 -- usr/src/lib/libast/common/tm/tmxduration.c | 80 - usr/src/lib/libast/common/tm/tmxfmt.c | 623 - usr/src/lib/libast/common/tm/tmxgettime.c | 44 - usr/src/lib/libast/common/tm/tmxleap.c | 51 - usr/src/lib/libast/common/tm/tmxmake.c | 140 - usr/src/lib/libast/common/tm/tmxscan.c | 534 - usr/src/lib/libast/common/tm/tmxsettime.c | 45 - usr/src/lib/libast/common/tm/tmxsleep.c | 41 - usr/src/lib/libast/common/tm/tmxtime.c | 137 - usr/src/lib/libast/common/tm/tmxtouch.c | 81 - usr/src/lib/libast/common/tm/tmzone.c | 95 - usr/src/lib/libast/common/tm/tvcmp.c | 46 - usr/src/lib/libast/common/tm/tvgettime.c | 70 - usr/src/lib/libast/common/tm/tvsettime.c | 72 - usr/src/lib/libast/common/tm/tvsleep.c | 48 - usr/src/lib/libast/common/tm/tvtouch.c | 295 - usr/src/lib/libast/common/uwin/a64l.c | 76 - usr/src/lib/libast/common/uwin/acosh.c | 108 - usr/src/lib/libast/common/uwin/asinh.c | 107 - usr/src/lib/libast/common/uwin/atanh.c | 89 - usr/src/lib/libast/common/uwin/cbrt.c | 38 - usr/src/lib/libast/common/uwin/crypt.c | 959 - usr/src/lib/libast/common/uwin/erf.c | 403 - usr/src/lib/libast/common/uwin/err.c | 124 - usr/src/lib/libast/common/uwin/exp.c | 213 - usr/src/lib/libast/common/uwin/exp__E.c | 142 - usr/src/lib/libast/common/uwin/expm1.c | 173 - usr/src/lib/libast/common/uwin/gamma.c | 343 - usr/src/lib/libast/common/uwin/getpass.c | 79 - usr/src/lib/libast/common/uwin/lgamma.c | 316 - usr/src/lib/libast/common/uwin/log.c | 496 - usr/src/lib/libast/common/uwin/log1p.c | 176 - usr/src/lib/libast/common/uwin/log__L.c | 116 - usr/src/lib/libast/common/uwin/rand48.c | 177 - usr/src/lib/libast/common/uwin/random.c | 381 - usr/src/lib/libast/common/uwin/rcmd.c | 571 - usr/src/lib/libast/common/uwin/rint.c | 41 - usr/src/lib/libast/common/uwin/support.c | 605 - usr/src/lib/libast/common/vec/vecargs.c | 76 - usr/src/lib/libast/common/vec/vecfile.c | 62 - usr/src/lib/libast/common/vec/vecfree.c | 48 - usr/src/lib/libast/common/vec/vecload.c | 96 - usr/src/lib/libast/common/vec/vecstring.c | 46 - usr/src/lib/libast/common/vmalloc/malloc.c | 1122 - usr/src/lib/libast/common/vmalloc/vmbest.c | 1494 -- usr/src/lib/libast/common/vmalloc/vmclear.c | 94 - usr/src/lib/libast/common/vmalloc/vmclose.c | 89 - usr/src/lib/libast/common/vmalloc/vmdcheap.c | 64 - usr/src/lib/libast/common/vmalloc/vmdebug.c | 798 - usr/src/lib/libast/common/vmalloc/vmdisc.c | 57 - usr/src/lib/libast/common/vmalloc/vmexit.c | 100 - usr/src/lib/libast/common/vmalloc/vmgetmem.c | 59 - usr/src/lib/libast/common/vmalloc/vmhdr.h | 562 - usr/src/lib/libast/common/vmalloc/vmlast.c | 479 - usr/src/lib/libast/common/vmalloc/vmmopen.c | 324 - usr/src/lib/libast/common/vmalloc/vmopen.c | 176 - usr/src/lib/libast/common/vmalloc/vmpool.c | 370 - usr/src/lib/libast/common/vmalloc/vmprivate.c | 294 - usr/src/lib/libast/common/vmalloc/vmprofile.c | 753 - usr/src/lib/libast/common/vmalloc/vmregion.c | 58 - usr/src/lib/libast/common/vmalloc/vmsegment.c | 66 - usr/src/lib/libast/common/vmalloc/vmset.c | 74 - usr/src/lib/libast/common/vmalloc/vmstat.c | 135 - usr/src/lib/libast/common/vmalloc/vmstrdup.c | 48 - usr/src/lib/libast/common/vmalloc/vmtrace.c | 286 - usr/src/lib/libast/common/vmalloc/vmwalk.c | 77 - usr/src/lib/libast/i386/Makefile | 44 - usr/src/lib/libast/i386/include/ast/align.h | 54 - usr/src/lib/libast/i386/include/ast/ast.h | 388 - usr/src/lib/libast/i386/include/ast/ast_botch.h | 26 - usr/src/lib/libast/i386/include/ast/ast_ccode.h | 50 - usr/src/lib/libast/i386/include/ast/ast_common.h | 219 - usr/src/lib/libast/i386/include/ast/ast_dir.h | 86 - usr/src/lib/libast/i386/include/ast/ast_dirent.h | 127 - usr/src/lib/libast/i386/include/ast/ast_fcntl.h | 135 - usr/src/lib/libast/i386/include/ast/ast_float.h | 237 - usr/src/lib/libast/i386/include/ast/ast_fs.h | 168 - usr/src/lib/libast/i386/include/ast/ast_getopt.h | 25 - usr/src/lib/libast/i386/include/ast/ast_iconv.h | 153 - usr/src/lib/libast/i386/include/ast/ast_lib.h | 193 - usr/src/lib/libast/i386/include/ast/ast_limits.h | 128 - usr/src/lib/libast/i386/include/ast/ast_map.h | 471 - usr/src/lib/libast/i386/include/ast/ast_mmap.h | 48 - usr/src/lib/libast/i386/include/ast/ast_mode.h | 35 - usr/src/lib/libast/i386/include/ast/ast_namval.h | 51 - usr/src/lib/libast/i386/include/ast/ast_ndbm.h | 30 - usr/src/lib/libast/i386/include/ast/ast_nl_types.h | 123 - usr/src/lib/libast/i386/include/ast/ast_param.h | 30 - .../lib/libast/i386/include/ast/ast_standards.h | 31 - usr/src/lib/libast/i386/include/ast/ast_std.h | 374 - usr/src/lib/libast/i386/include/ast/ast_stdio.h | 608 - usr/src/lib/libast/i386/include/ast/ast_sys.h | 171 - usr/src/lib/libast/i386/include/ast/ast_time.h | 104 - usr/src/lib/libast/i386/include/ast/ast_tty.h | 155 - usr/src/lib/libast/i386/include/ast/ast_version.h | 10 - usr/src/lib/libast/i386/include/ast/ast_vfork.h | 89 - usr/src/lib/libast/i386/include/ast/ast_wait.h | 32 - usr/src/lib/libast/i386/include/ast/ast_wchar.h | 208 - usr/src/lib/libast/i386/include/ast/ast_windows.h | 48 - usr/src/lib/libast/i386/include/ast/bytesex.h | 43 - usr/src/lib/libast/i386/include/ast/ccode.h | 101 - usr/src/lib/libast/i386/include/ast/cdt.h | 311 - usr/src/lib/libast/i386/include/ast/debug.h | 120 - usr/src/lib/libast/i386/include/ast/dirent.h | 22 - usr/src/lib/libast/i386/include/ast/dt.h | 49 - usr/src/lib/libast/i386/include/ast/endian.h | 54 - usr/src/lib/libast/i386/include/ast/error.h | 196 - usr/src/lib/libast/i386/include/ast/find.h | 97 - usr/src/lib/libast/i386/include/ast/fnmatch.h | 71 - usr/src/lib/libast/i386/include/ast/fnv.h | 81 - usr/src/lib/libast/i386/include/ast/fs3d.h | 123 - usr/src/lib/libast/i386/include/ast/fts.h | 173 - usr/src/lib/libast/i386/include/ast/ftw.h | 71 - usr/src/lib/libast/i386/include/ast/ftwalk.h | 135 - usr/src/lib/libast/i386/include/ast/getopt.h | 60 - usr/src/lib/libast/i386/include/ast/glob.h | 155 - usr/src/lib/libast/i386/include/ast/hash.h | 213 - usr/src/lib/libast/i386/include/ast/hashkey.h | 73 - usr/src/lib/libast/i386/include/ast/hashpart.h | 60 - usr/src/lib/libast/i386/include/ast/iconv.h | 22 - usr/src/lib/libast/i386/include/ast/ip6.h | 28 - usr/src/lib/libast/i386/include/ast/lc.h | 162 - usr/src/lib/libast/i386/include/ast/ls.h | 99 - usr/src/lib/libast/i386/include/ast/magic.h | 96 - usr/src/lib/libast/i386/include/ast/magicid.h | 55 - usr/src/lib/libast/i386/include/ast/mc.h | 107 - usr/src/lib/libast/i386/include/ast/mime.h | 102 - usr/src/lib/libast/i386/include/ast/mnt.h | 69 - usr/src/lib/libast/i386/include/ast/modecanon.h | 74 - usr/src/lib/libast/i386/include/ast/modex.h | 62 - usr/src/lib/libast/i386/include/ast/namval.h | 51 - usr/src/lib/libast/i386/include/ast/nl_types.h | 22 - usr/src/lib/libast/i386/include/ast/option.h | 120 - usr/src/lib/libast/i386/include/ast/preroot.h | 27 - usr/src/lib/libast/i386/include/ast/proc.h | 115 - usr/src/lib/libast/i386/include/ast/prototyped.h | 59 - usr/src/lib/libast/i386/include/ast/re_comp.h | 52 - usr/src/lib/libast/i386/include/ast/recfmt.h | 94 - usr/src/lib/libast/i386/include/ast/regex.h | 230 - usr/src/lib/libast/i386/include/ast/regexp.h | 139 - usr/src/lib/libast/i386/include/ast/sfdisc.h | 82 - usr/src/lib/libast/i386/include/ast/sfio.h | 455 - usr/src/lib/libast/i386/include/ast/sfio_s.h | 51 - usr/src/lib/libast/i386/include/ast/sfio_t.h | 126 - usr/src/lib/libast/i386/include/ast/shcmd.h | 104 - usr/src/lib/libast/i386/include/ast/sig.h | 159 - usr/src/lib/libast/i386/include/ast/stack.h | 94 - usr/src/lib/libast/i386/include/ast/stak.h | 64 - usr/src/lib/libast/i386/include/ast/stdio.h | 22 - usr/src/lib/libast/i386/include/ast/stk.h | 92 - usr/src/lib/libast/i386/include/ast/swap.h | 64 - usr/src/lib/libast/i386/include/ast/tar.h | 127 - usr/src/lib/libast/i386/include/ast/times.h | 65 - usr/src/lib/libast/i386/include/ast/tm.h | 206 - usr/src/lib/libast/i386/include/ast/tmx.h | 151 - usr/src/lib/libast/i386/include/ast/tok.h | 58 - usr/src/lib/libast/i386/include/ast/tv.h | 132 - usr/src/lib/libast/i386/include/ast/usage.h | 37 - usr/src/lib/libast/i386/include/ast/vdb.h | 55 - usr/src/lib/libast/i386/include/ast/vecargs.h | 56 - usr/src/lib/libast/i386/include/ast/vmalloc.h | 321 - usr/src/lib/libast/i386/include/ast/wait.h | 107 - usr/src/lib/libast/i386/include/ast/wchar.h | 22 - usr/src/lib/libast/i386/include/ast/wordexp.h | 74 - .../lib/libast/i386/src/lib/libast/FEATURE/align | 33 - .../lib/libast/i386/src/lib/libast/FEATURE/botch | 5 - .../lib/libast/i386/src/lib/libast/FEATURE/ccode | 29 - .../lib/libast/i386/src/lib/libast/FEATURE/common | 199 - .../lib/libast/i386/src/lib/libast/FEATURE/dirent | 106 - .../lib/libast/i386/src/lib/libast/FEATURE/eaccess | 5 - .../lib/libast/i386/src/lib/libast/FEATURE/errno | 7 - .../lib/libast/i386/src/lib/libast/FEATURE/fcntl | 114 - .../lib/libast/i386/src/lib/libast/FEATURE/float | 216 - usr/src/lib/libast/i386/src/lib/libast/FEATURE/fs | 147 - .../lib/libast/i386/src/lib/libast/FEATURE/hack | 5 - .../lib/libast/i386/src/lib/libast/FEATURE/iconv | 132 - .../lib/libast/i386/src/lib/libast/FEATURE/isoc99 | 11 - usr/src/lib/libast/i386/src/lib/libast/FEATURE/lib | 172 - .../lib/libast/i386/src/lib/libast/FEATURE/libpath | 6 - .../lib/libast/i386/src/lib/libast/FEATURE/limits | 107 - usr/src/lib/libast/i386/src/lib/libast/FEATURE/map | 450 - .../lib/libast/i386/src/lib/libast/FEATURE/mmap | 27 - .../lib/libast/i386/src/lib/libast/FEATURE/mode | 14 - .../lib/libast/i386/src/lib/libast/FEATURE/ndbm | 9 - .../libast/i386/src/lib/libast/FEATURE/nl_types | 102 - .../lib/libast/i386/src/lib/libast/FEATURE/omitted | 5 - .../lib/libast/i386/src/lib/libast/FEATURE/options | 5 - .../lib/libast/i386/src/lib/libast/FEATURE/param | 9 - .../lib/libast/i386/src/lib/libast/FEATURE/preroot | 6 - .../lib/libast/i386/src/lib/libast/FEATURE/prog | 7 - .../lib/libast/i386/src/lib/libast/FEATURE/sfinit | 5332 ----- .../lib/libast/i386/src/lib/libast/FEATURE/sfio | 14 - usr/src/lib/libast/i386/src/lib/libast/FEATURE/sig | 138 - .../lib/libast/i386/src/lib/libast/FEATURE/siglist | 128 - .../lib/libast/i386/src/lib/libast/FEATURE/signal | 175 - .../libast/i386/src/lib/libast/FEATURE/standards | 10 - .../lib/libast/i386/src/lib/libast/FEATURE/stdio | 587 - usr/src/lib/libast/i386/src/lib/libast/FEATURE/sys | 150 - .../lib/libast/i386/src/lib/libast/FEATURE/time | 83 - .../lib/libast/i386/src/lib/libast/FEATURE/tmlib | 71 - usr/src/lib/libast/i386/src/lib/libast/FEATURE/tmx | 130 - usr/src/lib/libast/i386/src/lib/libast/FEATURE/tty | 134 - usr/src/lib/libast/i386/src/lib/libast/FEATURE/tv | 111 - .../lib/libast/i386/src/lib/libast/FEATURE/tvlib | 19 - .../lib/libast/i386/src/lib/libast/FEATURE/uwin | 17 - .../lib/libast/i386/src/lib/libast/FEATURE/vfork | 68 - .../lib/libast/i386/src/lib/libast/FEATURE/vmalloc | 36 - .../lib/libast/i386/src/lib/libast/FEATURE/wait | 11 - .../lib/libast/i386/src/lib/libast/FEATURE/wchar | 187 - usr/src/lib/libast/i386/src/lib/libast/align.h | 33 - usr/src/lib/libast/i386/src/lib/libast/ast_botch.h | 5 - usr/src/lib/libast/i386/src/lib/libast/ast_ccode.h | 29 - .../lib/libast/i386/src/lib/libast/ast_common.h | 198 - .../lib/libast/i386/src/lib/libast/ast_dirent.h | 106 - usr/src/lib/libast/i386/src/lib/libast/ast_fcntl.h | 114 - usr/src/lib/libast/i386/src/lib/libast/ast_float.h | 216 - usr/src/lib/libast/i386/src/lib/libast/ast_fs.h | 147 - usr/src/lib/libast/i386/src/lib/libast/ast_iconv.h | 132 - usr/src/lib/libast/i386/src/lib/libast/ast_lib.h | 172 - .../lib/libast/i386/src/lib/libast/ast_limits.h | 107 - usr/src/lib/libast/i386/src/lib/libast/ast_map.h | 450 - usr/src/lib/libast/i386/src/lib/libast/ast_mmap.h | 27 - usr/src/lib/libast/i386/src/lib/libast/ast_mode.h | 14 - .../lib/libast/i386/src/lib/libast/ast_namval.h | 42 - usr/src/lib/libast/i386/src/lib/libast/ast_ndbm.h | 9 - .../lib/libast/i386/src/lib/libast/ast_nl_types.h | 102 - usr/src/lib/libast/i386/src/lib/libast/ast_param.h | 9 - .../lib/libast/i386/src/lib/libast/ast_standards.h | 10 - usr/src/lib/libast/i386/src/lib/libast/ast_stdio.h | 587 - usr/src/lib/libast/i386/src/lib/libast/ast_sys.h | 150 - usr/src/lib/libast/i386/src/lib/libast/ast_time.h | 83 - usr/src/lib/libast/i386/src/lib/libast/ast_tty.h | 134 - usr/src/lib/libast/i386/src/lib/libast/ast_vfork.h | 68 - usr/src/lib/libast/i386/src/lib/libast/ast_wait.h | 11 - usr/src/lib/libast/i386/src/lib/libast/ast_wchar.h | 187 - usr/src/lib/libast/i386/src/lib/libast/conftab.c | 392 - usr/src/lib/libast/i386/src/lib/libast/conftab.h | 94 - usr/src/lib/libast/i386/src/lib/libast/lc.h | 162 - usr/src/lib/libast/i386/src/lib/libast/lctab.c | 2634 --- usr/src/lib/libast/i386/src/lib/libast/preroot.h | 6 - usr/src/lib/libast/i386/src/lib/libast/sig.h | 138 - usr/src/lib/libast/i386/src/lib/libast/tmx.h | 130 - usr/src/lib/libast/i386/src/lib/libast/tv.h | 111 - usr/src/lib/libast/mapfile-vers | 749 - usr/src/lib/libast/sparc/Makefile | 45 - usr/src/lib/libast/sparc/include/ast/align.h | 54 - usr/src/lib/libast/sparc/include/ast/ast.h | 388 - usr/src/lib/libast/sparc/include/ast/ast_botch.h | 26 - usr/src/lib/libast/sparc/include/ast/ast_ccode.h | 50 - usr/src/lib/libast/sparc/include/ast/ast_common.h | 219 - usr/src/lib/libast/sparc/include/ast/ast_dir.h | 86 - usr/src/lib/libast/sparc/include/ast/ast_dirent.h | 127 - usr/src/lib/libast/sparc/include/ast/ast_fcntl.h | 135 - usr/src/lib/libast/sparc/include/ast/ast_float.h | 237 - usr/src/lib/libast/sparc/include/ast/ast_fs.h | 164 - usr/src/lib/libast/sparc/include/ast/ast_getopt.h | 25 - usr/src/lib/libast/sparc/include/ast/ast_iconv.h | 153 - usr/src/lib/libast/sparc/include/ast/ast_lib.h | 193 - usr/src/lib/libast/sparc/include/ast/ast_limits.h | 128 - usr/src/lib/libast/sparc/include/ast/ast_map.h | 471 - usr/src/lib/libast/sparc/include/ast/ast_mmap.h | 48 - usr/src/lib/libast/sparc/include/ast/ast_mode.h | 35 - usr/src/lib/libast/sparc/include/ast/ast_namval.h | 51 - usr/src/lib/libast/sparc/include/ast/ast_ndbm.h | 30 - .../lib/libast/sparc/include/ast/ast_nl_types.h | 123 - usr/src/lib/libast/sparc/include/ast/ast_param.h | 30 - .../lib/libast/sparc/include/ast/ast_standards.h | 31 - usr/src/lib/libast/sparc/include/ast/ast_std.h | 374 - usr/src/lib/libast/sparc/include/ast/ast_stdio.h | 608 - usr/src/lib/libast/sparc/include/ast/ast_sys.h | 171 - usr/src/lib/libast/sparc/include/ast/ast_time.h | 104 - usr/src/lib/libast/sparc/include/ast/ast_tty.h | 155 - usr/src/lib/libast/sparc/include/ast/ast_version.h | 10 - usr/src/lib/libast/sparc/include/ast/ast_vfork.h | 89 - usr/src/lib/libast/sparc/include/ast/ast_wait.h | 32 - usr/src/lib/libast/sparc/include/ast/ast_wchar.h | 208 - usr/src/lib/libast/sparc/include/ast/ast_windows.h | 48 - usr/src/lib/libast/sparc/include/ast/bytesex.h | 43 - usr/src/lib/libast/sparc/include/ast/ccode.h | 101 - usr/src/lib/libast/sparc/include/ast/cdt.h | 311 - usr/src/lib/libast/sparc/include/ast/debug.h | 120 - usr/src/lib/libast/sparc/include/ast/dirent.h | 22 - usr/src/lib/libast/sparc/include/ast/dt.h | 49 - usr/src/lib/libast/sparc/include/ast/endian.h | 54 - usr/src/lib/libast/sparc/include/ast/error.h | 196 - usr/src/lib/libast/sparc/include/ast/find.h | 97 - usr/src/lib/libast/sparc/include/ast/fnmatch.h | 71 - usr/src/lib/libast/sparc/include/ast/fnv.h | 81 - usr/src/lib/libast/sparc/include/ast/fs3d.h | 123 - usr/src/lib/libast/sparc/include/ast/fts.h | 173 - usr/src/lib/libast/sparc/include/ast/ftw.h | 71 - usr/src/lib/libast/sparc/include/ast/ftwalk.h | 135 - usr/src/lib/libast/sparc/include/ast/getopt.h | 60 - usr/src/lib/libast/sparc/include/ast/glob.h | 155 - usr/src/lib/libast/sparc/include/ast/hash.h | 213 - usr/src/lib/libast/sparc/include/ast/hashkey.h | 73 - usr/src/lib/libast/sparc/include/ast/hashpart.h | 60 - usr/src/lib/libast/sparc/include/ast/iconv.h | 22 - usr/src/lib/libast/sparc/include/ast/ip6.h | 28 - usr/src/lib/libast/sparc/include/ast/lc.h | 162 - usr/src/lib/libast/sparc/include/ast/ls.h | 99 - usr/src/lib/libast/sparc/include/ast/magic.h | 96 - usr/src/lib/libast/sparc/include/ast/magicid.h | 55 - usr/src/lib/libast/sparc/include/ast/mc.h | 107 - usr/src/lib/libast/sparc/include/ast/mime.h | 102 - usr/src/lib/libast/sparc/include/ast/mnt.h | 69 - usr/src/lib/libast/sparc/include/ast/modecanon.h | 74 - usr/src/lib/libast/sparc/include/ast/modex.h | 62 - usr/src/lib/libast/sparc/include/ast/namval.h | 51 - usr/src/lib/libast/sparc/include/ast/nl_types.h | 22 - usr/src/lib/libast/sparc/include/ast/option.h | 120 - usr/src/lib/libast/sparc/include/ast/preroot.h | 27 - usr/src/lib/libast/sparc/include/ast/proc.h | 115 - usr/src/lib/libast/sparc/include/ast/prototyped.h | 59 - usr/src/lib/libast/sparc/include/ast/re_comp.h | 52 - usr/src/lib/libast/sparc/include/ast/recfmt.h | 94 - usr/src/lib/libast/sparc/include/ast/regex.h | 230 - usr/src/lib/libast/sparc/include/ast/regexp.h | 139 - usr/src/lib/libast/sparc/include/ast/sfdisc.h | 82 - usr/src/lib/libast/sparc/include/ast/sfio.h | 455 - usr/src/lib/libast/sparc/include/ast/sfio_s.h | 51 - usr/src/lib/libast/sparc/include/ast/sfio_t.h | 126 - usr/src/lib/libast/sparc/include/ast/shcmd.h | 104 - usr/src/lib/libast/sparc/include/ast/sig.h | 159 - usr/src/lib/libast/sparc/include/ast/stack.h | 94 - usr/src/lib/libast/sparc/include/ast/stak.h | 64 - usr/src/lib/libast/sparc/include/ast/stdio.h | 22 - usr/src/lib/libast/sparc/include/ast/stk.h | 92 - usr/src/lib/libast/sparc/include/ast/swap.h | 64 - usr/src/lib/libast/sparc/include/ast/tar.h | 127 - usr/src/lib/libast/sparc/include/ast/times.h | 65 - usr/src/lib/libast/sparc/include/ast/tm.h | 206 - usr/src/lib/libast/sparc/include/ast/tmx.h | 151 - usr/src/lib/libast/sparc/include/ast/tok.h | 58 - usr/src/lib/libast/sparc/include/ast/tv.h | 132 - usr/src/lib/libast/sparc/include/ast/usage.h | 37 - usr/src/lib/libast/sparc/include/ast/vdb.h | 55 - usr/src/lib/libast/sparc/include/ast/vecargs.h | 56 - usr/src/lib/libast/sparc/include/ast/vmalloc.h | 321 - usr/src/lib/libast/sparc/include/ast/wait.h | 107 - usr/src/lib/libast/sparc/include/ast/wchar.h | 22 - usr/src/lib/libast/sparc/include/ast/wordexp.h | 74 - .../lib/libast/sparc/src/lib/libast/FEATURE/align | 33 - .../lib/libast/sparc/src/lib/libast/FEATURE/botch | 5 - .../lib/libast/sparc/src/lib/libast/FEATURE/ccode | 29 - .../lib/libast/sparc/src/lib/libast/FEATURE/common | 199 - .../lib/libast/sparc/src/lib/libast/FEATURE/dirent | 106 - .../libast/sparc/src/lib/libast/FEATURE/eaccess | 5 - .../lib/libast/sparc/src/lib/libast/FEATURE/errno | 7 - .../lib/libast/sparc/src/lib/libast/FEATURE/fcntl | 114 - .../lib/libast/sparc/src/lib/libast/FEATURE/float | 216 - usr/src/lib/libast/sparc/src/lib/libast/FEATURE/fs | 143 - .../lib/libast/sparc/src/lib/libast/FEATURE/hack | 5 - .../lib/libast/sparc/src/lib/libast/FEATURE/iconv | 132 - .../lib/libast/sparc/src/lib/libast/FEATURE/isoc99 | 11 - .../lib/libast/sparc/src/lib/libast/FEATURE/lib | 172 - .../libast/sparc/src/lib/libast/FEATURE/libpath | 6 - .../lib/libast/sparc/src/lib/libast/FEATURE/limits | 107 - .../lib/libast/sparc/src/lib/libast/FEATURE/map | 450 - .../lib/libast/sparc/src/lib/libast/FEATURE/mmap | 27 - .../lib/libast/sparc/src/lib/libast/FEATURE/mode | 14 - .../lib/libast/sparc/src/lib/libast/FEATURE/ndbm | 9 - .../libast/sparc/src/lib/libast/FEATURE/nl_types | 102 - .../libast/sparc/src/lib/libast/FEATURE/omitted | 5 - .../libast/sparc/src/lib/libast/FEATURE/options | 5 - .../lib/libast/sparc/src/lib/libast/FEATURE/param | 9 - .../libast/sparc/src/lib/libast/FEATURE/preroot | 6 - .../lib/libast/sparc/src/lib/libast/FEATURE/prog | 7 - .../lib/libast/sparc/src/lib/libast/FEATURE/sfinit | 5332 ----- .../lib/libast/sparc/src/lib/libast/FEATURE/sfio | 14 - .../lib/libast/sparc/src/lib/libast/FEATURE/sig | 138 - .../libast/sparc/src/lib/libast/FEATURE/siglist | 128 - .../lib/libast/sparc/src/lib/libast/FEATURE/signal | 175 - .../libast/sparc/src/lib/libast/FEATURE/standards | 10 - .../lib/libast/sparc/src/lib/libast/FEATURE/stdio | 587 - .../lib/libast/sparc/src/lib/libast/FEATURE/sys | 150 - .../lib/libast/sparc/src/lib/libast/FEATURE/time | 83 - .../lib/libast/sparc/src/lib/libast/FEATURE/tmlib | 71 - .../lib/libast/sparc/src/lib/libast/FEATURE/tmx | 130 - .../lib/libast/sparc/src/lib/libast/FEATURE/tty | 134 - usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tv | 111 - .../lib/libast/sparc/src/lib/libast/FEATURE/tvlib | 19 - .../lib/libast/sparc/src/lib/libast/FEATURE/uwin | 17 - .../lib/libast/sparc/src/lib/libast/FEATURE/vfork | 68 - .../libast/sparc/src/lib/libast/FEATURE/vmalloc | 36 - .../lib/libast/sparc/src/lib/libast/FEATURE/wait | 11 - .../lib/libast/sparc/src/lib/libast/FEATURE/wchar | 187 - usr/src/lib/libast/sparc/src/lib/libast/align.h | 33 - .../lib/libast/sparc/src/lib/libast/ast_botch.h | 5 - .../lib/libast/sparc/src/lib/libast/ast_ccode.h | 29 - .../lib/libast/sparc/src/lib/libast/ast_common.h | 198 - .../lib/libast/sparc/src/lib/libast/ast_dirent.h | 106 - .../lib/libast/sparc/src/lib/libast/ast_fcntl.h | 114 - .../lib/libast/sparc/src/lib/libast/ast_float.h | 216 - usr/src/lib/libast/sparc/src/lib/libast/ast_fs.h | 143 - .../lib/libast/sparc/src/lib/libast/ast_iconv.h | 132 - usr/src/lib/libast/sparc/src/lib/libast/ast_lib.h | 172 - .../lib/libast/sparc/src/lib/libast/ast_limits.h | 107 - usr/src/lib/libast/sparc/src/lib/libast/ast_map.h | 450 - usr/src/lib/libast/sparc/src/lib/libast/ast_mmap.h | 27 - usr/src/lib/libast/sparc/src/lib/libast/ast_mode.h | 14 - .../lib/libast/sparc/src/lib/libast/ast_namval.h | 42 - usr/src/lib/libast/sparc/src/lib/libast/ast_ndbm.h | 9 - .../lib/libast/sparc/src/lib/libast/ast_nl_types.h | 102 - .../lib/libast/sparc/src/lib/libast/ast_param.h | 9 - .../libast/sparc/src/lib/libast/ast_standards.h | 10 - .../lib/libast/sparc/src/lib/libast/ast_stdio.h | 587 - usr/src/lib/libast/sparc/src/lib/libast/ast_sys.h | 150 - usr/src/lib/libast/sparc/src/lib/libast/ast_time.h | 83 - usr/src/lib/libast/sparc/src/lib/libast/ast_tty.h | 134 - .../lib/libast/sparc/src/lib/libast/ast_vfork.h | 68 - usr/src/lib/libast/sparc/src/lib/libast/ast_wait.h | 11 - .../lib/libast/sparc/src/lib/libast/ast_wchar.h | 187 - usr/src/lib/libast/sparc/src/lib/libast/conftab.c | 392 - usr/src/lib/libast/sparc/src/lib/libast/conftab.h | 94 - usr/src/lib/libast/sparc/src/lib/libast/lc.h | 162 - usr/src/lib/libast/sparc/src/lib/libast/lctab.c | 2634 --- usr/src/lib/libast/sparc/src/lib/libast/preroot.h | 6 - usr/src/lib/libast/sparc/src/lib/libast/sig.h | 138 - usr/src/lib/libast/sparc/src/lib/libast/tmx.h | 130 - usr/src/lib/libast/sparc/src/lib/libast/tv.h | 111 - usr/src/lib/libast/sparcv9/Makefile | 46 - usr/src/lib/libast/sparcv9/include/ast/align.h | 54 - usr/src/lib/libast/sparcv9/include/ast/ast.h | 388 - usr/src/lib/libast/sparcv9/include/ast/ast_botch.h | 26 - usr/src/lib/libast/sparcv9/include/ast/ast_ccode.h | 50 - .../lib/libast/sparcv9/include/ast/ast_common.h | 220 - usr/src/lib/libast/sparcv9/include/ast/ast_dir.h | 86 - .../lib/libast/sparcv9/include/ast/ast_dirent.h | 103 - usr/src/lib/libast/sparcv9/include/ast/ast_fcntl.h | 135 - usr/src/lib/libast/sparcv9/include/ast/ast_float.h | 236 - usr/src/lib/libast/sparcv9/include/ast/ast_fs.h | 163 - .../lib/libast/sparcv9/include/ast/ast_getopt.h | 25 - usr/src/lib/libast/sparcv9/include/ast/ast_iconv.h | 153 - usr/src/lib/libast/sparcv9/include/ast/ast_lib.h | 182 - .../lib/libast/sparcv9/include/ast/ast_limits.h | 128 - usr/src/lib/libast/sparcv9/include/ast/ast_map.h | 471 - usr/src/lib/libast/sparcv9/include/ast/ast_mmap.h | 48 - usr/src/lib/libast/sparcv9/include/ast/ast_mode.h | 35 - .../lib/libast/sparcv9/include/ast/ast_namval.h | 51 - usr/src/lib/libast/sparcv9/include/ast/ast_ndbm.h | 30 - .../lib/libast/sparcv9/include/ast/ast_nl_types.h | 123 - usr/src/lib/libast/sparcv9/include/ast/ast_param.h | 30 - .../lib/libast/sparcv9/include/ast/ast_standards.h | 31 - usr/src/lib/libast/sparcv9/include/ast/ast_std.h | 374 - usr/src/lib/libast/sparcv9/include/ast/ast_stdio.h | 608 - usr/src/lib/libast/sparcv9/include/ast/ast_sys.h | 171 - usr/src/lib/libast/sparcv9/include/ast/ast_time.h | 104 - usr/src/lib/libast/sparcv9/include/ast/ast_tty.h | 155 - .../lib/libast/sparcv9/include/ast/ast_version.h | 10 - usr/src/lib/libast/sparcv9/include/ast/ast_vfork.h | 89 - usr/src/lib/libast/sparcv9/include/ast/ast_wait.h | 32 - usr/src/lib/libast/sparcv9/include/ast/ast_wchar.h | 208 - .../lib/libast/sparcv9/include/ast/ast_windows.h | 48 - usr/src/lib/libast/sparcv9/include/ast/bytesex.h | 43 - usr/src/lib/libast/sparcv9/include/ast/ccode.h | 101 - usr/src/lib/libast/sparcv9/include/ast/cdt.h | 311 - usr/src/lib/libast/sparcv9/include/ast/debug.h | 120 - usr/src/lib/libast/sparcv9/include/ast/dirent.h | 22 - usr/src/lib/libast/sparcv9/include/ast/dt.h | 49 - usr/src/lib/libast/sparcv9/include/ast/endian.h | 54 - usr/src/lib/libast/sparcv9/include/ast/error.h | 196 - usr/src/lib/libast/sparcv9/include/ast/find.h | 97 - usr/src/lib/libast/sparcv9/include/ast/fnmatch.h | 71 - usr/src/lib/libast/sparcv9/include/ast/fnv.h | 81 - usr/src/lib/libast/sparcv9/include/ast/fs3d.h | 123 - usr/src/lib/libast/sparcv9/include/ast/fts.h | 173 - usr/src/lib/libast/sparcv9/include/ast/ftw.h | 71 - usr/src/lib/libast/sparcv9/include/ast/ftwalk.h | 135 - usr/src/lib/libast/sparcv9/include/ast/getopt.h | 60 - usr/src/lib/libast/sparcv9/include/ast/glob.h | 155 - usr/src/lib/libast/sparcv9/include/ast/hash.h | 213 - usr/src/lib/libast/sparcv9/include/ast/hashkey.h | 73 - usr/src/lib/libast/sparcv9/include/ast/hashpart.h | 60 - usr/src/lib/libast/sparcv9/include/ast/iconv.h | 22 - usr/src/lib/libast/sparcv9/include/ast/ip6.h | 28 - usr/src/lib/libast/sparcv9/include/ast/lc.h | 162 - usr/src/lib/libast/sparcv9/include/ast/ls.h | 99 - usr/src/lib/libast/sparcv9/include/ast/magic.h | 96 - usr/src/lib/libast/sparcv9/include/ast/magicid.h | 55 - usr/src/lib/libast/sparcv9/include/ast/mc.h | 107 - usr/src/lib/libast/sparcv9/include/ast/mime.h | 102 - usr/src/lib/libast/sparcv9/include/ast/mnt.h | 69 - usr/src/lib/libast/sparcv9/include/ast/modecanon.h | 74 - usr/src/lib/libast/sparcv9/include/ast/modex.h | 62 - usr/src/lib/libast/sparcv9/include/ast/namval.h | 51 - usr/src/lib/libast/sparcv9/include/ast/nl_types.h | 22 - usr/src/lib/libast/sparcv9/include/ast/option.h | 120 - usr/src/lib/libast/sparcv9/include/ast/preroot.h | 27 - usr/src/lib/libast/sparcv9/include/ast/proc.h | 115 - .../lib/libast/sparcv9/include/ast/prototyped.h | 59 - usr/src/lib/libast/sparcv9/include/ast/re_comp.h | 52 - usr/src/lib/libast/sparcv9/include/ast/recfmt.h | 94 - usr/src/lib/libast/sparcv9/include/ast/regex.h | 230 - usr/src/lib/libast/sparcv9/include/ast/regexp.h | 139 - usr/src/lib/libast/sparcv9/include/ast/sfdisc.h | 82 - usr/src/lib/libast/sparcv9/include/ast/sfio.h | 455 - usr/src/lib/libast/sparcv9/include/ast/sfio_s.h | 51 - usr/src/lib/libast/sparcv9/include/ast/sfio_t.h | 126 - usr/src/lib/libast/sparcv9/include/ast/shcmd.h | 104 - usr/src/lib/libast/sparcv9/include/ast/sig.h | 159 - usr/src/lib/libast/sparcv9/include/ast/stack.h | 94 - usr/src/lib/libast/sparcv9/include/ast/stak.h | 64 - usr/src/lib/libast/sparcv9/include/ast/stdio.h | 22 - usr/src/lib/libast/sparcv9/include/ast/stk.h | 92 - usr/src/lib/libast/sparcv9/include/ast/swap.h | 64 - usr/src/lib/libast/sparcv9/include/ast/tar.h | 127 - usr/src/lib/libast/sparcv9/include/ast/times.h | 65 - usr/src/lib/libast/sparcv9/include/ast/tm.h | 206 - usr/src/lib/libast/sparcv9/include/ast/tmx.h | 151 - usr/src/lib/libast/sparcv9/include/ast/tok.h | 58 - usr/src/lib/libast/sparcv9/include/ast/tv.h | 132 - usr/src/lib/libast/sparcv9/include/ast/usage.h | 37 - usr/src/lib/libast/sparcv9/include/ast/vdb.h | 55 - usr/src/lib/libast/sparcv9/include/ast/vecargs.h | 56 - usr/src/lib/libast/sparcv9/include/ast/vmalloc.h | 321 - usr/src/lib/libast/sparcv9/include/ast/wait.h | 107 - usr/src/lib/libast/sparcv9/include/ast/wchar.h | 22 - usr/src/lib/libast/sparcv9/include/ast/wordexp.h | 74 - .../libast/sparcv9/src/lib/libast/FEATURE/align | 33 - .../libast/sparcv9/src/lib/libast/FEATURE/botch | 5 - .../libast/sparcv9/src/lib/libast/FEATURE/ccode | 29 - .../libast/sparcv9/src/lib/libast/FEATURE/common | 200 - .../libast/sparcv9/src/lib/libast/FEATURE/dirent | 82 - .../libast/sparcv9/src/lib/libast/FEATURE/eaccess | 5 - .../libast/sparcv9/src/lib/libast/FEATURE/errno | 7 - .../libast/sparcv9/src/lib/libast/FEATURE/fcntl | 114 - .../libast/sparcv9/src/lib/libast/FEATURE/float | 215 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/fs | 142 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/hack | 5 - .../libast/sparcv9/src/lib/libast/FEATURE/iconv | 132 - .../libast/sparcv9/src/lib/libast/FEATURE/isoc99 | 11 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/lib | 161 - .../libast/sparcv9/src/lib/libast/FEATURE/libpath | 6 - .../libast/sparcv9/src/lib/libast/FEATURE/limits | 107 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/map | 450 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/mmap | 27 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/mode | 14 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/ndbm | 9 - .../libast/sparcv9/src/lib/libast/FEATURE/nl_types | 102 - .../libast/sparcv9/src/lib/libast/FEATURE/omitted | 5 - .../libast/sparcv9/src/lib/libast/FEATURE/options | 5 - .../libast/sparcv9/src/lib/libast/FEATURE/param | 9 - .../libast/sparcv9/src/lib/libast/FEATURE/preroot | 6 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/prog | 7 - .../libast/sparcv9/src/lib/libast/FEATURE/sfinit | 5332 ----- .../lib/libast/sparcv9/src/lib/libast/FEATURE/sfio | 16 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/sig | 138 - .../libast/sparcv9/src/lib/libast/FEATURE/siglist | 128 - .../libast/sparcv9/src/lib/libast/FEATURE/signal | 175 - .../sparcv9/src/lib/libast/FEATURE/standards | 10 - .../libast/sparcv9/src/lib/libast/FEATURE/stdio | 587 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/sys | 150 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/time | 83 - .../libast/sparcv9/src/lib/libast/FEATURE/tmlib | 71 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/tmx | 130 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/tty | 134 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/tv | 111 - .../libast/sparcv9/src/lib/libast/FEATURE/tvlib | 19 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/uwin | 17 - .../libast/sparcv9/src/lib/libast/FEATURE/vfork | 68 - .../libast/sparcv9/src/lib/libast/FEATURE/vmalloc | 36 - .../lib/libast/sparcv9/src/lib/libast/FEATURE/wait | 11 - .../libast/sparcv9/src/lib/libast/FEATURE/wchar | 187 - usr/src/lib/libast/sparcv9/src/lib/libast/align.h | 33 - .../lib/libast/sparcv9/src/lib/libast/ast_botch.h | 5 - .../lib/libast/sparcv9/src/lib/libast/ast_ccode.h | 29 - .../lib/libast/sparcv9/src/lib/libast/ast_common.h | 199 - .../lib/libast/sparcv9/src/lib/libast/ast_dirent.h | 82 - .../lib/libast/sparcv9/src/lib/libast/ast_fcntl.h | 114 - .../lib/libast/sparcv9/src/lib/libast/ast_float.h | 215 - usr/src/lib/libast/sparcv9/src/lib/libast/ast_fs.h | 142 - .../lib/libast/sparcv9/src/lib/libast/ast_iconv.h | 132 - .../lib/libast/sparcv9/src/lib/libast/ast_lib.h | 161 - .../lib/libast/sparcv9/src/lib/libast/ast_limits.h | 107 - .../lib/libast/sparcv9/src/lib/libast/ast_map.h | 450 - .../lib/libast/sparcv9/src/lib/libast/ast_mmap.h | 27 - .../lib/libast/sparcv9/src/lib/libast/ast_mode.h | 14 - .../lib/libast/sparcv9/src/lib/libast/ast_namval.h | 42 - .../lib/libast/sparcv9/src/lib/libast/ast_ndbm.h | 9 - .../libast/sparcv9/src/lib/libast/ast_nl_types.h | 102 - .../lib/libast/sparcv9/src/lib/libast/ast_param.h | 9 - .../libast/sparcv9/src/lib/libast/ast_standards.h | 10 - .../lib/libast/sparcv9/src/lib/libast/ast_stdio.h | 587 - .../lib/libast/sparcv9/src/lib/libast/ast_sys.h | 150 - .../lib/libast/sparcv9/src/lib/libast/ast_time.h | 83 - .../lib/libast/sparcv9/src/lib/libast/ast_tty.h | 134 - .../lib/libast/sparcv9/src/lib/libast/ast_vfork.h | 68 - .../lib/libast/sparcv9/src/lib/libast/ast_wait.h | 11 - .../lib/libast/sparcv9/src/lib/libast/ast_wchar.h | 187 - .../lib/libast/sparcv9/src/lib/libast/conftab.c | 392 - .../lib/libast/sparcv9/src/lib/libast/conftab.h | 94 - usr/src/lib/libast/sparcv9/src/lib/libast/lc.h | 162 - usr/src/lib/libast/sparcv9/src/lib/libast/lctab.c | 2634 --- .../lib/libast/sparcv9/src/lib/libast/preroot.h | 6 - usr/src/lib/libast/sparcv9/src/lib/libast/sig.h | 138 - usr/src/lib/libast/sparcv9/src/lib/libast/tmx.h | 130 - usr/src/lib/libast/sparcv9/src/lib/libast/tv.h | 111 - usr/src/lib/libcmd/Makefile | 63 - usr/src/lib/libcmd/Makefile.com | 151 - usr/src/lib/libcmd/THIRDPARTYLICENSE | 245 - usr/src/lib/libcmd/THIRDPARTYLICENSE.descrip | 1 - usr/src/lib/libcmd/amd64/Makefile | 34 - usr/src/lib/libcmd/amd64/include/ast/cmd.h | 174 - usr/src/lib/libcmd/amd64/include/ast/cmdext.h | 77 - .../lib/libcmd/amd64/src/lib/libcmd/FEATURE/ids | 15 - .../libcmd/amd64/src/lib/libcmd/FEATURE/sockets | 13 - .../libcmd/amd64/src/lib/libcmd/FEATURE/symlink | 8 - .../libcmd/amd64/src/lib/libcmd/FEATURE/utsname | 16 - usr/src/lib/libcmd/common/RELEASE | 298 - usr/src/lib/libcmd/common/basename.c | 116 - usr/src/lib/libcmd/common/cat.c | 557 - usr/src/lib/libcmd/common/chgrp.c | 479 - usr/src/lib/libcmd/common/chmod.c | 308 - usr/src/lib/libcmd/common/chown.c | 39 - usr/src/lib/libcmd/common/cksum.c | 632 - usr/src/lib/libcmd/common/cmd.h | 163 - usr/src/lib/libcmd/common/cmdinit.c | 75 - usr/src/lib/libcmd/common/cmp.c | 289 - usr/src/lib/libcmd/common/comm.c | 201 - usr/src/lib/libcmd/common/cp.c | 950 - usr/src/lib/libcmd/common/cut.c | 702 - usr/src/lib/libcmd/common/date.c | 489 - usr/src/lib/libcmd/common/dirname.c | 136 - usr/src/lib/libcmd/common/expr.c | 535 - usr/src/lib/libcmd/common/fds.c | 360 - usr/src/lib/libcmd/common/features/ids | 8 - usr/src/lib/libcmd/common/features/sockets | 3 - usr/src/lib/libcmd/common/features/symlink | 21 - usr/src/lib/libcmd/common/features/utsname | 15 - usr/src/lib/libcmd/common/fmt.c | 632 - usr/src/lib/libcmd/common/fold.c | 242 - usr/src/lib/libcmd/common/fts_fix.c | 56 - usr/src/lib/libcmd/common/fts_fix.h | 48 - usr/src/lib/libcmd/common/getconf.c | 396 - usr/src/lib/libcmd/common/grep.c | 876 - usr/src/lib/libcmd/common/head.c | 150 - usr/src/lib/libcmd/common/id.c | 468 - usr/src/lib/libcmd/common/join.c | 996 - usr/src/lib/libcmd/common/ln.c | 35 - usr/src/lib/libcmd/common/logname.c | 78 - usr/src/lib/libcmd/common/md5sum.c | 35 - usr/src/lib/libcmd/common/mkdir.c | 181 - usr/src/lib/libcmd/common/mkfifo.c | 98 - usr/src/lib/libcmd/common/mktemp.c | 171 - usr/src/lib/libcmd/common/mv.c | 35 - usr/src/lib/libcmd/common/paste.c | 278 - usr/src/lib/libcmd/common/pathchk.c | 267 - usr/src/lib/libcmd/common/pids.c | 120 - usr/src/lib/libcmd/common/readlink.c | 111 - usr/src/lib/libcmd/common/rev.c | 160 - usr/src/lib/libcmd/common/rev.h | 34 - usr/src/lib/libcmd/common/revlib.c | 112 - usr/src/lib/libcmd/common/rm.c | 424 - usr/src/lib/libcmd/common/rmdir.c | 122 - usr/src/lib/libcmd/common/stty.c | 965 - usr/src/lib/libcmd/common/sum.c | 35 - usr/src/lib/libcmd/common/sync.c | 79 - usr/src/lib/libcmd/common/tail.c | 775 - usr/src/lib/libcmd/common/tee.c | 202 - usr/src/lib/libcmd/common/tty.c | 97 - usr/src/lib/libcmd/common/uname.c | 514 - usr/src/lib/libcmd/common/uniq.c | 338 - usr/src/lib/libcmd/common/vmstate.c | 163 - usr/src/lib/libcmd/common/wc.c | 188 - usr/src/lib/libcmd/common/wc.h | 59 - usr/src/lib/libcmd/common/wclib.c | 505 - usr/src/lib/libcmd/i386/Makefile | 31 - usr/src/lib/libcmd/i386/include/ast/cmd.h | 174 - usr/src/lib/libcmd/i386/include/ast/cmdext.h | 77 - usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/ids | 15 - .../lib/libcmd/i386/src/lib/libcmd/FEATURE/sockets | 13 - .../lib/libcmd/i386/src/lib/libcmd/FEATURE/symlink | 8 - .../lib/libcmd/i386/src/lib/libcmd/FEATURE/utsname | 16 - usr/src/lib/libcmd/mapfile-vers | 109 - usr/src/lib/libcmd/sparc/Makefile | 31 - usr/src/lib/libcmd/sparc/include/ast/cmd.h | 174 - usr/src/lib/libcmd/sparc/include/ast/cmdext.h | 77 - .../lib/libcmd/sparc/src/lib/libcmd/FEATURE/ids | 15 - .../libcmd/sparc/src/lib/libcmd/FEATURE/sockets | 13 - .../libcmd/sparc/src/lib/libcmd/FEATURE/symlink | 8 - .../libcmd/sparc/src/lib/libcmd/FEATURE/utsname | 16 - usr/src/lib/libcmd/sparcv9/Makefile | 34 - usr/src/lib/libcmd/sparcv9/include/ast/cmd.h | 174 - usr/src/lib/libcmd/sparcv9/include/ast/cmdext.h | 77 - .../lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/ids | 15 - .../libcmd/sparcv9/src/lib/libcmd/FEATURE/sockets | 13 - .../libcmd/sparcv9/src/lib/libcmd/FEATURE/symlink | 8 - .../libcmd/sparcv9/src/lib/libcmd/FEATURE/utsname | 16 - usr/src/lib/libdll/Makefile | 63 - usr/src/lib/libdll/Makefile.com | 95 - usr/src/lib/libdll/THIRDPARTYLICENSE | 245 - usr/src/lib/libdll/THIRDPARTYLICENSE.descrip | 1 - usr/src/lib/libdll/amd64/Makefile | 34 - .../lib/libdll/amd64/src/lib/libdll/FEATURE/dll | 129 - usr/src/lib/libdll/amd64/src/lib/libdll/dlldefs.h | 129 - usr/src/lib/libdll/common/RELEASE | 43 - usr/src/lib/libdll/common/dlfcn.c | 534 - usr/src/lib/libdll/common/dllfind.c | 46 - usr/src/lib/libdll/common/dlllook.c | 46 - usr/src/lib/libdll/common/dllnext.c | 223 - usr/src/lib/libdll/common/dllopen.c | 93 - usr/src/lib/libdll/common/dllplug.c | 73 - usr/src/lib/libdll/common/dllscan.c | 505 - usr/src/lib/libdll/common/features/dll | 242 - usr/src/lib/libdll/i386/Makefile | 33 - usr/src/lib/libdll/i386/src/lib/libdll/FEATURE/dll | 129 - usr/src/lib/libdll/i386/src/lib/libdll/dlldefs.h | 129 - usr/src/lib/libdll/mapfile-vers | 55 - usr/src/lib/libdll/sparc/Makefile | 33 - .../lib/libdll/sparc/src/lib/libdll/FEATURE/dll | 129 - usr/src/lib/libdll/sparc/src/lib/libdll/dlldefs.h | 129 - usr/src/lib/libdll/sparcv9/Makefile | 34 - .../lib/libdll/sparcv9/src/lib/libdll/FEATURE/dll | 129 - .../lib/libdll/sparcv9/src/lib/libdll/dlldefs.h | 129 - usr/src/lib/libpp/Makefile | 63 - usr/src/lib/libpp/Makefile.com | 126 - usr/src/lib/libpp/THIRDPARTYLICENSE | 245 - usr/src/lib/libpp/THIRDPARTYLICENSE.descrip | 1 - usr/src/lib/libpp/common/BUGS | 6 - usr/src/lib/libpp/common/HISTORY | 220 - usr/src/lib/libpp/common/NOTES | 83 - usr/src/lib/libpp/common/RELEASE | 449 - usr/src/lib/libpp/common/gentab.sh | 234 - usr/src/lib/libpp/common/pp.3 | 890 - usr/src/lib/libpp/common/pp.def | 283 - usr/src/lib/libpp/common/pp.h | 452 - usr/src/lib/libpp/common/pp.key | 117 - usr/src/lib/libpp/common/pp.probe | 1225 - usr/src/lib/libpp/common/pp.tab | 233 - usr/src/lib/libpp/common/ppargs.c | 608 - usr/src/lib/libpp/common/ppbuiltin.c | 405 - usr/src/lib/libpp/common/ppcall.c | 459 - usr/src/lib/libpp/common/ppcomment.c | 35 - usr/src/lib/libpp/common/ppcontext.c | 65 - usr/src/lib/libpp/common/ppcontrol.c | 2315 -- usr/src/lib/libpp/common/ppcpp.c | 30 - usr/src/lib/libpp/common/ppdata.c | 179 - usr/src/lib/libpp/common/pperror.c | 38 - usr/src/lib/libpp/common/ppexpr.c | 697 - usr/src/lib/libpp/common/ppfsm.c | 946 - usr/src/lib/libpp/common/ppfsm.h | 278 - usr/src/lib/libpp/common/ppincref.c | 49 - usr/src/lib/libpp/common/ppinput.c | 721 - usr/src/lib/libpp/common/ppkey.c | 118 - usr/src/lib/libpp/common/ppkey.h | 146 - usr/src/lib/libpp/common/pplex.c | 2446 -- usr/src/lib/libpp/common/pplib.h | 863 - usr/src/lib/libpp/common/ppline.c | 86 - usr/src/lib/libpp/common/ppmacref.c | 58 - usr/src/lib/libpp/common/ppmisc.c | 242 - usr/src/lib/libpp/common/ppop.c | 1557 -- usr/src/lib/libpp/common/pppragma.c | 66 - usr/src/lib/libpp/common/ppprintf.c | 45 - usr/src/lib/libpp/common/ppproto.c | 2557 --- usr/src/lib/libpp/common/ppsearch.c | 815 - usr/src/lib/libpp/common/ppsym.c | 94 - usr/src/lib/libpp/common/pptrace.c | 264 - usr/src/lib/libpp/i386/Makefile | 30 - usr/src/lib/libpp/i386/pp.req | 2 - usr/src/lib/libpp/i386/pp.yacc | 1 - usr/src/lib/libpp/i386/ppdebug.h | 211 - usr/src/lib/libpp/i386/ppdef.h | 220 - usr/src/lib/libpp/i386/pptab.h | 152 - usr/src/lib/libpp/mapfile-vers | 52 - usr/src/lib/libpp/sparc/Makefile | 29 - usr/src/lib/libpp/sparc/pp.req | 2 - usr/src/lib/libpp/sparc/pp.yacc | 1 - usr/src/lib/libpp/sparc/ppdebug.h | 211 - usr/src/lib/libpp/sparc/ppdef.h | 220 - usr/src/lib/libpp/sparc/pptab.h | 152 - usr/src/lib/libshell/Makefile | 68 - usr/src/lib/libshell/Makefile.com | 174 - usr/src/lib/libshell/Makefile.demo | 188 - usr/src/lib/libshell/Makefile.doc | 77 - usr/src/lib/libshell/THIRDPARTYLICENSE | 245 - usr/src/lib/libshell/THIRDPARTYLICENSE.descrip | 1 - usr/src/lib/libshell/amd64/Makefile | 30 - usr/src/lib/libshell/amd64/include/ast/history.h | 84 - usr/src/lib/libshell/amd64/include/ast/nval.h | 323 - usr/src/lib/libshell/amd64/include/ast/shell.h | 264 - .../lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct | 13 - .../lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds | 37 - .../libshell/amd64/src/cmd/ksh93/FEATURE/dynamic | 22 - .../libshell/amd64/src/cmd/ksh93/FEATURE/execargs | 11 - .../libshell/amd64/src/cmd/ksh93/FEATURE/externs | 86 - .../libshell/amd64/src/cmd/ksh93/FEATURE/locale | 39 - .../lib/libshell/amd64/src/cmd/ksh93/FEATURE/math | 183 - .../libshell/amd64/src/cmd/ksh93/FEATURE/options | 25 - .../lib/libshell/amd64/src/cmd/ksh93/FEATURE/poll | 120 - .../lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat | 11 - .../libshell/amd64/src/cmd/ksh93/FEATURE/rlimits | 20 - .../libshell/amd64/src/cmd/ksh93/FEATURE/setjmp | 36 - .../amd64/src/cmd/ksh93/FEATURE/sigfeatures | 55 - .../lib/libshell/amd64/src/cmd/ksh93/FEATURE/time | 29 - .../lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys | 20 - usr/src/lib/libshell/common/COMPATIBILITY | 134 - usr/src/lib/libshell/common/DESIGN | 170 - usr/src/lib/libshell/common/OBSOLETE | 152 - usr/src/lib/libshell/common/PROMO.mm | 141 - usr/src/lib/libshell/common/README | 232 - usr/src/lib/libshell/common/RELEASE | 2204 -- usr/src/lib/libshell/common/RELEASE88 | 422 - usr/src/lib/libshell/common/RELEASE93 | 455 - usr/src/lib/libshell/common/TYPES | 182 - usr/src/lib/libshell/common/bltins/alarm.c | 276 - usr/src/lib/libshell/common/bltins/cd_pwd.c | 254 - usr/src/lib/libshell/common/bltins/cflow.c | 117 - usr/src/lib/libshell/common/bltins/enum.c | 283 - usr/src/lib/libshell/common/bltins/getopts.c | 193 - usr/src/lib/libshell/common/bltins/hist.c | 309 - usr/src/lib/libshell/common/bltins/misc.c | 593 - usr/src/lib/libshell/common/bltins/mkservice.c | 494 - usr/src/lib/libshell/common/bltins/poll_solaris.c | 390 - usr/src/lib/libshell/common/bltins/print.c | 1026 - usr/src/lib/libshell/common/bltins/read.c | 729 - usr/src/lib/libshell/common/bltins/regress.c | 343 - .../lib/libshell/common/bltins/shiocmd_solaris.c | 906 - usr/src/lib/libshell/common/bltins/sleep.c | 173 - usr/src/lib/libshell/common/bltins/test.c | 664 - usr/src/lib/libshell/common/bltins/trap.c | 420 - usr/src/lib/libshell/common/bltins/typeset.c | 1215 - usr/src/lib/libshell/common/bltins/ulimit.c | 210 - usr/src/lib/libshell/common/bltins/umask.c | 98 - usr/src/lib/libshell/common/bltins/whence.c | 284 - usr/src/lib/libshell/common/builtins.mm | 631 - usr/src/lib/libshell/common/data/aliases.c | 59 - usr/src/lib/libshell/common/data/bash_pre_rc.sh | 255 - usr/src/lib/libshell/common/data/builtins.c | 1898 -- usr/src/lib/libshell/common/data/keywords.c | 63 - usr/src/lib/libshell/common/data/lexstates.c | 413 - usr/src/lib/libshell/common/data/limits.c | 57 - usr/src/lib/libshell/common/data/math.tab | 73 - usr/src/lib/libshell/common/data/msg.c | 198 - usr/src/lib/libshell/common/data/options.c | 148 - usr/src/lib/libshell/common/data/signals.c | 249 - usr/src/lib/libshell/common/data/solaris_cmdlist.h | 194 - usr/src/lib/libshell/common/data/strdata.c | 104 - usr/src/lib/libshell/common/data/testops.c | 174 - usr/src/lib/libshell/common/data/variables.c | 133 - usr/src/lib/libshell/common/edit/completion.c | 556 - usr/src/lib/libshell/common/edit/edit.c | 1592 -- usr/src/lib/libshell/common/edit/emacs.c | 1487 -- usr/src/lib/libshell/common/edit/hexpand.c | 737 - usr/src/lib/libshell/common/edit/history.c | 1190 - usr/src/lib/libshell/common/edit/vi.c | 2674 --- usr/src/lib/libshell/common/features/cmds | 1 - usr/src/lib/libshell/common/features/dynamic | 12 - usr/src/lib/libshell/common/features/externs | 13 - usr/src/lib/libshell/common/features/locale | 25 - usr/src/lib/libshell/common/features/math | 4 - usr/src/lib/libshell/common/features/math.sh | 189 - usr/src/lib/libshell/common/features/options | 47 - usr/src/lib/libshell/common/features/poll | 155 - usr/src/lib/libshell/common/features/rlimits | 3 - usr/src/lib/libshell/common/features/setjmp | 18 - usr/src/lib/libshell/common/features/sigfeatures | 49 - usr/src/lib/libshell/common/features/time | 35 - usr/src/lib/libshell/common/features/ttys | 3 - usr/src/lib/libshell/common/fun/dirs | 108 - usr/src/lib/libshell/common/fun/popd | 111 - usr/src/lib/libshell/common/fun/pushd | 111 - usr/src/lib/libshell/common/fun/title | 57 - usr/src/lib/libshell/common/include/argnod.h | 145 - usr/src/lib/libshell/common/include/builtins.h | 202 - usr/src/lib/libshell/common/include/defs.h | 465 - usr/src/lib/libshell/common/include/edit.h | 258 - usr/src/lib/libshell/common/include/env.h | 50 - usr/src/lib/libshell/common/include/fault.h | 129 - usr/src/lib/libshell/common/include/fcin.h | 63 - usr/src/lib/libshell/common/include/history.h | 75 - usr/src/lib/libshell/common/include/io.h | 125 - usr/src/lib/libshell/common/include/jobs.h | 185 - usr/src/lib/libshell/common/include/lexstates.h | 153 - usr/src/lib/libshell/common/include/name.h | 238 - usr/src/lib/libshell/common/include/national.h | 37 - usr/src/lib/libshell/common/include/nval.h | 311 - usr/src/lib/libshell/common/include/path.h | 142 - usr/src/lib/libshell/common/include/regress.h | 66 - usr/src/lib/libshell/common/include/shell.h | 253 - usr/src/lib/libshell/common/include/shlex.h | 169 - usr/src/lib/libshell/common/include/shnodes.h | 220 - usr/src/lib/libshell/common/include/shtable.h | 65 - usr/src/lib/libshell/common/include/streval.h | 198 - usr/src/lib/libshell/common/include/terminal.h | 195 - usr/src/lib/libshell/common/include/test.h | 71 - usr/src/lib/libshell/common/include/timeout.h | 30 - usr/src/lib/libshell/common/include/ulimit.h | 175 - usr/src/lib/libshell/common/include/variables.h | 109 - usr/src/lib/libshell/common/include/version.h | 20 - usr/src/lib/libshell/common/nval.3 | 693 - usr/src/lib/libshell/common/scripts/cpvprint.sh | 184 - .../libshell/common/scripts/crawlsrccomments.sh | 1241 - .../lib/libshell/common/scripts/filemutexdemo1.sh | 266 - usr/src/lib/libshell/common/scripts/filetree1.sh | 231 - usr/src/lib/libshell/common/scripts/gnaw.sh | 1044 - .../lib/libshell/common/scripts/mandelbrotset1.sh | 292 - usr/src/lib/libshell/common/scripts/multifollow.sh | 147 - usr/src/lib/libshell/common/scripts/numtree1.sh | 237 - .../lib/libshell/common/scripts/primenumbers1.sh | 114 - usr/src/lib/libshell/common/scripts/rssread.sh | 674 - usr/src/lib/libshell/common/scripts/shcalc.sh | 150 - usr/src/lib/libshell/common/scripts/shircbot.sh | 428 - usr/src/lib/libshell/common/scripts/shlint.sh | 95 - usr/src/lib/libshell/common/scripts/shman.sh | 395 - usr/src/lib/libshell/common/scripts/shnote.sh | 413 - usr/src/lib/libshell/common/scripts/shpiano.sh | 1414 -- usr/src/lib/libshell/common/scripts/shtinyurl.sh | 265 - usr/src/lib/libshell/common/scripts/shtwitter.sh | 355 - .../common/scripts/simplefileattributetree1.sh | 276 - .../lib/libshell/common/scripts/simplefiletree1.sh | 129 - .../lib/libshell/common/scripts/svcproptree1.sh | 172 - usr/src/lib/libshell/common/scripts/termclock.sh | 311 - .../lib/libshell/common/scripts/test_net_sctp.sh | 64 - .../libshell/common/scripts/xmldocumenttree1.sh | 358 - usr/src/lib/libshell/common/sh.1 | 7877 ------- usr/src/lib/libshell/common/sh.memo | 3248 --- usr/src/lib/libshell/common/sh/args.c | 879 - usr/src/lib/libshell/common/sh/arith.c | 396 - usr/src/lib/libshell/common/sh/array.c | 1355 -- usr/src/lib/libshell/common/sh/bash.c | 424 - usr/src/lib/libshell/common/sh/defs.c | 47 - usr/src/lib/libshell/common/sh/deparse.c | 584 - usr/src/lib/libshell/common/sh/env.c | 255 - usr/src/lib/libshell/common/sh/expand.c | 468 - usr/src/lib/libshell/common/sh/fault.c | 646 - usr/src/lib/libshell/common/sh/fcin.c | 212 - usr/src/lib/libshell/common/sh/init.c | 1838 -- usr/src/lib/libshell/common/sh/io.c | 2412 -- usr/src/lib/libshell/common/sh/jobs.c | 1854 -- usr/src/lib/libshell/common/sh/lex.c | 2416 -- usr/src/lib/libshell/common/sh/macro.c | 2597 --- usr/src/lib/libshell/common/sh/main.c | 786 - usr/src/lib/libshell/common/sh/name.c | 3278 --- usr/src/lib/libshell/common/sh/nvdisc.c | 1396 -- usr/src/lib/libshell/common/sh/nvtree.c | 1095 - usr/src/lib/libshell/common/sh/nvtype.c | 1551 -- usr/src/lib/libshell/common/sh/parse.c | 1966 -- usr/src/lib/libshell/common/sh/path.c | 1802 -- usr/src/lib/libshell/common/sh/pmain.c | 47 - usr/src/lib/libshell/common/sh/shcomp.c | 177 - usr/src/lib/libshell/common/sh/streval.c | 933 - usr/src/lib/libshell/common/sh/string.c | 711 - usr/src/lib/libshell/common/sh/subshell.c | 757 - usr/src/lib/libshell/common/sh/suid_exec.c | 509 - usr/src/lib/libshell/common/sh/tdump.c | 260 - usr/src/lib/libshell/common/sh/timers.c | 248 - usr/src/lib/libshell/common/sh/trestore.c | 349 - usr/src/lib/libshell/common/sh/waitevent.c | 54 - usr/src/lib/libshell/common/sh/xec.c | 3288 --- usr/src/lib/libshell/common/shell.3 | 422 - usr/src/lib/libshell/common/tests/README.tests | 53 - usr/src/lib/libshell/common/tests/alias.sh | 99 - usr/src/lib/libshell/common/tests/append.sh | 80 - usr/src/lib/libshell/common/tests/arith.sh | 562 - usr/src/lib/libshell/common/tests/arrays.sh | 501 - usr/src/lib/libshell/common/tests/arrays2.sh | 123 - usr/src/lib/libshell/common/tests/attributes.sh | 363 - usr/src/lib/libshell/common/tests/basic.sh | 482 - usr/src/lib/libshell/common/tests/bracket.sh | 323 - usr/src/lib/libshell/common/tests/builtins.sh | 528 - usr/src/lib/libshell/common/tests/case.sh | 81 - usr/src/lib/libshell/common/tests/comvar.sh | 541 - usr/src/lib/libshell/common/tests/coprocess.sh | 313 - usr/src/lib/libshell/common/tests/cubetype.sh | 211 - usr/src/lib/libshell/common/tests/enum.sh | 67 - usr/src/lib/libshell/common/tests/exit.sh | 80 - usr/src/lib/libshell/common/tests/expand.sh | 125 - usr/src/lib/libshell/common/tests/functions.sh | 1096 - usr/src/lib/libshell/common/tests/glob.sh | 375 - usr/src/lib/libshell/common/tests/grep.sh | 104 - usr/src/lib/libshell/common/tests/heredoc.sh | 255 - usr/src/lib/libshell/common/tests/io.sh | 451 - usr/src/lib/libshell/common/tests/nameref.sh | 365 - usr/src/lib/libshell/common/tests/options.sh | 499 - usr/src/lib/libshell/common/tests/path.sh | 306 - usr/src/lib/libshell/common/tests/pointtype.sh | 145 - usr/src/lib/libshell/common/tests/quoting.sh | 342 - usr/src/lib/libshell/common/tests/quoting2.sh | 209 - usr/src/lib/libshell/common/tests/recttype.sh | 69 - usr/src/lib/libshell/common/tests/restricted.sh | 82 - usr/src/lib/libshell/common/tests/return.sh | 182 - usr/src/lib/libshell/common/tests/select.sh | 66 - usr/src/lib/libshell/common/tests/shtests | 155 - usr/src/lib/libshell/common/tests/sigchld.sh | 139 - usr/src/lib/libshell/common/tests/signal.sh | 323 - usr/src/lib/libshell/common/tests/statics.sh | 106 - usr/src/lib/libshell/common/tests/subshell.sh | 472 - usr/src/lib/libshell/common/tests/substring.sh | 568 - .../tests/sun_solaris_array_default_datatype.sh | 302 - .../common/tests/sun_solaris_builtin_poll.sh | 72 - .../common/tests/sun_solaris_builtin_sum.sh | 110 - .../common/tests/sun_solaris_builtin_tail.sh | 500 - .../tests/sun_solaris_command_substitution.sh | 290 - .../common/tests/sun_solaris_compound_misc.sh | 163 - .../common/tests/sun_solaris_compound_nameref.sh | 214 - .../common/tests/sun_solaris_compoundvario.sh | 334 - ...ubstitution_exec_redirection_allocation_loop.sh | 214 - ...6713682_compound_var_bleeds_through_subshell.sh | 111 - .../sun_solaris_cr_6722134_background_CHLD_trap.sh | 122 - .../sun_solaris_cr_6753538_subshell_leaks_umask.sh | 100 - ...is_cr_6754020_weird_square_bracket_expansion.sh | 80 - ...laris_cr_6763594_command_failure_execs_twice.sh | 98 - .../sun_solaris_cr_6766246_pattern_matching_bug.sh | 174 - ...tutions_terminate_shell_after_257_iterations.sh | 123 - ...cr_6777491_lacks_arithmetric_function_iszero.sh | 94 - .../tests/sun_solaris_cr_6778077_sigthaw_trap.sh | 82 - ..._solaris_cr_6789247_printf_hexfloat_rounding.sh | 129 - ...s_cr_6800929_large_command_substitution_hang.sh | 211 - .../tests/sun_solaris_cr_6805792_varmovetest1.sh | 151 - ...is_cr_6805794_character_to_wchar_not_working.sh | 105 - .../tests/sun_solaris_cr_6805795_negative_zero.sh | 169 - ...olaris_cr_6807179_shellpattern_uses_getpwnam.sh | 88 - .../sun_solaris_cr_6835835_builtin_cat_n_broken.sh | 138 - ...st_with_test_undefined_executes_test_builtin.sh | 93 - ..._6855875_typeset_hexfloat_has_too_few_digits.sh | 144 - ...s_cr_6862121_shbinexec_kernel_module_defunct.sh | 110 - ..._background_process_in_subshell_hangs_caller.sh | 81 - ...mishandles_return_value_of_its_child_process.sh | 183 - ...c_no_longer_counts_number_of_bytes_correctly.sh | 174 - ..._-d_with_multibyte_character_no_longer_works.sh | 193 - ...o_longer_works_with_multibyte_char_separator.sh | 190 - ...T_trap_handlers_are_sometimes_executed_twice.sh | 221 - .../tests/sun_solaris_cr_xxxxxxxx_template.sh | 66 - .../libshell/common/tests/sun_solaris_getconf.sh | 175 - .../tests/sun_solaris_local_compound_nameref001.sh | 68 - .../common/tests/sun_solaris_locale_misc.sh | 188 - .../common/tests/sun_solaris_staticvariables.sh | 113 - .../common/tests/sun_solaris_vartree001.sh | 192 - .../common/tests/sun_solaris_vartree002.sh | 358 - .../common/tests/sun_solaris_vartree003.sh | 199 - usr/src/lib/libshell/common/tests/tilde.sh | 95 - usr/src/lib/libshell/common/tests/timetype.sh | 80 - usr/src/lib/libshell/common/tests/treemove.sh | 85 - usr/src/lib/libshell/common/tests/types.sh | 379 - usr/src/lib/libshell/common/tests/variables.sh | 659 - usr/src/lib/libshell/common/tests/vartree1.sh | 214 - usr/src/lib/libshell/common/tests/vartree2.sh | 334 - usr/src/lib/libshell/i386/Makefile | 29 - usr/src/lib/libshell/i386/include/ast/history.h | 84 - usr/src/lib/libshell/i386/include/ast/nval.h | 323 - usr/src/lib/libshell/i386/include/ast/shell.h | 264 - .../lib/libshell/i386/src/cmd/ksh93/FEATURE/acct | 13 - .../lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds | 37 - .../libshell/i386/src/cmd/ksh93/FEATURE/dynamic | 22 - .../libshell/i386/src/cmd/ksh93/FEATURE/execargs | 11 - .../libshell/i386/src/cmd/ksh93/FEATURE/externs | 86 - .../lib/libshell/i386/src/cmd/ksh93/FEATURE/locale | 39 - .../lib/libshell/i386/src/cmd/ksh93/FEATURE/math | 183 - .../libshell/i386/src/cmd/ksh93/FEATURE/options | 25 - .../lib/libshell/i386/src/cmd/ksh93/FEATURE/poll | 120 - .../lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat | 11 - .../libshell/i386/src/cmd/ksh93/FEATURE/rlimits | 20 - .../lib/libshell/i386/src/cmd/ksh93/FEATURE/setjmp | 36 - .../i386/src/cmd/ksh93/FEATURE/sigfeatures | 55 - .../lib/libshell/i386/src/cmd/ksh93/FEATURE/time | 29 - .../lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys | 20 - usr/src/lib/libshell/mapfile-vers | 183 - usr/src/lib/libshell/misc/ERRATA.txt | 1017 - usr/src/lib/libshell/misc/buildksh93.readme | 78 - usr/src/lib/libshell/misc/buildksh93.sh | 562 - usr/src/lib/libshell/misc/filelist.txt | 91 - usr/src/lib/libshell/misc/images/callouts/1.png | Bin 236 -> 0 bytes usr/src/lib/libshell/misc/images/callouts/10.png | Bin 284 -> 0 bytes usr/src/lib/libshell/misc/images/callouts/2.png | Bin 261 -> 0 bytes usr/src/lib/libshell/misc/images/callouts/3.png | Bin 265 -> 0 bytes usr/src/lib/libshell/misc/images/callouts/4.png | Bin 260 -> 0 bytes usr/src/lib/libshell/misc/images/callouts/5.png | Bin 261 -> 0 bytes usr/src/lib/libshell/misc/images/callouts/6.png | Bin 278 -> 0 bytes usr/src/lib/libshell/misc/images/callouts/7.png | Bin 253 -> 0 bytes usr/src/lib/libshell/misc/images/callouts/8.png | Bin 275 -> 0 bytes usr/src/lib/libshell/misc/images/callouts/9.png | Bin 284 -> 0 bytes usr/src/lib/libshell/misc/images/tag_bourne.png | Bin 130 -> 0 bytes usr/src/lib/libshell/misc/images/tag_i18n.png | Bin 124 -> 0 bytes usr/src/lib/libshell/misc/images/tag_ksh.png | Bin 122 -> 0 bytes usr/src/lib/libshell/misc/images/tag_ksh88.png | Bin 124 -> 0 bytes usr/src/lib/libshell/misc/images/tag_ksh93.png | Bin 140 -> 0 bytes usr/src/lib/libshell/misc/images/tag_l10n.png | Bin 118 -> 0 bytes usr/src/lib/libshell/misc/images/tag_perf.png | Bin 127 -> 0 bytes usr/src/lib/libshell/misc/shell_styleguide.docbook | 1464 -- usr/src/lib/libshell/sparc/Makefile | 33 - usr/src/lib/libshell/sparc/include/ast/history.h | 84 - usr/src/lib/libshell/sparc/include/ast/nval.h | 323 - usr/src/lib/libshell/sparc/include/ast/shell.h | 264 - .../lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct | 13 - .../lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds | 37 - .../libshell/sparc/src/cmd/ksh93/FEATURE/dynamic | 22 - .../libshell/sparc/src/cmd/ksh93/FEATURE/execargs | 11 - .../libshell/sparc/src/cmd/ksh93/FEATURE/externs | 86 - .../libshell/sparc/src/cmd/ksh93/FEATURE/locale | 39 - .../lib/libshell/sparc/src/cmd/ksh93/FEATURE/math | 183 - .../libshell/sparc/src/cmd/ksh93/FEATURE/options | 25 - .../lib/libshell/sparc/src/cmd/ksh93/FEATURE/poll | 120 - .../lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat | 11 - .../libshell/sparc/src/cmd/ksh93/FEATURE/rlimits | 20 - .../libshell/sparc/src/cmd/ksh93/FEATURE/setjmp | 36 - .../sparc/src/cmd/ksh93/FEATURE/sigfeatures | 55 - .../lib/libshell/sparc/src/cmd/ksh93/FEATURE/time | 29 - .../lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys | 20 - usr/src/lib/libshell/sparcv9/Makefile | 34 - usr/src/lib/libshell/sparcv9/include/ast/history.h | 84 - usr/src/lib/libshell/sparcv9/include/ast/nval.h | 323 - usr/src/lib/libshell/sparcv9/include/ast/shell.h | 264 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/acct | 13 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds | 37 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic | 22 - .../sparcv9/src/cmd/ksh93/FEATURE/execargs | 11 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/externs | 86 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/locale | 39 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/math | 183 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/options | 25 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/poll | 120 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat | 11 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/rlimits | 20 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/setjmp | 36 - .../sparcv9/src/cmd/ksh93/FEATURE/sigfeatures | 55 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/time | 29 - .../libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys | 20 - usr/src/lib/libsum/Makefile | 63 - usr/src/lib/libsum/Makefile.com | 95 - usr/src/lib/libsum/THIRDPARTYLICENSE | 245 - usr/src/lib/libsum/THIRDPARTYLICENSE.descrip | 1 - usr/src/lib/libsum/amd64/Makefile | 30 - usr/src/lib/libsum/amd64/include/ast/sum.h | 74 - .../lib/libsum/amd64/src/lib/libsum/FEATURE/sum | 16 - usr/src/lib/libsum/common/RELEASE | 15 - usr/src/lib/libsum/common/features/sum | 4 - usr/src/lib/libsum/common/sum-ast4.c | 120 - usr/src/lib/libsum/common/sum-att.c | 124 - usr/src/lib/libsum/common/sum-bsd.c | 48 - usr/src/lib/libsum/common/sum-crc.c | 333 - usr/src/lib/libsum/common/sum-lmd.c | 330 - usr/src/lib/libsum/common/sum-md5.c | 374 - usr/src/lib/libsum/common/sum-prng.c | 113 - usr/src/lib/libsum/common/sum-sha1.c | 342 - usr/src/lib/libsum/common/sum-sha2.c | 1248 - usr/src/lib/libsum/common/sum.h | 65 - usr/src/lib/libsum/common/sumlib.c | 374 - usr/src/lib/libsum/i386/Makefile | 29 - usr/src/lib/libsum/i386/include/ast/sum.h | 74 - usr/src/lib/libsum/i386/src/lib/libsum/FEATURE/sum | 16 - usr/src/lib/libsum/mapfile-vers | 54 - usr/src/lib/libsum/sparc/Makefile | 29 - usr/src/lib/libsum/sparc/include/ast/sum.h | 74 - .../lib/libsum/sparc/src/lib/libsum/FEATURE/sum | 16 - usr/src/lib/libsum/sparcv9/Makefile | 30 - usr/src/lib/libsum/sparcv9/include/ast/sum.h | 74 - .../lib/libsum/sparcv9/src/lib/libsum/FEATURE/sum | 16 - usr/src/man/man1/ksh93.1 | 2139 +- usr/src/pkg/manifests/SUNWcs.mf | 2 + usr/src/pkg/manifests/developer-astdev.mf | 5 +- usr/src/pkg/manifests/source-demo-system.mf | 13 +- usr/src/pkg/manifests/system-header.mf | 10 +- usr/src/pkg/manifests/system-library.mf | 11 +- usr/src/tools/findunref/exception_list.open | 60 +- 3820 files changed, 458172 insertions(+), 425510 deletions(-) delete mode 100644 usr/src/Makefile.ast create mode 100644 usr/src/cmd/ast/Makefile.ast create mode 100644 usr/src/cmd/ast/Makefile.asthdr create mode 100644 usr/src/cmd/ast/Makefile.astmsg create mode 100644 usr/src/cmd/ast/Makefile.iffe create mode 100644 usr/src/cmd/ast/README.ast delete mode 100644 usr/src/cmd/ast/THIRDPARTYLICENSE delete mode 100644 usr/src/cmd/ast/THIRDPARTYLICENSE.descrip create mode 100644 usr/src/cmd/ast/ksh/Makefile create mode 100644 usr/src/cmd/ast/ksh/Makefile.com create mode 100644 usr/src/cmd/ast/ksh/Makefile.testshell create mode 100644 usr/src/cmd/ast/ksh/amd64/Makefile create mode 100644 usr/src/cmd/ast/ksh/builtins/Makefile create mode 100644 usr/src/cmd/ast/ksh/builtins/alias.c create mode 100644 usr/src/cmd/ast/ksh/i386/Makefile create mode 100644 usr/src/cmd/ast/ksh/sparc/Makefile create mode 100644 usr/src/cmd/ast/ksh/sparcv9/Makefile create mode 100644 usr/src/cmd/ast/libast/Makefile create mode 100644 usr/src/cmd/ast/libast/Makefile.com create mode 100644 usr/src/cmd/ast/libast/Makefile.defs create mode 100644 usr/src/cmd/ast/libast/Makefile.iffe create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/align create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/api create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/aso create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/asometh create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/botch create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/ccode create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/common create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/dirent create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/eaccess create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/errno create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/fcntl create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/float create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/fs create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/hack create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/iconv create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/lib create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/libpath create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/limits create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/locale create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/map create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/mmap create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/mode create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/ndbm create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/nl_types create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/omitted create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/options create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/param create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/preroot create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/prog create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/sfinit create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/sfio create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/sig create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/siglist create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/signal create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/sizeof create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/standards create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/stdio create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/sys create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/syscall create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/time create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/tmlib create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/tmx create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/tty create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/tv create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/tvlib create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/uwin create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/vfork create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/vmalloc create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/wait create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/wchar create mode 100644 usr/src/cmd/ast/libast/amd64/FEATURE/wctype create mode 100644 usr/src/cmd/ast/libast/amd64/Makefile create mode 100644 usr/src/cmd/ast/libast/amd64/Makefile.iffe create mode 100644 usr/src/cmd/ast/libast/amd64/conflim.h create mode 100644 usr/src/cmd/ast/libast/amd64/conftab.c create mode 100644 usr/src/cmd/ast/libast/amd64/conftab.h create mode 100644 usr/src/cmd/ast/libast/amd64/lc.h create mode 100644 usr/src/cmd/ast/libast/amd64/lctab.c create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/align create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/api create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/aso create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/asometh create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/botch create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/ccode create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/common create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/dirent create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/eaccess create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/errno create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/fcntl create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/float create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/fs create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/hack create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/iconv create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/lib create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/libpath create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/limits create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/locale create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/map create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/mmap create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/mode create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/ndbm create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/nl_types create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/omitted create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/options create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/param create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/preroot create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/prog create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/sfinit create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/sfio create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/sig create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/siglist create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/signal create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/sizeof create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/standards create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/stdio create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/sys create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/syscall create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/time create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/tmlib create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/tmx create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/tty create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/tv create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/tvlib create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/uwin create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/vfork create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/vmalloc create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/wait create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/wchar create mode 100644 usr/src/cmd/ast/libast/i386/FEATURE/wctype create mode 100644 usr/src/cmd/ast/libast/i386/Makefile create mode 100644 usr/src/cmd/ast/libast/i386/Makefile.iffe create mode 100644 usr/src/cmd/ast/libast/i386/conflim.h create mode 100644 usr/src/cmd/ast/libast/i386/conftab.c create mode 100644 usr/src/cmd/ast/libast/i386/conftab.h create mode 100644 usr/src/cmd/ast/libast/i386/lc.h create mode 100644 usr/src/cmd/ast/libast/i386/lctab.c create mode 100644 usr/src/cmd/ast/libast/mapfile-vers create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/align create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/api create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/aso create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/asometh create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/botch create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/ccode create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/common create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/dirent create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/eaccess create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/errno create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/fcntl create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/float create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/fs create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/hack create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/iconv create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/lib create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/libpath create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/limits create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/locale create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/map create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/mmap create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/mode create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/ndbm create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/nl_types create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/omitted create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/options create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/param create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/preroot create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/prog create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/sfinit create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/sfio create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/sig create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/siglist create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/signal create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/sizeof create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/standards create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/stdio create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/sys create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/syscall create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/time create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/tmlib create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/tmx create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/tty create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/tv create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/tvlib create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/uwin create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/vfork create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/vmalloc create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/wait create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/wchar create mode 100644 usr/src/cmd/ast/libast/sparc/FEATURE/wctype create mode 100644 usr/src/cmd/ast/libast/sparc/Makefile create mode 100644 usr/src/cmd/ast/libast/sparc/Makefile.iffe create mode 100644 usr/src/cmd/ast/libast/sparc/conflim.h create mode 100644 usr/src/cmd/ast/libast/sparc/conftab.c create mode 100644 usr/src/cmd/ast/libast/sparc/conftab.h create mode 100644 usr/src/cmd/ast/libast/sparc/lc.h create mode 100644 usr/src/cmd/ast/libast/sparc/lctab.c create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/align create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/api create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/aso create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/asometh create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/botch create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/ccode create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/common create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/dirent create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/eaccess create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/errno create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/fcntl create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/float create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/fs create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/hack create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/iconv create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/lib create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/libpath create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/limits create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/locale create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/map create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/mmap create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/mode create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/ndbm create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/nl_types create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/omitted create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/options create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/param create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/preroot create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/prog create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/sfinit create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/sfio create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/sig create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/siglist create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/signal create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/sizeof create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/standards create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/stdio create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/sys create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/syscall create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/time create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/tmlib create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/tmx create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/tty create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/tv create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/tvlib create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/uwin create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/vfork create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/vmalloc create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/wait create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/wchar create mode 100644 usr/src/cmd/ast/libast/sparcv9/FEATURE/wctype create mode 100644 usr/src/cmd/ast/libast/sparcv9/Makefile create mode 100644 usr/src/cmd/ast/libast/sparcv9/Makefile.iffe create mode 100644 usr/src/cmd/ast/libast/sparcv9/conflim.h create mode 100644 usr/src/cmd/ast/libast/sparcv9/conftab.c create mode 100644 usr/src/cmd/ast/libast/sparcv9/conftab.h create mode 100644 usr/src/cmd/ast/libast/sparcv9/lc.h create mode 100644 usr/src/cmd/ast/libast/sparcv9/lctab.c create mode 100644 usr/src/cmd/ast/libcmd/Makefile create mode 100644 usr/src/cmd/ast/libcmd/Makefile.com create mode 100644 usr/src/cmd/ast/libcmd/Makefile.defs create mode 100644 usr/src/cmd/ast/libcmd/Makefile.iffe create mode 100644 usr/src/cmd/ast/libcmd/amd64/FEATURE/ids create mode 100644 usr/src/cmd/ast/libcmd/amd64/FEATURE/sockets create mode 100644 usr/src/cmd/ast/libcmd/amd64/FEATURE/symlink create mode 100644 usr/src/cmd/ast/libcmd/amd64/FEATURE/utsname create mode 100644 usr/src/cmd/ast/libcmd/amd64/Makefile create mode 100644 usr/src/cmd/ast/libcmd/amd64/Makefile.iffe create mode 100644 usr/src/cmd/ast/libcmd/i386/FEATURE/ids create mode 100644 usr/src/cmd/ast/libcmd/i386/FEATURE/sockets create mode 100644 usr/src/cmd/ast/libcmd/i386/FEATURE/symlink create mode 100644 usr/src/cmd/ast/libcmd/i386/FEATURE/utsname create mode 100644 usr/src/cmd/ast/libcmd/i386/Makefile create mode 100644 usr/src/cmd/ast/libcmd/i386/Makefile.iffe create mode 100644 usr/src/cmd/ast/libcmd/mapfile-vers create mode 100644 usr/src/cmd/ast/libcmd/sparc/FEATURE/ids create mode 100644 usr/src/cmd/ast/libcmd/sparc/FEATURE/sockets create mode 100644 usr/src/cmd/ast/libcmd/sparc/FEATURE/symlink create mode 100644 usr/src/cmd/ast/libcmd/sparc/FEATURE/utsname create mode 100644 usr/src/cmd/ast/libcmd/sparc/Makefile create mode 100644 usr/src/cmd/ast/libcmd/sparc/Makefile.iffe create mode 100644 usr/src/cmd/ast/libcmd/sparcv9/FEATURE/ids create mode 100644 usr/src/cmd/ast/libcmd/sparcv9/FEATURE/sockets create mode 100644 usr/src/cmd/ast/libcmd/sparcv9/FEATURE/symlink create mode 100644 usr/src/cmd/ast/libcmd/sparcv9/FEATURE/utsname create mode 100644 usr/src/cmd/ast/libcmd/sparcv9/Makefile create mode 100644 usr/src/cmd/ast/libcmd/sparcv9/Makefile.iffe create mode 100644 usr/src/cmd/ast/libdll/Makefile create mode 100644 usr/src/cmd/ast/libdll/Makefile.com create mode 100644 usr/src/cmd/ast/libdll/Makefile.defs create mode 100644 usr/src/cmd/ast/libdll/Makefile.iffe create mode 100644 usr/src/cmd/ast/libdll/amd64/FEATURE/dll create mode 100644 usr/src/cmd/ast/libdll/amd64/Makefile create mode 100644 usr/src/cmd/ast/libdll/amd64/Makefile.iffe create mode 100644 usr/src/cmd/ast/libdll/i386/FEATURE/dll create mode 100644 usr/src/cmd/ast/libdll/i386/Makefile create mode 100644 usr/src/cmd/ast/libdll/i386/Makefile.iffe create mode 100644 usr/src/cmd/ast/libdll/mapfile-vers create mode 100644 usr/src/cmd/ast/libdll/sparc/FEATURE/dll create mode 100644 usr/src/cmd/ast/libdll/sparc/Makefile create mode 100644 usr/src/cmd/ast/libdll/sparc/Makefile.iffe create mode 100644 usr/src/cmd/ast/libdll/sparcv9/FEATURE/dll create mode 100644 usr/src/cmd/ast/libdll/sparcv9/Makefile create mode 100644 usr/src/cmd/ast/libdll/sparcv9/Makefile.iffe create mode 100644 usr/src/cmd/ast/libpp/Makefile create mode 100644 usr/src/cmd/ast/libpp/Makefile.com create mode 100644 usr/src/cmd/ast/libpp/Makefile.defs create mode 100644 usr/src/cmd/ast/libpp/i386/Makefile create mode 100644 usr/src/cmd/ast/libpp/mapfile-vers create mode 100644 usr/src/cmd/ast/libpp/sparc/Makefile create mode 100644 usr/src/cmd/ast/libshell/Makefile create mode 100644 usr/src/cmd/ast/libshell/Makefile.com create mode 100644 usr/src/cmd/ast/libshell/Makefile.defs create mode 100644 usr/src/cmd/ast/libshell/Makefile.demo create mode 100644 usr/src/cmd/ast/libshell/Makefile.doc create mode 100644 usr/src/cmd/ast/libshell/Makefile.iffe create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/acct create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/cmds create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/dynamic create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/execargs create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/externs create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/locale create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/math create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/options create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/poll create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/pstat create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/rlimits create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/setjmp create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/sigfeatures create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/time create mode 100644 usr/src/cmd/ast/libshell/amd64/FEATURE/ttys create mode 100644 usr/src/cmd/ast/libshell/amd64/Makefile create mode 100644 usr/src/cmd/ast/libshell/amd64/Makefile.iffe create mode 100644 usr/src/cmd/ast/libshell/common/illumos_cmdlist.h create mode 100644 usr/src/cmd/ast/libshell/common/scripts/cpvprint.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/crawlsrccomments.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/filemutexdemo1.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/filetree1.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/gnaw.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/mandelbrotset1.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/multifollow.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/numtree1.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/primenumbers1.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/rssread.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/shcalc.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/shircbot.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/shlint.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/shman.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/shnote.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/shpiano.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/shtinyurl.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/shtwitter.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/simplefileattributetree1.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/simplefiletree1.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/svcproptree1.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/termclock.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/test_net_sctp.sh create mode 100644 usr/src/cmd/ast/libshell/common/scripts/xmldocumenttree1.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/README.tests create mode 100644 usr/src/cmd/ast/libshell/common/tests/illumos_13434_chunked_heredoc.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_array_default_datatype.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_poll.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_sum.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_tail.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_command_substitution.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_misc.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_nameref.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_compoundvario.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_getconf.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_local_compound_nameref001.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_locale_misc.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_staticvariables.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree001.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree002.sh create mode 100644 usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree003.sh create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/acct create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/cmds create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/dynamic create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/execargs create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/externs create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/locale create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/math create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/options create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/poll create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/pstat create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/rlimits create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/setjmp create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/sigfeatures create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/time create mode 100644 usr/src/cmd/ast/libshell/i386/FEATURE/ttys create mode 100644 usr/src/cmd/ast/libshell/i386/Makefile create mode 100644 usr/src/cmd/ast/libshell/i386/Makefile.iffe create mode 100644 usr/src/cmd/ast/libshell/mapfile-vers create mode 100644 usr/src/cmd/ast/libshell/misc/images/callouts/1.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/callouts/10.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/callouts/2.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/callouts/3.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/callouts/4.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/callouts/5.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/callouts/6.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/callouts/7.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/callouts/8.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/callouts/9.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/tag_bourne.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/tag_i18n.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/tag_ksh.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/tag_ksh88.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/tag_ksh93.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/tag_l10n.png create mode 100644 usr/src/cmd/ast/libshell/misc/images/tag_perf.png create mode 100644 usr/src/cmd/ast/libshell/misc/shell_styleguide.docbook create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/acct create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/cmds create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/dynamic create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/execargs create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/externs create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/locale create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/math create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/options create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/poll create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/pstat create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/rlimits create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/setjmp create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/sigfeatures create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/time create mode 100644 usr/src/cmd/ast/libshell/sparc/FEATURE/ttys create mode 100644 usr/src/cmd/ast/libshell/sparc/Makefile create mode 100644 usr/src/cmd/ast/libshell/sparc/Makefile.iffe create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/acct create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/cmds create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/dynamic create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/execargs create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/externs create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/locale create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/math create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/options create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/poll create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/pstat create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/rlimits create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/setjmp create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/sigfeatures create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/time create mode 100644 usr/src/cmd/ast/libshell/sparcv9/FEATURE/ttys create mode 100644 usr/src/cmd/ast/libshell/sparcv9/Makefile create mode 100644 usr/src/cmd/ast/libshell/sparcv9/Makefile.iffe create mode 100644 usr/src/cmd/ast/libsum/Makefile create mode 100644 usr/src/cmd/ast/libsum/Makefile.com create mode 100644 usr/src/cmd/ast/libsum/Makefile.defs create mode 100644 usr/src/cmd/ast/libsum/Makefile.iffe create mode 100644 usr/src/cmd/ast/libsum/amd64/FEATURE/sum create mode 100644 usr/src/cmd/ast/libsum/amd64/Makefile create mode 100644 usr/src/cmd/ast/libsum/amd64/Makefile.iffe create mode 100644 usr/src/cmd/ast/libsum/i386/FEATURE/sum create mode 100644 usr/src/cmd/ast/libsum/i386/Makefile create mode 100644 usr/src/cmd/ast/libsum/i386/Makefile.iffe create mode 100644 usr/src/cmd/ast/libsum/mapfile-vers create mode 100644 usr/src/cmd/ast/libsum/sparc/FEATURE/sum create mode 100644 usr/src/cmd/ast/libsum/sparc/Makefile create mode 100644 usr/src/cmd/ast/libsum/sparc/Makefile.iffe create mode 100644 usr/src/cmd/ast/libsum/sparcv9/FEATURE/sum create mode 100644 usr/src/cmd/ast/libsum/sparcv9/Makefile create mode 100644 usr/src/cmd/ast/libsum/sparcv9/Makefile.iffe delete mode 100644 usr/src/cmd/ast/msgcc/NOTES delete mode 100644 usr/src/cmd/ast/msgcc/PROMO.mm delete mode 100644 usr/src/cmd/ast/msgcc/msgcc.sh delete mode 100644 usr/src/cmd/ast/msgcc/msgcc.tst delete mode 100644 usr/src/cmd/ast/msgcc/msgcpp.c delete mode 100644 usr/src/cmd/ast/msgcc/msgcvt.c delete mode 100644 usr/src/cmd/ast/msgcc/msggen.c delete mode 100644 usr/src/cmd/ast/msgcc/msgget.c create mode 100644 usr/src/cmd/ast/shcomp/Makefile create mode 100644 usr/src/cmd/ast/tools/Makefile delete mode 100644 usr/src/cmd/ksh/Makefile delete mode 100644 usr/src/cmd/ksh/Makefile.com delete mode 100644 usr/src/cmd/ksh/Makefile.testshell delete mode 100644 usr/src/cmd/ksh/amd64/Makefile delete mode 100644 usr/src/cmd/ksh/builtins/Makefile delete mode 100644 usr/src/cmd/ksh/builtins/alias.c delete mode 100644 usr/src/cmd/ksh/i386/Makefile delete mode 100644 usr/src/cmd/ksh/sparc/Makefile delete mode 100644 usr/src/cmd/ksh/sparcv9/Makefile delete mode 100644 usr/src/cmd/shcomp/Makefile create mode 100644 usr/src/contrib/ast/LICENSE create mode 100644 usr/src/contrib/ast/LICENSE.descrip create mode 100644 usr/src/contrib/ast/README create mode 100644 usr/src/contrib/ast/lib/package/INIT.pkg create mode 100644 usr/src/contrib/ast/lib/package/INIT.req create mode 100644 usr/src/contrib/ast/lib/package/INIT.ver create mode 100644 usr/src/contrib/ast/lib/package/ast-ast.pkg create mode 100644 usr/src/contrib/ast/lib/package/ast-base.pkg create mode 100644 usr/src/contrib/ast/lib/package/ast-base.req create mode 100644 usr/src/contrib/ast/lib/package/ast-base.ver create mode 100644 usr/src/contrib/ast/lib/package/ast-dss.pkg create mode 100644 usr/src/contrib/ast/lib/package/ast-ksh.pkg create mode 100644 usr/src/contrib/ast/lib/package/ast-ksh.req create mode 100644 usr/src/contrib/ast/lib/package/ast-ksh.ver create mode 100644 usr/src/contrib/ast/lib/package/ast-make.pkg create mode 100644 usr/src/contrib/ast/lib/package/ast-open.pkg create mode 100644 usr/src/contrib/ast/lib/package/ast-open.req create mode 100644 usr/src/contrib/ast/lib/package/ast-open.ver create mode 100644 usr/src/contrib/ast/lib/package/ast.def create mode 100644 usr/src/contrib/ast/lib/package/ast.lic create mode 100644 usr/src/contrib/ast/lib/package/bsd.def create mode 100644 usr/src/contrib/ast/lib/package/bsd.lic create mode 100644 usr/src/contrib/ast/lib/package/epl.def create mode 100644 usr/src/contrib/ast/lib/package/ksh.pkg create mode 100644 usr/src/contrib/ast/lib/package/package.mk create mode 100644 usr/src/contrib/ast/lib/package/zlib.def create mode 100644 usr/src/contrib/ast/lib/package/zlib.lic create mode 100644 usr/src/contrib/ast/src/cmd/INIT/C+probe create mode 100644 usr/src/contrib/ast/src/cmd/INIT/CONVERT.mk create mode 100644 usr/src/contrib/ast/src/cmd/INIT/MAPLIB.mk create mode 100644 usr/src/contrib/ast/src/cmd/INIT/MSGFUN.mk create mode 100644 usr/src/contrib/ast/src/cmd/INIT/MSGKEY.mk create mode 100644 usr/src/contrib/ast/src/cmd/INIT/Makefile create mode 100644 usr/src/contrib/ast/src/cmd/INIT/Mamfile create mode 100644 usr/src/contrib/ast/src/cmd/INIT/PROBE.mk create mode 100644 usr/src/contrib/ast/src/cmd/INIT/RELEASE create mode 100644 usr/src/contrib/ast/src/cmd/INIT/TEST.mk create mode 100644 usr/src/contrib/ast/src/cmd/INIT/WWW.mk create mode 100644 usr/src/contrib/ast/src/cmd/INIT/crossexec.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/db.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/ditto.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/dl.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/execrate.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/filter.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/gdbm.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/gdbm1.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/gdbm2.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/hello.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/hosttype.tst create mode 100644 usr/src/contrib/ast/src/cmd/INIT/hurl.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/iconv.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/iffe.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/iffe.tst create mode 100644 usr/src/contrib/ast/src/cmd/INIT/ignore.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/intl.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/m.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/m2.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/m3.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/m4.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/m5.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/m6.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/make.probe create mode 100644 usr/src/contrib/ast/src/cmd/INIT/mamake.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/mamake.rt create mode 100644 usr/src/contrib/ast/src/cmd/INIT/mamake.tst create mode 100644 usr/src/contrib/ast/src/cmd/INIT/mamprobe.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/mkdir.sh create mode 100755 usr/src/contrib/ast/src/cmd/INIT/mktest.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/mprobe.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/nsl.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/p.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/package.mk create mode 100644 usr/src/contrib/ast/src/cmd/INIT/package.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/probe.win32 create mode 100644 usr/src/contrib/ast/src/cmd/INIT/proto.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/ratz.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/regress.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/release.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/rt.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/silent.sh create mode 100644 usr/src/contrib/ast/src/cmd/INIT/socket.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/w.c create mode 100644 usr/src/contrib/ast/src/cmd/INIT/w2.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/COMPATIBILITY create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/DESIGN create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/Makefile create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/Mamfile create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/OBSOLETE create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/PROMO.mm create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/README create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/RELEASE create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/RELEASE88 create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/RELEASE93 create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/TYPES create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/alarm.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/cd_pwd.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/cflow.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/enum.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/getopts.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/hist.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/lib.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/misc.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/mkservice.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/poll_solaris.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/print.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/read.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/regress.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/shiocmd_solaris.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/sleep.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/test.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/trap.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/typeset.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/ulimit.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/umask.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/bltins/whence.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/builtins.mm create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/aliases.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/bash_pre_rc.sh create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/builtins.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/keywords.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/lexstates.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/limits.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/math.tab create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/msg.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/options.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/signals.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/strdata.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/testops.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/data/variables.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/edit/completion.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/edit/edit.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/edit/emacs.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/edit/hexpand.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/edit/history.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/edit/vi.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/cmds create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/dynamic create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/externs create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/locale create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/math.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/features/options create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/poll create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/rlimits create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/setjmp create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/sigfeatures create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/time create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/features/ttys create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/fun/dirs create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/fun/popd create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/fun/pushd create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/argnod.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/builtins.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/defs.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/edit.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/env.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/fault.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/fcin.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/history.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/io.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/jobs.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/lexstates.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/name.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/national.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/nval.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/path.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/regress.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/shell.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/shlex.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/shnodes.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/shtable.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/streval.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/terminal.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/test.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/timeout.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/ulimit.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/variables.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/include/version.h create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.rt create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.tst create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/mamexec create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/mamstate.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/nval.3 create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh.1 create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh.memo create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/args.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/arith.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/array.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/bash.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/defs.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/deparse.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/env.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/expand.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/fault.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/fcin.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/init.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/io.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/jobs.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/lex.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/macro.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/main.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/name.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/nvdisc.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/nvtree.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/nvtype.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/parse.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/path.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/pmain.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/shcomp.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/streval.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/string.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/subshell.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/suid_exec.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/tdump.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/timers.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/trestore.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/waitevent.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/sh/xec.c create mode 100644 usr/src/contrib/ast/src/cmd/ksh93/shell.3 create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/alias.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/append.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/arith.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/arrays.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/arrays2.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/attributes.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/basic.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/bracket.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/builtins.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/case.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/comvar.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/comvario.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/coprocess.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/cubetype.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/enum.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/exit.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/expand.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/functions.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/glob.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/grep.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/heredoc.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/io.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/leaks.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/locale.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/math.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/nameref.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/namespace.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/options.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/path.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/pointtype.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/pty.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/quoting.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/quoting2.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/readcsv.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/recttype.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/restricted.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/return.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/select.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/shtests create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/sigchld.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/signal.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/statics.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/subshell.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/substring.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/tilde.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/timetype.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/treemove.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/types.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/variables.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/vartree1.sh create mode 100755 usr/src/contrib/ast/src/cmd/ksh93/tests/vartree2.sh create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/Makefile create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/Mamfile create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/NOTES create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/PROMO.mm create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/RELEASE create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/msgadmin.sh create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/msgcc.sh create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/msgcc.tst create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/msgcpp.c create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/msgcvt.c create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/msggen.c create mode 100644 usr/src/contrib/ast/src/cmd/msgcc/msgget.c create mode 100644 usr/src/contrib/ast/src/lib/libast/Makefile create mode 100644 usr/src/contrib/ast/src/lib/libast/Mamfile create mode 100644 usr/src/contrib/ast/src/lib/libast/README create mode 100644 usr/src/contrib/ast/src/lib/libast/RELEASE create mode 100644 usr/src/contrib/ast/src/lib/libast/aso/aso-fcntl.c create mode 100644 usr/src/contrib/ast/src/lib/libast/aso/aso-sem.c create mode 100644 usr/src/contrib/ast/src/lib/libast/aso/aso.c create mode 100644 usr/src/contrib/ast/src/lib/libast/aso/asohdr.h create mode 100644 usr/src/contrib/ast/src/lib/libast/aso/asolock.c create mode 100644 usr/src/contrib/ast/src/lib/libast/aso/asometh.c create mode 100644 usr/src/contrib/ast/src/lib/libast/aso/asorelax.c create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/README-astsa create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/aso.c create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/aso.h create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/ast.c create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/ast.h create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/ast_common.h create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/astsa.manifest create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/astsa.mm create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/astsa.omk create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/ccode.h create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/debug.h create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/error.c create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/error.h create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/hashkey.h create mode 100755 usr/src/contrib/ast/src/lib/libast/astsa/mkast_sa create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/option.h create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/optlib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/sfstr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/sfstr.h create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/strdup.c create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/strmatch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/times.h create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.h create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/cdtlib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dtclose.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dtcomp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dtdisc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dthash.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dthdr.h create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dtlist.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dtmethod.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dtnew.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dtopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dtstrhash.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dttree.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dtview.c create mode 100644 usr/src/contrib/ast/src/lib/libast/cdt/dtwalk.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/atexit.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/basename.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/catopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/closelog.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/conf.sh create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/conf.tab create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/creat64.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/dirname.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/dup2.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/eaccess.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/errno.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/execlp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/execve.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/execvp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/execvpe.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/fakelink.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/fcntl.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/fmtmsg.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/fmtmsglib.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/fnmatch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/fnmatch.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/frexp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/frexpl.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/fsync.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/ftw.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/ftw.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/getdate.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/getgroups.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/getlogin.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/getopt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/getopt.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/getoptl.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/getpgrp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/getsubopt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/getwd.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/gross.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/gross_sgi.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/hsearch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/iconv.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/killpg.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/libgen.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/link.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/localeconv.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/lstat.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/memccpy.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/memchr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/memcmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/memcpy.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/memmove.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/memset.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/mkdir.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/mkfifo.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/mknod.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/mktemp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/mktime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/mount.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/nftw.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/omitted.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/open.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/openlog.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/putenv.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/re_comp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/re_comp.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/readlink.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/realpath.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/regcmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/regexp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/regexp.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/remove.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/rename.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/resolvepath.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/rmdir.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/setenv.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/setlocale.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/setlogmask.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/setpgid.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/setsid.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/sigflag.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/sigunblock.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/spawnveg.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/statvfs.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strcasecmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strchr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strftime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strncasecmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strptime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strrchr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strstr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strtod.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strtol.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strtold.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strtoll.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strtoul.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/strtoull.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/swab.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/symlink.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/syslog.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/syslog.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/sysloglib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/system.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/tempnam.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/tmpnam.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/transition.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/tsearch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/unlink.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/unsetenv.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/vfork.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/waitpid.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/wc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/wordexp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/comp/wordexp.h create mode 100644 usr/src/contrib/ast/src/lib/libast/dir/dirlib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/dir/dirstd.h create mode 100644 usr/src/contrib/ast/src/lib/libast/dir/getdents.c create mode 100644 usr/src/contrib/ast/src/lib/libast/dir/opendir.c create mode 100644 usr/src/contrib/ast/src/lib/libast/dir/readdir.c create mode 100644 usr/src/contrib/ast/src/lib/libast/dir/rewinddir.c create mode 100644 usr/src/contrib/ast/src/lib/libast/dir/seekdir.c create mode 100644 usr/src/contrib/ast/src/lib/libast/dir/telldir.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/memfatal.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdcdio.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdcdos.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdcfilter.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdchdr.h create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdcmore.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdcprefix.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdcseekable.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdcslow.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdcsubstr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdctee.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfdcunion.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfkeyprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/disc/sfstrtmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/features/align.c create mode 100644 usr/src/contrib/ast/src/lib/libast/features/api create mode 100644 usr/src/contrib/ast/src/lib/libast/features/aso create mode 100644 usr/src/contrib/ast/src/lib/libast/features/asometh create mode 100644 usr/src/contrib/ast/src/lib/libast/features/botch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/features/ccode create mode 100644 usr/src/contrib/ast/src/lib/libast/features/common create mode 100644 usr/src/contrib/ast/src/lib/libast/features/dirent create mode 100644 usr/src/contrib/ast/src/lib/libast/features/eaccess create mode 100644 usr/src/contrib/ast/src/lib/libast/features/errno create mode 100644 usr/src/contrib/ast/src/lib/libast/features/fcntl.c create mode 100644 usr/src/contrib/ast/src/lib/libast/features/float create mode 100644 usr/src/contrib/ast/src/lib/libast/features/fs create mode 100644 usr/src/contrib/ast/src/lib/libast/features/hack create mode 100644 usr/src/contrib/ast/src/lib/libast/features/iconv create mode 100644 usr/src/contrib/ast/src/lib/libast/features/lib create mode 100644 usr/src/contrib/ast/src/lib/libast/features/libpath.sh create mode 100644 usr/src/contrib/ast/src/lib/libast/features/limits.c create mode 100644 usr/src/contrib/ast/src/lib/libast/features/locale create mode 100644 usr/src/contrib/ast/src/lib/libast/features/map.c create mode 100644 usr/src/contrib/ast/src/lib/libast/features/mmap create mode 100644 usr/src/contrib/ast/src/lib/libast/features/mode.c create mode 100644 usr/src/contrib/ast/src/lib/libast/features/ndbm create mode 100644 usr/src/contrib/ast/src/lib/libast/features/nl_types create mode 100644 usr/src/contrib/ast/src/lib/libast/features/omitted create mode 100644 usr/src/contrib/ast/src/lib/libast/features/options create mode 100644 usr/src/contrib/ast/src/lib/libast/features/param.sh create mode 100644 usr/src/contrib/ast/src/lib/libast/features/preroot.sh create mode 100644 usr/src/contrib/ast/src/lib/libast/features/prog create mode 100644 usr/src/contrib/ast/src/lib/libast/features/sfinit.c create mode 100644 usr/src/contrib/ast/src/lib/libast/features/sfio create mode 100644 usr/src/contrib/ast/src/lib/libast/features/sig.sh create mode 100644 usr/src/contrib/ast/src/lib/libast/features/siglist create mode 100644 usr/src/contrib/ast/src/lib/libast/features/signal.c create mode 100644 usr/src/contrib/ast/src/lib/libast/features/sizeof create mode 100644 usr/src/contrib/ast/src/lib/libast/features/standards create mode 100644 usr/src/contrib/ast/src/lib/libast/features/stdio create mode 100644 usr/src/contrib/ast/src/lib/libast/features/sys create mode 100644 usr/src/contrib/ast/src/lib/libast/features/syscall create mode 100644 usr/src/contrib/ast/src/lib/libast/features/time create mode 100644 usr/src/contrib/ast/src/lib/libast/features/tmlib create mode 100644 usr/src/contrib/ast/src/lib/libast/features/tmx create mode 100644 usr/src/contrib/ast/src/lib/libast/features/tty create mode 100644 usr/src/contrib/ast/src/lib/libast/features/tv create mode 100644 usr/src/contrib/ast/src/lib/libast/features/tvlib create mode 100644 usr/src/contrib/ast/src/lib/libast/features/uwin create mode 100644 usr/src/contrib/ast/src/lib/libast/features/vfork create mode 100644 usr/src/contrib/ast/src/lib/libast/features/vmalloc create mode 100644 usr/src/contrib/ast/src/lib/libast/features/wait create mode 100644 usr/src/contrib/ast/src/lib/libast/features/wchar create mode 100644 usr/src/contrib/ast/src/lib/libast/features/wctype create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/hashalloc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/hashdump.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/hashfree.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/hashlast.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/hashlib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/hashlook.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/hashscan.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/hashsize.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/hashview.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/hashwalk.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/memhash.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/memsum.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/strhash.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/strkey.c create mode 100644 usr/src/contrib/ast/src/lib/libast/hash/strsum.c create mode 100644 usr/src/contrib/ast/src/lib/libast/include/aso.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/ast.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/ast_dir.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/ast_getopt.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/ast_std.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/ast_windows.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/ccode.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/cdt.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/cmdarg.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/debug.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/dt.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/error.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/find.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/fnv.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/fs3d.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/fts.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/ftwalk.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/glob.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/hash.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/hashkey.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/hashpart.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/ip6.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/ls.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/magic.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/magicid.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/mc.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/mime.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/mnt.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/modecanon.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/modex.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/namval.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/option.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/proc.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/recfmt.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/regex.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/sfdisc.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/sfio.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/sfio_s.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/sfio_t.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/shcmd.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/stack.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/stak.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/stk.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/swap.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/tar.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/times.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/tm.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/tok.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/usage.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/vdb.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/vecargs.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/vmalloc.h create mode 100644 usr/src/contrib/ast/src/lib/libast/include/wait.h create mode 100644 usr/src/contrib/ast/src/lib/libast/man/LIBAST.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/aso.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/ast.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/astsa.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/cdt.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/chr.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/compat.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/error.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/find.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/fmt.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/fmtls.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/fs3d.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/ftwalk.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/getcwd.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/hash.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/iblocks.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/int.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/ip6.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/magic.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/mem.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/mime.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/modecanon.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/optget.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/path.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/preroot.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/proc.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/re.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/regex.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/setenviron.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/sfdisc.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/sfio.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/sig.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/spawnveg.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/stak.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/stk.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strcopy.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strdup.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strelapsed.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strerror.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/stresc.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/streval.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strgid.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strmatch.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/stropt.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strperm.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strsignal.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strsort.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strtape.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/strton.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/struid.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/swap.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/tab.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/tm.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/tmx.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/tok.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/touch.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/tv.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/vecargs.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/man/vmalloc.3 create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/astintercept.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/cmdarg.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/cmdlib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/conformance.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/debug.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/error.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/errorf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/errormsg.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/errorx.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/fastfind.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/findlib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/fmtrec.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/fs3d.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/fts.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/ftwalk.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/ftwflags.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/getcwd.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/getenv.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/glob.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/intercepts.h create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/magic.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/magic.tab create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/mime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/mimelib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/mimetype.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/optctx.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/optesc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/optget.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/optjoin.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/optlib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/procclose.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/procfree.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/proclib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/procopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/procrun.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/recfmt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/reclen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/recstr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/setenviron.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/sigcrit.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/sigdata.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/signal.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/stack.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/state.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/stk.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/systrace.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/translate.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/univdata.c create mode 100644 usr/src/contrib/ast/src/lib/libast/misc/univlib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/obsolete/spawn.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathaccess.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathbin.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathcanon.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathcat.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathcd.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathcheck.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathexists.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathfind.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathgetlink.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathkey.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathnative.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathpath.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathposix.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathprobe.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathprog.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathrepl.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathsetlink.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathshell.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathstat.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathtemp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/path/pathtmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/astconf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/astcopy.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/astdynamic.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/astlicense.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/astmath.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/astquery.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/aststatic.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/astwinsize.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/atmain.C create mode 100644 usr/src/contrib/ast/src/lib/libast/port/iblocks.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/lc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/lc.tab create mode 100644 usr/src/contrib/ast/src/lib/libast/port/lcgen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/lclang.h create mode 100644 usr/src/contrib/ast/src/lib/libast/port/lclib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/port/mc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/mnt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/port/touch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/preroot/getpreroot.c create mode 100644 usr/src/contrib/ast/src/lib/libast/preroot/ispreroot.c create mode 100644 usr/src/contrib/ast/src/lib/libast/preroot/realopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/preroot/setpreroot.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regalloc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regcache.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regclass.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regcoll.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regcomp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regdecomp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regerror.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regexec.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regfatal.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/reginit.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/reglib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regnexec.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regrecord.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regrexec.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regstat.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regsub.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regsubcomp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/regex/regsubexec.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfclrerr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfdlen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfeof.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sferror.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sffileno.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfgetc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfgetl.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfgetl2.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfgetu.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfgetu2.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfllen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfputc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfputd.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfputl.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfputm.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfputu.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfslen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfstacked.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfulen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/_sfvalue.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfclose.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfclrlock.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfcvt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfdisc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfdlen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfecvt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfexcept.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfextern.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sffcvt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sffilbuf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfflsbuf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfgetd.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfgetl.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfgetm.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfgetr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfgetu.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfhdr.h create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfllen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfmode.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfmove.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfmutex.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfnew.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfnotify.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfnputc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfpeek.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfpkrd.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfpoll.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfpool.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfpopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfprints.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfpurge.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfputd.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfputl.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfputm.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfputr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfputu.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfraise.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfrd.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfread.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfreserve.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfresize.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfseek.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfset.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfsetbuf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfsetfd.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfsize.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfsk.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfstack.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfstrtod.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfstrtof.h create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfswap.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfsync.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sftable.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sftell.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sftmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfungetc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfvprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfvscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfwalk.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfwr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/sfwrite.c create mode 100644 usr/src/contrib/ast/src/lib/libast/sfio/vthread.h create mode 100644 usr/src/contrib/ast/src/lib/libast/std/bytesex.h create mode 100644 usr/src/contrib/ast/src/lib/libast/std/dirent.h create mode 100644 usr/src/contrib/ast/src/lib/libast/std/endian.h create mode 100644 usr/src/contrib/ast/src/lib/libast/std/iconv.h create mode 100644 usr/src/contrib/ast/src/lib/libast/std/nl_types.h create mode 100644 usr/src/contrib/ast/src/lib/libast/std/stdio.h create mode 100644 usr/src/contrib/ast/src/lib/libast/std/wchar.h create mode 100644 usr/src/contrib/ast/src/lib/libast/std/wctype.h create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_doprnt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_doscan.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_filbuf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_flsbuf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_stdfun.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_stdopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_stdprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_stdscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_stdsprnt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_stdvbuf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_stdvsnprnt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_stdvsprnt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/_stdvsscn.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/asprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/clearerr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fclose.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fcloseall.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fdopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/feof.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/ferror.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fflush.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fgetc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fgetpos.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fgets.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fgetwc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fgetws.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fileno.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/flockfile.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fmemopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fpurge.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fputc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fputs.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fputwc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fputws.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fread.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/freopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fseek.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fseeko.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fsetpos.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/ftell.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/ftello.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/ftrylockfile.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/funlockfile.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fwide.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fwprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fwrite.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/fwscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/getc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/getchar.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/getdelim.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/getline.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/getw.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/getwc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/getwchar.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/pclose.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/popen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/printf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/putc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/putchar.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/puts.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/putw.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/putwc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/putwchar.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/rewind.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/scanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/setbuf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/setbuffer.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/setlinebuf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/setvbuf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/snprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/sprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/sscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/stdhdr.h create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/stdio_c99.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/swprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/swscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/tmpfile.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/ungetc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/ungetwc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vasprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vfprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vfscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vfwprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vfwscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vsnprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vsprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vsscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vswprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vswscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vwprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/vwscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/wprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/stdio/wscanf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/base64.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/ccmap.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/ccmapid.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/ccnative.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/chresc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/chrtoi.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtbase.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtbuf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtclock.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtdev.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtelapsed.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmterror.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtesc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtfmt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtfs.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtgid.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtident.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtint.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtip4.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtip6.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtls.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtmatch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtmode.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtnum.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtperm.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtre.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtscale.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtsignal.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmttime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmttmx.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmttv.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtuid.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/fmtversion.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/memdup.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/modedata.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/modei.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/modelib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/string/modex.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/stracmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strcopy.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strdup.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strelapsed.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strerror.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/stresc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/streval.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strexpr.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strgid.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strlcat.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strlcpy.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strlook.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strmatch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strmode.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strnacmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strncopy.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strnpcmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strntod.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strntol.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strntold.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strntoll.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strnton.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strntonll.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strntoul.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strntoull.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strnvcmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/stropt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strpcmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strperm.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strpsearch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strsearch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strsort.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strtape.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strtoi.h create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strtoip4.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strtoip6.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strton.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strtonll.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/struid.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/struniq.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/strvcmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/swapget.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/swapmem.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/swapop.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/swapput.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/tok.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/tokline.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/tokscan.c create mode 100644 usr/src/contrib/ast/src/lib/libast/string/wc2utf8.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmdata.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmdate.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmequiv.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmfix.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmfmt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmform.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmgoff.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tminit.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmleap.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmlex.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmlocale.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmmake.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmpoff.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmscan.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmsleep.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmtime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmtype.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmweek.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmword.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxdate.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxduration.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxfmt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxgettime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxleap.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxmake.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxscan.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxsettime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxsleep.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxtime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmxtouch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tmzone.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tvcmp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tvgettime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tvsettime.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tvsleep.c create mode 100644 usr/src/contrib/ast/src/lib/libast/tm/tvtouch.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/a64l.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/acosh.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/asinh.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/atanh.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/cbrt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/crypt.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/erf.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/err.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/exp.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/exp__E.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/expm1.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/gamma.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/getpass.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/lgamma.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/log.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/log1p.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/log__L.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/mathimpl.h create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/mini.sym create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/rand48.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/random.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/rcmd.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/rint.c create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/rlib.h create mode 100644 usr/src/contrib/ast/src/lib/libast/uwin/support.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vec/vecargs.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vec/vecfile.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vec/vecfree.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vec/vecload.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vec/vecstring.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/malloc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmbest.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmclear.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmclose.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmdcheap.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmdebug.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmdisc.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmexit.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmgetmem.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmhdr.h create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmlast.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmmopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmopen.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmpool.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmprivate.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmprofile.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmregion.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmsegment.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmset.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmstat.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmstrdup.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmtrace.c create mode 100644 usr/src/contrib/ast/src/lib/libast/vmalloc/vmwalk.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/Makefile create mode 100644 usr/src/contrib/ast/src/lib/libcmd/Mamfile create mode 100644 usr/src/contrib/ast/src/lib/libcmd/RELEASE create mode 100644 usr/src/contrib/ast/src/lib/libcmd/basename.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/cat.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/chgrp.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/chmod.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/chown.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/cksum.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/cmd.h create mode 100644 usr/src/contrib/ast/src/lib/libcmd/cmdinit.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/cmp.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/comm.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/cp.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/cut.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/date.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/dirname.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/expr.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/fds.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/features/ids create mode 100644 usr/src/contrib/ast/src/lib/libcmd/features/sockets create mode 100644 usr/src/contrib/ast/src/lib/libcmd/features/symlink create mode 100644 usr/src/contrib/ast/src/lib/libcmd/features/utsname create mode 100644 usr/src/contrib/ast/src/lib/libcmd/fmt.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/fold.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/fts_fix.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/fts_fix.h create mode 100644 usr/src/contrib/ast/src/lib/libcmd/getconf.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/head.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/id.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/join.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/lib.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/ln.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/logname.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/md5sum.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/mkdir.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/mkfifo.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/mktemp.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/mv.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/paste.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/pathchk.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/pids.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/rev.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/rev.h create mode 100644 usr/src/contrib/ast/src/lib/libcmd/revlib.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/rm.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/rmdir.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/stty.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/sum.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/sync.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/tail.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/tee.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/tty.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/uname.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/uniq.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/vmstate.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/wc.c create mode 100644 usr/src/contrib/ast/src/lib/libcmd/wc.h create mode 100644 usr/src/contrib/ast/src/lib/libcmd/wclib.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/Makefile create mode 100644 usr/src/contrib/ast/src/lib/libdll/Mamfile create mode 100644 usr/src/contrib/ast/src/lib/libdll/RELEASE create mode 100644 usr/src/contrib/ast/src/lib/libdll/dlfcn.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/dll_lib.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/dllcheck.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/dllerror.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/dllfind.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/dlllib.h create mode 100644 usr/src/contrib/ast/src/lib/libdll/dlllook.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/dllnext.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/dllopen.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/dllplug.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/dllscan.c create mode 100644 usr/src/contrib/ast/src/lib/libdll/features/dll create mode 100644 usr/src/contrib/ast/src/lib/libpp/BUGS create mode 100644 usr/src/contrib/ast/src/lib/libpp/HISTORY create mode 100644 usr/src/contrib/ast/src/lib/libpp/Makefile create mode 100644 usr/src/contrib/ast/src/lib/libpp/Mamfile create mode 100644 usr/src/contrib/ast/src/lib/libpp/NOTES create mode 100644 usr/src/contrib/ast/src/lib/libpp/RELEASE create mode 100644 usr/src/contrib/ast/src/lib/libpp/gentab.sh create mode 100644 usr/src/contrib/ast/src/lib/libpp/pp.3 create mode 100644 usr/src/contrib/ast/src/lib/libpp/pp.def create mode 100644 usr/src/contrib/ast/src/lib/libpp/pp.h create mode 100644 usr/src/contrib/ast/src/lib/libpp/pp.key create mode 100644 usr/src/contrib/ast/src/lib/libpp/pp.probe create mode 100644 usr/src/contrib/ast/src/lib/libpp/pp.tab create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppargs.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppbuiltin.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppcall.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppcomment.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppcontext.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppcontrol.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppcpp.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppdata.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/pperror.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppexpr.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppfsm.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppfsm.h create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppincref.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppinput.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppkey.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppkey.h create mode 100644 usr/src/contrib/ast/src/lib/libpp/pplex.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/pplib.h create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppline.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppmacref.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppmisc.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppop.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/pppragma.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppprintf.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppproto.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppsearch.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/ppsym.c create mode 100644 usr/src/contrib/ast/src/lib/libpp/pptrace.c create mode 100755 usr/src/contrib/ast/src/lib/libpp/probe.win32 create mode 100644 usr/src/contrib/ast/src/lib/libsum/Makefile create mode 100644 usr/src/contrib/ast/src/lib/libsum/Mamfile create mode 100644 usr/src/contrib/ast/src/lib/libsum/RELEASE create mode 100644 usr/src/contrib/ast/src/lib/libsum/features/sum create mode 100644 usr/src/contrib/ast/src/lib/libsum/sum-ast4.c create mode 100644 usr/src/contrib/ast/src/lib/libsum/sum-att.c create mode 100644 usr/src/contrib/ast/src/lib/libsum/sum-bsd.c create mode 100644 usr/src/contrib/ast/src/lib/libsum/sum-crc.c create mode 100644 usr/src/contrib/ast/src/lib/libsum/sum-lmd.c create mode 100644 usr/src/contrib/ast/src/lib/libsum/sum-md5.c create mode 100644 usr/src/contrib/ast/src/lib/libsum/sum-prng.c create mode 100644 usr/src/contrib/ast/src/lib/libsum/sum-sha1.c create mode 100644 usr/src/contrib/ast/src/lib/libsum/sum-sha2.c create mode 100644 usr/src/contrib/ast/src/lib/libsum/sum.h create mode 100644 usr/src/contrib/ast/src/lib/libsum/sumlib.c delete mode 100644 usr/src/lib/Makefile.asthdr delete mode 100644 usr/src/lib/Makefile.astmsg delete mode 100644 usr/src/lib/libast/Makefile delete mode 100644 usr/src/lib/libast/Makefile.com delete mode 100644 usr/src/lib/libast/THIRDPARTYLICENSE delete mode 100644 usr/src/lib/libast/THIRDPARTYLICENSE.descrip delete mode 100644 usr/src/lib/libast/amd64/Makefile delete mode 100644 usr/src/lib/libast/amd64/include/ast/align.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_botch.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_ccode.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_common.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_dir.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_dirent.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_fcntl.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_float.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_fs.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_getopt.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_iconv.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_lib.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_limits.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_map.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_mmap.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_mode.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_namval.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_ndbm.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_nl_types.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_param.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_standards.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_std.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_stdio.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_sys.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_time.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_tty.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_version.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_vfork.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_wait.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_wchar.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ast_windows.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/bytesex.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ccode.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/cdt.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/debug.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/dirent.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/dt.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/endian.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/error.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/find.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/fnmatch.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/fnv.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/fs3d.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/fts.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ftw.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ftwalk.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/getopt.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/glob.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/hash.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/hashkey.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/hashpart.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/iconv.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ip6.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/lc.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/ls.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/magic.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/magicid.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/mc.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/mime.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/mnt.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/modecanon.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/modex.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/namval.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/nl_types.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/option.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/preroot.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/proc.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/prototyped.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/re_comp.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/recfmt.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/regex.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/regexp.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/sfdisc.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/sfio.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/sfio_s.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/sfio_t.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/shcmd.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/sig.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/stack.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/stak.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/stdio.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/stk.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/swap.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/tar.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/times.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/tm.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/tmx.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/tok.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/tv.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/usage.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/vdb.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/vecargs.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/vmalloc.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/wait.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/wchar.h delete mode 100644 usr/src/lib/libast/amd64/include/ast/wordexp.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/align delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/botch delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/ccode delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/common delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/dirent delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/eaccess delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/errno delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/fcntl delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/float delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/fs delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/hack delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/iconv delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/isoc99 delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/lib delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/libpath delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/limits delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/map delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mmap delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mode delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/ndbm delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/nl_types delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/omitted delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/options delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/param delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/preroot delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/prog delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sfinit delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sfio delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sig delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/siglist delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/signal delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/standards delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/stdio delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sys delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/time delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tmlib delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tmx delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tty delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tv delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tvlib delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/uwin delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/vfork delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/vmalloc delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/wait delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/FEATURE/wchar delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/align.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_botch.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_ccode.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_common.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_dirent.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_fcntl.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_float.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_fs.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_iconv.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_lib.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_limits.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_map.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_mmap.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_mode.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_namval.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_ndbm.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_nl_types.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_param.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_standards.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_stdio.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_sys.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_time.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_tty.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_vfork.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_wait.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/ast_wchar.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/conftab.c delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/conftab.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/lc.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/lctab.c delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/preroot.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/sig.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/tmx.h delete mode 100644 usr/src/lib/libast/amd64/src/lib/libast/tv.h delete mode 100644 usr/src/lib/libast/common/README delete mode 100644 usr/src/lib/libast/common/RELEASE delete mode 100644 usr/src/lib/libast/common/cdt/dtclose.c delete mode 100644 usr/src/lib/libast/common/cdt/dtdisc.c delete mode 100644 usr/src/lib/libast/common/cdt/dtextract.c delete mode 100644 usr/src/lib/libast/common/cdt/dtflatten.c delete mode 100644 usr/src/lib/libast/common/cdt/dthash.c delete mode 100644 usr/src/lib/libast/common/cdt/dthdr.h delete mode 100644 usr/src/lib/libast/common/cdt/dtlist.c delete mode 100644 usr/src/lib/libast/common/cdt/dtmethod.c delete mode 100644 usr/src/lib/libast/common/cdt/dtnew.c delete mode 100644 usr/src/lib/libast/common/cdt/dtopen.c delete mode 100644 usr/src/lib/libast/common/cdt/dtrenew.c delete mode 100644 usr/src/lib/libast/common/cdt/dtrestore.c delete mode 100644 usr/src/lib/libast/common/cdt/dtsize.c delete mode 100644 usr/src/lib/libast/common/cdt/dtstat.c delete mode 100644 usr/src/lib/libast/common/cdt/dtstrhash.c delete mode 100644 usr/src/lib/libast/common/cdt/dttree.c delete mode 100644 usr/src/lib/libast/common/cdt/dttreeset.c delete mode 100644 usr/src/lib/libast/common/cdt/dtview.c delete mode 100644 usr/src/lib/libast/common/cdt/dtwalk.c delete mode 100644 usr/src/lib/libast/common/comp/atexit.c delete mode 100644 usr/src/lib/libast/common/comp/basename.c delete mode 100644 usr/src/lib/libast/common/comp/catopen.c delete mode 100644 usr/src/lib/libast/common/comp/closelog.c delete mode 100644 usr/src/lib/libast/common/comp/conf.sh delete mode 100644 usr/src/lib/libast/common/comp/conf.tab delete mode 100644 usr/src/lib/libast/common/comp/creat64.c delete mode 100644 usr/src/lib/libast/common/comp/dirname.c delete mode 100644 usr/src/lib/libast/common/comp/dup2.c delete mode 100644 usr/src/lib/libast/common/comp/eaccess.c delete mode 100644 usr/src/lib/libast/common/comp/errno.c delete mode 100644 usr/src/lib/libast/common/comp/execlp.c delete mode 100644 usr/src/lib/libast/common/comp/execve.c delete mode 100644 usr/src/lib/libast/common/comp/execvp.c delete mode 100644 usr/src/lib/libast/common/comp/execvpe.c delete mode 100644 usr/src/lib/libast/common/comp/fcntl.c delete mode 100644 usr/src/lib/libast/common/comp/fmtmsglib.c delete mode 100644 usr/src/lib/libast/common/comp/fnmatch.c delete mode 100644 usr/src/lib/libast/common/comp/fnmatch.h delete mode 100644 usr/src/lib/libast/common/comp/frexp.c delete mode 100644 usr/src/lib/libast/common/comp/frexpl.c delete mode 100644 usr/src/lib/libast/common/comp/fsync.c delete mode 100644 usr/src/lib/libast/common/comp/ftw.c delete mode 100644 usr/src/lib/libast/common/comp/ftw.h delete mode 100644 usr/src/lib/libast/common/comp/getdate.c delete mode 100644 usr/src/lib/libast/common/comp/getgroups.c delete mode 100644 usr/src/lib/libast/common/comp/getlogin.c delete mode 100644 usr/src/lib/libast/common/comp/getopt.c delete mode 100644 usr/src/lib/libast/common/comp/getopt.h delete mode 100644 usr/src/lib/libast/common/comp/getoptl.c delete mode 100644 usr/src/lib/libast/common/comp/getpgrp.c delete mode 100644 usr/src/lib/libast/common/comp/getsubopt.c delete mode 100644 usr/src/lib/libast/common/comp/getwd.c delete mode 100644 usr/src/lib/libast/common/comp/gross.c delete mode 100644 usr/src/lib/libast/common/comp/hsearch.c delete mode 100644 usr/src/lib/libast/common/comp/iconv.c delete mode 100644 usr/src/lib/libast/common/comp/killpg.c delete mode 100644 usr/src/lib/libast/common/comp/libgen.h delete mode 100644 usr/src/lib/libast/common/comp/link.c delete mode 100644 usr/src/lib/libast/common/comp/localeconv.c delete mode 100644 usr/src/lib/libast/common/comp/lstat.c delete mode 100644 usr/src/lib/libast/common/comp/memccpy.c delete mode 100644 usr/src/lib/libast/common/comp/memchr.c delete mode 100644 usr/src/lib/libast/common/comp/memcmp.c delete mode 100644 usr/src/lib/libast/common/comp/memcpy.c delete mode 100644 usr/src/lib/libast/common/comp/memmove.c delete mode 100644 usr/src/lib/libast/common/comp/memset.c delete mode 100644 usr/src/lib/libast/common/comp/mkdir.c delete mode 100644 usr/src/lib/libast/common/comp/mkfifo.c delete mode 100644 usr/src/lib/libast/common/comp/mknod.c delete mode 100644 usr/src/lib/libast/common/comp/mktemp.c delete mode 100644 usr/src/lib/libast/common/comp/mktime.c delete mode 100644 usr/src/lib/libast/common/comp/mount.c delete mode 100644 usr/src/lib/libast/common/comp/nftw.c delete mode 100644 usr/src/lib/libast/common/comp/omitted.c delete mode 100644 usr/src/lib/libast/common/comp/open.c delete mode 100644 usr/src/lib/libast/common/comp/openlog.c delete mode 100644 usr/src/lib/libast/common/comp/putenv.c delete mode 100644 usr/src/lib/libast/common/comp/re_comp.c delete mode 100644 usr/src/lib/libast/common/comp/re_comp.h delete mode 100644 usr/src/lib/libast/common/comp/readlink.c delete mode 100644 usr/src/lib/libast/common/comp/realpath.c delete mode 100644 usr/src/lib/libast/common/comp/regcmp.c delete mode 100644 usr/src/lib/libast/common/comp/regexp.c delete mode 100644 usr/src/lib/libast/common/comp/regexp.h delete mode 100644 usr/src/lib/libast/common/comp/remove.c delete mode 100644 usr/src/lib/libast/common/comp/rename.c delete mode 100644 usr/src/lib/libast/common/comp/resolvepath.c delete mode 100644 usr/src/lib/libast/common/comp/rmdir.c delete mode 100644 usr/src/lib/libast/common/comp/setenv.c delete mode 100644 usr/src/lib/libast/common/comp/setlocale.c delete mode 100644 usr/src/lib/libast/common/comp/setlogmask.c delete mode 100644 usr/src/lib/libast/common/comp/setpgid.c delete mode 100644 usr/src/lib/libast/common/comp/setsid.c delete mode 100644 usr/src/lib/libast/common/comp/sigflag.c delete mode 100644 usr/src/lib/libast/common/comp/sigunblock.c delete mode 100644 usr/src/lib/libast/common/comp/spawnveg.c delete mode 100644 usr/src/lib/libast/common/comp/statvfs.c delete mode 100644 usr/src/lib/libast/common/comp/strcasecmp.c delete mode 100644 usr/src/lib/libast/common/comp/strchr.c delete mode 100644 usr/src/lib/libast/common/comp/strftime.c delete mode 100644 usr/src/lib/libast/common/comp/strncasecmp.c delete mode 100644 usr/src/lib/libast/common/comp/strptime.c delete mode 100644 usr/src/lib/libast/common/comp/strrchr.c delete mode 100644 usr/src/lib/libast/common/comp/strstr.c delete mode 100644 usr/src/lib/libast/common/comp/strtod.c delete mode 100644 usr/src/lib/libast/common/comp/strtol.c delete mode 100644 usr/src/lib/libast/common/comp/strtold.c delete mode 100644 usr/src/lib/libast/common/comp/strtoll.c delete mode 100644 usr/src/lib/libast/common/comp/strtoul.c delete mode 100644 usr/src/lib/libast/common/comp/strtoull.c delete mode 100644 usr/src/lib/libast/common/comp/swab.c delete mode 100644 usr/src/lib/libast/common/comp/symlink.c delete mode 100644 usr/src/lib/libast/common/comp/syslog.c delete mode 100644 usr/src/lib/libast/common/comp/system.c delete mode 100644 usr/src/lib/libast/common/comp/tempnam.c delete mode 100644 usr/src/lib/libast/common/comp/tmpnam.c delete mode 100644 usr/src/lib/libast/common/comp/transition.c delete mode 100644 usr/src/lib/libast/common/comp/tsearch.c delete mode 100644 usr/src/lib/libast/common/comp/unlink.c delete mode 100644 usr/src/lib/libast/common/comp/unsetenv.c delete mode 100644 usr/src/lib/libast/common/comp/vfork.c delete mode 100644 usr/src/lib/libast/common/comp/waitpid.c delete mode 100644 usr/src/lib/libast/common/comp/wc.c delete mode 100644 usr/src/lib/libast/common/comp/wordexp.c delete mode 100644 usr/src/lib/libast/common/comp/wordexp.h delete mode 100644 usr/src/lib/libast/common/dir/dirlib.h delete mode 100644 usr/src/lib/libast/common/dir/getdents.c delete mode 100644 usr/src/lib/libast/common/dir/opendir.c delete mode 100644 usr/src/lib/libast/common/dir/readdir.c delete mode 100644 usr/src/lib/libast/common/dir/rewinddir.c delete mode 100644 usr/src/lib/libast/common/dir/seekdir.c delete mode 100644 usr/src/lib/libast/common/dir/telldir.c delete mode 100644 usr/src/lib/libast/common/disc/memfatal.c delete mode 100644 usr/src/lib/libast/common/disc/sfdcdio.c delete mode 100644 usr/src/lib/libast/common/disc/sfdcdos.c delete mode 100644 usr/src/lib/libast/common/disc/sfdcfilter.c delete mode 100644 usr/src/lib/libast/common/disc/sfdchdr.h delete mode 100644 usr/src/lib/libast/common/disc/sfdcmore.c delete mode 100644 usr/src/lib/libast/common/disc/sfdcprefix.c delete mode 100644 usr/src/lib/libast/common/disc/sfdcseekable.c delete mode 100644 usr/src/lib/libast/common/disc/sfdcslow.c delete mode 100644 usr/src/lib/libast/common/disc/sfdcsubstr.c delete mode 100644 usr/src/lib/libast/common/disc/sfdctee.c delete mode 100644 usr/src/lib/libast/common/disc/sfdcunion.c delete mode 100644 usr/src/lib/libast/common/disc/sfkeyprintf.c delete mode 100644 usr/src/lib/libast/common/disc/sfstrtmp.c delete mode 100644 usr/src/lib/libast/common/features/align.c delete mode 100644 usr/src/lib/libast/common/features/botch.c delete mode 100644 usr/src/lib/libast/common/features/ccode delete mode 100644 usr/src/lib/libast/common/features/common delete mode 100644 usr/src/lib/libast/common/features/dirent delete mode 100644 usr/src/lib/libast/common/features/eaccess delete mode 100644 usr/src/lib/libast/common/features/errno delete mode 100644 usr/src/lib/libast/common/features/fcntl.c delete mode 100644 usr/src/lib/libast/common/features/float delete mode 100644 usr/src/lib/libast/common/features/fs delete mode 100644 usr/src/lib/libast/common/features/hack delete mode 100644 usr/src/lib/libast/common/features/iconv delete mode 100644 usr/src/lib/libast/common/features/isoc99 delete mode 100644 usr/src/lib/libast/common/features/lib delete mode 100644 usr/src/lib/libast/common/features/libpath.sh delete mode 100644 usr/src/lib/libast/common/features/limits.c delete mode 100644 usr/src/lib/libast/common/features/map.c delete mode 100644 usr/src/lib/libast/common/features/mmap delete mode 100644 usr/src/lib/libast/common/features/mode.c delete mode 100644 usr/src/lib/libast/common/features/ndbm delete mode 100644 usr/src/lib/libast/common/features/nl_types delete mode 100644 usr/src/lib/libast/common/features/omitted delete mode 100644 usr/src/lib/libast/common/features/options delete mode 100644 usr/src/lib/libast/common/features/param.sh delete mode 100644 usr/src/lib/libast/common/features/preroot.sh delete mode 100644 usr/src/lib/libast/common/features/sfinit.c delete mode 100644 usr/src/lib/libast/common/features/sfio delete mode 100644 usr/src/lib/libast/common/features/sig.sh delete mode 100644 usr/src/lib/libast/common/features/siglist delete mode 100644 usr/src/lib/libast/common/features/signal.c delete mode 100644 usr/src/lib/libast/common/features/standards delete mode 100644 usr/src/lib/libast/common/features/stdio delete mode 100644 usr/src/lib/libast/common/features/sys delete mode 100644 usr/src/lib/libast/common/features/time delete mode 100644 usr/src/lib/libast/common/features/tmlib delete mode 100644 usr/src/lib/libast/common/features/tmx delete mode 100644 usr/src/lib/libast/common/features/tty delete mode 100644 usr/src/lib/libast/common/features/tv delete mode 100644 usr/src/lib/libast/common/features/tvlib delete mode 100644 usr/src/lib/libast/common/features/uwin delete mode 100644 usr/src/lib/libast/common/features/vfork delete mode 100644 usr/src/lib/libast/common/features/vmalloc delete mode 100644 usr/src/lib/libast/common/features/wait delete mode 100644 usr/src/lib/libast/common/features/wchar delete mode 100644 usr/src/lib/libast/common/hash/hashalloc.c delete mode 100644 usr/src/lib/libast/common/hash/hashdump.c delete mode 100644 usr/src/lib/libast/common/hash/hashfree.c delete mode 100644 usr/src/lib/libast/common/hash/hashlast.c delete mode 100644 usr/src/lib/libast/common/hash/hashlib.h delete mode 100644 usr/src/lib/libast/common/hash/hashlook.c delete mode 100644 usr/src/lib/libast/common/hash/hashscan.c delete mode 100644 usr/src/lib/libast/common/hash/hashsize.c delete mode 100644 usr/src/lib/libast/common/hash/hashview.c delete mode 100644 usr/src/lib/libast/common/hash/hashwalk.c delete mode 100644 usr/src/lib/libast/common/hash/memhash.c delete mode 100644 usr/src/lib/libast/common/hash/memsum.c delete mode 100644 usr/src/lib/libast/common/hash/strhash.c delete mode 100644 usr/src/lib/libast/common/hash/strkey.c delete mode 100644 usr/src/lib/libast/common/hash/strsum.c delete mode 100644 usr/src/lib/libast/common/include/ast.h delete mode 100644 usr/src/lib/libast/common/include/ast_dir.h delete mode 100644 usr/src/lib/libast/common/include/ast_getopt.h delete mode 100644 usr/src/lib/libast/common/include/ast_std.h delete mode 100644 usr/src/lib/libast/common/include/ast_version.h delete mode 100644 usr/src/lib/libast/common/include/ast_windows.h delete mode 100644 usr/src/lib/libast/common/include/ccode.h delete mode 100644 usr/src/lib/libast/common/include/cdt.h delete mode 100644 usr/src/lib/libast/common/include/cmdarg.h delete mode 100644 usr/src/lib/libast/common/include/debug.h delete mode 100644 usr/src/lib/libast/common/include/dt.h delete mode 100644 usr/src/lib/libast/common/include/error.h delete mode 100644 usr/src/lib/libast/common/include/find.h delete mode 100644 usr/src/lib/libast/common/include/fnv.h delete mode 100644 usr/src/lib/libast/common/include/fs3d.h delete mode 100644 usr/src/lib/libast/common/include/fts.h delete mode 100644 usr/src/lib/libast/common/include/ftwalk.h delete mode 100644 usr/src/lib/libast/common/include/glob.h delete mode 100644 usr/src/lib/libast/common/include/hash.h delete mode 100644 usr/src/lib/libast/common/include/hashkey.h delete mode 100644 usr/src/lib/libast/common/include/hashpart.h delete mode 100644 usr/src/lib/libast/common/include/ip6.h delete mode 100644 usr/src/lib/libast/common/include/ls.h delete mode 100644 usr/src/lib/libast/common/include/magic.h delete mode 100644 usr/src/lib/libast/common/include/magicid.h delete mode 100644 usr/src/lib/libast/common/include/mc.h delete mode 100644 usr/src/lib/libast/common/include/mime.h delete mode 100644 usr/src/lib/libast/common/include/mnt.h delete mode 100644 usr/src/lib/libast/common/include/modecanon.h delete mode 100644 usr/src/lib/libast/common/include/modex.h delete mode 100644 usr/src/lib/libast/common/include/namval.h delete mode 100644 usr/src/lib/libast/common/include/option.h delete mode 100644 usr/src/lib/libast/common/include/proc.h delete mode 100644 usr/src/lib/libast/common/include/recfmt.h delete mode 100644 usr/src/lib/libast/common/include/regex.h delete mode 100644 usr/src/lib/libast/common/include/sfdisc.h delete mode 100644 usr/src/lib/libast/common/include/sfio.h delete mode 100644 usr/src/lib/libast/common/include/sfio_s.h delete mode 100644 usr/src/lib/libast/common/include/sfio_t.h delete mode 100644 usr/src/lib/libast/common/include/shcmd.h delete mode 100644 usr/src/lib/libast/common/include/stack.h delete mode 100644 usr/src/lib/libast/common/include/stak.h delete mode 100644 usr/src/lib/libast/common/include/stk.h delete mode 100644 usr/src/lib/libast/common/include/swap.h delete mode 100644 usr/src/lib/libast/common/include/tar.h delete mode 100644 usr/src/lib/libast/common/include/times.h delete mode 100644 usr/src/lib/libast/common/include/tm.h delete mode 100644 usr/src/lib/libast/common/include/tok.h delete mode 100644 usr/src/lib/libast/common/include/usage.h delete mode 100644 usr/src/lib/libast/common/include/vdb.h delete mode 100644 usr/src/lib/libast/common/include/vecargs.h delete mode 100644 usr/src/lib/libast/common/include/vmalloc.h delete mode 100644 usr/src/lib/libast/common/include/wait.h delete mode 100644 usr/src/lib/libast/common/man/LIBAST.3 delete mode 100644 usr/src/lib/libast/common/man/ast.3 delete mode 100644 usr/src/lib/libast/common/man/astsa.3 delete mode 100644 usr/src/lib/libast/common/man/cdt.3 delete mode 100644 usr/src/lib/libast/common/man/chr.3 delete mode 100644 usr/src/lib/libast/common/man/compat.3 delete mode 100644 usr/src/lib/libast/common/man/error.3 delete mode 100644 usr/src/lib/libast/common/man/find.3 delete mode 100644 usr/src/lib/libast/common/man/fmt.3 delete mode 100644 usr/src/lib/libast/common/man/fmtls.3 delete mode 100644 usr/src/lib/libast/common/man/fs3d.3 delete mode 100644 usr/src/lib/libast/common/man/ftwalk.3 delete mode 100644 usr/src/lib/libast/common/man/getcwd.3 delete mode 100644 usr/src/lib/libast/common/man/hash.3 delete mode 100644 usr/src/lib/libast/common/man/iblocks.3 delete mode 100644 usr/src/lib/libast/common/man/int.3 delete mode 100644 usr/src/lib/libast/common/man/ip6.3 delete mode 100644 usr/src/lib/libast/common/man/magic.3 delete mode 100644 usr/src/lib/libast/common/man/mem.3 delete mode 100644 usr/src/lib/libast/common/man/mime.3 delete mode 100644 usr/src/lib/libast/common/man/modecanon.3 delete mode 100644 usr/src/lib/libast/common/man/optget.3 delete mode 100644 usr/src/lib/libast/common/man/path.3 delete mode 100644 usr/src/lib/libast/common/man/preroot.3 delete mode 100644 usr/src/lib/libast/common/man/proc.3 delete mode 100644 usr/src/lib/libast/common/man/re.3 delete mode 100644 usr/src/lib/libast/common/man/regex.3 delete mode 100644 usr/src/lib/libast/common/man/setenviron.3 delete mode 100644 usr/src/lib/libast/common/man/sfdisc.3 delete mode 100644 usr/src/lib/libast/common/man/sfio.3 delete mode 100644 usr/src/lib/libast/common/man/sig.3 delete mode 100644 usr/src/lib/libast/common/man/spawnveg.3 delete mode 100644 usr/src/lib/libast/common/man/stak.3 delete mode 100644 usr/src/lib/libast/common/man/stk.3 delete mode 100644 usr/src/lib/libast/common/man/strcopy.3 delete mode 100644 usr/src/lib/libast/common/man/strdup.3 delete mode 100644 usr/src/lib/libast/common/man/strelapsed.3 delete mode 100644 usr/src/lib/libast/common/man/strerror.3 delete mode 100644 usr/src/lib/libast/common/man/stresc.3 delete mode 100644 usr/src/lib/libast/common/man/streval.3 delete mode 100644 usr/src/lib/libast/common/man/strgid.3 delete mode 100644 usr/src/lib/libast/common/man/strmatch.3 delete mode 100644 usr/src/lib/libast/common/man/stropt.3 delete mode 100644 usr/src/lib/libast/common/man/strperm.3 delete mode 100644 usr/src/lib/libast/common/man/strsignal.3 delete mode 100644 usr/src/lib/libast/common/man/strsort.3 delete mode 100644 usr/src/lib/libast/common/man/strtape.3 delete mode 100644 usr/src/lib/libast/common/man/strton.3 delete mode 100644 usr/src/lib/libast/common/man/struid.3 delete mode 100644 usr/src/lib/libast/common/man/swap.3 delete mode 100644 usr/src/lib/libast/common/man/tab.3 delete mode 100644 usr/src/lib/libast/common/man/tm.3 delete mode 100644 usr/src/lib/libast/common/man/tmx.3 delete mode 100644 usr/src/lib/libast/common/man/tok.3 delete mode 100644 usr/src/lib/libast/common/man/touch.3 delete mode 100644 usr/src/lib/libast/common/man/tv.3 delete mode 100644 usr/src/lib/libast/common/man/vecargs.3 delete mode 100644 usr/src/lib/libast/common/man/vmalloc.3 delete mode 100644 usr/src/lib/libast/common/misc/astintercept.c delete mode 100644 usr/src/lib/libast/common/misc/cmdarg.c delete mode 100644 usr/src/lib/libast/common/misc/debug.c delete mode 100644 usr/src/lib/libast/common/misc/error.c delete mode 100644 usr/src/lib/libast/common/misc/errorf.c delete mode 100644 usr/src/lib/libast/common/misc/errormsg.c delete mode 100644 usr/src/lib/libast/common/misc/errorx.c delete mode 100644 usr/src/lib/libast/common/misc/fastfind.c delete mode 100644 usr/src/lib/libast/common/misc/findlib.h delete mode 100644 usr/src/lib/libast/common/misc/fmtrec.c delete mode 100644 usr/src/lib/libast/common/misc/fs3d.c delete mode 100644 usr/src/lib/libast/common/misc/fts.c delete mode 100644 usr/src/lib/libast/common/misc/ftwalk.c delete mode 100644 usr/src/lib/libast/common/misc/ftwflags.c delete mode 100644 usr/src/lib/libast/common/misc/getcwd.c delete mode 100644 usr/src/lib/libast/common/misc/getenv.c delete mode 100644 usr/src/lib/libast/common/misc/glob.c delete mode 100644 usr/src/lib/libast/common/misc/intercepts.h delete mode 100644 usr/src/lib/libast/common/misc/magic.c delete mode 100644 usr/src/lib/libast/common/misc/mime.c delete mode 100644 usr/src/lib/libast/common/misc/mimelib.h delete mode 100644 usr/src/lib/libast/common/misc/mimetype.c delete mode 100644 usr/src/lib/libast/common/misc/optctx.c delete mode 100644 usr/src/lib/libast/common/misc/optesc.c delete mode 100644 usr/src/lib/libast/common/misc/optget.c delete mode 100644 usr/src/lib/libast/common/misc/optjoin.c delete mode 100644 usr/src/lib/libast/common/misc/optlib.h delete mode 100644 usr/src/lib/libast/common/misc/procclose.c delete mode 100644 usr/src/lib/libast/common/misc/procfree.c delete mode 100644 usr/src/lib/libast/common/misc/proclib.h delete mode 100644 usr/src/lib/libast/common/misc/procopen.c delete mode 100644 usr/src/lib/libast/common/misc/procrun.c delete mode 100644 usr/src/lib/libast/common/misc/recfmt.c delete mode 100644 usr/src/lib/libast/common/misc/reclen.c delete mode 100644 usr/src/lib/libast/common/misc/recstr.c delete mode 100644 usr/src/lib/libast/common/misc/setenviron.c delete mode 100644 usr/src/lib/libast/common/misc/sigcrit.c delete mode 100644 usr/src/lib/libast/common/misc/sigdata.c delete mode 100644 usr/src/lib/libast/common/misc/signal.c delete mode 100644 usr/src/lib/libast/common/misc/stack.c delete mode 100644 usr/src/lib/libast/common/misc/state.c delete mode 100644 usr/src/lib/libast/common/misc/stk.c delete mode 100644 usr/src/lib/libast/common/misc/systrace.c delete mode 100644 usr/src/lib/libast/common/misc/translate.c delete mode 100644 usr/src/lib/libast/common/misc/univdata.c delete mode 100644 usr/src/lib/libast/common/misc/univlib.h delete mode 100644 usr/src/lib/libast/common/obsolete/spawn.c delete mode 100644 usr/src/lib/libast/common/path/pathaccess.c delete mode 100644 usr/src/lib/libast/common/path/pathbin.c delete mode 100644 usr/src/lib/libast/common/path/pathcanon.c delete mode 100644 usr/src/lib/libast/common/path/pathcat.c delete mode 100644 usr/src/lib/libast/common/path/pathcd.c delete mode 100644 usr/src/lib/libast/common/path/pathcheck.c delete mode 100644 usr/src/lib/libast/common/path/pathexists.c delete mode 100644 usr/src/lib/libast/common/path/pathfind.c delete mode 100644 usr/src/lib/libast/common/path/pathgetlink.c delete mode 100644 usr/src/lib/libast/common/path/pathkey.c delete mode 100644 usr/src/lib/libast/common/path/pathnative.c delete mode 100644 usr/src/lib/libast/common/path/pathpath.c delete mode 100644 usr/src/lib/libast/common/path/pathposix.c delete mode 100644 usr/src/lib/libast/common/path/pathprobe.c delete mode 100644 usr/src/lib/libast/common/path/pathprog.c delete mode 100644 usr/src/lib/libast/common/path/pathrepl.c delete mode 100644 usr/src/lib/libast/common/path/pathsetlink.c delete mode 100644 usr/src/lib/libast/common/path/pathshell.c delete mode 100644 usr/src/lib/libast/common/path/pathstat.c delete mode 100644 usr/src/lib/libast/common/path/pathtemp.c delete mode 100644 usr/src/lib/libast/common/path/pathtmp.c delete mode 100644 usr/src/lib/libast/common/port/astconf.c delete mode 100644 usr/src/lib/libast/common/port/astcopy.c delete mode 100644 usr/src/lib/libast/common/port/astdynamic.c delete mode 100644 usr/src/lib/libast/common/port/astlicense.c delete mode 100644 usr/src/lib/libast/common/port/astmath.c delete mode 100644 usr/src/lib/libast/common/port/astquery.c delete mode 100644 usr/src/lib/libast/common/port/aststatic.c delete mode 100644 usr/src/lib/libast/common/port/astwinsize.c delete mode 100644 usr/src/lib/libast/common/port/iblocks.c delete mode 100644 usr/src/lib/libast/common/port/lc.c delete mode 100644 usr/src/lib/libast/common/port/lc.tab delete mode 100644 usr/src/lib/libast/common/port/lcgen.c delete mode 100644 usr/src/lib/libast/common/port/lclang.h delete mode 100644 usr/src/lib/libast/common/port/lclib.h delete mode 100644 usr/src/lib/libast/common/port/mc.c delete mode 100644 usr/src/lib/libast/common/port/mnt.c delete mode 100644 usr/src/lib/libast/common/port/touch.c delete mode 100644 usr/src/lib/libast/common/preroot/getpreroot.c delete mode 100644 usr/src/lib/libast/common/preroot/ispreroot.c delete mode 100644 usr/src/lib/libast/common/preroot/realopen.c delete mode 100644 usr/src/lib/libast/common/preroot/setpreroot.c delete mode 100644 usr/src/lib/libast/common/regex/regalloc.c delete mode 100644 usr/src/lib/libast/common/regex/regcache.c delete mode 100644 usr/src/lib/libast/common/regex/regclass.c delete mode 100644 usr/src/lib/libast/common/regex/regcoll.c delete mode 100644 usr/src/lib/libast/common/regex/regcomp.c delete mode 100644 usr/src/lib/libast/common/regex/regdecomp.c delete mode 100644 usr/src/lib/libast/common/regex/regerror.c delete mode 100644 usr/src/lib/libast/common/regex/regexec.c delete mode 100644 usr/src/lib/libast/common/regex/regfatal.c delete mode 100644 usr/src/lib/libast/common/regex/reginit.c delete mode 100644 usr/src/lib/libast/common/regex/reglib.h delete mode 100644 usr/src/lib/libast/common/regex/regnexec.c delete mode 100644 usr/src/lib/libast/common/regex/regrecord.c delete mode 100644 usr/src/lib/libast/common/regex/regrexec.c delete mode 100644 usr/src/lib/libast/common/regex/regstat.c delete mode 100644 usr/src/lib/libast/common/regex/regsub.c delete mode 100644 usr/src/lib/libast/common/regex/regsubcomp.c delete mode 100644 usr/src/lib/libast/common/regex/regsubexec.c delete mode 100644 usr/src/lib/libast/common/regex/ucs_names.h delete mode 100644 usr/src/lib/libast/common/sfio/_sfclrerr.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfdlen.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfeof.c delete mode 100644 usr/src/lib/libast/common/sfio/_sferror.c delete mode 100644 usr/src/lib/libast/common/sfio/_sffileno.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfgetc.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfgetl.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfgetl2.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfgetu.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfgetu2.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfllen.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfopen.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfputc.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfputd.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfputl.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfputm.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfputu.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfslen.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfstacked.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfulen.c delete mode 100644 usr/src/lib/libast/common/sfio/_sfvalue.c delete mode 100644 usr/src/lib/libast/common/sfio/sfclose.c delete mode 100644 usr/src/lib/libast/common/sfio/sfclrlock.c delete mode 100644 usr/src/lib/libast/common/sfio/sfcvt.c delete mode 100644 usr/src/lib/libast/common/sfio/sfdisc.c delete mode 100644 usr/src/lib/libast/common/sfio/sfdlen.c delete mode 100644 usr/src/lib/libast/common/sfio/sfecvt.c delete mode 100644 usr/src/lib/libast/common/sfio/sfexcept.c delete mode 100644 usr/src/lib/libast/common/sfio/sfextern.c delete mode 100644 usr/src/lib/libast/common/sfio/sffcvt.c delete mode 100644 usr/src/lib/libast/common/sfio/sffilbuf.c delete mode 100644 usr/src/lib/libast/common/sfio/sfflsbuf.c delete mode 100644 usr/src/lib/libast/common/sfio/sfgetd.c delete mode 100644 usr/src/lib/libast/common/sfio/sfgetl.c delete mode 100644 usr/src/lib/libast/common/sfio/sfgetm.c delete mode 100644 usr/src/lib/libast/common/sfio/sfgetr.c delete mode 100644 usr/src/lib/libast/common/sfio/sfgetu.c delete mode 100644 usr/src/lib/libast/common/sfio/sfhdr.h delete mode 100644 usr/src/lib/libast/common/sfio/sfllen.c delete mode 100644 usr/src/lib/libast/common/sfio/sfmode.c delete mode 100644 usr/src/lib/libast/common/sfio/sfmove.c delete mode 100644 usr/src/lib/libast/common/sfio/sfmutex.c delete mode 100644 usr/src/lib/libast/common/sfio/sfnew.c delete mode 100644 usr/src/lib/libast/common/sfio/sfnotify.c delete mode 100644 usr/src/lib/libast/common/sfio/sfnputc.c delete mode 100644 usr/src/lib/libast/common/sfio/sfopen.c delete mode 100644 usr/src/lib/libast/common/sfio/sfpeek.c delete mode 100644 usr/src/lib/libast/common/sfio/sfpkrd.c delete mode 100644 usr/src/lib/libast/common/sfio/sfpoll.c delete mode 100644 usr/src/lib/libast/common/sfio/sfpool.c delete mode 100644 usr/src/lib/libast/common/sfio/sfpopen.c delete mode 100644 usr/src/lib/libast/common/sfio/sfprintf.c delete mode 100644 usr/src/lib/libast/common/sfio/sfprints.c delete mode 100644 usr/src/lib/libast/common/sfio/sfpurge.c delete mode 100644 usr/src/lib/libast/common/sfio/sfputd.c delete mode 100644 usr/src/lib/libast/common/sfio/sfputl.c delete mode 100644 usr/src/lib/libast/common/sfio/sfputm.c delete mode 100644 usr/src/lib/libast/common/sfio/sfputr.c delete mode 100644 usr/src/lib/libast/common/sfio/sfputu.c delete mode 100644 usr/src/lib/libast/common/sfio/sfraise.c delete mode 100644 usr/src/lib/libast/common/sfio/sfrd.c delete mode 100644 usr/src/lib/libast/common/sfio/sfread.c delete mode 100644 usr/src/lib/libast/common/sfio/sfreserve.c delete mode 100644 usr/src/lib/libast/common/sfio/sfresize.c delete mode 100644 usr/src/lib/libast/common/sfio/sfscanf.c delete mode 100644 usr/src/lib/libast/common/sfio/sfseek.c delete mode 100644 usr/src/lib/libast/common/sfio/sfset.c delete mode 100644 usr/src/lib/libast/common/sfio/sfsetbuf.c delete mode 100644 usr/src/lib/libast/common/sfio/sfsetfd.c delete mode 100644 usr/src/lib/libast/common/sfio/sfsize.c delete mode 100644 usr/src/lib/libast/common/sfio/sfsk.c delete mode 100644 usr/src/lib/libast/common/sfio/sfstack.c delete mode 100644 usr/src/lib/libast/common/sfio/sfstrtod.c delete mode 100644 usr/src/lib/libast/common/sfio/sfstrtof.h delete mode 100644 usr/src/lib/libast/common/sfio/sfswap.c delete mode 100644 usr/src/lib/libast/common/sfio/sfsync.c delete mode 100644 usr/src/lib/libast/common/sfio/sftable.c delete mode 100644 usr/src/lib/libast/common/sfio/sftell.c delete mode 100644 usr/src/lib/libast/common/sfio/sftmp.c delete mode 100644 usr/src/lib/libast/common/sfio/sfungetc.c delete mode 100644 usr/src/lib/libast/common/sfio/sfvprintf.c delete mode 100644 usr/src/lib/libast/common/sfio/sfvscanf.c delete mode 100644 usr/src/lib/libast/common/sfio/sfwalk.c delete mode 100644 usr/src/lib/libast/common/sfio/sfwr.c delete mode 100644 usr/src/lib/libast/common/sfio/sfwrite.c delete mode 100644 usr/src/lib/libast/common/sfio/vthread.h delete mode 100644 usr/src/lib/libast/common/std/bytesex.h delete mode 100644 usr/src/lib/libast/common/std/dirent.h delete mode 100644 usr/src/lib/libast/common/std/endian.h delete mode 100644 usr/src/lib/libast/common/std/iconv.h delete mode 100644 usr/src/lib/libast/common/std/nl_types.h delete mode 100644 usr/src/lib/libast/common/std/stdio.h delete mode 100644 usr/src/lib/libast/common/std/wchar.h delete mode 100644 usr/src/lib/libast/common/stdio/_doprnt.c delete mode 100644 usr/src/lib/libast/common/stdio/_doscan.c delete mode 100644 usr/src/lib/libast/common/stdio/_filbuf.c delete mode 100644 usr/src/lib/libast/common/stdio/_flsbuf.c delete mode 100644 usr/src/lib/libast/common/stdio/_stdfun.c delete mode 100644 usr/src/lib/libast/common/stdio/_stdopen.c delete mode 100644 usr/src/lib/libast/common/stdio/_stdprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/_stdscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/_stdsprnt.c delete mode 100644 usr/src/lib/libast/common/stdio/_stdvbuf.c delete mode 100644 usr/src/lib/libast/common/stdio/_stdvsnprnt.c delete mode 100644 usr/src/lib/libast/common/stdio/_stdvsprnt.c delete mode 100644 usr/src/lib/libast/common/stdio/_stdvsscn.c delete mode 100644 usr/src/lib/libast/common/stdio/asprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/clearerr.c delete mode 100644 usr/src/lib/libast/common/stdio/fclose.c delete mode 100644 usr/src/lib/libast/common/stdio/fcloseall.c delete mode 100644 usr/src/lib/libast/common/stdio/fdopen.c delete mode 100644 usr/src/lib/libast/common/stdio/feof.c delete mode 100644 usr/src/lib/libast/common/stdio/ferror.c delete mode 100644 usr/src/lib/libast/common/stdio/fflush.c delete mode 100644 usr/src/lib/libast/common/stdio/fgetc.c delete mode 100644 usr/src/lib/libast/common/stdio/fgetpos.c delete mode 100644 usr/src/lib/libast/common/stdio/fgets.c delete mode 100644 usr/src/lib/libast/common/stdio/fgetwc.c delete mode 100644 usr/src/lib/libast/common/stdio/fgetws.c delete mode 100644 usr/src/lib/libast/common/stdio/fileno.c delete mode 100644 usr/src/lib/libast/common/stdio/flockfile.c delete mode 100644 usr/src/lib/libast/common/stdio/fmemopen.c delete mode 100644 usr/src/lib/libast/common/stdio/fopen.c delete mode 100644 usr/src/lib/libast/common/stdio/fprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/fpurge.c delete mode 100644 usr/src/lib/libast/common/stdio/fputc.c delete mode 100644 usr/src/lib/libast/common/stdio/fputs.c delete mode 100644 usr/src/lib/libast/common/stdio/fputwc.c delete mode 100644 usr/src/lib/libast/common/stdio/fputws.c delete mode 100644 usr/src/lib/libast/common/stdio/fread.c delete mode 100644 usr/src/lib/libast/common/stdio/freopen.c delete mode 100644 usr/src/lib/libast/common/stdio/fscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/fseek.c delete mode 100644 usr/src/lib/libast/common/stdio/fseeko.c delete mode 100644 usr/src/lib/libast/common/stdio/fsetpos.c delete mode 100644 usr/src/lib/libast/common/stdio/ftell.c delete mode 100644 usr/src/lib/libast/common/stdio/ftello.c delete mode 100644 usr/src/lib/libast/common/stdio/ftrylockfile.c delete mode 100644 usr/src/lib/libast/common/stdio/funlockfile.c delete mode 100644 usr/src/lib/libast/common/stdio/fwide.c delete mode 100644 usr/src/lib/libast/common/stdio/fwprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/fwrite.c delete mode 100644 usr/src/lib/libast/common/stdio/fwscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/getc.c delete mode 100644 usr/src/lib/libast/common/stdio/getchar.c delete mode 100644 usr/src/lib/libast/common/stdio/getdelim.c delete mode 100644 usr/src/lib/libast/common/stdio/getline.c delete mode 100644 usr/src/lib/libast/common/stdio/getw.c delete mode 100644 usr/src/lib/libast/common/stdio/getwc.c delete mode 100644 usr/src/lib/libast/common/stdio/getwchar.c delete mode 100644 usr/src/lib/libast/common/stdio/pclose.c delete mode 100644 usr/src/lib/libast/common/stdio/popen.c delete mode 100644 usr/src/lib/libast/common/stdio/printf.c delete mode 100644 usr/src/lib/libast/common/stdio/putc.c delete mode 100644 usr/src/lib/libast/common/stdio/putchar.c delete mode 100644 usr/src/lib/libast/common/stdio/puts.c delete mode 100644 usr/src/lib/libast/common/stdio/putw.c delete mode 100644 usr/src/lib/libast/common/stdio/putwc.c delete mode 100644 usr/src/lib/libast/common/stdio/putwchar.c delete mode 100644 usr/src/lib/libast/common/stdio/rewind.c delete mode 100644 usr/src/lib/libast/common/stdio/scanf.c delete mode 100644 usr/src/lib/libast/common/stdio/setbuf.c delete mode 100644 usr/src/lib/libast/common/stdio/setbuffer.c delete mode 100644 usr/src/lib/libast/common/stdio/setlinebuf.c delete mode 100644 usr/src/lib/libast/common/stdio/setvbuf.c delete mode 100644 usr/src/lib/libast/common/stdio/snprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/sprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/sscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/stdhdr.h delete mode 100644 usr/src/lib/libast/common/stdio/stdio_c99.c delete mode 100644 usr/src/lib/libast/common/stdio/swprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/swscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/tmpfile.c delete mode 100644 usr/src/lib/libast/common/stdio/ungetc.c delete mode 100644 usr/src/lib/libast/common/stdio/ungetwc.c delete mode 100644 usr/src/lib/libast/common/stdio/vasprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/vfprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/vfscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/vfwprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/vfwscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/vprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/vscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/vsnprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/vsprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/vsscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/vswprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/vswscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/vwprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/vwscanf.c delete mode 100644 usr/src/lib/libast/common/stdio/wprintf.c delete mode 100644 usr/src/lib/libast/common/stdio/wscanf.c delete mode 100644 usr/src/lib/libast/common/string/base64.c delete mode 100644 usr/src/lib/libast/common/string/ccmap.c delete mode 100644 usr/src/lib/libast/common/string/ccmapid.c delete mode 100644 usr/src/lib/libast/common/string/ccnative.c delete mode 100644 usr/src/lib/libast/common/string/chresc.c delete mode 100644 usr/src/lib/libast/common/string/chrtoi.c delete mode 100644 usr/src/lib/libast/common/string/fmtbase.c delete mode 100644 usr/src/lib/libast/common/string/fmtbuf.c delete mode 100644 usr/src/lib/libast/common/string/fmtclock.c delete mode 100644 usr/src/lib/libast/common/string/fmtdev.c delete mode 100644 usr/src/lib/libast/common/string/fmtelapsed.c delete mode 100644 usr/src/lib/libast/common/string/fmterror.c delete mode 100644 usr/src/lib/libast/common/string/fmtesc.c delete mode 100644 usr/src/lib/libast/common/string/fmtfmt.c delete mode 100644 usr/src/lib/libast/common/string/fmtfs.c delete mode 100644 usr/src/lib/libast/common/string/fmtgid.c delete mode 100644 usr/src/lib/libast/common/string/fmtident.c delete mode 100644 usr/src/lib/libast/common/string/fmtip4.c delete mode 100644 usr/src/lib/libast/common/string/fmtip6.c delete mode 100644 usr/src/lib/libast/common/string/fmtls.c delete mode 100644 usr/src/lib/libast/common/string/fmtmatch.c delete mode 100644 usr/src/lib/libast/common/string/fmtmode.c delete mode 100644 usr/src/lib/libast/common/string/fmtnum.c delete mode 100644 usr/src/lib/libast/common/string/fmtperm.c delete mode 100644 usr/src/lib/libast/common/string/fmtre.c delete mode 100644 usr/src/lib/libast/common/string/fmtscale.c delete mode 100644 usr/src/lib/libast/common/string/fmtsignal.c delete mode 100644 usr/src/lib/libast/common/string/fmttime.c delete mode 100644 usr/src/lib/libast/common/string/fmttmx.c delete mode 100644 usr/src/lib/libast/common/string/fmttv.c delete mode 100644 usr/src/lib/libast/common/string/fmtuid.c delete mode 100644 usr/src/lib/libast/common/string/fmtversion.c delete mode 100644 usr/src/lib/libast/common/string/memdup.c delete mode 100644 usr/src/lib/libast/common/string/modedata.c delete mode 100644 usr/src/lib/libast/common/string/modei.c delete mode 100644 usr/src/lib/libast/common/string/modelib.h delete mode 100644 usr/src/lib/libast/common/string/modex.c delete mode 100644 usr/src/lib/libast/common/string/stracmp.c delete mode 100644 usr/src/lib/libast/common/string/strcopy.c delete mode 100644 usr/src/lib/libast/common/string/strdup.c delete mode 100644 usr/src/lib/libast/common/string/strelapsed.c delete mode 100644 usr/src/lib/libast/common/string/strerror.c delete mode 100644 usr/src/lib/libast/common/string/stresc.c delete mode 100644 usr/src/lib/libast/common/string/streval.c delete mode 100644 usr/src/lib/libast/common/string/strexpr.c delete mode 100644 usr/src/lib/libast/common/string/strgid.c delete mode 100644 usr/src/lib/libast/common/string/strlcat.c delete mode 100644 usr/src/lib/libast/common/string/strlcpy.c delete mode 100644 usr/src/lib/libast/common/string/strlook.c delete mode 100644 usr/src/lib/libast/common/string/strmatch.c delete mode 100644 usr/src/lib/libast/common/string/strmode.c delete mode 100644 usr/src/lib/libast/common/string/strnacmp.c delete mode 100644 usr/src/lib/libast/common/string/strncopy.c delete mode 100644 usr/src/lib/libast/common/string/strnpcmp.c delete mode 100644 usr/src/lib/libast/common/string/strntod.c delete mode 100644 usr/src/lib/libast/common/string/strntol.c delete mode 100644 usr/src/lib/libast/common/string/strntold.c delete mode 100644 usr/src/lib/libast/common/string/strntoll.c delete mode 100644 usr/src/lib/libast/common/string/strnton.c delete mode 100644 usr/src/lib/libast/common/string/strntonll.c delete mode 100644 usr/src/lib/libast/common/string/strntoul.c delete mode 100644 usr/src/lib/libast/common/string/strntoull.c delete mode 100644 usr/src/lib/libast/common/string/strnvcmp.c delete mode 100644 usr/src/lib/libast/common/string/stropt.c delete mode 100644 usr/src/lib/libast/common/string/strpcmp.c delete mode 100644 usr/src/lib/libast/common/string/strperm.c delete mode 100644 usr/src/lib/libast/common/string/strpsearch.c delete mode 100644 usr/src/lib/libast/common/string/strsearch.c delete mode 100644 usr/src/lib/libast/common/string/strsort.c delete mode 100644 usr/src/lib/libast/common/string/strtape.c delete mode 100644 usr/src/lib/libast/common/string/strtoi.h delete mode 100644 usr/src/lib/libast/common/string/strtoip4.c delete mode 100644 usr/src/lib/libast/common/string/strtoip6.c delete mode 100644 usr/src/lib/libast/common/string/strton.c delete mode 100644 usr/src/lib/libast/common/string/strtonll.c delete mode 100644 usr/src/lib/libast/common/string/struid.c delete mode 100644 usr/src/lib/libast/common/string/struniq.c delete mode 100644 usr/src/lib/libast/common/string/strvcmp.c delete mode 100644 usr/src/lib/libast/common/string/swapget.c delete mode 100644 usr/src/lib/libast/common/string/swapmem.c delete mode 100644 usr/src/lib/libast/common/string/swapop.c delete mode 100644 usr/src/lib/libast/common/string/swapput.c delete mode 100644 usr/src/lib/libast/common/string/tok.c delete mode 100644 usr/src/lib/libast/common/string/tokline.c delete mode 100644 usr/src/lib/libast/common/string/tokscan.c delete mode 100644 usr/src/lib/libast/common/tm/tmdata.c delete mode 100644 usr/src/lib/libast/common/tm/tmdate.c delete mode 100644 usr/src/lib/libast/common/tm/tmequiv.c delete mode 100644 usr/src/lib/libast/common/tm/tmfix.c delete mode 100644 usr/src/lib/libast/common/tm/tmfmt.c delete mode 100644 usr/src/lib/libast/common/tm/tmform.c delete mode 100644 usr/src/lib/libast/common/tm/tmgoff.c delete mode 100644 usr/src/lib/libast/common/tm/tminit.c delete mode 100644 usr/src/lib/libast/common/tm/tmleap.c delete mode 100644 usr/src/lib/libast/common/tm/tmlex.c delete mode 100644 usr/src/lib/libast/common/tm/tmlocale.c delete mode 100644 usr/src/lib/libast/common/tm/tmmake.c delete mode 100644 usr/src/lib/libast/common/tm/tmpoff.c delete mode 100644 usr/src/lib/libast/common/tm/tmscan.c delete mode 100644 usr/src/lib/libast/common/tm/tmsleep.c delete mode 100644 usr/src/lib/libast/common/tm/tmtime.c delete mode 100644 usr/src/lib/libast/common/tm/tmtype.c delete mode 100644 usr/src/lib/libast/common/tm/tmweek.c delete mode 100644 usr/src/lib/libast/common/tm/tmword.c delete mode 100644 usr/src/lib/libast/common/tm/tmxdate.c delete mode 100644 usr/src/lib/libast/common/tm/tmxduration.c delete mode 100644 usr/src/lib/libast/common/tm/tmxfmt.c delete mode 100644 usr/src/lib/libast/common/tm/tmxgettime.c delete mode 100644 usr/src/lib/libast/common/tm/tmxleap.c delete mode 100644 usr/src/lib/libast/common/tm/tmxmake.c delete mode 100644 usr/src/lib/libast/common/tm/tmxscan.c delete mode 100644 usr/src/lib/libast/common/tm/tmxsettime.c delete mode 100644 usr/src/lib/libast/common/tm/tmxsleep.c delete mode 100644 usr/src/lib/libast/common/tm/tmxtime.c delete mode 100644 usr/src/lib/libast/common/tm/tmxtouch.c delete mode 100644 usr/src/lib/libast/common/tm/tmzone.c delete mode 100644 usr/src/lib/libast/common/tm/tvcmp.c delete mode 100644 usr/src/lib/libast/common/tm/tvgettime.c delete mode 100644 usr/src/lib/libast/common/tm/tvsettime.c delete mode 100644 usr/src/lib/libast/common/tm/tvsleep.c delete mode 100644 usr/src/lib/libast/common/tm/tvtouch.c delete mode 100644 usr/src/lib/libast/common/uwin/a64l.c delete mode 100644 usr/src/lib/libast/common/uwin/acosh.c delete mode 100644 usr/src/lib/libast/common/uwin/asinh.c delete mode 100644 usr/src/lib/libast/common/uwin/atanh.c delete mode 100644 usr/src/lib/libast/common/uwin/cbrt.c delete mode 100644 usr/src/lib/libast/common/uwin/crypt.c delete mode 100644 usr/src/lib/libast/common/uwin/erf.c delete mode 100644 usr/src/lib/libast/common/uwin/err.c delete mode 100644 usr/src/lib/libast/common/uwin/exp.c delete mode 100644 usr/src/lib/libast/common/uwin/exp__E.c delete mode 100644 usr/src/lib/libast/common/uwin/expm1.c delete mode 100644 usr/src/lib/libast/common/uwin/gamma.c delete mode 100644 usr/src/lib/libast/common/uwin/getpass.c delete mode 100644 usr/src/lib/libast/common/uwin/lgamma.c delete mode 100644 usr/src/lib/libast/common/uwin/log.c delete mode 100644 usr/src/lib/libast/common/uwin/log1p.c delete mode 100644 usr/src/lib/libast/common/uwin/log__L.c delete mode 100644 usr/src/lib/libast/common/uwin/rand48.c delete mode 100644 usr/src/lib/libast/common/uwin/random.c delete mode 100644 usr/src/lib/libast/common/uwin/rcmd.c delete mode 100644 usr/src/lib/libast/common/uwin/rint.c delete mode 100644 usr/src/lib/libast/common/uwin/support.c delete mode 100644 usr/src/lib/libast/common/vec/vecargs.c delete mode 100644 usr/src/lib/libast/common/vec/vecfile.c delete mode 100644 usr/src/lib/libast/common/vec/vecfree.c delete mode 100644 usr/src/lib/libast/common/vec/vecload.c delete mode 100644 usr/src/lib/libast/common/vec/vecstring.c delete mode 100644 usr/src/lib/libast/common/vmalloc/malloc.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmbest.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmclear.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmclose.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmdcheap.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmdebug.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmdisc.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmexit.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmgetmem.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmhdr.h delete mode 100644 usr/src/lib/libast/common/vmalloc/vmlast.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmmopen.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmopen.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmpool.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmprivate.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmprofile.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmregion.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmsegment.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmset.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmstat.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmstrdup.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmtrace.c delete mode 100644 usr/src/lib/libast/common/vmalloc/vmwalk.c delete mode 100644 usr/src/lib/libast/i386/Makefile delete mode 100644 usr/src/lib/libast/i386/include/ast/align.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_botch.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_ccode.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_common.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_dir.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_dirent.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_fcntl.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_float.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_fs.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_getopt.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_iconv.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_lib.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_limits.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_map.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_mmap.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_mode.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_namval.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_ndbm.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_nl_types.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_param.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_standards.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_std.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_stdio.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_sys.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_time.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_tty.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_version.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_vfork.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_wait.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_wchar.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ast_windows.h delete mode 100644 usr/src/lib/libast/i386/include/ast/bytesex.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ccode.h delete mode 100644 usr/src/lib/libast/i386/include/ast/cdt.h delete mode 100644 usr/src/lib/libast/i386/include/ast/debug.h delete mode 100644 usr/src/lib/libast/i386/include/ast/dirent.h delete mode 100644 usr/src/lib/libast/i386/include/ast/dt.h delete mode 100644 usr/src/lib/libast/i386/include/ast/endian.h delete mode 100644 usr/src/lib/libast/i386/include/ast/error.h delete mode 100644 usr/src/lib/libast/i386/include/ast/find.h delete mode 100644 usr/src/lib/libast/i386/include/ast/fnmatch.h delete mode 100644 usr/src/lib/libast/i386/include/ast/fnv.h delete mode 100644 usr/src/lib/libast/i386/include/ast/fs3d.h delete mode 100644 usr/src/lib/libast/i386/include/ast/fts.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ftw.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ftwalk.h delete mode 100644 usr/src/lib/libast/i386/include/ast/getopt.h delete mode 100644 usr/src/lib/libast/i386/include/ast/glob.h delete mode 100644 usr/src/lib/libast/i386/include/ast/hash.h delete mode 100644 usr/src/lib/libast/i386/include/ast/hashkey.h delete mode 100644 usr/src/lib/libast/i386/include/ast/hashpart.h delete mode 100644 usr/src/lib/libast/i386/include/ast/iconv.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ip6.h delete mode 100644 usr/src/lib/libast/i386/include/ast/lc.h delete mode 100644 usr/src/lib/libast/i386/include/ast/ls.h delete mode 100644 usr/src/lib/libast/i386/include/ast/magic.h delete mode 100644 usr/src/lib/libast/i386/include/ast/magicid.h delete mode 100644 usr/src/lib/libast/i386/include/ast/mc.h delete mode 100644 usr/src/lib/libast/i386/include/ast/mime.h delete mode 100644 usr/src/lib/libast/i386/include/ast/mnt.h delete mode 100644 usr/src/lib/libast/i386/include/ast/modecanon.h delete mode 100644 usr/src/lib/libast/i386/include/ast/modex.h delete mode 100644 usr/src/lib/libast/i386/include/ast/namval.h delete mode 100644 usr/src/lib/libast/i386/include/ast/nl_types.h delete mode 100644 usr/src/lib/libast/i386/include/ast/option.h delete mode 100644 usr/src/lib/libast/i386/include/ast/preroot.h delete mode 100644 usr/src/lib/libast/i386/include/ast/proc.h delete mode 100644 usr/src/lib/libast/i386/include/ast/prototyped.h delete mode 100644 usr/src/lib/libast/i386/include/ast/re_comp.h delete mode 100644 usr/src/lib/libast/i386/include/ast/recfmt.h delete mode 100644 usr/src/lib/libast/i386/include/ast/regex.h delete mode 100644 usr/src/lib/libast/i386/include/ast/regexp.h delete mode 100644 usr/src/lib/libast/i386/include/ast/sfdisc.h delete mode 100644 usr/src/lib/libast/i386/include/ast/sfio.h delete mode 100644 usr/src/lib/libast/i386/include/ast/sfio_s.h delete mode 100644 usr/src/lib/libast/i386/include/ast/sfio_t.h delete mode 100644 usr/src/lib/libast/i386/include/ast/shcmd.h delete mode 100644 usr/src/lib/libast/i386/include/ast/sig.h delete mode 100644 usr/src/lib/libast/i386/include/ast/stack.h delete mode 100644 usr/src/lib/libast/i386/include/ast/stak.h delete mode 100644 usr/src/lib/libast/i386/include/ast/stdio.h delete mode 100644 usr/src/lib/libast/i386/include/ast/stk.h delete mode 100644 usr/src/lib/libast/i386/include/ast/swap.h delete mode 100644 usr/src/lib/libast/i386/include/ast/tar.h delete mode 100644 usr/src/lib/libast/i386/include/ast/times.h delete mode 100644 usr/src/lib/libast/i386/include/ast/tm.h delete mode 100644 usr/src/lib/libast/i386/include/ast/tmx.h delete mode 100644 usr/src/lib/libast/i386/include/ast/tok.h delete mode 100644 usr/src/lib/libast/i386/include/ast/tv.h delete mode 100644 usr/src/lib/libast/i386/include/ast/usage.h delete mode 100644 usr/src/lib/libast/i386/include/ast/vdb.h delete mode 100644 usr/src/lib/libast/i386/include/ast/vecargs.h delete mode 100644 usr/src/lib/libast/i386/include/ast/vmalloc.h delete mode 100644 usr/src/lib/libast/i386/include/ast/wait.h delete mode 100644 usr/src/lib/libast/i386/include/ast/wchar.h delete mode 100644 usr/src/lib/libast/i386/include/ast/wordexp.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/align delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/botch delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/ccode delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/common delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/dirent delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/eaccess delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/errno delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/fcntl delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/float delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/fs delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/hack delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/iconv delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/isoc99 delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/lib delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/libpath delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/limits delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/map delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/mmap delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/mode delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/ndbm delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/nl_types delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/omitted delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/options delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/param delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/preroot delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/prog delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/sfinit delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/sfio delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/sig delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/siglist delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/signal delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/standards delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/stdio delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/sys delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/time delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/tmlib delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/tmx delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/tty delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/tv delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/tvlib delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/uwin delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/vfork delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/vmalloc delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/wait delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/FEATURE/wchar delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/align.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_botch.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_ccode.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_common.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_dirent.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_fcntl.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_float.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_fs.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_iconv.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_lib.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_limits.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_map.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_mmap.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_mode.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_namval.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_ndbm.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_nl_types.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_param.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_standards.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_stdio.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_sys.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_time.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_tty.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_vfork.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_wait.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/ast_wchar.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/conftab.c delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/conftab.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/lc.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/lctab.c delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/preroot.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/sig.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/tmx.h delete mode 100644 usr/src/lib/libast/i386/src/lib/libast/tv.h delete mode 100644 usr/src/lib/libast/mapfile-vers delete mode 100644 usr/src/lib/libast/sparc/Makefile delete mode 100644 usr/src/lib/libast/sparc/include/ast/align.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_botch.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_ccode.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_common.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_dir.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_dirent.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_fcntl.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_float.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_fs.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_getopt.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_iconv.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_lib.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_limits.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_map.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_mmap.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_mode.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_namval.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_ndbm.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_nl_types.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_param.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_standards.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_std.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_stdio.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_sys.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_time.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_tty.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_version.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_vfork.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_wait.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_wchar.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ast_windows.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/bytesex.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ccode.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/cdt.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/debug.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/dirent.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/dt.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/endian.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/error.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/find.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/fnmatch.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/fnv.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/fs3d.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/fts.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ftw.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ftwalk.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/getopt.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/glob.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/hash.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/hashkey.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/hashpart.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/iconv.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ip6.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/lc.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/ls.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/magic.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/magicid.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/mc.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/mime.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/mnt.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/modecanon.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/modex.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/namval.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/nl_types.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/option.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/preroot.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/proc.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/prototyped.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/re_comp.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/recfmt.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/regex.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/regexp.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/sfdisc.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/sfio.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/sfio_s.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/sfio_t.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/shcmd.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/sig.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/stack.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/stak.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/stdio.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/stk.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/swap.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/tar.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/times.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/tm.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/tmx.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/tok.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/tv.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/usage.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/vdb.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/vecargs.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/vmalloc.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/wait.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/wchar.h delete mode 100644 usr/src/lib/libast/sparc/include/ast/wordexp.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/align delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/botch delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/ccode delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/common delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/dirent delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/eaccess delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/errno delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/fcntl delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/float delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/fs delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/hack delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/iconv delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/isoc99 delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/lib delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/libpath delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/limits delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/map delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mmap delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mode delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/ndbm delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/nl_types delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/omitted delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/options delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/param delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/preroot delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/prog delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sfinit delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sfio delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sig delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/siglist delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/signal delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/standards delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/stdio delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sys delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/time delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tmlib delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tmx delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tty delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tv delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tvlib delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/uwin delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/vfork delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/vmalloc delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/wait delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/FEATURE/wchar delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/align.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_botch.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_ccode.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_common.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_dirent.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_fcntl.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_float.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_fs.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_iconv.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_lib.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_limits.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_map.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_mmap.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_mode.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_namval.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_ndbm.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_nl_types.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_param.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_standards.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_stdio.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_sys.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_time.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_tty.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_vfork.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_wait.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/ast_wchar.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/conftab.c delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/conftab.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/lc.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/lctab.c delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/preroot.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/sig.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/tmx.h delete mode 100644 usr/src/lib/libast/sparc/src/lib/libast/tv.h delete mode 100644 usr/src/lib/libast/sparcv9/Makefile delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/align.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_botch.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_ccode.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_common.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_dir.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_dirent.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_fcntl.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_float.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_fs.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_getopt.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_iconv.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_lib.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_limits.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_map.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_mmap.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_mode.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_namval.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_ndbm.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_nl_types.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_param.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_standards.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_std.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_stdio.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_sys.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_time.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_tty.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_version.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_vfork.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_wait.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_wchar.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ast_windows.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/bytesex.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ccode.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/cdt.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/debug.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/dirent.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/dt.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/endian.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/error.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/find.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/fnmatch.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/fnv.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/fs3d.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/fts.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ftw.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ftwalk.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/getopt.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/glob.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/hash.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/hashkey.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/hashpart.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/iconv.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ip6.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/lc.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/ls.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/magic.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/magicid.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/mc.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/mime.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/mnt.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/modecanon.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/modex.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/namval.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/nl_types.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/option.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/preroot.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/proc.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/prototyped.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/re_comp.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/recfmt.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/regex.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/regexp.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/sfdisc.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/sfio.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/sfio_s.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/sfio_t.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/shcmd.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/sig.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/stack.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/stak.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/stdio.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/stk.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/swap.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/tar.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/times.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/tm.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/tmx.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/tok.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/tv.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/usage.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/vdb.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/vecargs.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/vmalloc.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/wait.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/wchar.h delete mode 100644 usr/src/lib/libast/sparcv9/include/ast/wordexp.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/align delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/botch delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/ccode delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/common delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/dirent delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/eaccess delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/errno delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/fcntl delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/float delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/fs delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/hack delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/iconv delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/isoc99 delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/libpath delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/limits delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/map delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mmap delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mode delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/ndbm delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/nl_types delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/omitted delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/options delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/param delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/preroot delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/prog delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sfinit delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sfio delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sig delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/siglist delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/signal delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/standards delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/stdio delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sys delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/time delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tmlib delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tmx delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tty delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tv delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tvlib delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/uwin delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/vfork delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/vmalloc delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/wait delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/wchar delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/align.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_botch.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_ccode.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_common.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_dirent.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_fcntl.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_float.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_fs.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_iconv.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_lib.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_limits.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_map.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_mmap.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_mode.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_namval.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_ndbm.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_nl_types.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_param.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_standards.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_stdio.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_sys.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_time.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_tty.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_vfork.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_wait.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/ast_wchar.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/conftab.c delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/conftab.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/lc.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/lctab.c delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/preroot.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/sig.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/tmx.h delete mode 100644 usr/src/lib/libast/sparcv9/src/lib/libast/tv.h delete mode 100644 usr/src/lib/libcmd/Makefile delete mode 100644 usr/src/lib/libcmd/Makefile.com delete mode 100644 usr/src/lib/libcmd/THIRDPARTYLICENSE delete mode 100644 usr/src/lib/libcmd/THIRDPARTYLICENSE.descrip delete mode 100644 usr/src/lib/libcmd/amd64/Makefile delete mode 100644 usr/src/lib/libcmd/amd64/include/ast/cmd.h delete mode 100644 usr/src/lib/libcmd/amd64/include/ast/cmdext.h delete mode 100644 usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/ids delete mode 100644 usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/sockets delete mode 100644 usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/symlink delete mode 100644 usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/utsname delete mode 100644 usr/src/lib/libcmd/common/RELEASE delete mode 100644 usr/src/lib/libcmd/common/basename.c delete mode 100644 usr/src/lib/libcmd/common/cat.c delete mode 100644 usr/src/lib/libcmd/common/chgrp.c delete mode 100644 usr/src/lib/libcmd/common/chmod.c delete mode 100644 usr/src/lib/libcmd/common/chown.c delete mode 100644 usr/src/lib/libcmd/common/cksum.c delete mode 100644 usr/src/lib/libcmd/common/cmd.h delete mode 100644 usr/src/lib/libcmd/common/cmdinit.c delete mode 100644 usr/src/lib/libcmd/common/cmp.c delete mode 100644 usr/src/lib/libcmd/common/comm.c delete mode 100644 usr/src/lib/libcmd/common/cp.c delete mode 100644 usr/src/lib/libcmd/common/cut.c delete mode 100644 usr/src/lib/libcmd/common/date.c delete mode 100644 usr/src/lib/libcmd/common/dirname.c delete mode 100644 usr/src/lib/libcmd/common/expr.c delete mode 100644 usr/src/lib/libcmd/common/fds.c delete mode 100644 usr/src/lib/libcmd/common/features/ids delete mode 100644 usr/src/lib/libcmd/common/features/sockets delete mode 100644 usr/src/lib/libcmd/common/features/symlink delete mode 100644 usr/src/lib/libcmd/common/features/utsname delete mode 100644 usr/src/lib/libcmd/common/fmt.c delete mode 100644 usr/src/lib/libcmd/common/fold.c delete mode 100644 usr/src/lib/libcmd/common/fts_fix.c delete mode 100644 usr/src/lib/libcmd/common/fts_fix.h delete mode 100644 usr/src/lib/libcmd/common/getconf.c delete mode 100644 usr/src/lib/libcmd/common/grep.c delete mode 100644 usr/src/lib/libcmd/common/head.c delete mode 100644 usr/src/lib/libcmd/common/id.c delete mode 100644 usr/src/lib/libcmd/common/join.c delete mode 100644 usr/src/lib/libcmd/common/ln.c delete mode 100644 usr/src/lib/libcmd/common/logname.c delete mode 100644 usr/src/lib/libcmd/common/md5sum.c delete mode 100644 usr/src/lib/libcmd/common/mkdir.c delete mode 100644 usr/src/lib/libcmd/common/mkfifo.c delete mode 100644 usr/src/lib/libcmd/common/mktemp.c delete mode 100644 usr/src/lib/libcmd/common/mv.c delete mode 100644 usr/src/lib/libcmd/common/paste.c delete mode 100644 usr/src/lib/libcmd/common/pathchk.c delete mode 100644 usr/src/lib/libcmd/common/pids.c delete mode 100644 usr/src/lib/libcmd/common/readlink.c delete mode 100644 usr/src/lib/libcmd/common/rev.c delete mode 100644 usr/src/lib/libcmd/common/rev.h delete mode 100644 usr/src/lib/libcmd/common/revlib.c delete mode 100644 usr/src/lib/libcmd/common/rm.c delete mode 100644 usr/src/lib/libcmd/common/rmdir.c delete mode 100644 usr/src/lib/libcmd/common/stty.c delete mode 100644 usr/src/lib/libcmd/common/sum.c delete mode 100644 usr/src/lib/libcmd/common/sync.c delete mode 100644 usr/src/lib/libcmd/common/tail.c delete mode 100644 usr/src/lib/libcmd/common/tee.c delete mode 100644 usr/src/lib/libcmd/common/tty.c delete mode 100644 usr/src/lib/libcmd/common/uname.c delete mode 100644 usr/src/lib/libcmd/common/uniq.c delete mode 100644 usr/src/lib/libcmd/common/vmstate.c delete mode 100644 usr/src/lib/libcmd/common/wc.c delete mode 100644 usr/src/lib/libcmd/common/wc.h delete mode 100644 usr/src/lib/libcmd/common/wclib.c delete mode 100644 usr/src/lib/libcmd/i386/Makefile delete mode 100644 usr/src/lib/libcmd/i386/include/ast/cmd.h delete mode 100644 usr/src/lib/libcmd/i386/include/ast/cmdext.h delete mode 100644 usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/ids delete mode 100644 usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/sockets delete mode 100644 usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/symlink delete mode 100644 usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/utsname delete mode 100644 usr/src/lib/libcmd/mapfile-vers delete mode 100644 usr/src/lib/libcmd/sparc/Makefile delete mode 100644 usr/src/lib/libcmd/sparc/include/ast/cmd.h delete mode 100644 usr/src/lib/libcmd/sparc/include/ast/cmdext.h delete mode 100644 usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/ids delete mode 100644 usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/sockets delete mode 100644 usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/symlink delete mode 100644 usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/utsname delete mode 100644 usr/src/lib/libcmd/sparcv9/Makefile delete mode 100644 usr/src/lib/libcmd/sparcv9/include/ast/cmd.h delete mode 100644 usr/src/lib/libcmd/sparcv9/include/ast/cmdext.h delete mode 100644 usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/ids delete mode 100644 usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/sockets delete mode 100644 usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/symlink delete mode 100644 usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/utsname delete mode 100644 usr/src/lib/libdll/Makefile delete mode 100644 usr/src/lib/libdll/Makefile.com delete mode 100644 usr/src/lib/libdll/THIRDPARTYLICENSE delete mode 100644 usr/src/lib/libdll/THIRDPARTYLICENSE.descrip delete mode 100644 usr/src/lib/libdll/amd64/Makefile delete mode 100644 usr/src/lib/libdll/amd64/src/lib/libdll/FEATURE/dll delete mode 100644 usr/src/lib/libdll/amd64/src/lib/libdll/dlldefs.h delete mode 100644 usr/src/lib/libdll/common/RELEASE delete mode 100644 usr/src/lib/libdll/common/dlfcn.c delete mode 100644 usr/src/lib/libdll/common/dllfind.c delete mode 100644 usr/src/lib/libdll/common/dlllook.c delete mode 100644 usr/src/lib/libdll/common/dllnext.c delete mode 100644 usr/src/lib/libdll/common/dllopen.c delete mode 100644 usr/src/lib/libdll/common/dllplug.c delete mode 100644 usr/src/lib/libdll/common/dllscan.c delete mode 100644 usr/src/lib/libdll/common/features/dll delete mode 100644 usr/src/lib/libdll/i386/Makefile delete mode 100644 usr/src/lib/libdll/i386/src/lib/libdll/FEATURE/dll delete mode 100644 usr/src/lib/libdll/i386/src/lib/libdll/dlldefs.h delete mode 100644 usr/src/lib/libdll/mapfile-vers delete mode 100644 usr/src/lib/libdll/sparc/Makefile delete mode 100644 usr/src/lib/libdll/sparc/src/lib/libdll/FEATURE/dll delete mode 100644 usr/src/lib/libdll/sparc/src/lib/libdll/dlldefs.h delete mode 100644 usr/src/lib/libdll/sparcv9/Makefile delete mode 100644 usr/src/lib/libdll/sparcv9/src/lib/libdll/FEATURE/dll delete mode 100644 usr/src/lib/libdll/sparcv9/src/lib/libdll/dlldefs.h delete mode 100644 usr/src/lib/libpp/Makefile delete mode 100644 usr/src/lib/libpp/Makefile.com delete mode 100644 usr/src/lib/libpp/THIRDPARTYLICENSE delete mode 100644 usr/src/lib/libpp/THIRDPARTYLICENSE.descrip delete mode 100644 usr/src/lib/libpp/common/BUGS delete mode 100644 usr/src/lib/libpp/common/HISTORY delete mode 100644 usr/src/lib/libpp/common/NOTES delete mode 100644 usr/src/lib/libpp/common/RELEASE delete mode 100644 usr/src/lib/libpp/common/gentab.sh delete mode 100644 usr/src/lib/libpp/common/pp.3 delete mode 100644 usr/src/lib/libpp/common/pp.def delete mode 100644 usr/src/lib/libpp/common/pp.h delete mode 100644 usr/src/lib/libpp/common/pp.key delete mode 100644 usr/src/lib/libpp/common/pp.probe delete mode 100644 usr/src/lib/libpp/common/pp.tab delete mode 100644 usr/src/lib/libpp/common/ppargs.c delete mode 100644 usr/src/lib/libpp/common/ppbuiltin.c delete mode 100644 usr/src/lib/libpp/common/ppcall.c delete mode 100644 usr/src/lib/libpp/common/ppcomment.c delete mode 100644 usr/src/lib/libpp/common/ppcontext.c delete mode 100644 usr/src/lib/libpp/common/ppcontrol.c delete mode 100644 usr/src/lib/libpp/common/ppcpp.c delete mode 100644 usr/src/lib/libpp/common/ppdata.c delete mode 100644 usr/src/lib/libpp/common/pperror.c delete mode 100644 usr/src/lib/libpp/common/ppexpr.c delete mode 100644 usr/src/lib/libpp/common/ppfsm.c delete mode 100644 usr/src/lib/libpp/common/ppfsm.h delete mode 100644 usr/src/lib/libpp/common/ppincref.c delete mode 100644 usr/src/lib/libpp/common/ppinput.c delete mode 100644 usr/src/lib/libpp/common/ppkey.c delete mode 100644 usr/src/lib/libpp/common/ppkey.h delete mode 100644 usr/src/lib/libpp/common/pplex.c delete mode 100644 usr/src/lib/libpp/common/pplib.h delete mode 100644 usr/src/lib/libpp/common/ppline.c delete mode 100644 usr/src/lib/libpp/common/ppmacref.c delete mode 100644 usr/src/lib/libpp/common/ppmisc.c delete mode 100644 usr/src/lib/libpp/common/ppop.c delete mode 100644 usr/src/lib/libpp/common/pppragma.c delete mode 100644 usr/src/lib/libpp/common/ppprintf.c delete mode 100644 usr/src/lib/libpp/common/ppproto.c delete mode 100644 usr/src/lib/libpp/common/ppsearch.c delete mode 100644 usr/src/lib/libpp/common/ppsym.c delete mode 100644 usr/src/lib/libpp/common/pptrace.c delete mode 100644 usr/src/lib/libpp/i386/Makefile delete mode 100644 usr/src/lib/libpp/i386/pp.req delete mode 100644 usr/src/lib/libpp/i386/pp.yacc delete mode 100644 usr/src/lib/libpp/i386/ppdebug.h delete mode 100644 usr/src/lib/libpp/i386/ppdef.h delete mode 100644 usr/src/lib/libpp/i386/pptab.h delete mode 100644 usr/src/lib/libpp/mapfile-vers delete mode 100644 usr/src/lib/libpp/sparc/Makefile delete mode 100644 usr/src/lib/libpp/sparc/pp.req delete mode 100644 usr/src/lib/libpp/sparc/pp.yacc delete mode 100644 usr/src/lib/libpp/sparc/ppdebug.h delete mode 100644 usr/src/lib/libpp/sparc/ppdef.h delete mode 100644 usr/src/lib/libpp/sparc/pptab.h delete mode 100644 usr/src/lib/libshell/Makefile delete mode 100644 usr/src/lib/libshell/Makefile.com delete mode 100644 usr/src/lib/libshell/Makefile.demo delete mode 100644 usr/src/lib/libshell/Makefile.doc delete mode 100644 usr/src/lib/libshell/THIRDPARTYLICENSE delete mode 100644 usr/src/lib/libshell/THIRDPARTYLICENSE.descrip delete mode 100644 usr/src/lib/libshell/amd64/Makefile delete mode 100644 usr/src/lib/libshell/amd64/include/ast/history.h delete mode 100644 usr/src/lib/libshell/amd64/include/ast/nval.h delete mode 100644 usr/src/lib/libshell/amd64/include/ast/shell.h delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/dynamic delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/execargs delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/externs delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/locale delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/options delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/poll delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/rlimits delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/setjmp delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/sigfeatures delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/time delete mode 100644 usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys delete mode 100644 usr/src/lib/libshell/common/COMPATIBILITY delete mode 100644 usr/src/lib/libshell/common/DESIGN delete mode 100644 usr/src/lib/libshell/common/OBSOLETE delete mode 100644 usr/src/lib/libshell/common/PROMO.mm delete mode 100644 usr/src/lib/libshell/common/README delete mode 100644 usr/src/lib/libshell/common/RELEASE delete mode 100644 usr/src/lib/libshell/common/RELEASE88 delete mode 100644 usr/src/lib/libshell/common/RELEASE93 delete mode 100644 usr/src/lib/libshell/common/TYPES delete mode 100644 usr/src/lib/libshell/common/bltins/alarm.c delete mode 100644 usr/src/lib/libshell/common/bltins/cd_pwd.c delete mode 100644 usr/src/lib/libshell/common/bltins/cflow.c delete mode 100644 usr/src/lib/libshell/common/bltins/enum.c delete mode 100644 usr/src/lib/libshell/common/bltins/getopts.c delete mode 100644 usr/src/lib/libshell/common/bltins/hist.c delete mode 100644 usr/src/lib/libshell/common/bltins/misc.c delete mode 100644 usr/src/lib/libshell/common/bltins/mkservice.c delete mode 100644 usr/src/lib/libshell/common/bltins/poll_solaris.c delete mode 100644 usr/src/lib/libshell/common/bltins/print.c delete mode 100644 usr/src/lib/libshell/common/bltins/read.c delete mode 100644 usr/src/lib/libshell/common/bltins/regress.c delete mode 100644 usr/src/lib/libshell/common/bltins/shiocmd_solaris.c delete mode 100644 usr/src/lib/libshell/common/bltins/sleep.c delete mode 100644 usr/src/lib/libshell/common/bltins/test.c delete mode 100644 usr/src/lib/libshell/common/bltins/trap.c delete mode 100644 usr/src/lib/libshell/common/bltins/typeset.c delete mode 100644 usr/src/lib/libshell/common/bltins/ulimit.c delete mode 100644 usr/src/lib/libshell/common/bltins/umask.c delete mode 100644 usr/src/lib/libshell/common/bltins/whence.c delete mode 100644 usr/src/lib/libshell/common/builtins.mm delete mode 100644 usr/src/lib/libshell/common/data/aliases.c delete mode 100644 usr/src/lib/libshell/common/data/bash_pre_rc.sh delete mode 100644 usr/src/lib/libshell/common/data/builtins.c delete mode 100644 usr/src/lib/libshell/common/data/keywords.c delete mode 100644 usr/src/lib/libshell/common/data/lexstates.c delete mode 100644 usr/src/lib/libshell/common/data/limits.c delete mode 100644 usr/src/lib/libshell/common/data/math.tab delete mode 100644 usr/src/lib/libshell/common/data/msg.c delete mode 100644 usr/src/lib/libshell/common/data/options.c delete mode 100644 usr/src/lib/libshell/common/data/signals.c delete mode 100644 usr/src/lib/libshell/common/data/solaris_cmdlist.h delete mode 100644 usr/src/lib/libshell/common/data/strdata.c delete mode 100644 usr/src/lib/libshell/common/data/testops.c delete mode 100644 usr/src/lib/libshell/common/data/variables.c delete mode 100644 usr/src/lib/libshell/common/edit/completion.c delete mode 100644 usr/src/lib/libshell/common/edit/edit.c delete mode 100644 usr/src/lib/libshell/common/edit/emacs.c delete mode 100644 usr/src/lib/libshell/common/edit/hexpand.c delete mode 100644 usr/src/lib/libshell/common/edit/history.c delete mode 100644 usr/src/lib/libshell/common/edit/vi.c delete mode 100644 usr/src/lib/libshell/common/features/cmds delete mode 100644 usr/src/lib/libshell/common/features/dynamic delete mode 100644 usr/src/lib/libshell/common/features/externs delete mode 100644 usr/src/lib/libshell/common/features/locale delete mode 100644 usr/src/lib/libshell/common/features/math delete mode 100644 usr/src/lib/libshell/common/features/math.sh delete mode 100644 usr/src/lib/libshell/common/features/options delete mode 100644 usr/src/lib/libshell/common/features/poll delete mode 100644 usr/src/lib/libshell/common/features/rlimits delete mode 100644 usr/src/lib/libshell/common/features/setjmp delete mode 100644 usr/src/lib/libshell/common/features/sigfeatures delete mode 100644 usr/src/lib/libshell/common/features/time delete mode 100644 usr/src/lib/libshell/common/features/ttys delete mode 100644 usr/src/lib/libshell/common/fun/dirs delete mode 100644 usr/src/lib/libshell/common/fun/popd delete mode 100644 usr/src/lib/libshell/common/fun/pushd delete mode 100644 usr/src/lib/libshell/common/fun/title delete mode 100644 usr/src/lib/libshell/common/include/argnod.h delete mode 100644 usr/src/lib/libshell/common/include/builtins.h delete mode 100644 usr/src/lib/libshell/common/include/defs.h delete mode 100644 usr/src/lib/libshell/common/include/edit.h delete mode 100644 usr/src/lib/libshell/common/include/env.h delete mode 100644 usr/src/lib/libshell/common/include/fault.h delete mode 100644 usr/src/lib/libshell/common/include/fcin.h delete mode 100644 usr/src/lib/libshell/common/include/history.h delete mode 100644 usr/src/lib/libshell/common/include/io.h delete mode 100644 usr/src/lib/libshell/common/include/jobs.h delete mode 100644 usr/src/lib/libshell/common/include/lexstates.h delete mode 100644 usr/src/lib/libshell/common/include/name.h delete mode 100644 usr/src/lib/libshell/common/include/national.h delete mode 100644 usr/src/lib/libshell/common/include/nval.h delete mode 100644 usr/src/lib/libshell/common/include/path.h delete mode 100644 usr/src/lib/libshell/common/include/regress.h delete mode 100644 usr/src/lib/libshell/common/include/shell.h delete mode 100644 usr/src/lib/libshell/common/include/shlex.h delete mode 100644 usr/src/lib/libshell/common/include/shnodes.h delete mode 100644 usr/src/lib/libshell/common/include/shtable.h delete mode 100644 usr/src/lib/libshell/common/include/streval.h delete mode 100644 usr/src/lib/libshell/common/include/terminal.h delete mode 100644 usr/src/lib/libshell/common/include/test.h delete mode 100644 usr/src/lib/libshell/common/include/timeout.h delete mode 100644 usr/src/lib/libshell/common/include/ulimit.h delete mode 100644 usr/src/lib/libshell/common/include/variables.h delete mode 100644 usr/src/lib/libshell/common/include/version.h delete mode 100644 usr/src/lib/libshell/common/nval.3 delete mode 100644 usr/src/lib/libshell/common/scripts/cpvprint.sh delete mode 100644 usr/src/lib/libshell/common/scripts/crawlsrccomments.sh delete mode 100644 usr/src/lib/libshell/common/scripts/filemutexdemo1.sh delete mode 100644 usr/src/lib/libshell/common/scripts/filetree1.sh delete mode 100644 usr/src/lib/libshell/common/scripts/gnaw.sh delete mode 100644 usr/src/lib/libshell/common/scripts/mandelbrotset1.sh delete mode 100644 usr/src/lib/libshell/common/scripts/multifollow.sh delete mode 100644 usr/src/lib/libshell/common/scripts/numtree1.sh delete mode 100644 usr/src/lib/libshell/common/scripts/primenumbers1.sh delete mode 100644 usr/src/lib/libshell/common/scripts/rssread.sh delete mode 100644 usr/src/lib/libshell/common/scripts/shcalc.sh delete mode 100644 usr/src/lib/libshell/common/scripts/shircbot.sh delete mode 100644 usr/src/lib/libshell/common/scripts/shlint.sh delete mode 100644 usr/src/lib/libshell/common/scripts/shman.sh delete mode 100644 usr/src/lib/libshell/common/scripts/shnote.sh delete mode 100644 usr/src/lib/libshell/common/scripts/shpiano.sh delete mode 100644 usr/src/lib/libshell/common/scripts/shtinyurl.sh delete mode 100644 usr/src/lib/libshell/common/scripts/shtwitter.sh delete mode 100644 usr/src/lib/libshell/common/scripts/simplefileattributetree1.sh delete mode 100644 usr/src/lib/libshell/common/scripts/simplefiletree1.sh delete mode 100644 usr/src/lib/libshell/common/scripts/svcproptree1.sh delete mode 100644 usr/src/lib/libshell/common/scripts/termclock.sh delete mode 100644 usr/src/lib/libshell/common/scripts/test_net_sctp.sh delete mode 100644 usr/src/lib/libshell/common/scripts/xmldocumenttree1.sh delete mode 100644 usr/src/lib/libshell/common/sh.1 delete mode 100644 usr/src/lib/libshell/common/sh.memo delete mode 100644 usr/src/lib/libshell/common/sh/args.c delete mode 100644 usr/src/lib/libshell/common/sh/arith.c delete mode 100644 usr/src/lib/libshell/common/sh/array.c delete mode 100644 usr/src/lib/libshell/common/sh/bash.c delete mode 100644 usr/src/lib/libshell/common/sh/defs.c delete mode 100644 usr/src/lib/libshell/common/sh/deparse.c delete mode 100644 usr/src/lib/libshell/common/sh/env.c delete mode 100644 usr/src/lib/libshell/common/sh/expand.c delete mode 100644 usr/src/lib/libshell/common/sh/fault.c delete mode 100644 usr/src/lib/libshell/common/sh/fcin.c delete mode 100644 usr/src/lib/libshell/common/sh/init.c delete mode 100644 usr/src/lib/libshell/common/sh/io.c delete mode 100644 usr/src/lib/libshell/common/sh/jobs.c delete mode 100644 usr/src/lib/libshell/common/sh/lex.c delete mode 100644 usr/src/lib/libshell/common/sh/macro.c delete mode 100644 usr/src/lib/libshell/common/sh/main.c delete mode 100644 usr/src/lib/libshell/common/sh/name.c delete mode 100644 usr/src/lib/libshell/common/sh/nvdisc.c delete mode 100644 usr/src/lib/libshell/common/sh/nvtree.c delete mode 100644 usr/src/lib/libshell/common/sh/nvtype.c delete mode 100644 usr/src/lib/libshell/common/sh/parse.c delete mode 100644 usr/src/lib/libshell/common/sh/path.c delete mode 100644 usr/src/lib/libshell/common/sh/pmain.c delete mode 100644 usr/src/lib/libshell/common/sh/shcomp.c delete mode 100644 usr/src/lib/libshell/common/sh/streval.c delete mode 100644 usr/src/lib/libshell/common/sh/string.c delete mode 100644 usr/src/lib/libshell/common/sh/subshell.c delete mode 100644 usr/src/lib/libshell/common/sh/suid_exec.c delete mode 100644 usr/src/lib/libshell/common/sh/tdump.c delete mode 100644 usr/src/lib/libshell/common/sh/timers.c delete mode 100644 usr/src/lib/libshell/common/sh/trestore.c delete mode 100644 usr/src/lib/libshell/common/sh/waitevent.c delete mode 100644 usr/src/lib/libshell/common/sh/xec.c delete mode 100644 usr/src/lib/libshell/common/shell.3 delete mode 100644 usr/src/lib/libshell/common/tests/README.tests delete mode 100644 usr/src/lib/libshell/common/tests/alias.sh delete mode 100644 usr/src/lib/libshell/common/tests/append.sh delete mode 100644 usr/src/lib/libshell/common/tests/arith.sh delete mode 100644 usr/src/lib/libshell/common/tests/arrays.sh delete mode 100644 usr/src/lib/libshell/common/tests/arrays2.sh delete mode 100644 usr/src/lib/libshell/common/tests/attributes.sh delete mode 100644 usr/src/lib/libshell/common/tests/basic.sh delete mode 100644 usr/src/lib/libshell/common/tests/bracket.sh delete mode 100644 usr/src/lib/libshell/common/tests/builtins.sh delete mode 100644 usr/src/lib/libshell/common/tests/case.sh delete mode 100644 usr/src/lib/libshell/common/tests/comvar.sh delete mode 100644 usr/src/lib/libshell/common/tests/coprocess.sh delete mode 100644 usr/src/lib/libshell/common/tests/cubetype.sh delete mode 100644 usr/src/lib/libshell/common/tests/enum.sh delete mode 100644 usr/src/lib/libshell/common/tests/exit.sh delete mode 100644 usr/src/lib/libshell/common/tests/expand.sh delete mode 100644 usr/src/lib/libshell/common/tests/functions.sh delete mode 100644 usr/src/lib/libshell/common/tests/glob.sh delete mode 100644 usr/src/lib/libshell/common/tests/grep.sh delete mode 100644 usr/src/lib/libshell/common/tests/heredoc.sh delete mode 100644 usr/src/lib/libshell/common/tests/io.sh delete mode 100644 usr/src/lib/libshell/common/tests/nameref.sh delete mode 100644 usr/src/lib/libshell/common/tests/options.sh delete mode 100644 usr/src/lib/libshell/common/tests/path.sh delete mode 100644 usr/src/lib/libshell/common/tests/pointtype.sh delete mode 100644 usr/src/lib/libshell/common/tests/quoting.sh delete mode 100644 usr/src/lib/libshell/common/tests/quoting2.sh delete mode 100644 usr/src/lib/libshell/common/tests/recttype.sh delete mode 100644 usr/src/lib/libshell/common/tests/restricted.sh delete mode 100644 usr/src/lib/libshell/common/tests/return.sh delete mode 100644 usr/src/lib/libshell/common/tests/select.sh delete mode 100644 usr/src/lib/libshell/common/tests/shtests delete mode 100644 usr/src/lib/libshell/common/tests/sigchld.sh delete mode 100644 usr/src/lib/libshell/common/tests/signal.sh delete mode 100644 usr/src/lib/libshell/common/tests/statics.sh delete mode 100644 usr/src/lib/libshell/common/tests/subshell.sh delete mode 100644 usr/src/lib/libshell/common/tests/substring.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_array_default_datatype.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_builtin_poll.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_builtin_sum.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_builtin_tail.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_command_substitution.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_compound_misc.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_compound_nameref.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_compoundvario.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_getconf.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_local_compound_nameref001.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_locale_misc.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_staticvariables.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_vartree001.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_vartree002.sh delete mode 100644 usr/src/lib/libshell/common/tests/sun_solaris_vartree003.sh delete mode 100644 usr/src/lib/libshell/common/tests/tilde.sh delete mode 100644 usr/src/lib/libshell/common/tests/timetype.sh delete mode 100644 usr/src/lib/libshell/common/tests/treemove.sh delete mode 100644 usr/src/lib/libshell/common/tests/types.sh delete mode 100644 usr/src/lib/libshell/common/tests/variables.sh delete mode 100644 usr/src/lib/libshell/common/tests/vartree1.sh delete mode 100644 usr/src/lib/libshell/common/tests/vartree2.sh delete mode 100644 usr/src/lib/libshell/i386/Makefile delete mode 100644 usr/src/lib/libshell/i386/include/ast/history.h delete mode 100644 usr/src/lib/libshell/i386/include/ast/nval.h delete mode 100644 usr/src/lib/libshell/i386/include/ast/shell.h delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/acct delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/dynamic delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/execargs delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/externs delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/locale delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/options delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/poll delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/rlimits delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/setjmp delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/sigfeatures delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/time delete mode 100644 usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys delete mode 100644 usr/src/lib/libshell/mapfile-vers delete mode 100644 usr/src/lib/libshell/misc/ERRATA.txt delete mode 100644 usr/src/lib/libshell/misc/buildksh93.readme delete mode 100644 usr/src/lib/libshell/misc/buildksh93.sh delete mode 100644 usr/src/lib/libshell/misc/filelist.txt delete mode 100644 usr/src/lib/libshell/misc/images/callouts/1.png delete mode 100644 usr/src/lib/libshell/misc/images/callouts/10.png delete mode 100644 usr/src/lib/libshell/misc/images/callouts/2.png delete mode 100644 usr/src/lib/libshell/misc/images/callouts/3.png delete mode 100644 usr/src/lib/libshell/misc/images/callouts/4.png delete mode 100644 usr/src/lib/libshell/misc/images/callouts/5.png delete mode 100644 usr/src/lib/libshell/misc/images/callouts/6.png delete mode 100644 usr/src/lib/libshell/misc/images/callouts/7.png delete mode 100644 usr/src/lib/libshell/misc/images/callouts/8.png delete mode 100644 usr/src/lib/libshell/misc/images/callouts/9.png delete mode 100644 usr/src/lib/libshell/misc/images/tag_bourne.png delete mode 100644 usr/src/lib/libshell/misc/images/tag_i18n.png delete mode 100644 usr/src/lib/libshell/misc/images/tag_ksh.png delete mode 100644 usr/src/lib/libshell/misc/images/tag_ksh88.png delete mode 100644 usr/src/lib/libshell/misc/images/tag_ksh93.png delete mode 100644 usr/src/lib/libshell/misc/images/tag_l10n.png delete mode 100644 usr/src/lib/libshell/misc/images/tag_perf.png delete mode 100644 usr/src/lib/libshell/misc/shell_styleguide.docbook delete mode 100644 usr/src/lib/libshell/sparc/Makefile delete mode 100644 usr/src/lib/libshell/sparc/include/ast/history.h delete mode 100644 usr/src/lib/libshell/sparc/include/ast/nval.h delete mode 100644 usr/src/lib/libshell/sparc/include/ast/shell.h delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/dynamic delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/execargs delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/externs delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/locale delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/math delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/options delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/poll delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/rlimits delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/setjmp delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/sigfeatures delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/time delete mode 100644 usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys delete mode 100644 usr/src/lib/libshell/sparcv9/Makefile delete mode 100644 usr/src/lib/libshell/sparcv9/include/ast/history.h delete mode 100644 usr/src/lib/libshell/sparcv9/include/ast/nval.h delete mode 100644 usr/src/lib/libshell/sparcv9/include/ast/shell.h delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/acct delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/execargs delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/externs delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/locale delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/math delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/options delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/poll delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/rlimits delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/setjmp delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/sigfeatures delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/time delete mode 100644 usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys delete mode 100644 usr/src/lib/libsum/Makefile delete mode 100644 usr/src/lib/libsum/Makefile.com delete mode 100644 usr/src/lib/libsum/THIRDPARTYLICENSE delete mode 100644 usr/src/lib/libsum/THIRDPARTYLICENSE.descrip delete mode 100644 usr/src/lib/libsum/amd64/Makefile delete mode 100644 usr/src/lib/libsum/amd64/include/ast/sum.h delete mode 100644 usr/src/lib/libsum/amd64/src/lib/libsum/FEATURE/sum delete mode 100644 usr/src/lib/libsum/common/RELEASE delete mode 100644 usr/src/lib/libsum/common/features/sum delete mode 100644 usr/src/lib/libsum/common/sum-ast4.c delete mode 100644 usr/src/lib/libsum/common/sum-att.c delete mode 100644 usr/src/lib/libsum/common/sum-bsd.c delete mode 100644 usr/src/lib/libsum/common/sum-crc.c delete mode 100644 usr/src/lib/libsum/common/sum-lmd.c delete mode 100644 usr/src/lib/libsum/common/sum-md5.c delete mode 100644 usr/src/lib/libsum/common/sum-prng.c delete mode 100644 usr/src/lib/libsum/common/sum-sha1.c delete mode 100644 usr/src/lib/libsum/common/sum-sha2.c delete mode 100644 usr/src/lib/libsum/common/sum.h delete mode 100644 usr/src/lib/libsum/common/sumlib.c delete mode 100644 usr/src/lib/libsum/i386/Makefile delete mode 100644 usr/src/lib/libsum/i386/include/ast/sum.h delete mode 100644 usr/src/lib/libsum/i386/src/lib/libsum/FEATURE/sum delete mode 100644 usr/src/lib/libsum/mapfile-vers delete mode 100644 usr/src/lib/libsum/sparc/Makefile delete mode 100644 usr/src/lib/libsum/sparc/include/ast/sum.h delete mode 100644 usr/src/lib/libsum/sparc/src/lib/libsum/FEATURE/sum delete mode 100644 usr/src/lib/libsum/sparcv9/Makefile delete mode 100644 usr/src/lib/libsum/sparcv9/include/ast/sum.h delete mode 100644 usr/src/lib/libsum/sparcv9/src/lib/libsum/FEATURE/sum (limited to 'usr/src') 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 ]"\ - "[-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 for +# 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 ]" \ + "[-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/cmd/ast/Makefile.asthdr b/usr/src/cmd/ast/Makefile.asthdr new file mode 100644 index 0000000000..0590b35ec0 --- /dev/null +++ b/usr/src/cmd/ast/Makefile.asthdr @@ -0,0 +1,82 @@ +# +# 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. +# + +ROOTHDRDIR= $(ROOT)/usr/include/ast + +# Define the symbol used to distinguish between 32bit and 64bit parts of the +# include file. We cannot use |_LP64| here because not every compiler (like +# Studio 10/11/12) sets it by default (this doesn't harm because the AST +# includes are OS- and platform-specific anyway) and we can't rely on the +# system includes like because "/usr/bin/diff -D" +# adds the "#ifdef " before any other content and "injecting" an +# "#include " will alter the behaviour of the AST code +# in unpredictable ways (e.g. the resulting code will not longer work). +# Sun-Bug #6524070 ("RFE: Please set |_LP64| for 64bit platforms by default +# (like gcc does)") has been filed against the Sun Studio compiler as RFE +# to set |_LP64| for 64bit targets. +# (INTEL_BLD is '#' for a Sparc build and SPARC_BLD is '#' for an Intel build) +$(SPARC_BLD)AST64BITCPPSYMBOL = __sparcv9 +$(INTEL_BLD)AST64BITCPPSYMBOL = __amd64 + +# We use a custom install sequence here to unify 32bit and 64bit AST includes +# since we can only ship one set of includes. Therefore we use +# "/usr/bin/diff -D <64bit>" (and for some exceptions a manual path) to +# generate an unified version of the include files (and add a boilerplate text +# which explains the interface stability status). +$(ROOTHDRDIR)/%: $(HDRDIR32)/% $(HDRDIR64)/% + @mkdir -p tmpastinclude ; \ + typeset boilerplate="" ; \ + boilerplate+="/*\n" \ + boilerplate+=" * BEGIN illumos section\n" \ + boilerplate+=" * This is an unstable interface; changes may be made\n" \ + boilerplate+=" * without notice.\n" \ + boilerplate+=" * END illumos section\n" \ + boilerplate+=" */\n" ; \ + if [[ "$(@F)" == "ast_limits.h" || \ + "$(@F)" == "ast_dirent.h" ]] ; then \ + printf "# Building (concatenation) %s\n" "$(@F)" ; \ + { \ + print -n "$${boilerplate}" ; \ + printf '#ifndef %s\n' "$(AST64BITCPPSYMBOL)" ; \ + cat "$(HDRDIR32)/$(@F)" ; \ + printf '#else /* %s */\n' "$(AST64BITCPPSYMBOL)" ; \ + cat "$(HDRDIR64)/$(@F)" ; \ + printf '#endif /* %s */\n' "$(AST64BITCPPSYMBOL)" ; \ + } >"tmpastinclude/$(@F)" ; \ + else \ + printf "# Building (diff) %s\n" "$(@F)"; \ + { \ + set +o errexit ; \ + print -n "$${boilerplate}" ; \ + /usr/bin/diff -D $(AST64BITCPPSYMBOL) "$(HDRDIR32)/$(@F)" "$(HDRDIR64)/$(@F)" ; true ;\ + } >"tmpastinclude/$(@F)" ; \ + fi + $(INS) -s -m $(FILEMODE) -f $(@D) "tmpastinclude/$(@F)" + +# Add temporary include files to the list of files to "clobber" +CLOBBERFILES += tmpastinclude/* diff --git a/usr/src/cmd/ast/Makefile.astmsg b/usr/src/cmd/ast/Makefile.astmsg new file mode 100644 index 0000000000..c7f911c260 --- /dev/null +++ b/usr/src/cmd/ast/Makefile.astmsg @@ -0,0 +1,98 @@ +# +# 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. +# + +# +# Temporarily control building AST l10n catalogs until all build +# machines have been updated. +# + +# Should we build AST l10n catalogs ? +# This can be overridden at build time via: +# $ export ON_BUILD_AST_L10N_CATALOGS=0 +ON_BUILD_AST_L10N_CATALOGS=1 + +DO_BUILD_AST_CATALOGS_1= $(ON_BUILD_AST_L10N_CATALOGS:0=$(POUND_SIGN)) +DONT_BUILD_AST_CATALOGS_1= $(ON_BUILD_AST_L10N_CATALOGS:1=$(POUND_SIGN)) +DO_BUILD_AST_CATALOGS= $(DO_BUILD_AST_CATALOGS_1:1=) +DONT_BUILD_AST_CATALOGS= $(DONT_BUILD_AST_CATALOGS_1:0=) + +# +# l10n message catalog generation for AST libraries +# + +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= $(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) + +msgs/%.mso: $(ASTSRC)/%.c + @mkdir -p "$$(dirname "$@")" ; \ + print "# Processing file $< to $@" >>msgcc.out ; \ + $(ASTMSGCC) -M-set=ast $(ASTMSGCCFLAGS) $(CFLAGS) $(CPPFLAGS) -c "$<" -o "$@" +msgs/%.mso: ../%.c + @mkdir -p "$$(dirname "$@")" ; \ + print "# Processing file $< to $@" >>msgcc.out ; \ + $(ASTMSGCC) -M-set=ast $(ASTMSGCCFLAGS) $(CFLAGS) $(CPPFLAGS) -c "$<" -o "$@" + +$(MSGLIBNAME).msg: $(ASTMSGS) + @print "# Processing files $(ASTMSGS) to $@" >>msgcc.out ; \ + $(ASTMSGCC) -M-set=ast $(ASTMSGCCFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ $(ASTMSGS) + +$(ASTMSGCATALOG): $(MSGLIBNAME).msg + @$(RM) "$(ASTMSGCATALOG)" ; \ + sed 's/^$$translation msgcc .*//' <"$(MSGLIBNAME).msg" | gencat "$@" - ; \ + $(CHMOD) 0644 $(ASTMSGCATALOG) + +# 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) +$(DONT_BUILD_AST_CATALOGS)_msg: +$(DONT_BUILD_AST_CATALOGS) $(RM) $(ASTMSGCATALOG) ; \ + $(TOUCH) $(ASTMSGCATALOG) ; \ + $(CHMOD) 0644 $(ASTMSGCATALOG) + +# Add message catalogs to the list of files to "clobber" +CLOBBERFILES += \ + $(ASTMSGS) \ + $(ASTMSGCATALOG) \ + $(MSGLIBNAME).msg \ + msgcc.out 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//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/ast/ksh/Makefile b/usr/src/cmd/ast/ksh/Makefile new file mode 100644 index 0000000000..43ef7613e1 --- /dev/null +++ b/usr/src/cmd/ast/ksh/Makefile @@ -0,0 +1,93 @@ +# +# 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. +# + +SHELL= /usr/bin/ksh93 + +PROG= ksh + +USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93 + +include ../../Makefile.cmd + +SUBDIRS= $(MACH) +$(BUILD64)SUBDIRS += $(MACH64) + +SUBDIRS += builtins + +ARCH32_i386= i86 +ARCH32_sparc= sparcv7 +ARCH32= $(ARCH32_$(MACH)) + +all := TARGET = all +install := TARGET = install +clean := TARGET = clean +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, +# i.e. there are no l10n strings here) +$(PROG).po: + $(RM) ksh.po ksh93.po ; \ + $(TOUCH) $(PROG).po + +install: $(SUBDIRS) + @(set -o xtrace ; \ + builtin ln ; \ + builtin rm ; \ + rm -f $(ROOTPROG) ; \ + ln $(ISAEXEC) $(ROOTPROG) ; \ + for i in $(USRKSH_ALIAS_LIST) ; do \ + [[ "$$i" == "$(PROG)" ]] && continue ; \ + rm -f "$(ROOTBIN)/$$i" ; \ + ln "$(ROOTBIN)/$(PROG)" "$(ROOTBIN)/$$i" ; \ + done \ + ) + $(RM) $(ROOTSBIN)/sh + $(SYMLINK) ../usr/bin/$(ARCH32)/ksh93 $(ROOTSBIN)/sh + $(RM) $(ROOTSBIN)/jsh + $(SYMLINK) ../usr/bin/ksh93 $(ROOTSBIN)/jsh + $(RM) $(ROOTBIN)/jsh + $(SYMLINK) ksh93 $(ROOTBIN)/jsh + $(RM) $(ROOTBIN)/sh + $(SYMLINK) $(ARCH32)/ksh93 $(ROOTBIN)/sh + $(RM) $(ROOTLIB)/rsh + $(SYMLINK) ../bin/ksh93 $(ROOTLIB)/rsh + +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) +FRC: + +include ../../Makefile.targ diff --git a/usr/src/cmd/ast/ksh/Makefile.com b/usr/src/cmd/ast/ksh/Makefile.com new file mode 100644 index 0000000000..f5be217a77 --- /dev/null +++ b/usr/src/cmd/ast/ksh/Makefile.com @@ -0,0 +1,117 @@ +# +# 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) 2018, Joyent, Inc. +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. + +SHELL=/usr/bin/ksh93 + +PROG= ksh + +USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93 + +# Set common AST build flags (e.g., needed to support the math stuff). +include ../../Makefile.ast + +OBJECTS= pmain.o + +ASTSRC= $(C_AST)/src/cmd/ksh93 +LIBSHELLBASE= ../../libshell +LIBSHELLSRC= $(ASTSRC)/sh + +SRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c) + +LDLIBS += -lshell -lumem + +# 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) + +# Workaround for CR#6628728 ("|memcntl()| prototype not available for C99/XPG6") +pmain.o := CERRWARN += -_gcc=-Wno-implicit-function-declaration + +# not linted +SMATCH=off + +.KEEP_STATE: + +%.o: $(LIBSHELLSRC)/%.c + $(COMPILE.c) -c -o $@ $< + $(POST_PROCESS_O) + +all: $(PROG) + +# We explicitly delete "ksh" and "ksh93" to catch changes in +# BUILD_KSH93_AS_BINKSH (see Makefile.ksh93switch) +# and soft-link $(PROG) to ksh/ksh93 below because ksh93 test +# suite seems to require that ksh93 is available as "ksh" in +# ${PATH} (see comment about "io.sh" in Makefile.testshell). +$(PROG): $(OBJECTS) + $(RM) ksh ksh93 + $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS) + $(POST_PROCESS) + (set +o errexit ; \ + [[ ! -x ksh93 ]] && ln $(PROG) ksh93 ; \ + [[ ! -x ksh ]] && ln $(PROG) ksh ; \ + true \ + ) + +clean: + $(RM) $(OBJECTS) + +# We explicitly delete "ksh" and "ksh93" to catch changes in +# BUILD_KSH93_AS_BINKSH (see Makefile.ksh93switch) +CLOBBERFILES += ksh ksh93 + +# Install rule for $(MACH)/Makefile (32bit) +INSTALL.ksh.32bit=@ \ + (print "$(POUND_SIGN) Installing 32bit $(PROG) aliases $(USRKSH_ALIAS_LIST)" ; \ + set -o xtrace ; \ + for i in $(USRKSH_ALIAS_LIST) ; do \ + [[ "$$i" == "$(PROG)" ]] && continue ; \ + $(RM) "$(ROOTBIN32)/$$i" ; \ + $(LN) "$(ROOTBIN32)/$(PROG)" "$(ROOTBIN32)/$$i" ; \ + done \ + ) + +# Install rule for $(MACH64)/Makefile (64bit) +INSTALL.ksh.64bit=@ \ + (print "$(POUND_SIGN) Installing 64bit $(PROG) aliases $(USRKSH_ALIAS_LIST)" ; \ + set -o xtrace ; \ + for i in $(USRKSH_ALIAS_LIST) ; do \ + [[ "$$i" == "$(PROG)" ]] && continue ; \ + $(RM) "$(ROOTBIN64)/$$i" ; \ + $(LN) "$(ROOTBIN64)/$(PROG)" "$(ROOTBIN64)/$$i" ; \ + done \ + ) + +include ../Makefile.testshell diff --git a/usr/src/cmd/ast/ksh/Makefile.testshell b/usr/src/cmd/ast/ksh/Makefile.testshell new file mode 100644 index 0000000000..9d289a0ac7 --- /dev/null +++ b/usr/src/cmd/ast/ksh/Makefile.testshell @@ -0,0 +1,173 @@ +# +# 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. +# + +# +# Run the ksh93 minimum set of tests +# + +# +# Notes: +# - "builtins.sh" may fail in some locales like this: +# -- snip -- +# ## Running ksh test: LANG='zh_TW.EUC' script='builtins.sh' +# builtins.sh[274]: printf "%T" now +# -- snip -- +# +# - "options.sh" may currently fail in some locales with: +# -- snip -- +# options.sh[145]: -G ** failed -- expected 'bam.c bar bar.c bar/bam.c bar/foo.c foo foo/bam.c', got 'bam.c bar bar/bam.c bar.c bar/foo.c foo foo/bam.c' +# options.sh[149]: -G **/*.c failed -- expected 'bam.c bar.c bar/bam.c bar/foo.c foo/bam.c', got 'bam.c bar/bam.c bar.c bar/foo.c foo/bam.c' +# -- snip -- +# This may be simply a different sort order or a bug in the test suite. +# Currently under investigation. +# +# - "glob.sh" may currently fail in some locales (e.g. en_US.UTF-8) with: +# -- snip -- +# glob.sh[157] glob -- expected '
', got '
' +# glob.sh[277] glob -- expected ' ', got ' ' +# -- snip -- +# This may be simply a different sort order or a bug in the test suite. +# Currently under investigation. +# +# - These tests need a working system clock, otherwise they'll bite you. +# +# - The current list of locales was mainly composed to cover various encodings +# 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", +# "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 +# being integrated into OS/Net and then change the test sequence to +# 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 +# be run on a quiet system with no other activity. +# + +TESTSRC= $(LIBSHELLBASE)/common/tests + +# ON_KSH_TEST_LOCALES can be overridden via +# $ export ON_KSH_TEST_LOCALES= # before $ make install # +ON_KSH_TEST_LOCALES = \ + C \ + en_US.UTF-8 en_US en_US.ISO8859-15@euro \ + he_IL.UTF-8 \ + hi_IN.UTF-8 \ + ja ja_JP.PCK ja_JP.UTF-8 ja_JP.eucJP \ + ko_KR.UTF-8 ko_KR.EUC \ + th_TH.TIS620 \ + zh_CN.EUC zh_CN.GBK \ + zh_CN.GB18030 zh_CN.GB18030@pinyin zh_CN.GB18030@radical zh_CN.GB18030@stroke \ + zh_CN.UTF-8 zh_CN.UTF-8@pinyin zh_CN.UTF-8@radical zh_CN.UTF-8@stroke \ + zh_HK.BIG5HK \ + zh_TW.BIG5 zh_TW.EUC zh_TW.UTF-8 + +# ON_KSH_TEST_LIST can be overridden via +# $ export ON_KSH_TEST_LIST= # before $ make install # +ON_KSH_TEST_LIST = $(TESTSRC)/*.sh + +# Boolean (true/false) flag to control whether we should make test +# failures non-fatal +ON_KSH_TEST_IGNORE_TESTFAILURE=false + +# We must wait for other things in this subdir to finish before running +# the test suite, otherwise we may run into trouble that this activity +# may disturb the test suite run (resulting in weird "heisenbug"-like +# test failures). +testshell: $(PROG) + @ \ + builtin basename ; \ + print '# NOTE: Make sure your binaries in ROOT match your kernel!' ; \ + ( \ + set +o errexit ; \ + export PATH="$(SRC)/cmd/ksh/$(LIBSHELLMACH):/bin:/usr/bin" ; \ + printf "# which ksh='%s', ksh93='%s'\n" \ + "$$(which ksh)" "$$(which ksh93)" ; \ + ) ; \ + if [[ "$$(isalist)" != ~(F)$(LIBSHELLMACH) ]] ; then \ + printf \ + "# ISA='%s' not available on this system, skipping tests...\n" \ + "$(LIBSHELLMACH)" ; \ + exit 0 ; \ + fi ; \ + print "# Libraries used:" ; \ + LD_LIBRARY_PATH_64="$(ROOTLIB64)/" \ + LD_LIBRARY_PATH_32="$(ROOTLIB)/" \ + LD_LIBRARY_PATH="$(ROOTLIB64)/:$(ROOTLIB)/" \ + /usr/bin/ldd "$(SRC)/cmd/ksh/$(LIBSHELLMACH)/ksh" ; \ + print "# Running tests:" ; \ + redirect 2>&1 ; \ + (supported_locales="$$(/usr/bin/locale -a)" ; \ + for test_lang in $(ON_KSH_TEST_LOCALES) ; do \ + if [[ "$$(egrep "^$${test_lang}\$$" <<< "$${supported_locales}")" == "" ]] ; then \ + printf \ + "# Locale '%s' not supported, skipping tests...\n" \ + "$${test_lang}" ; \ + 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" ]] || \ + $(ON_KSH_TEST_IGNORE_TESTFAILURE) && \ + set +o errexit ; \ + for mode in 'plain_script:-s' 'compiled_script:-c' ; do \ + printf \ + "## Running %s test: LANG='%s' script='%s', mode='%s'\n" \ + "$(LIBSHELLMACH)/ksh" \ + "$${test_lang}" \ + "$$(basename "$${test_item}")" \ + "$${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}" \ + VMALLOC_OPTIONS=abort \ + SHCOMP="$(ROOTBIN)/shcomp" \ + "$${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) \ + ) ; \ + done ; \ + set -o errexit ; \ + done) ; \ + done) diff --git a/usr/src/cmd/ast/ksh/amd64/Makefile b/usr/src/cmd/ast/ksh/amd64/Makefile new file mode 100644 index 0000000000..8c252d1a0f --- /dev/null +++ b/usr/src/cmd/ast/ksh/amd64/Makefile @@ -0,0 +1,40 @@ +# +# 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. +# + +# Specify the MACH we currently use to build and test ksh +LIBSHELLMACH= $(MACH64) + +include ../../../Makefile.cmd +include ../../../Makefile.cmd.64 + +include ../Makefile.com + +install: all $(ROOTPROG64) + $(INSTALL.ksh.64bit) + +include ../../../Makefile.targ diff --git a/usr/src/cmd/ast/ksh/builtins/Makefile b/usr/src/cmd/ast/ksh/builtins/Makefile new file mode 100644 index 0000000000..8ae2eb1b67 --- /dev/null +++ b/usr/src/cmd/ast/ksh/builtins/Makefile @@ -0,0 +1,148 @@ +# +# 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 2009 Sun Microsystems, Inc. All rights reserved. +# 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 +ALIASPROG= \ + bg \ + cd \ + cksum \ + cmp \ + comm \ + command \ + cut \ + fc \ + fg \ + getopts \ + hash \ + jobs \ + join \ + kill \ + logname \ + paste \ + print \ + read \ + rev \ + sum \ + tee \ + test \ + type \ + ulimit \ + umask \ + unalias \ + uniq \ + wait \ + wc + +XPG4ALIASPROG= \ + alias \ + bg \ + cd \ + command \ + fc \ + fg \ + getopts \ + hash \ + jobs \ + kill \ + read \ + test \ + type \ + ulimit \ + umask \ + unalias \ + wait + +XPG4SH= \ + sh + +ROOTXPG4ALIAS= \ + $(XPG4SH:%=$(ROOTXPG4BIN)/%) $(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%) +ROOTALIASPROG= $(ALIASPROG:%=$(ROOTBIN)/%) + +include ../../../Makefile.cmd +$(SPARC_BLD)include ../../../Makefile.cmd.64 + +FILEMODE= 555 +CERRWARN += -_gcc=-Wno-parentheses + +# not linted +SMATCH=off + +.KEEP_STATE: + +all: $(PROG) + +$(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%): + $(RM) $@; $(SYMLINK) ../../bin/alias $@ + +$(XPG4SH:%=$(ROOTXPG4BIN)/%): + $(RM) $@; $(SYMLINK) ../../bin/ksh93 $@ + +$(ALIASPROG:%=$(ROOTBIN)/%): $(ROOTPROG) + $(RM) $@; $(LN) $(ROOTPROG) $@ + +.KEEP_STATE: + +# Set common AST build flags (e.g., needed to support the math stuff). +include ../../Makefile.ast + + +ASTSRC= $(C_AST)/src/cmd/ksh93 + +OBJECTS= \ + alias.o + +SRCS= $(OBJECTS:%.o=%.c) + +LDLIBS += -lshell -lcmd -last -lumem + +CPPFLAGS= \ + $(DTEXTDOM) $(DTS_ERRNO) \ + -I$(ASTSRC)/include \ + -I$(AST)/libshell/$(MACH) \ + -I$(ROOT)/usr/include/ast \ + -I$(ROOT)/usr/include + +CFLAGS += $(ASTCFLAGS) +CFLAGS64 += $(ASTCFLAGS64) + +ROOTCMDDIR=$(ROOT)/usr/bin + +install: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTALIASPROG) $(ROOTXPG4ALIAS) + +$(PROG): $(OBJECTS) + $(RM) alias + $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS) + $(POST_PROCESS) + +clean clobber: + rm -f $(PROG) $(OBJECTS) + +_msg: diff --git a/usr/src/cmd/ast/ksh/builtins/alias.c b/usr/src/cmd/ast/ksh/builtins/alias.c new file mode 100644 index 0000000000..1516a0bf1c --- /dev/null +++ b/usr/src/cmd/ast/ksh/builtins/alias.c @@ -0,0 +1,246 @@ +/* + * 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 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * Copyright 2021 OmniOS Community Edition (OmniOSce) Association. + */ + +/* + * alias.c is a C version of the alias.sh wrapper (which links ksh + * builtins to commands in /usr/bin/, e.g. calling this wrapper as + * /usr/bin/alias will call the ksh "alias" builtin, running it as + * /usr/bin/cut will call the ksh "cut" builtin etc. + */ + +#include +#include +#include +#include +#include +#include + +#undef calloc +#undef free + +typedef struct { + const char *name; + int (* func)(int, char **, Shbltin_t *); +} bfastpathrec; + +/* + * We've disabled the "fastpath" codepath for some commands below + * because it causes a paradoxon for large input files (as used by + * ON PerfPIT for testing). For /usr/bin/rev (where the issue was + * first discovered) it looks like this: + * - for small files like /etc/profile the fastpath is faster in a loop + * with 1000 iterations (8 seconds with fastpath, 14 seconds without + * fastpath) + * - for large files (/usr/pub/UTF-8 replicated until the test file + * reaches 24884706 bytes) the benchmark reverses: The fastpath now + * needs 40 seconds and without fastpath it needs 30 seconds (for 100 + * iterations). + */ +#if 0 +#define ENABLE_PERFORMANCE_PARADOXON 1 +#endif + +/* + * List of libcmd builtins which do not require a |Shell_t| context. + * This list was automatically generated from + */ +static const +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 */ + { "cmp", b_cmp }, + { "comm", b_comm }, + { "cp", b_cp }, + { "cut", b_cut }, + { "date", b_date }, + { "dirname", b_dirname }, + { "expr", b_expr }, + { "fds", b_fds }, + { "fmt", b_fmt }, + { "fold", b_fold }, + { "getconf", b_getconf }, + { "head", b_head }, + { "id", b_id }, + { "join", b_join }, + { "ln", b_ln }, + { "logname", b_logname }, + { "md5sum", b_md5sum }, + { "mkdir", b_mkdir }, + { "mkfifo", b_mkfifo }, + { "mktemp", b_mktemp }, + { "mv", b_mv }, + { "paste", b_paste }, + { "pathchk", b_pathchk }, + { "pids", b_pids }, +#ifdef ENABLE_PERFORMANCE_PARADOXON + { "rev", b_rev }, +#endif /* ENABLE_PERFORMANCE_PARADOXON */ + { "rm", b_rm }, + { "rmdir", b_rmdir }, + { "stty", b_stty }, +#ifdef ENABLE_PERFORMANCE_PARADOXON + { "sum", b_sum }, +#endif /* ENABLE_PERFORMANCE_PARADOXON */ + { "sync", b_sync }, + { "tail", b_tail }, + { "tee", b_tee }, + { "tty", b_tty }, + { "uname", b_uname }, + { "uniq", b_uniq }, + { "vmstate", b_vmstate }, + { "wc", b_wc }, + { NULL, NULL } +}; + +static inline const bfastpathrec * +find_bfastpathrec(const char *name) +{ + unsigned int i; + signed int cmpres; + for (i = 0; fastpath_builtins[i].name != NULL; i++) { + cmpres = strcmp(fastpath_builtins[i].name, name); + if (cmpres == 0) + return (&fastpath_builtins[i]); + else if (cmpres > 0) + return (NULL); + } + return (NULL); +} + +static inline int +fastpath_builtin_main(const bfastpathrec *brec, int argc, char *argv[]) +{ + setlocale(LC_ALL, ""); /* calls |_ast_setlocale()| */ + + return ((*brec->func)(argc, argv, NULL)); +} + + +/* 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 + * 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 + * PATH element) - otherwise we may execute the wrong command + * if an executable with the same name sits in a PATH element + * before /usr/bin (e.g. /usr/xpg4/bin/ls would be executed + * before /usr/bin/ls if the path was something like + * PATH=/usr/xpg4/bin:/usr/bin). + */ +"if [[ \"${cmd}\" != ~(Elr)(alias|unalias|command) ]] && " + "! alias \"${cmd}\" >/dev/null 2>&1 ; then\n" + "PATH='' builtin \"${cmd}\"\n" +"fi\n" +/* command is a keyword and needs to be handled separately */ +"if [[ \"${cmd}\" == \"command\" ]] ; then\n" + "command \"$@\"\n" +"else\n" + "\"${cmd}\" \"$@\"\n" +"fi\n" +"exitval=$?"; + +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 + * emulate $ /usr/bin/sh ... #. + * First position is set to "/usr/bin/sh" since other + * values may trigger special shell modes (e.g. *rsh* will + * trigger "restricted" shell mode etc.). + */ + xargv = calloc(argc + 2, sizeof (char *)); + if (xargv == NULL) + return (1); + xargv[0] = "/usr/bin/sh"; + for (i = 0; i < argc; i++) + xargv[i + 1] = argv[i]; + xargv[i + 1] = NULL; + + shp = sh_init(argc + 1, xargv, 0); + if (!shp) + error(ERROR_exit(1), "shell initialisation failed."); + if (setjmp(*shp->jmplist) == 0) + (void) sh_trap(script, 0); + + np = nv_open("exitval", shp->var_tree, 0); + if (!np) + error(ERROR_exit(1), "variable %s not found.", "exitval"); + exitval = (int)nv_getnum(np); + nv_close(np); + + free(xargv); + + return (exitval); +} + +int +main(int argc, char **argv) +{ + const char *progname; + const bfastpathrec *brec; + 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) + 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 { + /* ... or from within a full shell. */ + return (script_builtin_main(argc, argv)); + } +} diff --git a/usr/src/cmd/ast/ksh/i386/Makefile b/usr/src/cmd/ast/ksh/i386/Makefile new file mode 100644 index 0000000000..78732c4fa1 --- /dev/null +++ b/usr/src/cmd/ast/ksh/i386/Makefile @@ -0,0 +1,39 @@ +# +# 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. +# + +# Specify the MACH we currently use to build and test ksh +LIBSHELLMACH= $(MACH) + +include ../../../Makefile.cmd + +include ../Makefile.com + +install: all $(ROOTPROG32) + $(INSTALL.ksh.32bit) + +include ../../../Makefile.targ diff --git a/usr/src/cmd/ast/ksh/sparc/Makefile b/usr/src/cmd/ast/ksh/sparc/Makefile new file mode 100644 index 0000000000..78732c4fa1 --- /dev/null +++ b/usr/src/cmd/ast/ksh/sparc/Makefile @@ -0,0 +1,39 @@ +# +# 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. +# + +# Specify the MACH we currently use to build and test ksh +LIBSHELLMACH= $(MACH) + +include ../../../Makefile.cmd + +include ../Makefile.com + +install: all $(ROOTPROG32) + $(INSTALL.ksh.32bit) + +include ../../../Makefile.targ diff --git a/usr/src/cmd/ast/ksh/sparcv9/Makefile b/usr/src/cmd/ast/ksh/sparcv9/Makefile new file mode 100644 index 0000000000..8c252d1a0f --- /dev/null +++ b/usr/src/cmd/ast/ksh/sparcv9/Makefile @@ -0,0 +1,40 @@ +# +# 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. +# + +# Specify the MACH we currently use to build and test ksh +LIBSHELLMACH= $(MACH64) + +include ../../../Makefile.cmd +include ../../../Makefile.cmd.64 + +include ../Makefile.com + +install: all $(ROOTPROG64) + $(INSTALL.ksh.64bit) + +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/cmd/ast/libast/amd64/FEATURE/align b/usr/src/cmd/ast/libast/amd64/FEATURE/align new file mode 100644 index 0000000000..228de042de --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/align @@ -0,0 +1,32 @@ +/* : : 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 ok */ + +#define ALIGN_CHUNK 8192 +#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)) + +#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/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 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 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 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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/ccode b/usr/src/cmd/ast/libast/amd64/FEATURE/ccode new file mode 100644 index 0000000000..30603c443a --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/ccode @@ -0,0 +1,29 @@ +/* : : 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 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/cmd/ast/libast/amd64/FEATURE/common b/usr/src/cmd/ast/libast/amd64/FEATURE/common new file mode 100644 index 0000000000..8dddf7dc17 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/common @@ -0,0 +1,212 @@ +/* : : 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 ok */ +#define _hdr_pthread 1 /* #include ok */ +#define _hdr_stdarg 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdint 1 /* #include ok */ +#define _hdr_inttypes 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include 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 _hdr_stdio 1 /* #include ok */ +#define _typ___va_list 1 /* __va_list is a type */ +#define _sys_stat 1 /* #include ok */ +#define _sys_socket 1 /* #include 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__, if defined, 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_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 +#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 */ +#define _typ_uintptr_t 1 /* uintptr_t is a type */ + +#ifndef va_listref +#ifndef va_start +#if __STD_C +#include +#else +#include +#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 +# endif +# if _sys_types +# include +# endif +# if _hdr_stdint +# include +# else +# if _hdr_inttypes +# include +# 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 +# define _def_map_ast 1 +# if !_def_map_ast +# include +# endif +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/dirent b/usr/src/cmd/ast/libast/amd64/FEATURE/dirent new file mode 100644 index 0000000000..5e7e6cc7fc --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/dirent @@ -0,0 +1,82 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _nxt_dirent <../include/dirent.h> /* include path for the native */ +#define _nxt_dirent_str "../include/dirent.h" /* include string for the native */ +/* + * for systems with ok + */ + +#ifndef _DIRENT_H + +#include <../include/dirent.h> /* the native */ + +#ifndef _DIRENT_H +#define _DIRENT_H +#endif + +#endif +#endif 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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/errno b/usr/src/cmd/ast/libast/amd64/FEATURE/errno new file mode 100644 index 0000000000..1107a008c7 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/errno @@ -0,0 +1,7 @@ +/* : : 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 ok */ +#define _dat_sys_nerr 1 /* sys_nerr in default libs */ +#define _dat_sys_errlist 1 /* sys_errlist in default libs */ +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/fcntl b/usr/src/cmd/ast/libast/amd64/FEATURE/fcntl new file mode 100644 index 0000000000..9c2328f31b --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/fcntl @@ -0,0 +1,116 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ + + +#if _typ_off64_t +#undef off_t +#ifdef __STDC__ +#define off_t off_t +#endif +#endif + +#include + +#if _typ_off64_t +#undef off_t +#ifdef __STDC__ +#define off_t off_t +#endif +#endif + +#include +#include + +#define F_dupfd_cloexec F_DUPFD_CLOEXEC +#define O_BINARY 0 +#define O_cloexec O_CLOEXEC +#define O_TEMPORARY 0 +#define O_TEXT 0 + +#include +#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/cmd/ast/libast/amd64/FEATURE/float b/usr/src/cmd/ast/libast/amd64/FEATURE/float new file mode 100644 index 0000000000..d4a7e3d4bc --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/float @@ -0,0 +1,209 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_float 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _hdr_values 1 /* #include ok */ +#define _LIB_m 1 /* -lm is a library */ +#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_isnanl 1 /* isnanl() 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 +#include +#include +#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 + +#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,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/cmd/ast/libast/amd64/FEATURE/fs b/usr/src/cmd/ast/libast/amd64/FEATURE/fs new file mode 100644 index 0000000000..e013cccbf6 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/fs @@ -0,0 +1,143 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _sys_stat 1 /* #include 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 +#include +#define FS_default "ufs" +#if defined(__STDPP__directive) && defined(__STDPP__initial) +__STDPP__directive pragma pp:noinitial +#endif +#define _hdr_stdio 1 /* #include ok */ +#define _sys_mntent 1 /* #include ok */ +#define _sys_mnttab 1 /* #include ok */ +#define _sys_param 1 /* #include ok */ +#define _sys_ucred 1 /* #include ok */ +#define _sys_mount 1 /* #include ok */ +#define _sys_statfs 1 /* #include ok */ +#define _sys_statvfs 1 /* #include ok */ +#define _sys_vfs 1 /* #include 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 _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 +#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/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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/iconv b/usr/src/cmd/ast/libast/amd64/FEATURE/iconv new file mode 100644 index 0000000000..f81d5fc8fa --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/iconv @@ -0,0 +1,150 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_iconv 1 /* #include 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 */ +#define _nxt_iconv_str "../include/iconv.h" /* include string for the native */ +#include +#include +#include <../include/iconv.h> /* the native iconv.h */ + +#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 +#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 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__ +#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, 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, Iconv_disc_t*)); +extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, Iconv_disc_t*)); +#endif +#endif + +#undef __MANGLE__ +#define __MANGLE__ __LINKAGE__ + +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/lib b/usr/src/cmd/ast/libast/amd64/FEATURE/lib new file mode 100644 index 0000000000..cab2bfea82 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/lib @@ -0,0 +1,166 @@ +/* : : 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 ok */ +#define _hdr_dirent 1 /* #include ok */ +#define _hdr_fmtmsg 1 /* #include ok */ +#define _hdr_fnmatch 1 /* #include ok */ +#define _hdr_libgen 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +#define _hdr_locale 1 /* #include ok */ +#define _hdr_nl_types 1 /* #include ok */ +#define _hdr_spawn 1 /* #include ok */ +#define _hdr_syslog 1 /* #include ok */ +#define _hdr_utime 1 /* #include ok */ +#define _hdr_wchar 1 /* and isw*() really work */ +#define _hdr_wchar 1 /* #include ok */ +#define _hdr_wctype 1 /* #include 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) */ +#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 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 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 _mem_dd_fd_DIR 1 /* dd_fd is a member of DIR */ +#define _sys_filio 1 /* #include ok */ +#define _sys_jioctl 1 /* #include ok */ +#define _sys_localedef 1 /* #include ok */ +#define _sys_resource 1 /* #include ok */ +#define _sys_socket 1 /* #include ok */ +#define _sys_stream 1 /* #include ok */ +#define _sys_systeminfo 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include 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 ok */ +#define _lib_select 1 /* select() has standard 5 arg interface */ +#define _sys_select 1 /* select() requires */ +#define _pipe_rw 1 /* full duplex pipes */ +#define _hdr_unistd 1 /* #include 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 _stream_peek 1 /* ioctl(I_PEEK) works on pipe() */ +#define _socket_peek 1 /* recv(MSG_PEEK) works on socketpair() */ +#define _hdr_string 1 /* #include ok */ +#define _lib_memcmp 1 /* standard memcmp interface that works */ +#define _hdr_fcntl 1 /* #include ok */ +#define _sys_stat 1 /* #include ok */ +#define _sys_mman 1 /* #include 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/cmd/ast/libast/amd64/FEATURE/libpath b/usr/src/cmd/ast/libast/amd64/FEATURE/libpath new file mode 100644 index 0000000000..d272a4015d --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/libpath @@ -0,0 +1,6 @@ +/* : : 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 ok */ +#define CONF_LIBPATH "lib/64:LD_LIBRARY_PATH_64:sol.*64*,lib/32:LD_LIBRARY_PATH_32,lib:LD_LIBRARY_PATH" +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/limits b/usr/src/cmd/ast/libast/amd64/FEATURE/limits new file mode 100644 index 0000000000..efe390eee9 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/limits @@ -0,0 +1,107 @@ +/* : : 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 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/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 ok */ +#define _locale_utf8_str "UTF-8" +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/map b/usr/src/cmd/ast/libast/amd64/FEATURE/map new file mode 100644 index 0000000000..30c7f4e2b5 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/map @@ -0,0 +1,466 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ + + +/* + * prototypes provided for standard interfaces hijacked + * by ast and mapped to _ast_* but already prototyped + * unmapped in native headers included by + */ + +#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)); + +#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/cmd/ast/libast/amd64/FEATURE/mmap b/usr/src/cmd/ast/libast/amd64/FEATURE/mmap new file mode 100644 index 0000000000..12d991f9a6 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/mmap @@ -0,0 +1,26 @@ +/* : : 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 ok */ +#define _sys_mman 1 /* #include 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 */ + +/* 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/cmd/ast/libast/amd64/FEATURE/mode b/usr/src/cmd/ast/libast/amd64/FEATURE/mode new file mode 100644 index 0000000000..f2ec3091fa --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/mode @@ -0,0 +1,14 @@ +/* : : 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 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/cmd/ast/libast/amd64/FEATURE/ndbm b/usr/src/cmd/ast/libast/amd64/FEATURE/ndbm new file mode 100644 index 0000000000..0e55ff820d --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/ndbm @@ -0,0 +1,9 @@ +/* : : 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 ok */ +#define _hdr_ndbm 1 /* #include ok */ +#include +#define _use_ndbm 1 + +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/nl_types b/usr/src/cmd/ast/libast/amd64/FEATURE/nl_types new file mode 100644 index 0000000000..d8c540626e --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/nl_types @@ -0,0 +1,102 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 ok */ +#define _hdr_langinfo 1 /* #include ok */ +#define _nxt_nl_types <../include/nl_types.h> /* include path for the native */ +#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native */ +#include +#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/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 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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/param b/usr/src/cmd/ast/libast/amd64/FEATURE/param new file mode 100644 index 0000000000..8c200b4462 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/param @@ -0,0 +1,9 @@ +/* : : 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 ok */ +#include +#ifndef S_IFDIR +#include +#endif +#endif 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 ok */ +/* preroot not enabled */ +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/prog b/usr/src/cmd/ast/libast/amd64/FEATURE/prog new file mode 100644 index 0000000000..592037efb7 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/prog @@ -0,0 +1,7 @@ +/* : : 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 ok */ +#define _lib_getexecname 1 /* getexecname() in default lib(s) */ +#define _PROC_PROG "/proc/self/path/a.out" +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/sfinit b/usr/src/cmd/ast/libast/amd64/FEATURE/sfinit new file mode 100644 index 0000000000..756d559262 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/sfinit @@ -0,0 +1,5332 @@ +/* : : 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 ok */ + +static const float sf_flt_pow10[] = +{ + 1E0F, + 1E1F, + 1E2F, + 1E3F, + 1E4F, + 1E5F, + 1E6F, + 1E7F, + 1E8F, + 1E9F, + 1E10F, + 1E11F, + 1E12F, + 1E13F, + 1E14F, + 1E15F, + 1E16F, + 1E17F, + 1E18F, + 1E19F, + 1E20F, + 1E21F, + 1E22F, + 1E23F, + 1E24F, + 1E25F, + 1E26F, + 1E27F, + 1E28F, + 1E29F, + 1E30F, + 1E31F, + 1E32F, + 1E33F, + 1E34F, + 1E35F, + 1E36F, + 1E37F, + 1E38F, +}; + +static const double sf_dbl_pow10[] = +{ + 1E0, + 1E1, + 1E2, + 1E3, + 1E4, + 1E5, + 1E6, + 1E7, + 1E8, + 1E9, + 1E10, + 1E11, + 1E12, + 1E13, + 1E14, + 1E15, + 1E16, + 1E17, + 1E18, + 1E19, + 1E20, + 1E21, + 1E22, + 1E23, + 1E24, + 1E25, + 1E26, + 1E27, + 1E28, + 1E29, + 1E30, + 1E31, + 1E32, + 1E33, + 1E34, + 1E35, + 1E36, + 1E37, + 1E38, + 1E39, + 1E40, + 1E41, + 1E42, + 1E43, + 1E44, + 1E45, + 1E46, + 1E47, + 1E48, + 1E49, + 1E50, + 1E51, + 1E52, + 1E53, + 1E54, + 1E55, + 1E56, + 1E57, + 1E58, + 1E59, + 1E60, + 1E61, + 1E62, + 1E63, + 1E64, + 1E65, + 1E66, + 1E67, + 1E68, + 1E69, + 1E70, + 1E71, + 1E72, + 1E73, + 1E74, + 1E75, + 1E76, + 1E77, + 1E78, + 1E79, + 1E80, + 1E81, + 1E82, + 1E83, + 1E84, + 1E85, + 1E86, + 1E87, + 1E88, + 1E89, + 1E90, + 1E91, + 1E92, + 1E93, + 1E94, + 1E95, + 1E96, + 1E97, + 1E98, + 1E99, + 1E100, + 1E101, + 1E102, + 1E103, + 1E104, + 1E105, + 1E106, + 1E107, + 1E108, + 1E109, + 1E110, + 1E111, + 1E112, + 1E113, + 1E114, + 1E115, + 1E116, + 1E117, + 1E118, + 1E119, + 1E120, + 1E121, + 1E122, + 1E123, + 1E124, + 1E125, + 1E126, + 1E127, + 1E128, + 1E129, + 1E130, + 1E131, + 1E132, + 1E133, + 1E134, + 1E135, + 1E136, + 1E137, + 1E138, + 1E139, + 1E140, + 1E141, + 1E142, + 1E143, + 1E144, + 1E145, + 1E146, + 1E147, + 1E148, + 1E149, + 1E150, + 1E151, + 1E152, + 1E153, + 1E154, + 1E155, + 1E156, + 1E157, + 1E158, + 1E159, + 1E160, + 1E161, + 1E162, + 1E163, + 1E164, + 1E165, + 1E166, + 1E167, + 1E168, + 1E169, + 1E170, + 1E171, + 1E172, + 1E173, + 1E174, + 1E175, + 1E176, + 1E177, + 1E178, + 1E179, + 1E180, + 1E181, + 1E182, + 1E183, + 1E184, + 1E185, + 1E186, + 1E187, + 1E188, + 1E189, + 1E190, + 1E191, + 1E192, + 1E193, + 1E194, + 1E195, + 1E196, + 1E197, + 1E198, + 1E199, + 1E200, + 1E201, + 1E202, + 1E203, + 1E204, + 1E205, + 1E206, + 1E207, + 1E208, + 1E209, + 1E210, + 1E211, + 1E212, + 1E213, + 1E214, + 1E215, + 1E216, + 1E217, + 1E218, + 1E219, + 1E220, + 1E221, + 1E222, + 1E223, + 1E224, + 1E225, + 1E226, + 1E227, + 1E228, + 1E229, + 1E230, + 1E231, + 1E232, + 1E233, + 1E234, + 1E235, + 1E236, + 1E237, + 1E238, + 1E239, + 1E240, + 1E241, + 1E242, + 1E243, + 1E244, + 1E245, + 1E246, + 1E247, + 1E248, + 1E249, + 1E250, + 1E251, + 1E252, + 1E253, + 1E254, + 1E255, + 1E256, + 1E257, + 1E258, + 1E259, + 1E260, + 1E261, + 1E262, + 1E263, + 1E264, + 1E265, + 1E266, + 1E267, + 1E268, + 1E269, + 1E270, + 1E271, + 1E272, + 1E273, + 1E274, + 1E275, + 1E276, + 1E277, + 1E278, + 1E279, + 1E280, + 1E281, + 1E282, + 1E283, + 1E284, + 1E285, + 1E286, + 1E287, + 1E288, + 1E289, + 1E290, + 1E291, + 1E292, + 1E293, + 1E294, + 1E295, + 1E296, + 1E297, + 1E298, + 1E299, + 1E300, + 1E301, + 1E302, + 1E303, + 1E304, + 1E305, + 1E306, + 1E307, + 1E308, +}; + +static const _ast_fltmax_t sf_ldbl_pow10[] = +{ + 1E0L, + 1E1L, + 1E2L, + 1E3L, + 1E4L, + 1E5L, + 1E6L, + 1E7L, + 1E8L, + 1E9L, + 1E10L, + 1E11L, + 1E12L, + 1E13L, + 1E14L, + 1E15L, + 1E16L, + 1E17L, + 1E18L, + 1E19L, + 1E20L, + 1E21L, + 1E22L, + 1E23L, + 1E24L, + 1E25L, + 1E26L, + 1E27L, + 1E28L, + 1E29L, + 1E30L, + 1E31L, + 1E32L, + 1E33L, + 1E34L, + 1E35L, + 1E36L, + 1E37L, + 1E38L, + 1E39L, + 1E40L, + 1E41L, + 1E42L, + 1E43L, + 1E44L, + 1E45L, + 1E46L, + 1E47L, + 1E48L, + 1E49L, + 1E50L, + 1E51L, + 1E52L, + 1E53L, + 1E54L, + 1E55L, + 1E56L, + 1E57L, + 1E58L, + 1E59L, + 1E60L, + 1E61L, + 1E62L, + 1E63L, + 1E64L, + 1E65L, + 1E66L, + 1E67L, + 1E68L, + 1E69L, + 1E70L, + 1E71L, + 1E72L, + 1E73L, + 1E74L, + 1E75L, + 1E76L, + 1E77L, + 1E78L, + 1E79L, + 1E80L, + 1E81L, + 1E82L, + 1E83L, + 1E84L, + 1E85L, + 1E86L, + 1E87L, + 1E88L, + 1E89L, + 1E90L, + 1E91L, + 1E92L, + 1E93L, + 1E94L, + 1E95L, + 1E96L, + 1E97L, + 1E98L, + 1E99L, + 1E100L, + 1E101L, + 1E102L, + 1E103L, + 1E104L, + 1E105L, + 1E106L, + 1E107L, + 1E108L, + 1E109L, + 1E110L, + 1E111L, + 1E112L, + 1E113L, + 1E114L, + 1E115L, + 1E116L, + 1E117L, + 1E118L, + 1E119L, + 1E120L, + 1E121L, + 1E122L, + 1E123L, + 1E124L, + 1E125L, + 1E126L, + 1E127L, + 1E128L, + 1E129L, + 1E130L, + 1E131L, + 1E132L, + 1E133L, + 1E134L, + 1E135L, + 1E136L, + 1E137L, + 1E138L, + 1E139L, + 1E140L, + 1E141L, + 1E142L, + 1E143L, + 1E144L, + 1E145L, + 1E146L, + 1E147L, + 1E148L, + 1E149L, + 1E150L, + 1E151L, + 1E152L, + 1E153L, + 1E154L, + 1E155L, + 1E156L, + 1E157L, + 1E158L, + 1E159L, + 1E160L, + 1E161L, + 1E162L, + 1E163L, + 1E164L, + 1E165L, + 1E166L, + 1E167L, + 1E168L, + 1E169L, + 1E170L, + 1E171L, + 1E172L, + 1E173L, + 1E174L, + 1E175L, + 1E176L, + 1E177L, + 1E178L, + 1E179L, + 1E180L, + 1E181L, + 1E182L, + 1E183L, + 1E184L, + 1E185L, + 1E186L, + 1E187L, + 1E188L, + 1E189L, + 1E190L, + 1E191L, + 1E192L, + 1E193L, + 1E194L, + 1E195L, + 1E196L, + 1E197L, + 1E198L, + 1E199L, + 1E200L, + 1E201L, + 1E202L, + 1E203L, + 1E204L, + 1E205L, + 1E206L, + 1E207L, + 1E208L, + 1E209L, + 1E210L, + 1E211L, + 1E212L, + 1E213L, + 1E214L, + 1E215L, + 1E216L, + 1E217L, + 1E218L, + 1E219L, + 1E220L, + 1E221L, + 1E222L, + 1E223L, + 1E224L, + 1E225L, + 1E226L, + 1E227L, + 1E228L, + 1E229L, + 1E230L, + 1E231L, + 1E232L, + 1E233L, + 1E234L, + 1E235L, + 1E236L, + 1E237L, + 1E238L, + 1E239L, + 1E240L, + 1E241L, + 1E242L, + 1E243L, + 1E244L, + 1E245L, + 1E246L, + 1E247L, + 1E248L, + 1E249L, + 1E250L, + 1E251L, + 1E252L, + 1E253L, + 1E254L, + 1E255L, + 1E256L, + 1E257L, + 1E258L, + 1E259L, + 1E260L, + 1E261L, + 1E262L, + 1E263L, + 1E264L, + 1E265L, + 1E266L, + 1E267L, + 1E268L, + 1E269L, + 1E270L, + 1E271L, + 1E272L, + 1E273L, + 1E274L, + 1E275L, + 1E276L, + 1E277L, + 1E278L, + 1E279L, + 1E280L, + 1E281L, + 1E282L, + 1E283L, + 1E284L, + 1E285L, + 1E286L, + 1E287L, + 1E288L, + 1E289L, + 1E290L, + 1E291L, + 1E292L, + 1E293L, + 1E294L, + 1E295L, + 1E296L, + 1E297L, + 1E298L, + 1E299L, + 1E300L, + 1E301L, + 1E302L, + 1E303L, + 1E304L, + 1E305L, + 1E306L, + 1E307L, + 1E308L, + 1E309L, + 1E310L, + 1E311L, + 1E312L, + 1E313L, + 1E314L, + 1E315L, + 1E316L, + 1E317L, + 1E318L, + 1E319L, + 1E320L, + 1E321L, + 1E322L, + 1E323L, + 1E324L, + 1E325L, + 1E326L, + 1E327L, + 1E328L, + 1E329L, + 1E330L, + 1E331L, + 1E332L, + 1E333L, + 1E334L, + 1E335L, + 1E336L, + 1E337L, + 1E338L, + 1E339L, + 1E340L, + 1E341L, + 1E342L, + 1E343L, + 1E344L, + 1E345L, + 1E346L, + 1E347L, + 1E348L, + 1E349L, + 1E350L, + 1E351L, + 1E352L, + 1E353L, + 1E354L, + 1E355L, + 1E356L, + 1E357L, + 1E358L, + 1E359L, + 1E360L, + 1E361L, + 1E362L, + 1E363L, + 1E364L, + 1E365L, + 1E366L, + 1E367L, + 1E368L, + 1E369L, + 1E370L, + 1E371L, + 1E372L, + 1E373L, + 1E374L, + 1E375L, + 1E376L, + 1E377L, + 1E378L, + 1E379L, + 1E380L, + 1E381L, + 1E382L, + 1E383L, + 1E384L, + 1E385L, + 1E386L, + 1E387L, + 1E388L, + 1E389L, + 1E390L, + 1E391L, + 1E392L, + 1E393L, + 1E394L, + 1E395L, + 1E396L, + 1E397L, + 1E398L, + 1E399L, + 1E400L, + 1E401L, + 1E402L, + 1E403L, + 1E404L, + 1E405L, + 1E406L, + 1E407L, + 1E408L, + 1E409L, + 1E410L, + 1E411L, + 1E412L, + 1E413L, + 1E414L, + 1E415L, + 1E416L, + 1E417L, + 1E418L, + 1E419L, + 1E420L, + 1E421L, + 1E422L, + 1E423L, + 1E424L, + 1E425L, + 1E426L, + 1E427L, + 1E428L, + 1E429L, + 1E430L, + 1E431L, + 1E432L, + 1E433L, + 1E434L, + 1E435L, + 1E436L, + 1E437L, + 1E438L, + 1E439L, + 1E440L, + 1E441L, + 1E442L, + 1E443L, + 1E444L, + 1E445L, + 1E446L, + 1E447L, + 1E448L, + 1E449L, + 1E450L, + 1E451L, + 1E452L, + 1E453L, + 1E454L, + 1E455L, + 1E456L, + 1E457L, + 1E458L, + 1E459L, + 1E460L, + 1E461L, + 1E462L, + 1E463L, + 1E464L, + 1E465L, + 1E466L, + 1E467L, + 1E468L, + 1E469L, + 1E470L, + 1E471L, + 1E472L, + 1E473L, + 1E474L, + 1E475L, + 1E476L, + 1E477L, + 1E478L, + 1E479L, + 1E480L, + 1E481L, + 1E482L, + 1E483L, + 1E484L, + 1E485L, + 1E486L, + 1E487L, + 1E488L, + 1E489L, + 1E490L, + 1E491L, + 1E492L, + 1E493L, + 1E494L, + 1E495L, + 1E496L, + 1E497L, + 1E498L, + 1E499L, + 1E500L, + 1E501L, + 1E502L, + 1E503L, + 1E504L, + 1E505L, + 1E506L, + 1E507L, + 1E508L, + 1E509L, + 1E510L, + 1E511L, + 1E512L, + 1E513L, + 1E514L, + 1E515L, + 1E516L, + 1E517L, + 1E518L, + 1E519L, + 1E520L, + 1E521L, + 1E522L, + 1E523L, + 1E524L, + 1E525L, + 1E526L, + 1E527L, + 1E528L, + 1E529L, + 1E530L, + 1E531L, + 1E532L, + 1E533L, + 1E534L, + 1E535L, + 1E536L, + 1E537L, + 1E538L, + 1E539L, + 1E540L, + 1E541L, + 1E542L, + 1E543L, + 1E544L, + 1E545L, + 1E546L, + 1E547L, + 1E548L, + 1E549L, + 1E550L, + 1E551L, + 1E552L, + 1E553L, + 1E554L, + 1E555L, + 1E556L, + 1E557L, + 1E558L, + 1E559L, + 1E560L, + 1E561L, + 1E562L, + 1E563L, + 1E564L, + 1E565L, + 1E566L, + 1E567L, + 1E568L, + 1E569L, + 1E570L, + 1E571L, + 1E572L, + 1E573L, + 1E574L, + 1E575L, + 1E576L, + 1E577L, + 1E578L, + 1E579L, + 1E580L, + 1E581L, + 1E582L, + 1E583L, + 1E584L, + 1E585L, + 1E586L, + 1E587L, + 1E588L, + 1E589L, + 1E590L, + 1E591L, + 1E592L, + 1E593L, + 1E594L, + 1E595L, + 1E596L, + 1E597L, + 1E598L, + 1E599L, + 1E600L, + 1E601L, + 1E602L, + 1E603L, + 1E604L, + 1E605L, + 1E606L, + 1E607L, + 1E608L, + 1E609L, + 1E610L, + 1E611L, + 1E612L, + 1E613L, + 1E614L, + 1E615L, + 1E616L, + 1E617L, + 1E618L, + 1E619L, + 1E620L, + 1E621L, + 1E622L, + 1E623L, + 1E624L, + 1E625L, + 1E626L, + 1E627L, + 1E628L, + 1E629L, + 1E630L, + 1E631L, + 1E632L, + 1E633L, + 1E634L, + 1E635L, + 1E636L, + 1E637L, + 1E638L, + 1E639L, + 1E640L, + 1E641L, + 1E642L, + 1E643L, + 1E644L, + 1E645L, + 1E646L, + 1E647L, + 1E648L, + 1E649L, + 1E650L, + 1E651L, + 1E652L, + 1E653L, + 1E654L, + 1E655L, + 1E656L, + 1E657L, + 1E658L, + 1E659L, + 1E660L, + 1E661L, + 1E662L, + 1E663L, + 1E664L, + 1E665L, + 1E666L, + 1E667L, + 1E668L, + 1E669L, + 1E670L, + 1E671L, + 1E672L, + 1E673L, + 1E674L, + 1E675L, + 1E676L, + 1E677L, + 1E678L, + 1E679L, + 1E680L, + 1E681L, + 1E682L, + 1E683L, + 1E684L, + 1E685L, + 1E686L, + 1E687L, + 1E688L, + 1E689L, + 1E690L, + 1E691L, + 1E692L, + 1E693L, + 1E694L, + 1E695L, + 1E696L, + 1E697L, + 1E698L, + 1E699L, + 1E700L, + 1E701L, + 1E702L, + 1E703L, + 1E704L, + 1E705L, + 1E706L, + 1E707L, + 1E708L, + 1E709L, + 1E710L, + 1E711L, + 1E712L, + 1E713L, + 1E714L, + 1E715L, + 1E716L, + 1E717L, + 1E718L, + 1E719L, + 1E720L, + 1E721L, + 1E722L, + 1E723L, + 1E724L, + 1E725L, + 1E726L, + 1E727L, + 1E728L, + 1E729L, + 1E730L, + 1E731L, + 1E732L, + 1E733L, + 1E734L, + 1E735L, + 1E736L, + 1E737L, + 1E738L, + 1E739L, + 1E740L, + 1E741L, + 1E742L, + 1E743L, + 1E744L, + 1E745L, + 1E746L, + 1E747L, + 1E748L, + 1E749L, + 1E750L, + 1E751L, + 1E752L, + 1E753L, + 1E754L, + 1E755L, + 1E756L, + 1E757L, + 1E758L, + 1E759L, + 1E760L, + 1E761L, + 1E762L, + 1E763L, + 1E764L, + 1E765L, + 1E766L, + 1E767L, + 1E768L, + 1E769L, + 1E770L, + 1E771L, + 1E772L, + 1E773L, + 1E774L, + 1E775L, + 1E776L, + 1E777L, + 1E778L, + 1E779L, + 1E780L, + 1E781L, + 1E782L, + 1E783L, + 1E784L, + 1E785L, + 1E786L, + 1E787L, + 1E788L, + 1E789L, + 1E790L, + 1E791L, + 1E792L, + 1E793L, + 1E794L, + 1E795L, + 1E796L, + 1E797L, + 1E798L, + 1E799L, + 1E800L, + 1E801L, + 1E802L, + 1E803L, + 1E804L, + 1E805L, + 1E806L, + 1E807L, + 1E808L, + 1E809L, + 1E810L, + 1E811L, + 1E812L, + 1E813L, + 1E814L, + 1E815L, + 1E816L, + 1E817L, + 1E818L, + 1E819L, + 1E820L, + 1E821L, + 1E822L, + 1E823L, + 1E824L, + 1E825L, + 1E826L, + 1E827L, + 1E828L, + 1E829L, + 1E830L, + 1E831L, + 1E832L, + 1E833L, + 1E834L, + 1E835L, + 1E836L, + 1E837L, + 1E838L, + 1E839L, + 1E840L, + 1E841L, + 1E842L, + 1E843L, + 1E844L, + 1E845L, + 1E846L, + 1E847L, + 1E848L, + 1E849L, + 1E850L, + 1E851L, + 1E852L, + 1E853L, + 1E854L, + 1E855L, + 1E856L, + 1E857L, + 1E858L, + 1E859L, + 1E860L, + 1E861L, + 1E862L, + 1E863L, + 1E864L, + 1E865L, + 1E866L, + 1E867L, + 1E868L, + 1E869L, + 1E870L, + 1E871L, + 1E872L, + 1E873L, + 1E874L, + 1E875L, + 1E876L, + 1E877L, + 1E878L, + 1E879L, + 1E880L, + 1E881L, + 1E882L, + 1E883L, + 1E884L, + 1E885L, + 1E886L, + 1E887L, + 1E888L, + 1E889L, + 1E890L, + 1E891L, + 1E892L, + 1E893L, + 1E894L, + 1E895L, + 1E896L, + 1E897L, + 1E898L, + 1E899L, + 1E900L, + 1E901L, + 1E902L, + 1E903L, + 1E904L, + 1E905L, + 1E906L, + 1E907L, + 1E908L, + 1E909L, + 1E910L, + 1E911L, + 1E912L, + 1E913L, + 1E914L, + 1E915L, + 1E916L, + 1E917L, + 1E918L, + 1E919L, + 1E920L, + 1E921L, + 1E922L, + 1E923L, + 1E924L, + 1E925L, + 1E926L, + 1E927L, + 1E928L, + 1E929L, + 1E930L, + 1E931L, + 1E932L, + 1E933L, + 1E934L, + 1E935L, + 1E936L, + 1E937L, + 1E938L, + 1E939L, + 1E940L, + 1E941L, + 1E942L, + 1E943L, + 1E944L, + 1E945L, + 1E946L, + 1E947L, + 1E948L, + 1E949L, + 1E950L, + 1E951L, + 1E952L, + 1E953L, + 1E954L, + 1E955L, + 1E956L, + 1E957L, + 1E958L, + 1E959L, + 1E960L, + 1E961L, + 1E962L, + 1E963L, + 1E964L, + 1E965L, + 1E966L, + 1E967L, + 1E968L, + 1E969L, + 1E970L, + 1E971L, + 1E972L, + 1E973L, + 1E974L, + 1E975L, + 1E976L, + 1E977L, + 1E978L, + 1E979L, + 1E980L, + 1E981L, + 1E982L, + 1E983L, + 1E984L, + 1E985L, + 1E986L, + 1E987L, + 1E988L, + 1E989L, + 1E990L, + 1E991L, + 1E992L, + 1E993L, + 1E994L, + 1E995L, + 1E996L, + 1E997L, + 1E998L, + 1E999L, + 1E1000L, + 1E1001L, + 1E1002L, + 1E1003L, + 1E1004L, + 1E1005L, + 1E1006L, + 1E1007L, + 1E1008L, + 1E1009L, + 1E1010L, + 1E1011L, + 1E1012L, + 1E1013L, + 1E1014L, + 1E1015L, + 1E1016L, + 1E1017L, + 1E1018L, + 1E1019L, + 1E1020L, + 1E1021L, + 1E1022L, + 1E1023L, + 1E1024L, + 1E1025L, + 1E1026L, + 1E1027L, + 1E1028L, + 1E1029L, + 1E1030L, + 1E1031L, + 1E1032L, + 1E1033L, + 1E1034L, + 1E1035L, + 1E1036L, + 1E1037L, + 1E1038L, + 1E1039L, + 1E1040L, + 1E1041L, + 1E1042L, + 1E1043L, + 1E1044L, + 1E1045L, + 1E1046L, + 1E1047L, + 1E1048L, + 1E1049L, + 1E1050L, + 1E1051L, + 1E1052L, + 1E1053L, + 1E1054L, + 1E1055L, + 1E1056L, + 1E1057L, + 1E1058L, + 1E1059L, + 1E1060L, + 1E1061L, + 1E1062L, + 1E1063L, + 1E1064L, + 1E1065L, + 1E1066L, + 1E1067L, + 1E1068L, + 1E1069L, + 1E1070L, + 1E1071L, + 1E1072L, + 1E1073L, + 1E1074L, + 1E1075L, + 1E1076L, + 1E1077L, + 1E1078L, + 1E1079L, + 1E1080L, + 1E1081L, + 1E1082L, + 1E1083L, + 1E1084L, + 1E1085L, + 1E1086L, + 1E1087L, + 1E1088L, + 1E1089L, + 1E1090L, + 1E1091L, + 1E1092L, + 1E1093L, + 1E1094L, + 1E1095L, + 1E1096L, + 1E1097L, + 1E1098L, + 1E1099L, + 1E1100L, + 1E1101L, + 1E1102L, + 1E1103L, + 1E1104L, + 1E1105L, + 1E1106L, + 1E1107L, + 1E1108L, + 1E1109L, + 1E1110L, + 1E1111L, + 1E1112L, + 1E1113L, + 1E1114L, + 1E1115L, + 1E1116L, + 1E1117L, + 1E1118L, + 1E1119L, + 1E1120L, + 1E1121L, + 1E1122L, + 1E1123L, + 1E1124L, + 1E1125L, + 1E1126L, + 1E1127L, + 1E1128L, + 1E1129L, + 1E1130L, + 1E1131L, + 1E1132L, + 1E1133L, + 1E1134L, + 1E1135L, + 1E1136L, + 1E1137L, + 1E1138L, + 1E1139L, + 1E1140L, + 1E1141L, + 1E1142L, + 1E1143L, + 1E1144L, + 1E1145L, + 1E1146L, + 1E1147L, + 1E1148L, + 1E1149L, + 1E1150L, + 1E1151L, + 1E1152L, + 1E1153L, + 1E1154L, + 1E1155L, + 1E1156L, + 1E1157L, + 1E1158L, + 1E1159L, + 1E1160L, + 1E1161L, + 1E1162L, + 1E1163L, + 1E1164L, + 1E1165L, + 1E1166L, + 1E1167L, + 1E1168L, + 1E1169L, + 1E1170L, + 1E1171L, + 1E1172L, + 1E1173L, + 1E1174L, + 1E1175L, + 1E1176L, + 1E1177L, + 1E1178L, + 1E1179L, + 1E1180L, + 1E1181L, + 1E1182L, + 1E1183L, + 1E1184L, + 1E1185L, + 1E1186L, + 1E1187L, + 1E1188L, + 1E1189L, + 1E1190L, + 1E1191L, + 1E1192L, + 1E1193L, + 1E1194L, + 1E1195L, + 1E1196L, + 1E1197L, + 1E1198L, + 1E1199L, + 1E1200L, + 1E1201L, + 1E1202L, + 1E1203L, + 1E1204L, + 1E1205L, + 1E1206L, + 1E1207L, + 1E1208L, + 1E1209L, + 1E1210L, + 1E1211L, + 1E1212L, + 1E1213L, + 1E1214L, + 1E1215L, + 1E1216L, + 1E1217L, + 1E1218L, + 1E1219L, + 1E1220L, + 1E1221L, + 1E1222L, + 1E1223L, + 1E1224L, + 1E1225L, + 1E1226L, + 1E1227L, + 1E1228L, + 1E1229L, + 1E1230L, + 1E1231L, + 1E1232L, + 1E1233L, + 1E1234L, + 1E1235L, + 1E1236L, + 1E1237L, + 1E1238L, + 1E1239L, + 1E1240L, + 1E1241L, + 1E1242L, + 1E1243L, + 1E1244L, + 1E1245L, + 1E1246L, + 1E1247L, + 1E1248L, + 1E1249L, + 1E1250L, + 1E1251L, + 1E1252L, + 1E1253L, + 1E1254L, + 1E1255L, + 1E1256L, + 1E1257L, + 1E1258L, + 1E1259L, + 1E1260L, + 1E1261L, + 1E1262L, + 1E1263L, + 1E1264L, + 1E1265L, + 1E1266L, + 1E1267L, + 1E1268L, + 1E1269L, + 1E1270L, + 1E1271L, + 1E1272L, + 1E1273L, + 1E1274L, + 1E1275L, + 1E1276L, + 1E1277L, + 1E1278L, + 1E1279L, + 1E1280L, + 1E1281L, + 1E1282L, + 1E1283L, + 1E1284L, + 1E1285L, + 1E1286L, + 1E1287L, + 1E1288L, + 1E1289L, + 1E1290L, + 1E1291L, + 1E1292L, + 1E1293L, + 1E1294L, + 1E1295L, + 1E1296L, + 1E1297L, + 1E1298L, + 1E1299L, + 1E1300L, + 1E1301L, + 1E1302L, + 1E1303L, + 1E1304L, + 1E1305L, + 1E1306L, + 1E1307L, + 1E1308L, + 1E1309L, + 1E1310L, + 1E1311L, + 1E1312L, + 1E1313L, + 1E1314L, + 1E1315L, + 1E1316L, + 1E1317L, + 1E1318L, + 1E1319L, + 1E1320L, + 1E1321L, + 1E1322L, + 1E1323L, + 1E1324L, + 1E1325L, + 1E1326L, + 1E1327L, + 1E1328L, + 1E1329L, + 1E1330L, + 1E1331L, + 1E1332L, + 1E1333L, + 1E1334L, + 1E1335L, + 1E1336L, + 1E1337L, + 1E1338L, + 1E1339L, + 1E1340L, + 1E1341L, + 1E1342L, + 1E1343L, + 1E1344L, + 1E1345L, + 1E1346L, + 1E1347L, + 1E1348L, + 1E1349L, + 1E1350L, + 1E1351L, + 1E1352L, + 1E1353L, + 1E1354L, + 1E1355L, + 1E1356L, + 1E1357L, + 1E1358L, + 1E1359L, + 1E1360L, + 1E1361L, + 1E1362L, + 1E1363L, + 1E1364L, + 1E1365L, + 1E1366L, + 1E1367L, + 1E1368L, + 1E1369L, + 1E1370L, + 1E1371L, + 1E1372L, + 1E1373L, + 1E1374L, + 1E1375L, + 1E1376L, + 1E1377L, + 1E1378L, + 1E1379L, + 1E1380L, + 1E1381L, + 1E1382L, + 1E1383L, + 1E1384L, + 1E1385L, + 1E1386L, + 1E1387L, + 1E1388L, + 1E1389L, + 1E1390L, + 1E1391L, + 1E1392L, + 1E1393L, + 1E1394L, + 1E1395L, + 1E1396L, + 1E1397L, + 1E1398L, + 1E1399L, + 1E1400L, + 1E1401L, + 1E1402L, + 1E1403L, + 1E1404L, + 1E1405L, + 1E1406L, + 1E1407L, + 1E1408L, + 1E1409L, + 1E1410L, + 1E1411L, + 1E1412L, + 1E1413L, + 1E1414L, + 1E1415L, + 1E1416L, + 1E1417L, + 1E1418L, + 1E1419L, + 1E1420L, + 1E1421L, + 1E1422L, + 1E1423L, + 1E1424L, + 1E1425L, + 1E1426L, + 1E1427L, + 1E1428L, + 1E1429L, + 1E1430L, + 1E1431L, + 1E1432L, + 1E1433L, + 1E1434L, + 1E1435L, + 1E1436L, + 1E1437L, + 1E1438L, + 1E1439L, + 1E1440L, + 1E1441L, + 1E1442L, + 1E1443L, + 1E1444L, + 1E1445L, + 1E1446L, + 1E1447L, + 1E1448L, + 1E1449L, + 1E1450L, + 1E1451L, + 1E1452L, + 1E1453L, + 1E1454L, + 1E1455L, + 1E1456L, + 1E1457L, + 1E1458L, + 1E1459L, + 1E1460L, + 1E1461L, + 1E1462L, + 1E1463L, + 1E1464L, + 1E1465L, + 1E1466L, + 1E1467L, + 1E1468L, + 1E1469L, + 1E1470L, + 1E1471L, + 1E1472L, + 1E1473L, + 1E1474L, + 1E1475L, + 1E1476L, + 1E1477L, + 1E1478L, + 1E1479L, + 1E1480L, + 1E1481L, + 1E1482L, + 1E1483L, + 1E1484L, + 1E1485L, + 1E1486L, + 1E1487L, + 1E1488L, + 1E1489L, + 1E1490L, + 1E1491L, + 1E1492L, + 1E1493L, + 1E1494L, + 1E1495L, + 1E1496L, + 1E1497L, + 1E1498L, + 1E1499L, + 1E1500L, + 1E1501L, + 1E1502L, + 1E1503L, + 1E1504L, + 1E1505L, + 1E1506L, + 1E1507L, + 1E1508L, + 1E1509L, + 1E1510L, + 1E1511L, + 1E1512L, + 1E1513L, + 1E1514L, + 1E1515L, + 1E1516L, + 1E1517L, + 1E1518L, + 1E1519L, + 1E1520L, + 1E1521L, + 1E1522L, + 1E1523L, + 1E1524L, + 1E1525L, + 1E1526L, + 1E1527L, + 1E1528L, + 1E1529L, + 1E1530L, + 1E1531L, + 1E1532L, + 1E1533L, + 1E1534L, + 1E1535L, + 1E1536L, + 1E1537L, + 1E1538L, + 1E1539L, + 1E1540L, + 1E1541L, + 1E1542L, + 1E1543L, + 1E1544L, + 1E1545L, + 1E1546L, + 1E1547L, + 1E1548L, + 1E1549L, + 1E1550L, + 1E1551L, + 1E1552L, + 1E1553L, + 1E1554L, + 1E1555L, + 1E1556L, + 1E1557L, + 1E1558L, + 1E1559L, + 1E1560L, + 1E1561L, + 1E1562L, + 1E1563L, + 1E1564L, + 1E1565L, + 1E1566L, + 1E1567L, + 1E1568L, + 1E1569L, + 1E1570L, + 1E1571L, + 1E1572L, + 1E1573L, + 1E1574L, + 1E1575L, + 1E1576L, + 1E1577L, + 1E1578L, + 1E1579L, + 1E1580L, + 1E1581L, + 1E1582L, + 1E1583L, + 1E1584L, + 1E1585L, + 1E1586L, + 1E1587L, + 1E1588L, + 1E1589L, + 1E1590L, + 1E1591L, + 1E1592L, + 1E1593L, + 1E1594L, + 1E1595L, + 1E1596L, + 1E1597L, + 1E1598L, + 1E1599L, + 1E1600L, + 1E1601L, + 1E1602L, + 1E1603L, + 1E1604L, + 1E1605L, + 1E1606L, + 1E1607L, + 1E1608L, + 1E1609L, + 1E1610L, + 1E1611L, + 1E1612L, + 1E1613L, + 1E1614L, + 1E1615L, + 1E1616L, + 1E1617L, + 1E1618L, + 1E1619L, + 1E1620L, + 1E1621L, + 1E1622L, + 1E1623L, + 1E1624L, + 1E1625L, + 1E1626L, + 1E1627L, + 1E1628L, + 1E1629L, + 1E1630L, + 1E1631L, + 1E1632L, + 1E1633L, + 1E1634L, + 1E1635L, + 1E1636L, + 1E1637L, + 1E1638L, + 1E1639L, + 1E1640L, + 1E1641L, + 1E1642L, + 1E1643L, + 1E1644L, + 1E1645L, + 1E1646L, + 1E1647L, + 1E1648L, + 1E1649L, + 1E1650L, + 1E1651L, + 1E1652L, + 1E1653L, + 1E1654L, + 1E1655L, + 1E1656L, + 1E1657L, + 1E1658L, + 1E1659L, + 1E1660L, + 1E1661L, + 1E1662L, + 1E1663L, + 1E1664L, + 1E1665L, + 1E1666L, + 1E1667L, + 1E1668L, + 1E1669L, + 1E1670L, + 1E1671L, + 1E1672L, + 1E1673L, + 1E1674L, + 1E1675L, + 1E1676L, + 1E1677L, + 1E1678L, + 1E1679L, + 1E1680L, + 1E1681L, + 1E1682L, + 1E1683L, + 1E1684L, + 1E1685L, + 1E1686L, + 1E1687L, + 1E1688L, + 1E1689L, + 1E1690L, + 1E1691L, + 1E1692L, + 1E1693L, + 1E1694L, + 1E1695L, + 1E1696L, + 1E1697L, + 1E1698L, + 1E1699L, + 1E1700L, + 1E1701L, + 1E1702L, + 1E1703L, + 1E1704L, + 1E1705L, + 1E1706L, + 1E1707L, + 1E1708L, + 1E1709L, + 1E1710L, + 1E1711L, + 1E1712L, + 1E1713L, + 1E1714L, + 1E1715L, + 1E1716L, + 1E1717L, + 1E1718L, + 1E1719L, + 1E1720L, + 1E1721L, + 1E1722L, + 1E1723L, + 1E1724L, + 1E1725L, + 1E1726L, + 1E1727L, + 1E1728L, + 1E1729L, + 1E1730L, + 1E1731L, + 1E1732L, + 1E1733L, + 1E1734L, + 1E1735L, + 1E1736L, + 1E1737L, + 1E1738L, + 1E1739L, + 1E1740L, + 1E1741L, + 1E1742L, + 1E1743L, + 1E1744L, + 1E1745L, + 1E1746L, + 1E1747L, + 1E1748L, + 1E1749L, + 1E1750L, + 1E1751L, + 1E1752L, + 1E1753L, + 1E1754L, + 1E1755L, + 1E1756L, + 1E1757L, + 1E1758L, + 1E1759L, + 1E1760L, + 1E1761L, + 1E1762L, + 1E1763L, + 1E1764L, + 1E1765L, + 1E1766L, + 1E1767L, + 1E1768L, + 1E1769L, + 1E1770L, + 1E1771L, + 1E1772L, + 1E1773L, + 1E1774L, + 1E1775L, + 1E1776L, + 1E1777L, + 1E1778L, + 1E1779L, + 1E1780L, + 1E1781L, + 1E1782L, + 1E1783L, + 1E1784L, + 1E1785L, + 1E1786L, + 1E1787L, + 1E1788L, + 1E1789L, + 1E1790L, + 1E1791L, + 1E1792L, + 1E1793L, + 1E1794L, + 1E1795L, + 1E1796L, + 1E1797L, + 1E1798L, + 1E1799L, + 1E1800L, + 1E1801L, + 1E1802L, + 1E1803L, + 1E1804L, + 1E1805L, + 1E1806L, + 1E1807L, + 1E1808L, + 1E1809L, + 1E1810L, + 1E1811L, + 1E1812L, + 1E1813L, + 1E1814L, + 1E1815L, + 1E1816L, + 1E1817L, + 1E1818L, + 1E1819L, + 1E1820L, + 1E1821L, + 1E1822L, + 1E1823L, + 1E1824L, + 1E1825L, + 1E1826L, + 1E1827L, + 1E1828L, + 1E1829L, + 1E1830L, + 1E1831L, + 1E1832L, + 1E1833L, + 1E1834L, + 1E1835L, + 1E1836L, + 1E1837L, + 1E1838L, + 1E1839L, + 1E1840L, + 1E1841L, + 1E1842L, + 1E1843L, + 1E1844L, + 1E1845L, + 1E1846L, + 1E1847L, + 1E1848L, + 1E1849L, + 1E1850L, + 1E1851L, + 1E1852L, + 1E1853L, + 1E1854L, + 1E1855L, + 1E1856L, + 1E1857L, + 1E1858L, + 1E1859L, + 1E1860L, + 1E1861L, + 1E1862L, + 1E1863L, + 1E1864L, + 1E1865L, + 1E1866L, + 1E1867L, + 1E1868L, + 1E1869L, + 1E1870L, + 1E1871L, + 1E1872L, + 1E1873L, + 1E1874L, + 1E1875L, + 1E1876L, + 1E1877L, + 1E1878L, + 1E1879L, + 1E1880L, + 1E1881L, + 1E1882L, + 1E1883L, + 1E1884L, + 1E1885L, + 1E1886L, + 1E1887L, + 1E1888L, + 1E1889L, + 1E1890L, + 1E1891L, + 1E1892L, + 1E1893L, + 1E1894L, + 1E1895L, + 1E1896L, + 1E1897L, + 1E1898L, + 1E1899L, + 1E1900L, + 1E1901L, + 1E1902L, + 1E1903L, + 1E1904L, + 1E1905L, + 1E1906L, + 1E1907L, + 1E1908L, + 1E1909L, + 1E1910L, + 1E1911L, + 1E1912L, + 1E1913L, + 1E1914L, + 1E1915L, + 1E1916L, + 1E1917L, + 1E1918L, + 1E1919L, + 1E1920L, + 1E1921L, + 1E1922L, + 1E1923L, + 1E1924L, + 1E1925L, + 1E1926L, + 1E1927L, + 1E1928L, + 1E1929L, + 1E1930L, + 1E1931L, + 1E1932L, + 1E1933L, + 1E1934L, + 1E1935L, + 1E1936L, + 1E1937L, + 1E1938L, + 1E1939L, + 1E1940L, + 1E1941L, + 1E1942L, + 1E1943L, + 1E1944L, + 1E1945L, + 1E1946L, + 1E1947L, + 1E1948L, + 1E1949L, + 1E1950L, + 1E1951L, + 1E1952L, + 1E1953L, + 1E1954L, + 1E1955L, + 1E1956L, + 1E1957L, + 1E1958L, + 1E1959L, + 1E1960L, + 1E1961L, + 1E1962L, + 1E1963L, + 1E1964L, + 1E1965L, + 1E1966L, + 1E1967L, + 1E1968L, + 1E1969L, + 1E1970L, + 1E1971L, + 1E1972L, + 1E1973L, + 1E1974L, + 1E1975L, + 1E1976L, + 1E1977L, + 1E1978L, + 1E1979L, + 1E1980L, + 1E1981L, + 1E1982L, + 1E1983L, + 1E1984L, + 1E1985L, + 1E1986L, + 1E1987L, + 1E1988L, + 1E1989L, + 1E1990L, + 1E1991L, + 1E1992L, + 1E1993L, + 1E1994L, + 1E1995L, + 1E1996L, + 1E1997L, + 1E1998L, + 1E1999L, + 1E2000L, + 1E2001L, + 1E2002L, + 1E2003L, + 1E2004L, + 1E2005L, + 1E2006L, + 1E2007L, + 1E2008L, + 1E2009L, + 1E2010L, + 1E2011L, + 1E2012L, + 1E2013L, + 1E2014L, + 1E2015L, + 1E2016L, + 1E2017L, + 1E2018L, + 1E2019L, + 1E2020L, + 1E2021L, + 1E2022L, + 1E2023L, + 1E2024L, + 1E2025L, + 1E2026L, + 1E2027L, + 1E2028L, + 1E2029L, + 1E2030L, + 1E2031L, + 1E2032L, + 1E2033L, + 1E2034L, + 1E2035L, + 1E2036L, + 1E2037L, + 1E2038L, + 1E2039L, + 1E2040L, + 1E2041L, + 1E2042L, + 1E2043L, + 1E2044L, + 1E2045L, + 1E2046L, + 1E2047L, + 1E2048L, + 1E2049L, + 1E2050L, + 1E2051L, + 1E2052L, + 1E2053L, + 1E2054L, + 1E2055L, + 1E2056L, + 1E2057L, + 1E2058L, + 1E2059L, + 1E2060L, + 1E2061L, + 1E2062L, + 1E2063L, + 1E2064L, + 1E2065L, + 1E2066L, + 1E2067L, + 1E2068L, + 1E2069L, + 1E2070L, + 1E2071L, + 1E2072L, + 1E2073L, + 1E2074L, + 1E2075L, + 1E2076L, + 1E2077L, + 1E2078L, + 1E2079L, + 1E2080L, + 1E2081L, + 1E2082L, + 1E2083L, + 1E2084L, + 1E2085L, + 1E2086L, + 1E2087L, + 1E2088L, + 1E2089L, + 1E2090L, + 1E2091L, + 1E2092L, + 1E2093L, + 1E2094L, + 1E2095L, + 1E2096L, + 1E2097L, + 1E2098L, + 1E2099L, + 1E2100L, + 1E2101L, + 1E2102L, + 1E2103L, + 1E2104L, + 1E2105L, + 1E2106L, + 1E2107L, + 1E2108L, + 1E2109L, + 1E2110L, + 1E2111L, + 1E2112L, + 1E2113L, + 1E2114L, + 1E2115L, + 1E2116L, + 1E2117L, + 1E2118L, + 1E2119L, + 1E2120L, + 1E2121L, + 1E2122L, + 1E2123L, + 1E2124L, + 1E2125L, + 1E2126L, + 1E2127L, + 1E2128L, + 1E2129L, + 1E2130L, + 1E2131L, + 1E2132L, + 1E2133L, + 1E2134L, + 1E2135L, + 1E2136L, + 1E2137L, + 1E2138L, + 1E2139L, + 1E2140L, + 1E2141L, + 1E2142L, + 1E2143L, + 1E2144L, + 1E2145L, + 1E2146L, + 1E2147L, + 1E2148L, + 1E2149L, + 1E2150L, + 1E2151L, + 1E2152L, + 1E2153L, + 1E2154L, + 1E2155L, + 1E2156L, + 1E2157L, + 1E2158L, + 1E2159L, + 1E2160L, + 1E2161L, + 1E2162L, + 1E2163L, + 1E2164L, + 1E2165L, + 1E2166L, + 1E2167L, + 1E2168L, + 1E2169L, + 1E2170L, + 1E2171L, + 1E2172L, + 1E2173L, + 1E2174L, + 1E2175L, + 1E2176L, + 1E2177L, + 1E2178L, + 1E2179L, + 1E2180L, + 1E2181L, + 1E2182L, + 1E2183L, + 1E2184L, + 1E2185L, + 1E2186L, + 1E2187L, + 1E2188L, + 1E2189L, + 1E2190L, + 1E2191L, + 1E2192L, + 1E2193L, + 1E2194L, + 1E2195L, + 1E2196L, + 1E2197L, + 1E2198L, + 1E2199L, + 1E2200L, + 1E2201L, + 1E2202L, + 1E2203L, + 1E2204L, + 1E2205L, + 1E2206L, + 1E2207L, + 1E2208L, + 1E2209L, + 1E2210L, + 1E2211L, + 1E2212L, + 1E2213L, + 1E2214L, + 1E2215L, + 1E2216L, + 1E2217L, + 1E2218L, + 1E2219L, + 1E2220L, + 1E2221L, + 1E2222L, + 1E2223L, + 1E2224L, + 1E2225L, + 1E2226L, + 1E2227L, + 1E2228L, + 1E2229L, + 1E2230L, + 1E2231L, + 1E2232L, + 1E2233L, + 1E2234L, + 1E2235L, + 1E2236L, + 1E2237L, + 1E2238L, + 1E2239L, + 1E2240L, + 1E2241L, + 1E2242L, + 1E2243L, + 1E2244L, + 1E2245L, + 1E2246L, + 1E2247L, + 1E2248L, + 1E2249L, + 1E2250L, + 1E2251L, + 1E2252L, + 1E2253L, + 1E2254L, + 1E2255L, + 1E2256L, + 1E2257L, + 1E2258L, + 1E2259L, + 1E2260L, + 1E2261L, + 1E2262L, + 1E2263L, + 1E2264L, + 1E2265L, + 1E2266L, + 1E2267L, + 1E2268L, + 1E2269L, + 1E2270L, + 1E2271L, + 1E2272L, + 1E2273L, + 1E2274L, + 1E2275L, + 1E2276L, + 1E2277L, + 1E2278L, + 1E2279L, + 1E2280L, + 1E2281L, + 1E2282L, + 1E2283L, + 1E2284L, + 1E2285L, + 1E2286L, + 1E2287L, + 1E2288L, + 1E2289L, + 1E2290L, + 1E2291L, + 1E2292L, + 1E2293L, + 1E2294L, + 1E2295L, + 1E2296L, + 1E2297L, + 1E2298L, + 1E2299L, + 1E2300L, + 1E2301L, + 1E2302L, + 1E2303L, + 1E2304L, + 1E2305L, + 1E2306L, + 1E2307L, + 1E2308L, + 1E2309L, + 1E2310L, + 1E2311L, + 1E2312L, + 1E2313L, + 1E2314L, + 1E2315L, + 1E2316L, + 1E2317L, + 1E2318L, + 1E2319L, + 1E2320L, + 1E2321L, + 1E2322L, + 1E2323L, + 1E2324L, + 1E2325L, + 1E2326L, + 1E2327L, + 1E2328L, + 1E2329L, + 1E2330L, + 1E2331L, + 1E2332L, + 1E2333L, + 1E2334L, + 1E2335L, + 1E2336L, + 1E2337L, + 1E2338L, + 1E2339L, + 1E2340L, + 1E2341L, + 1E2342L, + 1E2343L, + 1E2344L, + 1E2345L, + 1E2346L, + 1E2347L, + 1E2348L, + 1E2349L, + 1E2350L, + 1E2351L, + 1E2352L, + 1E2353L, + 1E2354L, + 1E2355L, + 1E2356L, + 1E2357L, + 1E2358L, + 1E2359L, + 1E2360L, + 1E2361L, + 1E2362L, + 1E2363L, + 1E2364L, + 1E2365L, + 1E2366L, + 1E2367L, + 1E2368L, + 1E2369L, + 1E2370L, + 1E2371L, + 1E2372L, + 1E2373L, + 1E2374L, + 1E2375L, + 1E2376L, + 1E2377L, + 1E2378L, + 1E2379L, + 1E2380L, + 1E2381L, + 1E2382L, + 1E2383L, + 1E2384L, + 1E2385L, + 1E2386L, + 1E2387L, + 1E2388L, + 1E2389L, + 1E2390L, + 1E2391L, + 1E2392L, + 1E2393L, + 1E2394L, + 1E2395L, + 1E2396L, + 1E2397L, + 1E2398L, + 1E2399L, + 1E2400L, + 1E2401L, + 1E2402L, + 1E2403L, + 1E2404L, + 1E2405L, + 1E2406L, + 1E2407L, + 1E2408L, + 1E2409L, + 1E2410L, + 1E2411L, + 1E2412L, + 1E2413L, + 1E2414L, + 1E2415L, + 1E2416L, + 1E2417L, + 1E2418L, + 1E2419L, + 1E2420L, + 1E2421L, + 1E2422L, + 1E2423L, + 1E2424L, + 1E2425L, + 1E2426L, + 1E2427L, + 1E2428L, + 1E2429L, + 1E2430L, + 1E2431L, + 1E2432L, + 1E2433L, + 1E2434L, + 1E2435L, + 1E2436L, + 1E2437L, + 1E2438L, + 1E2439L, + 1E2440L, + 1E2441L, + 1E2442L, + 1E2443L, + 1E2444L, + 1E2445L, + 1E2446L, + 1E2447L, + 1E2448L, + 1E2449L, + 1E2450L, + 1E2451L, + 1E2452L, + 1E2453L, + 1E2454L, + 1E2455L, + 1E2456L, + 1E2457L, + 1E2458L, + 1E2459L, + 1E2460L, + 1E2461L, + 1E2462L, + 1E2463L, + 1E2464L, + 1E2465L, + 1E2466L, + 1E2467L, + 1E2468L, + 1E2469L, + 1E2470L, + 1E2471L, + 1E2472L, + 1E2473L, + 1E2474L, + 1E2475L, + 1E2476L, + 1E2477L, + 1E2478L, + 1E2479L, + 1E2480L, + 1E2481L, + 1E2482L, + 1E2483L, + 1E2484L, + 1E2485L, + 1E2486L, + 1E2487L, + 1E2488L, + 1E2489L, + 1E2490L, + 1E2491L, + 1E2492L, + 1E2493L, + 1E2494L, + 1E2495L, + 1E2496L, + 1E2497L, + 1E2498L, + 1E2499L, + 1E2500L, + 1E2501L, + 1E2502L, + 1E2503L, + 1E2504L, + 1E2505L, + 1E2506L, + 1E2507L, + 1E2508L, + 1E2509L, + 1E2510L, + 1E2511L, + 1E2512L, + 1E2513L, + 1E2514L, + 1E2515L, + 1E2516L, + 1E2517L, + 1E2518L, + 1E2519L, + 1E2520L, + 1E2521L, + 1E2522L, + 1E2523L, + 1E2524L, + 1E2525L, + 1E2526L, + 1E2527L, + 1E2528L, + 1E2529L, + 1E2530L, + 1E2531L, + 1E2532L, + 1E2533L, + 1E2534L, + 1E2535L, + 1E2536L, + 1E2537L, + 1E2538L, + 1E2539L, + 1E2540L, + 1E2541L, + 1E2542L, + 1E2543L, + 1E2544L, + 1E2545L, + 1E2546L, + 1E2547L, + 1E2548L, + 1E2549L, + 1E2550L, + 1E2551L, + 1E2552L, + 1E2553L, + 1E2554L, + 1E2555L, + 1E2556L, + 1E2557L, + 1E2558L, + 1E2559L, + 1E2560L, + 1E2561L, + 1E2562L, + 1E2563L, + 1E2564L, + 1E2565L, + 1E2566L, + 1E2567L, + 1E2568L, + 1E2569L, + 1E2570L, + 1E2571L, + 1E2572L, + 1E2573L, + 1E2574L, + 1E2575L, + 1E2576L, + 1E2577L, + 1E2578L, + 1E2579L, + 1E2580L, + 1E2581L, + 1E2582L, + 1E2583L, + 1E2584L, + 1E2585L, + 1E2586L, + 1E2587L, + 1E2588L, + 1E2589L, + 1E2590L, + 1E2591L, + 1E2592L, + 1E2593L, + 1E2594L, + 1E2595L, + 1E2596L, + 1E2597L, + 1E2598L, + 1E2599L, + 1E2600L, + 1E2601L, + 1E2602L, + 1E2603L, + 1E2604L, + 1E2605L, + 1E2606L, + 1E2607L, + 1E2608L, + 1E2609L, + 1E2610L, + 1E2611L, + 1E2612L, + 1E2613L, + 1E2614L, + 1E2615L, + 1E2616L, + 1E2617L, + 1E2618L, + 1E2619L, + 1E2620L, + 1E2621L, + 1E2622L, + 1E2623L, + 1E2624L, + 1E2625L, + 1E2626L, + 1E2627L, + 1E2628L, + 1E2629L, + 1E2630L, + 1E2631L, + 1E2632L, + 1E2633L, + 1E2634L, + 1E2635L, + 1E2636L, + 1E2637L, + 1E2638L, + 1E2639L, + 1E2640L, + 1E2641L, + 1E2642L, + 1E2643L, + 1E2644L, + 1E2645L, + 1E2646L, + 1E2647L, + 1E2648L, + 1E2649L, + 1E2650L, + 1E2651L, + 1E2652L, + 1E2653L, + 1E2654L, + 1E2655L, + 1E2656L, + 1E2657L, + 1E2658L, + 1E2659L, + 1E2660L, + 1E2661L, + 1E2662L, + 1E2663L, + 1E2664L, + 1E2665L, + 1E2666L, + 1E2667L, + 1E2668L, + 1E2669L, + 1E2670L, + 1E2671L, + 1E2672L, + 1E2673L, + 1E2674L, + 1E2675L, + 1E2676L, + 1E2677L, + 1E2678L, + 1E2679L, + 1E2680L, + 1E2681L, + 1E2682L, + 1E2683L, + 1E2684L, + 1E2685L, + 1E2686L, + 1E2687L, + 1E2688L, + 1E2689L, + 1E2690L, + 1E2691L, + 1E2692L, + 1E2693L, + 1E2694L, + 1E2695L, + 1E2696L, + 1E2697L, + 1E2698L, + 1E2699L, + 1E2700L, + 1E2701L, + 1E2702L, + 1E2703L, + 1E2704L, + 1E2705L, + 1E2706L, + 1E2707L, + 1E2708L, + 1E2709L, + 1E2710L, + 1E2711L, + 1E2712L, + 1E2713L, + 1E2714L, + 1E2715L, + 1E2716L, + 1E2717L, + 1E2718L, + 1E2719L, + 1E2720L, + 1E2721L, + 1E2722L, + 1E2723L, + 1E2724L, + 1E2725L, + 1E2726L, + 1E2727L, + 1E2728L, + 1E2729L, + 1E2730L, + 1E2731L, + 1E2732L, + 1E2733L, + 1E2734L, + 1E2735L, + 1E2736L, + 1E2737L, + 1E2738L, + 1E2739L, + 1E2740L, + 1E2741L, + 1E2742L, + 1E2743L, + 1E2744L, + 1E2745L, + 1E2746L, + 1E2747L, + 1E2748L, + 1E2749L, + 1E2750L, + 1E2751L, + 1E2752L, + 1E2753L, + 1E2754L, + 1E2755L, + 1E2756L, + 1E2757L, + 1E2758L, + 1E2759L, + 1E2760L, + 1E2761L, + 1E2762L, + 1E2763L, + 1E2764L, + 1E2765L, + 1E2766L, + 1E2767L, + 1E2768L, + 1E2769L, + 1E2770L, + 1E2771L, + 1E2772L, + 1E2773L, + 1E2774L, + 1E2775L, + 1E2776L, + 1E2777L, + 1E2778L, + 1E2779L, + 1E2780L, + 1E2781L, + 1E2782L, + 1E2783L, + 1E2784L, + 1E2785L, + 1E2786L, + 1E2787L, + 1E2788L, + 1E2789L, + 1E2790L, + 1E2791L, + 1E2792L, + 1E2793L, + 1E2794L, + 1E2795L, + 1E2796L, + 1E2797L, + 1E2798L, + 1E2799L, + 1E2800L, + 1E2801L, + 1E2802L, + 1E2803L, + 1E2804L, + 1E2805L, + 1E2806L, + 1E2807L, + 1E2808L, + 1E2809L, + 1E2810L, + 1E2811L, + 1E2812L, + 1E2813L, + 1E2814L, + 1E2815L, + 1E2816L, + 1E2817L, + 1E2818L, + 1E2819L, + 1E2820L, + 1E2821L, + 1E2822L, + 1E2823L, + 1E2824L, + 1E2825L, + 1E2826L, + 1E2827L, + 1E2828L, + 1E2829L, + 1E2830L, + 1E2831L, + 1E2832L, + 1E2833L, + 1E2834L, + 1E2835L, + 1E2836L, + 1E2837L, + 1E2838L, + 1E2839L, + 1E2840L, + 1E2841L, + 1E2842L, + 1E2843L, + 1E2844L, + 1E2845L, + 1E2846L, + 1E2847L, + 1E2848L, + 1E2849L, + 1E2850L, + 1E2851L, + 1E2852L, + 1E2853L, + 1E2854L, + 1E2855L, + 1E2856L, + 1E2857L, + 1E2858L, + 1E2859L, + 1E2860L, + 1E2861L, + 1E2862L, + 1E2863L, + 1E2864L, + 1E2865L, + 1E2866L, + 1E2867L, + 1E2868L, + 1E2869L, + 1E2870L, + 1E2871L, + 1E2872L, + 1E2873L, + 1E2874L, + 1E2875L, + 1E2876L, + 1E2877L, + 1E2878L, + 1E2879L, + 1E2880L, + 1E2881L, + 1E2882L, + 1E2883L, + 1E2884L, + 1E2885L, + 1E2886L, + 1E2887L, + 1E2888L, + 1E2889L, + 1E2890L, + 1E2891L, + 1E2892L, + 1E2893L, + 1E2894L, + 1E2895L, + 1E2896L, + 1E2897L, + 1E2898L, + 1E2899L, + 1E2900L, + 1E2901L, + 1E2902L, + 1E2903L, + 1E2904L, + 1E2905L, + 1E2906L, + 1E2907L, + 1E2908L, + 1E2909L, + 1E2910L, + 1E2911L, + 1E2912L, + 1E2913L, + 1E2914L, + 1E2915L, + 1E2916L, + 1E2917L, + 1E2918L, + 1E2919L, + 1E2920L, + 1E2921L, + 1E2922L, + 1E2923L, + 1E2924L, + 1E2925L, + 1E2926L, + 1E2927L, + 1E2928L, + 1E2929L, + 1E2930L, + 1E2931L, + 1E2932L, + 1E2933L, + 1E2934L, + 1E2935L, + 1E2936L, + 1E2937L, + 1E2938L, + 1E2939L, + 1E2940L, + 1E2941L, + 1E2942L, + 1E2943L, + 1E2944L, + 1E2945L, + 1E2946L, + 1E2947L, + 1E2948L, + 1E2949L, + 1E2950L, + 1E2951L, + 1E2952L, + 1E2953L, + 1E2954L, + 1E2955L, + 1E2956L, + 1E2957L, + 1E2958L, + 1E2959L, + 1E2960L, + 1E2961L, + 1E2962L, + 1E2963L, + 1E2964L, + 1E2965L, + 1E2966L, + 1E2967L, + 1E2968L, + 1E2969L, + 1E2970L, + 1E2971L, + 1E2972L, + 1E2973L, + 1E2974L, + 1E2975L, + 1E2976L, + 1E2977L, + 1E2978L, + 1E2979L, + 1E2980L, + 1E2981L, + 1E2982L, + 1E2983L, + 1E2984L, + 1E2985L, + 1E2986L, + 1E2987L, + 1E2988L, + 1E2989L, + 1E2990L, + 1E2991L, + 1E2992L, + 1E2993L, + 1E2994L, + 1E2995L, + 1E2996L, + 1E2997L, + 1E2998L, + 1E2999L, + 1E3000L, + 1E3001L, + 1E3002L, + 1E3003L, + 1E3004L, + 1E3005L, + 1E3006L, + 1E3007L, + 1E3008L, + 1E3009L, + 1E3010L, + 1E3011L, + 1E3012L, + 1E3013L, + 1E3014L, + 1E3015L, + 1E3016L, + 1E3017L, + 1E3018L, + 1E3019L, + 1E3020L, + 1E3021L, + 1E3022L, + 1E3023L, + 1E3024L, + 1E3025L, + 1E3026L, + 1E3027L, + 1E3028L, + 1E3029L, + 1E3030L, + 1E3031L, + 1E3032L, + 1E3033L, + 1E3034L, + 1E3035L, + 1E3036L, + 1E3037L, + 1E3038L, + 1E3039L, + 1E3040L, + 1E3041L, + 1E3042L, + 1E3043L, + 1E3044L, + 1E3045L, + 1E3046L, + 1E3047L, + 1E3048L, + 1E3049L, + 1E3050L, + 1E3051L, + 1E3052L, + 1E3053L, + 1E3054L, + 1E3055L, + 1E3056L, + 1E3057L, + 1E3058L, + 1E3059L, + 1E3060L, + 1E3061L, + 1E3062L, + 1E3063L, + 1E3064L, + 1E3065L, + 1E3066L, + 1E3067L, + 1E3068L, + 1E3069L, + 1E3070L, + 1E3071L, + 1E3072L, + 1E3073L, + 1E3074L, + 1E3075L, + 1E3076L, + 1E3077L, + 1E3078L, + 1E3079L, + 1E3080L, + 1E3081L, + 1E3082L, + 1E3083L, + 1E3084L, + 1E3085L, + 1E3086L, + 1E3087L, + 1E3088L, + 1E3089L, + 1E3090L, + 1E3091L, + 1E3092L, + 1E3093L, + 1E3094L, + 1E3095L, + 1E3096L, + 1E3097L, + 1E3098L, + 1E3099L, + 1E3100L, + 1E3101L, + 1E3102L, + 1E3103L, + 1E3104L, + 1E3105L, + 1E3106L, + 1E3107L, + 1E3108L, + 1E3109L, + 1E3110L, + 1E3111L, + 1E3112L, + 1E3113L, + 1E3114L, + 1E3115L, + 1E3116L, + 1E3117L, + 1E3118L, + 1E3119L, + 1E3120L, + 1E3121L, + 1E3122L, + 1E3123L, + 1E3124L, + 1E3125L, + 1E3126L, + 1E3127L, + 1E3128L, + 1E3129L, + 1E3130L, + 1E3131L, + 1E3132L, + 1E3133L, + 1E3134L, + 1E3135L, + 1E3136L, + 1E3137L, + 1E3138L, + 1E3139L, + 1E3140L, + 1E3141L, + 1E3142L, + 1E3143L, + 1E3144L, + 1E3145L, + 1E3146L, + 1E3147L, + 1E3148L, + 1E3149L, + 1E3150L, + 1E3151L, + 1E3152L, + 1E3153L, + 1E3154L, + 1E3155L, + 1E3156L, + 1E3157L, + 1E3158L, + 1E3159L, + 1E3160L, + 1E3161L, + 1E3162L, + 1E3163L, + 1E3164L, + 1E3165L, + 1E3166L, + 1E3167L, + 1E3168L, + 1E3169L, + 1E3170L, + 1E3171L, + 1E3172L, + 1E3173L, + 1E3174L, + 1E3175L, + 1E3176L, + 1E3177L, + 1E3178L, + 1E3179L, + 1E3180L, + 1E3181L, + 1E3182L, + 1E3183L, + 1E3184L, + 1E3185L, + 1E3186L, + 1E3187L, + 1E3188L, + 1E3189L, + 1E3190L, + 1E3191L, + 1E3192L, + 1E3193L, + 1E3194L, + 1E3195L, + 1E3196L, + 1E3197L, + 1E3198L, + 1E3199L, + 1E3200L, + 1E3201L, + 1E3202L, + 1E3203L, + 1E3204L, + 1E3205L, + 1E3206L, + 1E3207L, + 1E3208L, + 1E3209L, + 1E3210L, + 1E3211L, + 1E3212L, + 1E3213L, + 1E3214L, + 1E3215L, + 1E3216L, + 1E3217L, + 1E3218L, + 1E3219L, + 1E3220L, + 1E3221L, + 1E3222L, + 1E3223L, + 1E3224L, + 1E3225L, + 1E3226L, + 1E3227L, + 1E3228L, + 1E3229L, + 1E3230L, + 1E3231L, + 1E3232L, + 1E3233L, + 1E3234L, + 1E3235L, + 1E3236L, + 1E3237L, + 1E3238L, + 1E3239L, + 1E3240L, + 1E3241L, + 1E3242L, + 1E3243L, + 1E3244L, + 1E3245L, + 1E3246L, + 1E3247L, + 1E3248L, + 1E3249L, + 1E3250L, + 1E3251L, + 1E3252L, + 1E3253L, + 1E3254L, + 1E3255L, + 1E3256L, + 1E3257L, + 1E3258L, + 1E3259L, + 1E3260L, + 1E3261L, + 1E3262L, + 1E3263L, + 1E3264L, + 1E3265L, + 1E3266L, + 1E3267L, + 1E3268L, + 1E3269L, + 1E3270L, + 1E3271L, + 1E3272L, + 1E3273L, + 1E3274L, + 1E3275L, + 1E3276L, + 1E3277L, + 1E3278L, + 1E3279L, + 1E3280L, + 1E3281L, + 1E3282L, + 1E3283L, + 1E3284L, + 1E3285L, + 1E3286L, + 1E3287L, + 1E3288L, + 1E3289L, + 1E3290L, + 1E3291L, + 1E3292L, + 1E3293L, + 1E3294L, + 1E3295L, + 1E3296L, + 1E3297L, + 1E3298L, + 1E3299L, + 1E3300L, + 1E3301L, + 1E3302L, + 1E3303L, + 1E3304L, + 1E3305L, + 1E3306L, + 1E3307L, + 1E3308L, + 1E3309L, + 1E3310L, + 1E3311L, + 1E3312L, + 1E3313L, + 1E3314L, + 1E3315L, + 1E3316L, + 1E3317L, + 1E3318L, + 1E3319L, + 1E3320L, + 1E3321L, + 1E3322L, + 1E3323L, + 1E3324L, + 1E3325L, + 1E3326L, + 1E3327L, + 1E3328L, + 1E3329L, + 1E3330L, + 1E3331L, + 1E3332L, + 1E3333L, + 1E3334L, + 1E3335L, + 1E3336L, + 1E3337L, + 1E3338L, + 1E3339L, + 1E3340L, + 1E3341L, + 1E3342L, + 1E3343L, + 1E3344L, + 1E3345L, + 1E3346L, + 1E3347L, + 1E3348L, + 1E3349L, + 1E3350L, + 1E3351L, + 1E3352L, + 1E3353L, + 1E3354L, + 1E3355L, + 1E3356L, + 1E3357L, + 1E3358L, + 1E3359L, + 1E3360L, + 1E3361L, + 1E3362L, + 1E3363L, + 1E3364L, + 1E3365L, + 1E3366L, + 1E3367L, + 1E3368L, + 1E3369L, + 1E3370L, + 1E3371L, + 1E3372L, + 1E3373L, + 1E3374L, + 1E3375L, + 1E3376L, + 1E3377L, + 1E3378L, + 1E3379L, + 1E3380L, + 1E3381L, + 1E3382L, + 1E3383L, + 1E3384L, + 1E3385L, + 1E3386L, + 1E3387L, + 1E3388L, + 1E3389L, + 1E3390L, + 1E3391L, + 1E3392L, + 1E3393L, + 1E3394L, + 1E3395L, + 1E3396L, + 1E3397L, + 1E3398L, + 1E3399L, + 1E3400L, + 1E3401L, + 1E3402L, + 1E3403L, + 1E3404L, + 1E3405L, + 1E3406L, + 1E3407L, + 1E3408L, + 1E3409L, + 1E3410L, + 1E3411L, + 1E3412L, + 1E3413L, + 1E3414L, + 1E3415L, + 1E3416L, + 1E3417L, + 1E3418L, + 1E3419L, + 1E3420L, + 1E3421L, + 1E3422L, + 1E3423L, + 1E3424L, + 1E3425L, + 1E3426L, + 1E3427L, + 1E3428L, + 1E3429L, + 1E3430L, + 1E3431L, + 1E3432L, + 1E3433L, + 1E3434L, + 1E3435L, + 1E3436L, + 1E3437L, + 1E3438L, + 1E3439L, + 1E3440L, + 1E3441L, + 1E3442L, + 1E3443L, + 1E3444L, + 1E3445L, + 1E3446L, + 1E3447L, + 1E3448L, + 1E3449L, + 1E3450L, + 1E3451L, + 1E3452L, + 1E3453L, + 1E3454L, + 1E3455L, + 1E3456L, + 1E3457L, + 1E3458L, + 1E3459L, + 1E3460L, + 1E3461L, + 1E3462L, + 1E3463L, + 1E3464L, + 1E3465L, + 1E3466L, + 1E3467L, + 1E3468L, + 1E3469L, + 1E3470L, + 1E3471L, + 1E3472L, + 1E3473L, + 1E3474L, + 1E3475L, + 1E3476L, + 1E3477L, + 1E3478L, + 1E3479L, + 1E3480L, + 1E3481L, + 1E3482L, + 1E3483L, + 1E3484L, + 1E3485L, + 1E3486L, + 1E3487L, + 1E3488L, + 1E3489L, + 1E3490L, + 1E3491L, + 1E3492L, + 1E3493L, + 1E3494L, + 1E3495L, + 1E3496L, + 1E3497L, + 1E3498L, + 1E3499L, + 1E3500L, + 1E3501L, + 1E3502L, + 1E3503L, + 1E3504L, + 1E3505L, + 1E3506L, + 1E3507L, + 1E3508L, + 1E3509L, + 1E3510L, + 1E3511L, + 1E3512L, + 1E3513L, + 1E3514L, + 1E3515L, + 1E3516L, + 1E3517L, + 1E3518L, + 1E3519L, + 1E3520L, + 1E3521L, + 1E3522L, + 1E3523L, + 1E3524L, + 1E3525L, + 1E3526L, + 1E3527L, + 1E3528L, + 1E3529L, + 1E3530L, + 1E3531L, + 1E3532L, + 1E3533L, + 1E3534L, + 1E3535L, + 1E3536L, + 1E3537L, + 1E3538L, + 1E3539L, + 1E3540L, + 1E3541L, + 1E3542L, + 1E3543L, + 1E3544L, + 1E3545L, + 1E3546L, + 1E3547L, + 1E3548L, + 1E3549L, + 1E3550L, + 1E3551L, + 1E3552L, + 1E3553L, + 1E3554L, + 1E3555L, + 1E3556L, + 1E3557L, + 1E3558L, + 1E3559L, + 1E3560L, + 1E3561L, + 1E3562L, + 1E3563L, + 1E3564L, + 1E3565L, + 1E3566L, + 1E3567L, + 1E3568L, + 1E3569L, + 1E3570L, + 1E3571L, + 1E3572L, + 1E3573L, + 1E3574L, + 1E3575L, + 1E3576L, + 1E3577L, + 1E3578L, + 1E3579L, + 1E3580L, + 1E3581L, + 1E3582L, + 1E3583L, + 1E3584L, + 1E3585L, + 1E3586L, + 1E3587L, + 1E3588L, + 1E3589L, + 1E3590L, + 1E3591L, + 1E3592L, + 1E3593L, + 1E3594L, + 1E3595L, + 1E3596L, + 1E3597L, + 1E3598L, + 1E3599L, + 1E3600L, + 1E3601L, + 1E3602L, + 1E3603L, + 1E3604L, + 1E3605L, + 1E3606L, + 1E3607L, + 1E3608L, + 1E3609L, + 1E3610L, + 1E3611L, + 1E3612L, + 1E3613L, + 1E3614L, + 1E3615L, + 1E3616L, + 1E3617L, + 1E3618L, + 1E3619L, + 1E3620L, + 1E3621L, + 1E3622L, + 1E3623L, + 1E3624L, + 1E3625L, + 1E3626L, + 1E3627L, + 1E3628L, + 1E3629L, + 1E3630L, + 1E3631L, + 1E3632L, + 1E3633L, + 1E3634L, + 1E3635L, + 1E3636L, + 1E3637L, + 1E3638L, + 1E3639L, + 1E3640L, + 1E3641L, + 1E3642L, + 1E3643L, + 1E3644L, + 1E3645L, + 1E3646L, + 1E3647L, + 1E3648L, + 1E3649L, + 1E3650L, + 1E3651L, + 1E3652L, + 1E3653L, + 1E3654L, + 1E3655L, + 1E3656L, + 1E3657L, + 1E3658L, + 1E3659L, + 1E3660L, + 1E3661L, + 1E3662L, + 1E3663L, + 1E3664L, + 1E3665L, + 1E3666L, + 1E3667L, + 1E3668L, + 1E3669L, + 1E3670L, + 1E3671L, + 1E3672L, + 1E3673L, + 1E3674L, + 1E3675L, + 1E3676L, + 1E3677L, + 1E3678L, + 1E3679L, + 1E3680L, + 1E3681L, + 1E3682L, + 1E3683L, + 1E3684L, + 1E3685L, + 1E3686L, + 1E3687L, + 1E3688L, + 1E3689L, + 1E3690L, + 1E3691L, + 1E3692L, + 1E3693L, + 1E3694L, + 1E3695L, + 1E3696L, + 1E3697L, + 1E3698L, + 1E3699L, + 1E3700L, + 1E3701L, + 1E3702L, + 1E3703L, + 1E3704L, + 1E3705L, + 1E3706L, + 1E3707L, + 1E3708L, + 1E3709L, + 1E3710L, + 1E3711L, + 1E3712L, + 1E3713L, + 1E3714L, + 1E3715L, + 1E3716L, + 1E3717L, + 1E3718L, + 1E3719L, + 1E3720L, + 1E3721L, + 1E3722L, + 1E3723L, + 1E3724L, + 1E3725L, + 1E3726L, + 1E3727L, + 1E3728L, + 1E3729L, + 1E3730L, + 1E3731L, + 1E3732L, + 1E3733L, + 1E3734L, + 1E3735L, + 1E3736L, + 1E3737L, + 1E3738L, + 1E3739L, + 1E3740L, + 1E3741L, + 1E3742L, + 1E3743L, + 1E3744L, + 1E3745L, + 1E3746L, + 1E3747L, + 1E3748L, + 1E3749L, + 1E3750L, + 1E3751L, + 1E3752L, + 1E3753L, + 1E3754L, + 1E3755L, + 1E3756L, + 1E3757L, + 1E3758L, + 1E3759L, + 1E3760L, + 1E3761L, + 1E3762L, + 1E3763L, + 1E3764L, + 1E3765L, + 1E3766L, + 1E3767L, + 1E3768L, + 1E3769L, + 1E3770L, + 1E3771L, + 1E3772L, + 1E3773L, + 1E3774L, + 1E3775L, + 1E3776L, + 1E3777L, + 1E3778L, + 1E3779L, + 1E3780L, + 1E3781L, + 1E3782L, + 1E3783L, + 1E3784L, + 1E3785L, + 1E3786L, + 1E3787L, + 1E3788L, + 1E3789L, + 1E3790L, + 1E3791L, + 1E3792L, + 1E3793L, + 1E3794L, + 1E3795L, + 1E3796L, + 1E3797L, + 1E3798L, + 1E3799L, + 1E3800L, + 1E3801L, + 1E3802L, + 1E3803L, + 1E3804L, + 1E3805L, + 1E3806L, + 1E3807L, + 1E3808L, + 1E3809L, + 1E3810L, + 1E3811L, + 1E3812L, + 1E3813L, + 1E3814L, + 1E3815L, + 1E3816L, + 1E3817L, + 1E3818L, + 1E3819L, + 1E3820L, + 1E3821L, + 1E3822L, + 1E3823L, + 1E3824L, + 1E3825L, + 1E3826L, + 1E3827L, + 1E3828L, + 1E3829L, + 1E3830L, + 1E3831L, + 1E3832L, + 1E3833L, + 1E3834L, + 1E3835L, + 1E3836L, + 1E3837L, + 1E3838L, + 1E3839L, + 1E3840L, + 1E3841L, + 1E3842L, + 1E3843L, + 1E3844L, + 1E3845L, + 1E3846L, + 1E3847L, + 1E3848L, + 1E3849L, + 1E3850L, + 1E3851L, + 1E3852L, + 1E3853L, + 1E3854L, + 1E3855L, + 1E3856L, + 1E3857L, + 1E3858L, + 1E3859L, + 1E3860L, + 1E3861L, + 1E3862L, + 1E3863L, + 1E3864L, + 1E3865L, + 1E3866L, + 1E3867L, + 1E3868L, + 1E3869L, + 1E3870L, + 1E3871L, + 1E3872L, + 1E3873L, + 1E3874L, + 1E3875L, + 1E3876L, + 1E3877L, + 1E3878L, + 1E3879L, + 1E3880L, + 1E3881L, + 1E3882L, + 1E3883L, + 1E3884L, + 1E3885L, + 1E3886L, + 1E3887L, + 1E3888L, + 1E3889L, + 1E3890L, + 1E3891L, + 1E3892L, + 1E3893L, + 1E3894L, + 1E3895L, + 1E3896L, + 1E3897L, + 1E3898L, + 1E3899L, + 1E3900L, + 1E3901L, + 1E3902L, + 1E3903L, + 1E3904L, + 1E3905L, + 1E3906L, + 1E3907L, + 1E3908L, + 1E3909L, + 1E3910L, + 1E3911L, + 1E3912L, + 1E3913L, + 1E3914L, + 1E3915L, + 1E3916L, + 1E3917L, + 1E3918L, + 1E3919L, + 1E3920L, + 1E3921L, + 1E3922L, + 1E3923L, + 1E3924L, + 1E3925L, + 1E3926L, + 1E3927L, + 1E3928L, + 1E3929L, + 1E3930L, + 1E3931L, + 1E3932L, + 1E3933L, + 1E3934L, + 1E3935L, + 1E3936L, + 1E3937L, + 1E3938L, + 1E3939L, + 1E3940L, + 1E3941L, + 1E3942L, + 1E3943L, + 1E3944L, + 1E3945L, + 1E3946L, + 1E3947L, + 1E3948L, + 1E3949L, + 1E3950L, + 1E3951L, + 1E3952L, + 1E3953L, + 1E3954L, + 1E3955L, + 1E3956L, + 1E3957L, + 1E3958L, + 1E3959L, + 1E3960L, + 1E3961L, + 1E3962L, + 1E3963L, + 1E3964L, + 1E3965L, + 1E3966L, + 1E3967L, + 1E3968L, + 1E3969L, + 1E3970L, + 1E3971L, + 1E3972L, + 1E3973L, + 1E3974L, + 1E3975L, + 1E3976L, + 1E3977L, + 1E3978L, + 1E3979L, + 1E3980L, + 1E3981L, + 1E3982L, + 1E3983L, + 1E3984L, + 1E3985L, + 1E3986L, + 1E3987L, + 1E3988L, + 1E3989L, + 1E3990L, + 1E3991L, + 1E3992L, + 1E3993L, + 1E3994L, + 1E3995L, + 1E3996L, + 1E3997L, + 1E3998L, + 1E3999L, + 1E4000L, + 1E4001L, + 1E4002L, + 1E4003L, + 1E4004L, + 1E4005L, + 1E4006L, + 1E4007L, + 1E4008L, + 1E4009L, + 1E4010L, + 1E4011L, + 1E4012L, + 1E4013L, + 1E4014L, + 1E4015L, + 1E4016L, + 1E4017L, + 1E4018L, + 1E4019L, + 1E4020L, + 1E4021L, + 1E4022L, + 1E4023L, + 1E4024L, + 1E4025L, + 1E4026L, + 1E4027L, + 1E4028L, + 1E4029L, + 1E4030L, + 1E4031L, + 1E4032L, + 1E4033L, + 1E4034L, + 1E4035L, + 1E4036L, + 1E4037L, + 1E4038L, + 1E4039L, + 1E4040L, + 1E4041L, + 1E4042L, + 1E4043L, + 1E4044L, + 1E4045L, + 1E4046L, + 1E4047L, + 1E4048L, + 1E4049L, + 1E4050L, + 1E4051L, + 1E4052L, + 1E4053L, + 1E4054L, + 1E4055L, + 1E4056L, + 1E4057L, + 1E4058L, + 1E4059L, + 1E4060L, + 1E4061L, + 1E4062L, + 1E4063L, + 1E4064L, + 1E4065L, + 1E4066L, + 1E4067L, + 1E4068L, + 1E4069L, + 1E4070L, + 1E4071L, + 1E4072L, + 1E4073L, + 1E4074L, + 1E4075L, + 1E4076L, + 1E4077L, + 1E4078L, + 1E4079L, + 1E4080L, + 1E4081L, + 1E4082L, + 1E4083L, + 1E4084L, + 1E4085L, + 1E4086L, + 1E4087L, + 1E4088L, + 1E4089L, + 1E4090L, + 1E4091L, + 1E4092L, + 1E4093L, + 1E4094L, + 1E4095L, + 1E4096L, + 1E4097L, + 1E4098L, + 1E4099L, + 1E4100L, + 1E4101L, + 1E4102L, + 1E4103L, + 1E4104L, + 1E4105L, + 1E4106L, + 1E4107L, + 1E4108L, + 1E4109L, + 1E4110L, + 1E4111L, + 1E4112L, + 1E4113L, + 1E4114L, + 1E4115L, + 1E4116L, + 1E4117L, + 1E4118L, + 1E4119L, + 1E4120L, + 1E4121L, + 1E4122L, + 1E4123L, + 1E4124L, + 1E4125L, + 1E4126L, + 1E4127L, + 1E4128L, + 1E4129L, + 1E4130L, + 1E4131L, + 1E4132L, + 1E4133L, + 1E4134L, + 1E4135L, + 1E4136L, + 1E4137L, + 1E4138L, + 1E4139L, + 1E4140L, + 1E4141L, + 1E4142L, + 1E4143L, + 1E4144L, + 1E4145L, + 1E4146L, + 1E4147L, + 1E4148L, + 1E4149L, + 1E4150L, + 1E4151L, + 1E4152L, + 1E4153L, + 1E4154L, + 1E4155L, + 1E4156L, + 1E4157L, + 1E4158L, + 1E4159L, + 1E4160L, + 1E4161L, + 1E4162L, + 1E4163L, + 1E4164L, + 1E4165L, + 1E4166L, + 1E4167L, + 1E4168L, + 1E4169L, + 1E4170L, + 1E4171L, + 1E4172L, + 1E4173L, + 1E4174L, + 1E4175L, + 1E4176L, + 1E4177L, + 1E4178L, + 1E4179L, + 1E4180L, + 1E4181L, + 1E4182L, + 1E4183L, + 1E4184L, + 1E4185L, + 1E4186L, + 1E4187L, + 1E4188L, + 1E4189L, + 1E4190L, + 1E4191L, + 1E4192L, + 1E4193L, + 1E4194L, + 1E4195L, + 1E4196L, + 1E4197L, + 1E4198L, + 1E4199L, + 1E4200L, + 1E4201L, + 1E4202L, + 1E4203L, + 1E4204L, + 1E4205L, + 1E4206L, + 1E4207L, + 1E4208L, + 1E4209L, + 1E4210L, + 1E4211L, + 1E4212L, + 1E4213L, + 1E4214L, + 1E4215L, + 1E4216L, + 1E4217L, + 1E4218L, + 1E4219L, + 1E4220L, + 1E4221L, + 1E4222L, + 1E4223L, + 1E4224L, + 1E4225L, + 1E4226L, + 1E4227L, + 1E4228L, + 1E4229L, + 1E4230L, + 1E4231L, + 1E4232L, + 1E4233L, + 1E4234L, + 1E4235L, + 1E4236L, + 1E4237L, + 1E4238L, + 1E4239L, + 1E4240L, + 1E4241L, + 1E4242L, + 1E4243L, + 1E4244L, + 1E4245L, + 1E4246L, + 1E4247L, + 1E4248L, + 1E4249L, + 1E4250L, + 1E4251L, + 1E4252L, + 1E4253L, + 1E4254L, + 1E4255L, + 1E4256L, + 1E4257L, + 1E4258L, + 1E4259L, + 1E4260L, + 1E4261L, + 1E4262L, + 1E4263L, + 1E4264L, + 1E4265L, + 1E4266L, + 1E4267L, + 1E4268L, + 1E4269L, + 1E4270L, + 1E4271L, + 1E4272L, + 1E4273L, + 1E4274L, + 1E4275L, + 1E4276L, + 1E4277L, + 1E4278L, + 1E4279L, + 1E4280L, + 1E4281L, + 1E4282L, + 1E4283L, + 1E4284L, + 1E4285L, + 1E4286L, + 1E4287L, + 1E4288L, + 1E4289L, + 1E4290L, + 1E4291L, + 1E4292L, + 1E4293L, + 1E4294L, + 1E4295L, + 1E4296L, + 1E4297L, + 1E4298L, + 1E4299L, + 1E4300L, + 1E4301L, + 1E4302L, + 1E4303L, + 1E4304L, + 1E4305L, + 1E4306L, + 1E4307L, + 1E4308L, + 1E4309L, + 1E4310L, + 1E4311L, + 1E4312L, + 1E4313L, + 1E4314L, + 1E4315L, + 1E4316L, + 1E4317L, + 1E4318L, + 1E4319L, + 1E4320L, + 1E4321L, + 1E4322L, + 1E4323L, + 1E4324L, + 1E4325L, + 1E4326L, + 1E4327L, + 1E4328L, + 1E4329L, + 1E4330L, + 1E4331L, + 1E4332L, + 1E4333L, + 1E4334L, + 1E4335L, + 1E4336L, + 1E4337L, + 1E4338L, + 1E4339L, + 1E4340L, + 1E4341L, + 1E4342L, + 1E4343L, + 1E4344L, + 1E4345L, + 1E4346L, + 1E4347L, + 1E4348L, + 1E4349L, + 1E4350L, + 1E4351L, + 1E4352L, + 1E4353L, + 1E4354L, + 1E4355L, + 1E4356L, + 1E4357L, + 1E4358L, + 1E4359L, + 1E4360L, + 1E4361L, + 1E4362L, + 1E4363L, + 1E4364L, + 1E4365L, + 1E4366L, + 1E4367L, + 1E4368L, + 1E4369L, + 1E4370L, + 1E4371L, + 1E4372L, + 1E4373L, + 1E4374L, + 1E4375L, + 1E4376L, + 1E4377L, + 1E4378L, + 1E4379L, + 1E4380L, + 1E4381L, + 1E4382L, + 1E4383L, + 1E4384L, + 1E4385L, + 1E4386L, + 1E4387L, + 1E4388L, + 1E4389L, + 1E4390L, + 1E4391L, + 1E4392L, + 1E4393L, + 1E4394L, + 1E4395L, + 1E4396L, + 1E4397L, + 1E4398L, + 1E4399L, + 1E4400L, + 1E4401L, + 1E4402L, + 1E4403L, + 1E4404L, + 1E4405L, + 1E4406L, + 1E4407L, + 1E4408L, + 1E4409L, + 1E4410L, + 1E4411L, + 1E4412L, + 1E4413L, + 1E4414L, + 1E4415L, + 1E4416L, + 1E4417L, + 1E4418L, + 1E4419L, + 1E4420L, + 1E4421L, + 1E4422L, + 1E4423L, + 1E4424L, + 1E4425L, + 1E4426L, + 1E4427L, + 1E4428L, + 1E4429L, + 1E4430L, + 1E4431L, + 1E4432L, + 1E4433L, + 1E4434L, + 1E4435L, + 1E4436L, + 1E4437L, + 1E4438L, + 1E4439L, + 1E4440L, + 1E4441L, + 1E4442L, + 1E4443L, + 1E4444L, + 1E4445L, + 1E4446L, + 1E4447L, + 1E4448L, + 1E4449L, + 1E4450L, + 1E4451L, + 1E4452L, + 1E4453L, + 1E4454L, + 1E4455L, + 1E4456L, + 1E4457L, + 1E4458L, + 1E4459L, + 1E4460L, + 1E4461L, + 1E4462L, + 1E4463L, + 1E4464L, + 1E4465L, + 1E4466L, + 1E4467L, + 1E4468L, + 1E4469L, + 1E4470L, + 1E4471L, + 1E4472L, + 1E4473L, + 1E4474L, + 1E4475L, + 1E4476L, + 1E4477L, + 1E4478L, + 1E4479L, + 1E4480L, + 1E4481L, + 1E4482L, + 1E4483L, + 1E4484L, + 1E4485L, + 1E4486L, + 1E4487L, + 1E4488L, + 1E4489L, + 1E4490L, + 1E4491L, + 1E4492L, + 1E4493L, + 1E4494L, + 1E4495L, + 1E4496L, + 1E4497L, + 1E4498L, + 1E4499L, + 1E4500L, + 1E4501L, + 1E4502L, + 1E4503L, + 1E4504L, + 1E4505L, + 1E4506L, + 1E4507L, + 1E4508L, + 1E4509L, + 1E4510L, + 1E4511L, + 1E4512L, + 1E4513L, + 1E4514L, + 1E4515L, + 1E4516L, + 1E4517L, + 1E4518L, + 1E4519L, + 1E4520L, + 1E4521L, + 1E4522L, + 1E4523L, + 1E4524L, + 1E4525L, + 1E4526L, + 1E4527L, + 1E4528L, + 1E4529L, + 1E4530L, + 1E4531L, + 1E4532L, + 1E4533L, + 1E4534L, + 1E4535L, + 1E4536L, + 1E4537L, + 1E4538L, + 1E4539L, + 1E4540L, + 1E4541L, + 1E4542L, + 1E4543L, + 1E4544L, + 1E4545L, + 1E4546L, + 1E4547L, + 1E4548L, + 1E4549L, + 1E4550L, + 1E4551L, + 1E4552L, + 1E4553L, + 1E4554L, + 1E4555L, + 1E4556L, + 1E4557L, + 1E4558L, + 1E4559L, + 1E4560L, + 1E4561L, + 1E4562L, + 1E4563L, + 1E4564L, + 1E4565L, + 1E4566L, + 1E4567L, + 1E4568L, + 1E4569L, + 1E4570L, + 1E4571L, + 1E4572L, + 1E4573L, + 1E4574L, + 1E4575L, + 1E4576L, + 1E4577L, + 1E4578L, + 1E4579L, + 1E4580L, + 1E4581L, + 1E4582L, + 1E4583L, + 1E4584L, + 1E4585L, + 1E4586L, + 1E4587L, + 1E4588L, + 1E4589L, + 1E4590L, + 1E4591L, + 1E4592L, + 1E4593L, + 1E4594L, + 1E4595L, + 1E4596L, + 1E4597L, + 1E4598L, + 1E4599L, + 1E4600L, + 1E4601L, + 1E4602L, + 1E4603L, + 1E4604L, + 1E4605L, + 1E4606L, + 1E4607L, + 1E4608L, + 1E4609L, + 1E4610L, + 1E4611L, + 1E4612L, + 1E4613L, + 1E4614L, + 1E4615L, + 1E4616L, + 1E4617L, + 1E4618L, + 1E4619L, + 1E4620L, + 1E4621L, + 1E4622L, + 1E4623L, + 1E4624L, + 1E4625L, + 1E4626L, + 1E4627L, + 1E4628L, + 1E4629L, + 1E4630L, + 1E4631L, + 1E4632L, + 1E4633L, + 1E4634L, + 1E4635L, + 1E4636L, + 1E4637L, + 1E4638L, + 1E4639L, + 1E4640L, + 1E4641L, + 1E4642L, + 1E4643L, + 1E4644L, + 1E4645L, + 1E4646L, + 1E4647L, + 1E4648L, + 1E4649L, + 1E4650L, + 1E4651L, + 1E4652L, + 1E4653L, + 1E4654L, + 1E4655L, + 1E4656L, + 1E4657L, + 1E4658L, + 1E4659L, + 1E4660L, + 1E4661L, + 1E4662L, + 1E4663L, + 1E4664L, + 1E4665L, + 1E4666L, + 1E4667L, + 1E4668L, + 1E4669L, + 1E4670L, + 1E4671L, + 1E4672L, + 1E4673L, + 1E4674L, + 1E4675L, + 1E4676L, + 1E4677L, + 1E4678L, + 1E4679L, + 1E4680L, + 1E4681L, + 1E4682L, + 1E4683L, + 1E4684L, + 1E4685L, + 1E4686L, + 1E4687L, + 1E4688L, + 1E4689L, + 1E4690L, + 1E4691L, + 1E4692L, + 1E4693L, + 1E4694L, + 1E4695L, + 1E4696L, + 1E4697L, + 1E4698L, + 1E4699L, + 1E4700L, + 1E4701L, + 1E4702L, + 1E4703L, + 1E4704L, + 1E4705L, + 1E4706L, + 1E4707L, + 1E4708L, + 1E4709L, + 1E4710L, + 1E4711L, + 1E4712L, + 1E4713L, + 1E4714L, + 1E4715L, + 1E4716L, + 1E4717L, + 1E4718L, + 1E4719L, + 1E4720L, + 1E4721L, + 1E4722L, + 1E4723L, + 1E4724L, + 1E4725L, + 1E4726L, + 1E4727L, + 1E4728L, + 1E4729L, + 1E4730L, + 1E4731L, + 1E4732L, + 1E4733L, + 1E4734L, + 1E4735L, + 1E4736L, + 1E4737L, + 1E4738L, + 1E4739L, + 1E4740L, + 1E4741L, + 1E4742L, + 1E4743L, + 1E4744L, + 1E4745L, + 1E4746L, + 1E4747L, + 1E4748L, + 1E4749L, + 1E4750L, + 1E4751L, + 1E4752L, + 1E4753L, + 1E4754L, + 1E4755L, + 1E4756L, + 1E4757L, + 1E4758L, + 1E4759L, + 1E4760L, + 1E4761L, + 1E4762L, + 1E4763L, + 1E4764L, + 1E4765L, + 1E4766L, + 1E4767L, + 1E4768L, + 1E4769L, + 1E4770L, + 1E4771L, + 1E4772L, + 1E4773L, + 1E4774L, + 1E4775L, + 1E4776L, + 1E4777L, + 1E4778L, + 1E4779L, + 1E4780L, + 1E4781L, + 1E4782L, + 1E4783L, + 1E4784L, + 1E4785L, + 1E4786L, + 1E4787L, + 1E4788L, + 1E4789L, + 1E4790L, + 1E4791L, + 1E4792L, + 1E4793L, + 1E4794L, + 1E4795L, + 1E4796L, + 1E4797L, + 1E4798L, + 1E4799L, + 1E4800L, + 1E4801L, + 1E4802L, + 1E4803L, + 1E4804L, + 1E4805L, + 1E4806L, + 1E4807L, + 1E4808L, + 1E4809L, + 1E4810L, + 1E4811L, + 1E4812L, + 1E4813L, + 1E4814L, + 1E4815L, + 1E4816L, + 1E4817L, + 1E4818L, + 1E4819L, + 1E4820L, + 1E4821L, + 1E4822L, + 1E4823L, + 1E4824L, + 1E4825L, + 1E4826L, + 1E4827L, + 1E4828L, + 1E4829L, + 1E4830L, + 1E4831L, + 1E4832L, + 1E4833L, + 1E4834L, + 1E4835L, + 1E4836L, + 1E4837L, + 1E4838L, + 1E4839L, + 1E4840L, + 1E4841L, + 1E4842L, + 1E4843L, + 1E4844L, + 1E4845L, + 1E4846L, + 1E4847L, + 1E4848L, + 1E4849L, + 1E4850L, + 1E4851L, + 1E4852L, + 1E4853L, + 1E4854L, + 1E4855L, + 1E4856L, + 1E4857L, + 1E4858L, + 1E4859L, + 1E4860L, + 1E4861L, + 1E4862L, + 1E4863L, + 1E4864L, + 1E4865L, + 1E4866L, + 1E4867L, + 1E4868L, + 1E4869L, + 1E4870L, + 1E4871L, + 1E4872L, + 1E4873L, + 1E4874L, + 1E4875L, + 1E4876L, + 1E4877L, + 1E4878L, + 1E4879L, + 1E4880L, + 1E4881L, + 1E4882L, + 1E4883L, + 1E4884L, + 1E4885L, + 1E4886L, + 1E4887L, + 1E4888L, + 1E4889L, + 1E4890L, + 1E4891L, + 1E4892L, + 1E4893L, + 1E4894L, + 1E4895L, + 1E4896L, + 1E4897L, + 1E4898L, + 1E4899L, + 1E4900L, + 1E4901L, + 1E4902L, + 1E4903L, + 1E4904L, + 1E4905L, + 1E4906L, + 1E4907L, + 1E4908L, + 1E4909L, + 1E4910L, + 1E4911L, + 1E4912L, + 1E4913L, + 1E4914L, + 1E4915L, + 1E4916L, + 1E4917L, + 1E4918L, + 1E4919L, + 1E4920L, + 1E4921L, + 1E4922L, + 1E4923L, + 1E4924L, + 1E4925L, + 1E4926L, + 1E4927L, + 1E4928L, + 1E4929L, + 1E4930L, + 1E4931L, + 1E4932L, +}; + +Sftab_t _Sftable = +{ + { 1E1L, 1E2L, 1E4L, 1E8L, 1E16L, 1E32L }, + { 1E-1L, 1E-2L, 1E-4L, 1E-8L, 1E-16L, 1E-32L }, + { '0','0', '0','1', '0','2', '0','3', '0','4', + '0','5', '0','6', '0','7', '0','8', '0','9', + '1','0', '1','1', '1','2', '1','3', '1','4', + '1','5', '1','6', '1','7', '1','8', '1','9', + '2','0', '2','1', '2','2', '2','3', '2','4', + '2','5', '2','6', '2','7', '2','8', '2','9', + '3','0', '3','1', '3','2', '3','3', '3','4', + '3','5', '3','6', '3','7', '3','8', '3','9', + '4','0', '4','1', '4','2', '4','3', '4','4', + '4','5', '4','6', '4','7', '4','8', '4','9', + '5','0', '5','1', '5','2', '5','3', '5','4', + '5','5', '5','6', '5','7', '5','8', '5','9', + '6','0', '6','1', '6','2', '6','3', '6','4', + '6','5', '6','6', '6','7', '6','8', '6','9', + '7','0', '7','1', '7','2', '7','3', '7','4', + '7','5', '7','6', '7','7', '7','8', '7','9', + '8','0', '8','1', '8','2', '8','3', '8','4', + '8','5', '8','6', '8','7', '8','8', '8','9', + '9','0', '9','1', '9','2', '9','3', '9','4', + '9','5', '9','6', '9','7', '9','8', '9','9', + }, + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_", + sfcvinit, 0, + sffmtpos, + sffmtint, + (float*)&sf_flt_pow10[0], + (double*)&sf_dbl_pow10[0], + (_ast_fltmax_t*)&sf_ldbl_pow10[0], +}; +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/sfio b/usr/src/cmd/ast/libast/amd64/FEATURE/sfio new file mode 100644 index 0000000000..7cad3472b6 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/sfio @@ -0,0 +1,17 @@ +/* : : 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 ok */ +#define _hdr_float 1 /* #include ok */ +#define _hdr_floatingpoint 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _hdr_values 1 /* #include ok */ +#define _sys_filio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include 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 */ +#define _xopen_stdio 1 /* Stdio fseek/fflush are X/Open-compliant */ +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/sig b/usr/src/cmd/ast/libast/amd64/FEATURE/sig new file mode 100644 index 0000000000..03020573f3 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/sig @@ -0,0 +1,138 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 +#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/cmd/ast/libast/amd64/FEATURE/siglist b/usr/src/cmd/ast/libast/amd64/FEATURE/siglist new file mode 100644 index 0000000000..7ac817cdd9 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/siglist @@ -0,0 +1,131 @@ +/* : : 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 ok */ +#define _hdr_string 1 /* #include ok */ +#define _hdr_signal 1 /* #include ok */ +#define _lib_strsignal 1 /* strsignal() in default lib(s) */ +#if defined(SIGHUP) && !defined(HAD_SIGHUP) +0,"HUP",SIGHUP, +#endif +#if defined(SIGINT) && !defined(HAD_SIGINT) +0,"INT",SIGINT, +#endif +#if defined(SIGQUIT) && !defined(HAD_SIGQUIT) +0,"QUIT",SIGQUIT, +#endif +#if defined(SIGILL) && !defined(HAD_SIGILL) +0,"ILL",SIGILL, +#endif +#if defined(SIGTRAP) && !defined(HAD_SIGTRAP) +0,"TRAP",SIGTRAP, +#endif +#if defined(SIGIOT) && !defined(HAD_SIGIOT) +0,"IOT",SIGIOT, +#endif +#if defined(SIGEMT) && !defined(HAD_SIGEMT) +0,"EMT",SIGEMT, +#endif +#if defined(SIGFPE) && !defined(HAD_SIGFPE) +0,"FPE",SIGFPE, +#endif +#if defined(SIGKILL) && !defined(HAD_SIGKILL) +0,"KILL",SIGKILL, +#endif +#if defined(SIGBUS) && !defined(HAD_SIGBUS) +0,"BUS",SIGBUS, +#endif +#if defined(SIGSEGV) && !defined(HAD_SIGSEGV) +0,"SEGV",SIGSEGV, +#endif +#if defined(SIGSYS) && !defined(HAD_SIGSYS) +0,"SYS",SIGSYS, +#endif +#if defined(SIGPIPE) && !defined(HAD_SIGPIPE) +0,"PIPE",SIGPIPE, +#endif +#if defined(SIGALRM) && !defined(HAD_SIGALRM) +0,"ALRM",SIGALRM, +#endif +#if defined(SIGTERM) && !defined(HAD_SIGTERM) +0,"TERM",SIGTERM, +#endif +#if defined(SIGUSR1) && !defined(HAD_SIGUSR1) +0,"USR1",SIGUSR1, +#endif +#if defined(SIGUSR2) && !defined(HAD_SIGUSR2) +0,"USR2",SIGUSR2, +#endif +#if defined(SIGCHLD) && !defined(HAD_SIGCHLD) +0,"CHLD",SIGCHLD, +#endif +#if defined(SIGPWR) && !defined(HAD_SIGPWR) +0,"PWR",SIGPWR, +#endif +#if defined(SIGWINCH) && !defined(HAD_SIGWINCH) +0,"WINCH",SIGWINCH, +#endif +#if defined(SIGURG) && !defined(HAD_SIGURG) +0,"URG",SIGURG, +#endif +#if defined(SIGPOLL) && !defined(HAD_SIGPOLL) +0,"POLL",SIGPOLL, +#endif +#if defined(SIGSTOP) && !defined(HAD_SIGSTOP) +0,"STOP",SIGSTOP, +#endif +#if defined(SIGTSTP) && !defined(HAD_SIGTSTP) +0,"TSTP",SIGTSTP, +#endif +#if defined(SIGCONT) && !defined(HAD_SIGCONT) +0,"CONT",SIGCONT, +#endif +#if defined(SIGTTIN) && !defined(HAD_SIGTTIN) +0,"TTIN",SIGTTIN, +#endif +#if defined(SIGTTOU) && !defined(HAD_SIGTTOU) +0,"TTOU",SIGTTOU, +#endif +#if defined(SIGVTALRM) && !defined(HAD_SIGVTALRM) +0,"VTALRM",SIGVTALRM, +#endif +#if defined(SIGPROF) && !defined(HAD_SIGPROF) +0,"PROF",SIGPROF, +#endif +#if defined(SIGXCPU) && !defined(HAD_SIGXCPU) +0,"XCPU",SIGXCPU, +#endif +#if defined(SIGXFSZ) && !defined(HAD_SIGXFSZ) +0,"XFSZ",SIGXFSZ, +#endif +#if defined(SIGWAITING) && !defined(HAD_SIGWAITING) +0,"WAITING",SIGWAITING, +#endif +#if defined(SIGLWP) && !defined(HAD_SIGLWP) +0,"LWP",SIGLWP, +#endif +#if defined(SIGFREEZE) && !defined(HAD_SIGFREEZE) +0,"FREEZE",SIGFREEZE, +#endif +#if defined(SIGTHAW) && !defined(HAD_SIGTHAW) +0,"THAW",SIGTHAW, +#endif +#if defined(SIGCANCEL) && !defined(HAD_SIGCANCEL) +0,"CANCEL",SIGCANCEL, +#endif +#if defined(SIGLOST) && !defined(HAD_SIGLOST) +0,"LOST",SIGLOST, +#endif +#if defined(SIGXRES) && !defined(HAD_SIGXRES) +0,"XRES",SIGXRES, +#endif +#if defined(SIGJVM1) && !defined(HAD_SIGJVM1) +0,"JVM1",SIGJVM1, +#endif +#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/cmd/ast/libast/amd64/FEATURE/signal b/usr/src/cmd/ast/libast/amd64/FEATURE/signal new file mode 100644 index 0000000000..43b48f1dda --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/signal @@ -0,0 +1,225 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_signal_ast 1 +#define _sys_types 1 /* #include ok */ + +#define SIG_MAX 73 + +static const char* const sig_name[] = +{ + "0", + "HUP", + "INT", + "QUIT", + "ILL", + "TRAP", + "IOT", + "EMT", + "FPE", + "KILL", + "BUS", + "SEGV", + "SYS", + "PIPE", + "ALRM", + "TERM", + "USR1", + "USR2", + "CHLD", + "PWR", + "WINCH", + "URG", + "IO", + "STOP", + "TSTP", + "CONT", + "TTIN", + "TTOU", + "VTALRM", + "PROF", + "XCPU", + "XFSZ", + "WAITING", + "LWP", + "FREEZE", + "THAW", + "CANCEL", + "LOST", + "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", + "RTMAX", + 0 +}; + +static const char* const sig_text[] = +{ + "Signal 0", + "Hangup", + "Interrupt", + "Quit", + "Illegal instruction", + "Trace trap", + "IOT trap", + "EMT trap", + "Floating exception", + "Killed", + "Bus error", + "Memory fault", + "Bad system call", + "Broken pipe", + "Alarm call", + "Terminated", + "User signal 1", + "User signal 2", + "Child status change", + "Power fail", + "Window change", + "Urgent IO", + "IO possible", + "Stopped (signal)", + "Stopped", + "Stopped process continued", + "Stopped (tty input)", + "Stopped (tty output)", + "Virtual timer alarm", + "Profile timer alarm", + "CPU time limit", + "File size limit", + "All threads blocked", + "Thread event", + "CPR freeze", + "CPR thaw", + "Thread Cancellation", + "Resources lost", + "Resource Control Exceeded", + "Reserved for JVM 1", + "Reserved for JVM 2", + "Information Request", + "Realtime priority 0 (lo)", + "Realtime priority 1", + "Realtime priority 2", + "Realtime priority 3", + "Realtime priority 4", + "Realtime priority 5", + "Realtime priority 6", + "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 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 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/cmd/ast/libast/amd64/FEATURE/stdio b/usr/src/cmd/ast/libast/amd64/FEATURE/stdio new file mode 100644 index 0000000000..0694a40264 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/stdio @@ -0,0 +1,587 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 + +#include + +#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/cmd/ast/libast/amd64/FEATURE/sys b/usr/src/cmd/ast/libast/amd64/FEATURE/sys new file mode 100644 index 0000000000..c02852888c --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/sys @@ -0,0 +1,159 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 +#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 +#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 !_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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include 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 ok */ +#define _hdr_wchar 1 /* #include 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 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__ 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)); +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 +#else +#include +#endif +#endif + +#endif 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 ok */ +#define _lib_sysgetcwd 1 /* syscall(SYS_getcwd,buf,len) implemented */ +#include + +#define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b) + +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/time b/usr/src/cmd/ast/libast/amd64/FEATURE/time new file mode 100644 index 0000000000..fba3ba062b --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/time @@ -0,0 +1,83 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */ +#define _lib_usleep 1 /* usleep() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _typ_clock_t 1 /* clock_t is a type */ +#define _typ_time_t 1 /* time_t is a type */ +#include + +#include + +#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK) +#define CLOCKS_PER_SEC CLK_TCK +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/tmlib b/usr/src/cmd/ast/libast/amd64/FEATURE/tmlib new file mode 100644 index 0000000000..6162b62ea8 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/tmlib @@ -0,0 +1,71 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_tmlib_ast 1 +#define _sys_types 1 /* #include ok */ +#define _tzset_environ 1 /* tzset() bypasses user getenv() */ +#define tmlocaltime(p) _tm_localtime(p) + +extern __MANGLE__ struct tm* _tm_localtime __PROTO__((const time_t*)); + +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/tmx b/usr/src/cmd/ast/libast/amd64/FEATURE/tmx new file mode 100644 index 0000000000..6ad4804a4b --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/tmx @@ -0,0 +1,130 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 +#include + +#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/cmd/ast/libast/amd64/FEATURE/tty b/usr/src/cmd/ast/libast/amd64/FEATURE/tty new file mode 100644 index 0000000000..1d39c122ed --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/tty @@ -0,0 +1,134 @@ +/* : : 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 ok */ +#define _hdr_termios 1 /* #include ok */ +#define _hdr_termio 1 /* #include ok */ +#define _hdr_sgtty 1 /* #include ok */ +#define _sys_termios 1 /* #include ok */ +#define _sys_termio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include 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 +#else +# if defined(_sys_termios) && defined(_lib_tcgetattr) +# include +# 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 +# else +# ifdef _sys_termio +# include +# 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 +# endif /* _sys_bsdtty */ +# else +# ifdef _hdr_sgtty +# include +# ifndef LPENDIN +# ifdef _sys_nttyio +# include +# 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 +# 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/cmd/ast/libast/amd64/FEATURE/tv b/usr/src/cmd/ast/libast/amd64/FEATURE/tv new file mode 100644 index 0000000000..0caab4a20a --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/tv @@ -0,0 +1,111 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 + +#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/cmd/ast/libast/amd64/FEATURE/tvlib b/usr/src/cmd/ast/libast/amd64/FEATURE/tvlib new file mode 100644 index 0000000000..3121038298 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/tvlib @@ -0,0 +1,19 @@ +/* : : 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 ok */ +#define _hdr_time 1 /* #include ok */ +#define _lib_clock_settime 1 /* clock_settime() in default lib(s) */ +#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */ +#define _lib_settimeofday 1 /* settimeofday() in default lib(s) */ +#define _lib_stime 1 /* stime() in default lib(s) */ +#define _lib_utimes 1 /* utimes() in default lib(s) */ +#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */ +#define _lib_usleep 1 /* usleep() in default lib(s) */ +#define _sys_stat 1 /* #include ok */ +#define _lib_utimensat 1 /* complete utimensat implementation */ +#define _sys_time 1 /* #include ok */ +#define _lib_clock_gettime 1 /* execute{\ passed */ +#define tmgettimeofday(p) gettimeofday(p,(struct timezone*)0) +#define tmsettimeofday(p) settimeofday(p,(struct timezone*)0) +#endif 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 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/cmd/ast/libast/amd64/FEATURE/vfork b/usr/src/cmd/ast/libast/amd64/FEATURE/vfork new file mode 100644 index 0000000000..b555d25c80 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/vfork @@ -0,0 +1,68 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +extern __MANGLE__ pid_t vfork(void) __attribute__((__returns_twice__)); +#pragma unknown_control_flow(vfork) +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/vmalloc b/usr/src/cmd/ast/libast/amd64/FEATURE/vmalloc new file mode 100644 index 0000000000..0be84333de --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/vmalloc @@ -0,0 +1,36 @@ +/* : : 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 ok */ +#define _lib_atexit 1 /* atexit() in default lib(s) */ +#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */ +#define _lib_memalign 1 /* memalign() in default lib(s) */ +#define _lib_strdup 1 /* strdup() in default lib(s) */ +#define _lib_valloc 1 /* valloc() in default lib(s) */ +#define _hdr_alloca 1 /* #include ok */ +#define _hdr_malloc 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _mem_arena_mallinfo 1 /* arena is a member of struct mallinfo */ +#define _sys_stat 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _typ_ssize_t 1 /* ssize_t is a type */ +#define _mem_sbrk 1 /* brk()/sbrk() work as expected */ +#define _lib_alloca 1 /* alloca exists */ +#define _stk_down 1 /* stack grows downward */ +#include "FEATURE/mmap" +#if _BLD_INSTRUMENT || cray || _UWIN && _BLD_ast +#undef _map_malloc +#define _std_malloc 1 /* defer to standard malloc */ +#endif +#if _mmap_anon +#define _mem_mmap_anon 1 +#endif +#if _mmap_devzero +#define _mem_mmap_zero 1 +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/wait b/usr/src/cmd/ast/libast/amd64/FEATURE/wait new file mode 100644 index 0000000000..36ae8feef1 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/wait @@ -0,0 +1,11 @@ +/* : : 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 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 ok */ +#define _ok_wif 1 /* posix wait macros ok */ +#endif diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/wchar b/usr/src/cmd/ast/libast/amd64/FEATURE/wchar new file mode 100644 index 0000000000..2616f8f168 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/FEATURE/wchar @@ -0,0 +1,198 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 _sys_types 1 /* #include ok */ +#ifndef _AST_WCHAR_H +#define _AST_WCHAR_H 1 + +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _hdr_wchar 1 /* #include 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 ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _typ_mbstate_t 1 /* mbstate_t is a type */ +#define _nxt_wchar <../include/wchar.h> /* include path for the native */ +#define _nxt_wchar_str "../include/wchar.h" /* include string for the native */ +#ifndef _SFSTDIO_H +#include +#include +#endif + +#define _hdr_unistd 1 /* #include ok */ +#include /* includes */ + +#if _hdr_wchar && defined(_nxt_wchar) +#include <../include/wchar.h> /* the native wchar.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__ + +#else + +/* on some systems 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 ok */ +#define _nxt_wctype <../include/wctype.h> /* include path for the native */ +#define _nxt_wctype_str "../include/wctype.h" /* include string for the native */ +#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/cmd/ast/libast/amd64/Makefile b/usr/src/cmd/ast/libast/amd64/Makefile new file mode 100644 index 0000000000..89fcdb081b --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/Makefile @@ -0,0 +1,43 @@ +# +# 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. +# + +# Platform-specific config +# Note that "HOSTTYPE" matches the value used by AT&T upstream. +ASTPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"' + +# platform-specific sources +OBJECTS= conftab.o lctab.o + +include ../Makefile.com +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) +amd64_C_PICFLAGS = $(C_BIGPICFLAGS) + +install: all $(ROOTLIBS64) $(ROOTLINKS64) 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 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/cmd/ast/libast/amd64/conftab.c b/usr/src/cmd/ast/libast/amd64/conftab.c new file mode 100644 index 0000000000..f1a50aeb07 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/conftab.c @@ -0,0 +1,393 @@ +#include "FEATURE/standards" +#include "FEATURE/common" +#include +#include +#include +#if !defined(SYS_NMLEN) +#define SYS_NMLEN 9 +#endif +#include +#include "FEATURE/param" +#include "conftab.h" + +/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */ + +/* + * prefix strings -- the first few are indexed by Conf_t.standard + */ + +const Prefix_t prefix[] = +{ + "C", 1, CONF_C, -1, + "POSIX", 5, CONF_POSIX, -1, + "SVID", 4, CONF_SVID, -1, + "XOPEN", 5, CONF_XOPEN, -1, + "SUN", 3, CONF_SUN, -1, + "XBS5", 4, CONF_XBS5, -1, + "SCO", 3, CONF_SCO, -1, + "AST", 3, CONF_AST, -1, + "AES", 3, CONF_AES, -1, + "XPG", 3, CONF_XPG, -1, + "GNU", 3, CONF_GNU, -1, + "TRUSTEDBSD", 10, CONF_TRUSTEDBSD, -1, + "XX", 2, CONF_POSIX, CONF_nop, + "CS", 2, CONF_POSIX, CONF_confstr, + "PC", 2, CONF_POSIX, CONF_pathconf, + "SC", 2, CONF_POSIX, CONF_sysconf, + "SI", 2, CONF_SVID, CONF_sysinfo, +}; + +const int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]); + +/* + * conf strings sorted in ascending order + */ + +const Conf_t conf[] = +{ +{ "ABI_AIO_XFER_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ABI_ASYNCHRONOUS_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ABI_ASYNC_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ADVISORY_INFO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_ADVISORY_INFO }, +{ "AIO_LISTIO_MAX", { 0UL, 0 }, { _POSIX_AIO_LISTIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_LISTIO_MAX }, +{ "AIO_MAX", { 0UL, 0 }, { _POSIX_AIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_MAX }, +{ "AIO_PRIO_DELTA_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_PRIO_DELTA_MAX }, +{ "ALLOC_SIZE_MIN", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_ALLOC_SIZE_MIN }, +{ "ARCHITECTURE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_ARCHITECTURE }, +{ "ARG_MAX", { 0UL, 0 }, { _POSIX_ARG_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_ARG_MAX }, +{ "ASYNCHRONOUS_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_ASYNCHRONOUS_IO }, +{ "ASYNC_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_ASYNC_IO }, +{ "ATEXIT_MAX", { 0UL, 0 }, { 32UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_XOPEN, 1, CONF_sysconf, _SC_ATEXIT_MAX }, +{ "AUDIT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "AVAIL_PROCESSORS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "AVPHYS_PAGES", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SUN, 1, CONF_sysconf, _SC_AVPHYS_PAGES }, +{ "BARRIERS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_BARRIERS }, +{ "BC_BASE_MAX", { 0UL, 0 }, { _POSIX2_BC_BASE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_BASE_MAX }, +{ "BC_DIM_MAX", { 0UL, 0 }, { _POSIX2_BC_DIM_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_DIM_MAX }, +{ "BC_SCALE_MAX", { 0UL, 0 }, { _POSIX2_BC_SCALE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_SCALE_MAX }, +{ "BC_STRING_MAX", { 0UL, 0 }, { _POSIX2_BC_STRING_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_STRING_MAX }, +{ "BUSTYPES", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "CHARCLASS_NAME_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "CHAR_BIT", { 8UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_MAX", { 127UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_MIN", { -127L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_TERM", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_CHAR_TERM }, +{ "CHILD_MAX", { 0UL, 0 }, { _POSIX_CHILD_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_CHILD_MAX }, +{ "CHOWN_RESTRICTED", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_CHOWN_RESTRICTED }, +{ "CKPT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "CLK_TCK", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_POSIX, 1, CONF_sysconf, _SC_CLK_TCK }, +{ "CLOCKRES_MIN", { 0UL, 0 }, { _POSIX_CLOCKRES_MIN, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "CLOCKS_PER_SEC", { 1000000UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_LIMIT|CONF_LIMIT_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CLOCK_SELECTION", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_CLOCK_SELECTION }, +{ "COLL_WEIGHTS_MAX", { 0UL, 0 }, { _POSIX2_COLL_WEIGHTS_MAX, 0 }, CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_COLL_WEIGHTS_MAX }, +{ "CPUTIME", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_CPUTIME }, +{ "CPU_KEYBITS1", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CPU_VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CRYPT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_CRYPT }, +{ "C_BIND", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_BIND }, +{ "C_DEV", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_DEV }, +{ "C_VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_VERSION }, +{ "DATAKEYS_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "DELAYTIMER_MAX", { 0UL, 0 }, { _POSIX_DELAYTIMER_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_DELAYTIMER_MAX }, +{ "ENH_I18N", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_ENH_I18N }, +{ "EQUIV_CLASS_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "EXEC_INTERPRETER_LENGTH", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "EXPR_NEST_MAX", { 0UL, 0 }, { _POSIX2_EXPR_NEST_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_EXPR_NEST_MAX }, +{ "FCHR_MAX", { 0UL, 0 }, { LONG_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "FILESIZEBITS", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_FILESIZEBITS }, +{ "FILE_LOCKING", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "FORT_DEV", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_FORT_DEV }, +{ "FORT_RUN", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_FORT_RUN }, +{ "FSYNC", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_FSYNC }, +{ "GETGR_R_SIZE_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_sysconf, _SC_GETGR_R_SIZE_MAX }, +{ "GETPW_R_SIZE_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_sysconf, _SC_GETPW_R_SIZE_MAX }, +{ "HOSTID", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "HOSTNAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_HOSTNAME }, +{ "HOST_NAME_MAX", { 0UL, 0 }, { _POSIX_HOST_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_HOST_NAME_MAX }, +{ "HW_PROVIDER", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_HW_PROVIDER }, +{ "HW_SERIAL", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ILP32_OFF32", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "ILP32_OFF32_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "ILP32_OFFBIG_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "INITTAB_NAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "INT_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "INT_MIN", { -2147483647L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "IOV_MAX", { 0UL, 0 }, { _XOPEN_IOV_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_XOPEN, 1, CONF_sysconf, _SC_IOV_MAX }, +{ "IO_TYPE", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "IPV6", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_IPV6 }, +{ "IP_SECOPTS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "JOB_CONTROL", { 0UL, 0 }, { 1UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_JOB_CONTROL }, +{ "KERNEL_CLIST", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_CLIST_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DISK", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DISK_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DMABUF", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DMABUF_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FILE", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FILE_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FLCKREC", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FLCKREC_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_INODE", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_INODE_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_MOUNT", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_MOUNT_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PINODE", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PINODE_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PROC", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PROC_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_REGION", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_REGION_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_S5INODE", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_S5INODE_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_STAMP", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "KERN_POINTERS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "KERN_SIM", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "LEGACY", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "LFS64_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_CFLAGS }, +{ "LFS64_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LDFLAGS }, +{ "LFS64_LIBS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LIBS }, +{ "LFS64_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LINTFLAGS }, +{ "LFS_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_CFLAGS }, +{ "LFS_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LDFLAGS }, +{ "LFS_LIBS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LIBS }, +{ "LFS_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LINTFLAGS }, +{ "LINE_MAX", { 0UL, 0 }, { _POSIX2_LINE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_LINE_MAX }, +{ "LINK_MAX", { 0UL, 0 }, { _POSIX_LINK_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_LINK_MAX }, +{ "LLONG_MAX", { 9223372036854775807UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LLONG_MIN", { -9223372036854775807L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LOCALEDEF", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_LOCALEDEF }, +{ "LOGIN_NAME_MAX", { 0UL, 0 }, { _POSIX_LOGIN_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_LOGIN_NAME_MAX }, +{ "LOGNAME_MAX", { 0UL, 0 }, { 8UL, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, _SC_LOGNAME_MAX }, +{ "LONG_BIT", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "LONG_MAX", { 2147483647UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LONG_MIN", { -2147483647L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LP64_OFF64", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "LP64_OFF64_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "LPBIG_OFFBIG_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "MACHINE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_MACHINE }, +{ "MAPPED_FILES", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MAPPED_FILES }, +{ "MAX_CANON", { 0UL, 0 }, { _POSIX_MAX_CANON, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_MAX_CANON }, +{ "MAX_INPUT", { 0UL, 0 }, { _POSIX_MAX_INPUT, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_MAX_INPUT }, +{ "MB_LEN_MAX", { 5UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "MCAS_OFFSET", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MEMLOCK", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMLOCK }, +{ "MEMLOCK_RANGE", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMLOCK_RANGE }, +{ "MEMORY_PROTECTION", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMORY_PROTECTION }, +{ "MESSAGE_PASSING", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MESSAGE_PASSING }, +{ "MMAP_FIXED_ALIGNMENT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MONOTONIC_CLOCK", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MONOTONIC_CLOCK }, +{ "MQ_OPEN_MAX", { 0UL, 0 }, { _POSIX_MQ_OPEN_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_MQ_OPEN_MAX }, +{ "MQ_PRIO_MAX", { 0UL, 0 }, { _POSIX_MQ_PRIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_MQ_PRIO_MAX }, +{ "MSEM_LOCKID", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MULTI_PROCESS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "NACLS_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "NAME_MAX", { 0UL, 0 }, { _POSIX_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_NAME_MAX }, +{ "NGROUPS_MAX", { 0UL, 0 }, { _POSIX_NGROUPS_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_NGROUPS_MAX }, +{ "NL_ARGMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_LANGMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NL_MSGMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_NMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_SETMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_SPECMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NL_TEXTMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NO_TRUNC", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_NO_TRUNC }, +{ "NPROCESSORS_CONF", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_CONF }, +{ "NPROCESSORS_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_MAX }, +{ "NPROCESSORS_ONLN", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_ONLN }, +{ "NPROC_CONF", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NPROC_ONLN", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NSS_BUFLEN_GROUP", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NSS_BUFLEN_PASSWD", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NUM_PROCESSORS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NZERO", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "OPEN_MAX", { 0UL, 0 }, { _POSIX_OPEN_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_OPEN_MAX }, +{ "OPEN_MAX_CEIL", { OPEN_MAX, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_AST, 1, CONF_nop, -1 }, +{ "OSREL_MAJ", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OSREL_MIN", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OSREL_PATCH", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OS_BASE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "OS_PROVIDER", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "OS_VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE, CONF_AES, 1, CONF_sysconf, -1 }, +{ "PAGESIZE", { 0UL, 0 }, { 4096UL, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_PAGESIZE }, +{ "PAGE_SIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_MINMAX|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, _SC_PAGE_SIZE }, +{ "PASS_MAX", { 0UL, 0 }, { 8UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, _SC_PASS_MAX }, +{ "PATH", { 0, 0 }, { 0, "/bin:/usr/bin" }, CONF_DEFER_CALL|CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_confstr, _CS_PATH }, +{ "PATH_MAX", { 0UL, 0 }, { _POSIX_PATH_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_PATH_MAX }, +{ "PBS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS }, +{ "PBS_ACCOUNTING", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_ACCOUNTING }, +{ "PBS_CHECKPOINT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_CHECKPOINT }, +{ "PBS_LOCATE", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_LOCATE }, +{ "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 }, { 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 }, +{ "PII_INTERNET_STREAM", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_CLTS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_COTS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_M", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_SOCKET", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_XTI", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PIPE_BUF", { 0UL, 0 }, { _POSIX_PIPE_BUF, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_PIPE_BUF }, +{ "POLL", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PRIORITIZED_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_PRIORITIZED_IO }, +{ "PRIORITY_SCHEDULING", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_PRIORITY_SCHEDULING }, +{ "PRIO_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_PRIO_IO }, +{ "PROC_RSRC_MGR", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_DESTRUCTOR_ITERATIONS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_KEYS_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_STACK_MIN", { 4096UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_LIMIT|CONF_LIMIT_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_THREADS_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTRDIFF_MAX", { 9223372036854775807UL, 0 }, { 65535UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "PTRDIFF_MIN", { -9223372036854775807L-1L, 0 }, { -65535L, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "RAW_SOCKETS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_RAW_SOCKETS }, +{ "READER_WRITER_LOCKS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_READER_WRITER_LOCKS }, +{ "REALTIME", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "REALTIME_SIGNALS", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_REALTIME_SIGNALS }, +{ "REALTIME_THREADS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "REC_INCR_XFER_SIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_INCR_XFER_SIZE }, +{ "REC_MAX_XFER_SIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_MAX_XFER_SIZE }, +{ "REC_MIN_XFER_SIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_MIN_XFER_SIZE }, +{ "REC_XFER_ALIGN", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_XFER_ALIGN }, +{ "REENTRANT_FUNCTIONS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "REGEXP", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_REGEXP }, +{ "REGEX_VERSION", { 0UL, 0 }, { 20030916UL, 0 }, CONF_FEATURE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "RELEASE", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_AST, 1, CONF_nop, -1 }, +{ "RESOURCE_LIMITS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "RE_DUP_MAX", { 0UL, 0 }, { _POSIX2_RE_DUP_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_RE_DUP_MAX }, +{ "RTSIG_MAX", { 0UL, 0 }, { _POSIX_RTSIG_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_RTSIG_MAX }, +{ "SAVED_IDS", { 0UL, 0 }, { 1UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SAVED_IDS }, +{ "SCHAR_MAX", { 127UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SCHAR_MIN", { -127L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SECURITY_CLASS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SELECT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "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 }, +{ "SHM", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_SHM }, +{ "SHRT_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "SHRT_MIN", { -32767L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIGQUEUE_MAX", { 0UL, 0 }, { _POSIX_SIGQUEUE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SIGQUEUE_MAX }, +{ "SIGRT_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_SIGRT_MAX }, +{ "SIGRT_MIN", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_SIGRT_MIN }, +{ "SIG_ATOMIC_MAX", { 2147483647UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIG_ATOMIC_MIN", { -2147483647L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIZE_MAX", { UINT_MAX, 0 }, { 65535UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SLVM_MAXNODES", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SOCK_MAXBUF", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SOFTPOWER", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SPAWN", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPAWN }, +{ "SPIN_LOCKS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPIN_LOCKS }, +{ "SPORADIC_SERVER", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPORADIC_SERVER }, +{ "SRPC_DOMAIN", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SSIZE_MAX", { INT_MAX, 0 }, { _POSIX_SSIZE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SS_REPL_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SS_REPL_MAX }, +{ "STD_BLK", { 0UL, 0 }, { 1024UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "STREAMS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_STREAMS }, +{ "STREAM_MAX", { 0UL, 0 }, { _POSIX_STREAM_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_STREAM_MAX }, +{ "SW_DEV", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_SW_DEV }, +{ "SYMLINKS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_pathconf, _PC_2_SYMLINKS }, +{ "SYMLINK_MAX", { 0UL, 0 }, { _POSIX_SYMLINK_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_SYMLINK_MAX }, +{ "SYMLOOP_MAX", { 0UL, 0 }, { _POSIX_SYMLOOP_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SYMLOOP_MAX }, +{ "SYNCHRONIZED_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SYNCHRONIZED_IO }, +{ "SYNC_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_SYNC_IO }, +{ "SYSNAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_SYSNAME }, +{ "SYSPID_MAX", { 0UL, 0 }, { 2UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "THREADS", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREADS }, +{ "THREADS_PRIO_CEILING", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "THREADS_PRIO_INHERIT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "THREAD_ATTR_STACKADDR", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_ATTR_STACKADDR }, +{ "THREAD_ATTR_STACKSIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_ATTR_STACKSIZE }, +{ "THREAD_CPUTIME", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_CPUTIME }, +{ "THREAD_DESTRUCTOR_ITERATIONS", { 0UL, 0 }, { _POSIX_THREAD_DESTRUCTOR_ITERATIONS, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_DESTRUCTOR_ITERATIONS }, +{ "THREAD_KEYS_MAX", { 0UL, 0 }, { _POSIX_THREAD_KEYS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_KEYS_MAX }, +{ "THREAD_PRIORITY_SCHEDULING", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIORITY_SCHEDULING }, +{ "THREAD_PRIO_INHERIT", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIO_INHERIT }, +{ "THREAD_PRIO_PROTECT", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIO_PROTECT }, +{ "THREAD_PROCESS_SHARED", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PROCESS_SHARED }, +{ "THREAD_SAFE_FUNCTIONS", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_SAFE_FUNCTIONS }, +{ "THREAD_SPORADIC_SERVER", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_SPORADIC_SERVER }, +{ "THREAD_STACK_MIN", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_STACK_MIN }, +{ "THREAD_THREADS_MAX", { 0UL, 0 }, { _POSIX_THREAD_THREADS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_THREADS_MAX }, +{ "TIMEOUTS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TIMEOUTS }, +{ "TIMERS", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TIMERS }, +{ "TIMER_MAX", { 0UL, 0 }, { _POSIX_TIMER_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TIMER_MAX }, +{ "TMP", { 0, 0 }, { 0, "/tmp" }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_AST, 1, CONF_confstr, -1 }, +{ "TMP_MAX", { 17576UL, 0 }, { 10000UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_sysconf, -1 }, +{ "TRACE", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE }, +{ "TRACE_EVENT_FILTER", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_EVENT_FILTER }, +{ "TRACE_EVENT_NAME_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_EVENT_NAME_MAX }, +{ "TRACE_INHERIT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_INHERIT }, +{ "TRACE_LOG", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_LOG }, +{ "TRACE_NAME_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_NAME_MAX }, +{ "TRACE_SYS_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_SYS_MAX }, +{ "TRACE_USER_EVENT_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_USER_EVENT_MAX }, +{ "TTY_NAME_MAX", { 0UL, 0 }, { _POSIX_TTY_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TTY_NAME_MAX }, +{ "TYPED_MEMORY_OBJECTS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TYPED_MEMORY_OBJECTS }, +{ "TZNAME_MAX", { 0UL, 0 }, { _POSIX_TZNAME_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TZNAME_MAX }, +{ "T_IOV_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_C, 1, CONF_sysconf, _SC_T_IOV_MAX }, +{ "UCHAR_MAX", { 255UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "UCHAR_MIN", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "UID_MAX", { 0UL, 0 }, { 60002UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "UINT_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "UIO_MAXIOV", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ULLONG_MAX", { 18446744073709551615UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "ULONG_MAX", { 4294967295UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "UNIX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_UNIX }, +{ "UPE", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_UPE }, +{ "USER_LIMIT", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "USHRT_MAX", { 65535UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "V6_ILP32_OFF32", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_ILP32_OFF32 }, +{ "V6_ILP32_OFFBIG", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_ILP32_OFFBIG }, +{ "V6_LP64_OFF64", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_LP64_OFF64 }, +{ "V6_LPBIG_OFFBIG", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_LPBIG_OFFBIG }, +{ "VDISABLE", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_VDISABLE }, +{ "VERSION", { 0, 0 }, { 0, 0 }, CONF_PREFIXED|CONF_STANDARD|CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "VERSION", { 0UL, 0 }, { 200112UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION", { 0UL, 0 }, { 200112UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, -1 }, +{ "VERSION", { 0UL, 0 }, { 600UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_VERSION }, +{ "VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XPG, 3, CONF_sysconf, -1 }, +{ "VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XPG, 4, CONF_sysconf, -1 }, +{ "VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_MINMAX|CONF_PREFIXED|CONF_STANDARD, CONF_AST, 1, CONF_nop, -1 }, +{ "VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIXED|CONF_STANDARD, CONF_GNU, 1, CONF_nop, -1 }, +{ "VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIXED|CONF_STANDARD, CONF_TRUSTEDBSD, 1, CONF_nop, -1 }, +{ "VERSION_88", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_88", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "VERSION_90", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_90", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "VERSION_93", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_93", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "WCHAR_MAX", { 2147483647UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WCHAR_MIN", { -2147483647L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WINT_MAX", { 2147483647UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WINT_MIN", { -2147483647L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WORD_BIT", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XCU_VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_XCU_VERSION }, +{ "XPG2", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XPG3", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XPG4", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +}; + +const int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]); diff --git a/usr/src/cmd/ast/libast/amd64/conftab.h b/usr/src/cmd/ast/libast/amd64/conftab.h new file mode 100644 index 0000000000..a15714e8cb --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/conftab.h @@ -0,0 +1,94 @@ +#ifndef _CONFTAB_H +#define _CONFTAB_H + +#if !defined(SYS_NMLEN) +#define SYS_NMLEN 9 +#endif +#include + +/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */ + +#if !defined(const) && !defined(__STDC__) && !defined(__cplusplus) && !defined(c_plusplus) +#define const +#endif + +#define conf _ast_conf_data +#define conf_elements _ast_conf_ndata + +#define prefix _ast_conf_prefix +#define prefix_elements _ast_conf_nprefix + +#define CONF_nop 0 +#define CONF_confstr 1 +#define CONF_pathconf 2 +#define CONF_sysconf 3 +#define CONF_sysinfo 4 + +#define CONF_C 0 +#define CONF_POSIX 1 +#define CONF_SVID 2 +#define CONF_XOPEN 3 +#define CONF_SUN 4 +#define CONF_XBS5 5 +#define CONF_SCO 6 +#define CONF_AST 7 +#define CONF_AES 8 +#define CONF_XPG 9 +#define CONF_GNU 10 +#define CONF_TRUSTEDBSD 11 +#define CONF_call 12 + +#define _pth_getconf "/usr/bin/getconf" +#define _pth_getconf_a "-a" + +#define CONF_DEFER_CALL 0x0001 +#define CONF_DEFER_MM 0x0002 +#define CONF_FEATURE 0x0004 +#define CONF_LIMIT 0x0008 +#define CONF_LIMIT_DEF 0x0010 +#define CONF_MINMAX 0x0020 +#define CONF_MINMAX_DEF 0x0040 +#define CONF_NOSECTION 0x0080 +#define CONF_NOUNDERSCORE 0x0100 +#define CONF_PREFIX_ONLY 0x0200 +#define CONF_PREFIXED 0x0400 +#define CONF_STANDARD 0x0800 +#define CONF_STRING 0x1000 +#define CONF_UNDERSCORE 0x2000 +#define CONF_USER 0x4000 + +struct Conf_s; typedef struct Conf_s Conf_t; + +typedef struct Value_s +{ + intmax_t number; + const char* string; +} Value_t; + +struct Conf_s +{ + const char name[32]; + Value_t limit; + Value_t minmax; + unsigned int flags; + short standard; + short section; + short call; + short op; +}; + +typedef struct Prefix_s +{ + const char name[16]; + short length; + short standard; + short call; +} Prefix_t; + +extern const Conf_t conf[]; +extern const int conf_elements; + +extern const Prefix_t prefix[]; +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 + +#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/cmd/ast/libast/amd64/lctab.c b/usr/src/cmd/ast/libast/amd64/lctab.c new file mode 100644 index 0000000000..2afc20e2b5 --- /dev/null +++ b/usr/src/cmd/ast/libast/amd64/lctab.c @@ -0,0 +1,2635 @@ +/* : : generated by cmd/ast/tools/lcgen : : */ + +#include "lclib.h" +#include "lclang.h" + + +const Lc_attribute_t attribute_es[] = +{ +{"traditional",LC_default, +#ifdef SUBLANG_SPANISH_TRADITIONAL +SUBLANG_SPANISH_TRADITIONAL, +#else +0, +#endif + +}, +{"modern",0, +#ifdef SUBLANG_SPANISH_MODERN +SUBLANG_SPANISH_MODERN, +#else +0, +#endif + +}, +}; + +const Lc_charset_t lc_charsets[] = +{ +{"iso8859-1","latin1|west-europe","1252",}, +{"iso8859-2","latin2|east-europe","1250",}, +{"iso8859-3","latin3|south-europe","1257",}, +{"iso8859-4","latin4|north-europe",0}, +{"iso8859-5","cyrillic","1251",}, +{"iso8859-6","arabic","1256",}, +{"iso8859-7","greek","1253",}, +{"iso8859-8","hebrew","1255",}, +{"iso8859-9","latin5|turkish","1254",}, +{"iso8859-10","latin6|nordic",0}, +{"iso8859-13","latin7",0}, +{"iso8859-14","latin8|celtic",0}, +{"iso8859-15","latin0",0}, +{"iso2022","japanese|korean",0}, +{"iso4873","japanese-ascii|korean-ascii",0}, +{"koi8-r","russian",0}, +{"utf8","plan9",0}, + 0 +}; + +const Lc_language_t lc_languages[] = +{ +{"C","C","POSIX",&lc_charsets[0],LC_default,0,0,0,}, +{"debug","debug",0,&lc_charsets[0],LC_debug,0,0,0,}, +{"aa","afar",0,&lc_charsets[0],0, +#ifdef LANG_AFAR +LANG_AFAR, +#else +0, +#endif +0,0, +}, +{"ab","abkhazian",0,&lc_charsets[0],0, +#ifdef LANG_ABKHAZIAN +LANG_ABKHAZIAN, +#else +0, +#endif +0,0, +}, +{"af","afrikaans","afr",&lc_charsets[0],0, +#ifdef LANG_AFRIKAANS +LANG_AFRIKAANS, +#else +0, +#endif +0,0, +}, +{"am","amharic",0,&lc_charsets[0],0, +#ifdef LANG_AMHARIC +LANG_AMHARIC, +#else +0, +#endif +0,0, +}, +{"ar","arabic","ara",&lc_charsets[5],0, +#ifdef LANG_ARABIC +LANG_ARABIC, +#else +0, +#endif +0,0, +}, +{"as","assamese",0,&lc_charsets[0],0, +#ifdef LANG_ASSAMESE +LANG_ASSAMESE, +#else +0, +#endif +0,0, +}, +{"ay","aymara",0,&lc_charsets[0],0, +#ifdef LANG_AYMARA +LANG_AYMARA, +#else +0, +#endif +0,0, +}, +{"az","azerbaijani",0,&lc_charsets[0],0, +#ifdef LANG_AZERBAIJANI +LANG_AZERBAIJANI, +#else +0, +#endif +0,0, +}, +{"ba","bashkir",0,&lc_charsets[0],0, +#ifdef LANG_BASHKIR +LANG_BASHKIR, +#else +0, +#endif +0,0, +}, +{"be","belarusian","bel",&lc_charsets[0],0, +#ifdef LANG_BELARUSIAN +LANG_BELARUSIAN, +#else +0, +#endif +0,0, +}, +{"bg","bulgarian","bul",&lc_charsets[4],0, +#ifdef LANG_BULGARIAN +LANG_BULGARIAN, +#else +0, +#endif +0,0, +}, +{"bh","bihari",0,&lc_charsets[0],0, +#ifdef LANG_BIHARI +LANG_BIHARI, +#else +0, +#endif +0,0, +}, +{"bi","bislama",0,&lc_charsets[0],0, +#ifdef LANG_BISLAMA +LANG_BISLAMA, +#else +0, +#endif +0,0, +}, +{"bn","bengali-bangla",0,&lc_charsets[0],0, +#ifdef LANG_BENGALI_BANGLA +LANG_BENGALI_BANGLA, +#else +0, +#endif +0,0, +}, +{"bo","tibetan",0,&lc_charsets[0],0, +#ifdef LANG_TIBETAN +LANG_TIBETAN, +#else +0, +#endif +0,0, +}, +{"br","breton",0,&lc_charsets[0],0, +#ifdef LANG_BRETON +LANG_BRETON, +#else +0, +#endif +0,0, +}, +{"ca","catalan","cat",&lc_charsets[0],0, +#ifdef LANG_CATALAN +LANG_CATALAN, +#else +0, +#endif +0,0, +}, +{"co","corsican",0,&lc_charsets[0],0, +#ifdef LANG_CORSICAN +LANG_CORSICAN, +#else +0, +#endif +0,0, +}, +{"cs","czech","ces|cze",&lc_charsets[1],0, +#ifdef LANG_CZECH +LANG_CZECH, +#else +0, +#endif +0,0, +}, +{"cy","welsh",0,&lc_charsets[0],0, +#ifdef LANG_WELSH +LANG_WELSH, +#else +0, +#endif +0,0, +}, +{"da","danish","dan",&lc_charsets[0],0, +#ifdef LANG_DANISH +LANG_DANISH, +#else +0, +#endif +0,0, +}, +{"de","german","deu|ger",&lc_charsets[0],0, +#ifdef LANG_GERMAN +LANG_GERMAN, +#else +0, +#endif +0,0, +}, +{"dz","bhutani",0,&lc_charsets[0],0, +#ifdef LANG_BHUTANI +LANG_BHUTANI, +#else +0, +#endif +0,0, +}, +{"el","greek","ell|gre",&lc_charsets[6],0, +#ifdef LANG_GREEK +LANG_GREEK, +#else +0, +#endif +0,0, +}, +{"en","english","eng",&lc_charsets[0],0, +#ifdef LANG_ENGLISH +LANG_ENGLISH, +#else +0, +#endif +0,0, +}, +{"eo","esperanto",0,&lc_charsets[0],0, +#ifdef LANG_ESPERANTO +LANG_ESPERANTO, +#else +0, +#endif +0,0, +}, +{"es","spanish","spa",&lc_charsets[0],0, +#ifdef LANG_SPANISH +LANG_SPANISH, +#else +0, +#endif +&attribute_es[0],&attribute_es[1], +}, +{"et","estonian","est",&lc_charsets[2],0, +#ifdef LANG_ESTONIAN +LANG_ESTONIAN, +#else +0, +#endif +0,0, +}, +{"eu","basque","eus|baq",&lc_charsets[0],0, +#ifdef LANG_BASQUE +LANG_BASQUE, +#else +0, +#endif +0,0, +}, +{"fa","persian",0,&lc_charsets[0],0, +#ifdef LANG_PERSIAN +LANG_PERSIAN, +#else +0, +#endif +0,0, +}, +{"fi","finnish","fin",&lc_charsets[0],0, +#ifdef LANG_FINNISH +LANG_FINNISH, +#else +0, +#endif +0,0, +}, +{"fj","fiji",0,&lc_charsets[0],0, +#ifdef LANG_FIJI +LANG_FIJI, +#else +0, +#endif +0,0, +}, +{"fo","faeroese",0,&lc_charsets[0],0, +#ifdef LANG_FAEROESE +LANG_FAEROESE, +#else +0, +#endif +0,0, +}, +{"fr","french","fra|fre",&lc_charsets[0],0, +#ifdef LANG_FRENCH +LANG_FRENCH, +#else +0, +#endif +0,0, +}, +{"fy","frisian",0,&lc_charsets[0],0, +#ifdef LANG_FRISIAN +LANG_FRISIAN, +#else +0, +#endif +0,0, +}, +{"ga","irish",0,&lc_charsets[11],0, +#ifdef LANG_IRISH +LANG_IRISH, +#else +0, +#endif +0,0, +}, +{"gd","scots-gaelic",0,&lc_charsets[11],0, +#ifdef LANG_SCOTS_GAELIC +LANG_SCOTS_GAELIC, +#else +0, +#endif +0,0, +}, +{"gl","galician",0,&lc_charsets[0],0, +#ifdef LANG_GALICIAN +LANG_GALICIAN, +#else +0, +#endif +0,0, +}, +{"gn","guarani",0,&lc_charsets[0],0, +#ifdef LANG_GUARANI +LANG_GUARANI, +#else +0, +#endif +0,0, +}, +{"gu","gujarati",0,&lc_charsets[0],0, +#ifdef LANG_GUJARATI +LANG_GUJARATI, +#else +0, +#endif +0,0, +}, +{"ha","hausa",0,&lc_charsets[0],0, +#ifdef LANG_HAUSA +LANG_HAUSA, +#else +0, +#endif +0,0, +}, +{"he","hebrew","heb",&lc_charsets[7],0, +#ifdef LANG_HEBREW +LANG_HEBREW, +#else +0, +#endif +0,0, +}, +{"hi","hindi",0,&lc_charsets[0],0, +#ifdef LANG_HINDI +LANG_HINDI, +#else +0, +#endif +0,0, +}, +{"hr","croatian","hrv|scr",&lc_charsets[1],0, +#ifdef LANG_CROATIAN +LANG_CROATIAN, +#else +0, +#endif +0,0, +}, +{"hu","hungarian","hun",&lc_charsets[1],0, +#ifdef LANG_HUNGARIAN +LANG_HUNGARIAN, +#else +0, +#endif +0,0, +}, +{"hy","armenian",0,&lc_charsets[0],0, +#ifdef LANG_ARMENIAN +LANG_ARMENIAN, +#else +0, +#endif +0,0, +}, +{"ia","interlingua",0,&lc_charsets[0],0, +#ifdef LANG_INTERLINGUA +LANG_INTERLINGUA, +#else +0, +#endif +0,0, +}, +{"id","indonesian","ind",&lc_charsets[0],0, +#ifdef LANG_INDONESIAN +LANG_INDONESIAN, +#else +0, +#endif +0,0, +}, +{"ie","interlingue",0,&lc_charsets[0],0, +#ifdef LANG_INTERLINGUE +LANG_INTERLINGUE, +#else +0, +#endif +0,0, +}, +{"ik","inupiak",0,&lc_charsets[0],0, +#ifdef LANG_INUPIAK +LANG_INUPIAK, +#else +0, +#endif +0,0, +}, +{"in","indonesian",0,&lc_charsets[0],0, +#ifdef LANG_INDONESIAN +LANG_INDONESIAN, +#else +0, +#endif +0,0, +}, +{"is","icelandic","isl|ice",&lc_charsets[0],0, +#ifdef LANG_ICELANDIC +LANG_ICELANDIC, +#else +0, +#endif +0,0, +}, +{"it","italian","ita",&lc_charsets[0],0, +#ifdef LANG_ITALIAN +LANG_ITALIAN, +#else +0, +#endif +0,0, +}, +{"iw","hebrew",0,&lc_charsets[0],0, +#ifdef LANG_HEBREW +LANG_HEBREW, +#else +0, +#endif +0,0, +}, +{"ja","japanese","jpn",&lc_charsets[0],0, +#ifdef LANG_JAPANESE +LANG_JAPANESE, +#else +0, +#endif +0,0, +}, +{"ji","yiddish",0,&lc_charsets[0],0, +#ifdef LANG_YIDDISH +LANG_YIDDISH, +#else +0, +#endif +0,0, +}, +{"jw","javanese",0,&lc_charsets[0],0, +#ifdef LANG_JAVANESE +LANG_JAVANESE, +#else +0, +#endif +0,0, +}, +{"ka","georgian",0,&lc_charsets[0],0, +#ifdef LANG_GEORGIAN +LANG_GEORGIAN, +#else +0, +#endif +0,0, +}, +{"kk","kazakh","kaz",&lc_charsets[0],0, +#ifdef LANG_KAZAKH +LANG_KAZAKH, +#else +0, +#endif +0,0, +}, +{"kl","greenlandic",0,&lc_charsets[0],0, +#ifdef LANG_GREENLANDIC +LANG_GREENLANDIC, +#else +0, +#endif +0,0, +}, +{"km","cambodian",0,&lc_charsets[0],0, +#ifdef LANG_CAMBODIAN +LANG_CAMBODIAN, +#else +0, +#endif +0,0, +}, +{"kn","kannada",0,&lc_charsets[0],0, +#ifdef LANG_KANNADA +LANG_KANNADA, +#else +0, +#endif +0,0, +}, +{"ko","korean","kor",&lc_charsets[0],0, +#ifdef LANG_KOREAN +LANG_KOREAN, +#else +0, +#endif +0,0, +}, +{"ks","kashmiri",0,&lc_charsets[0],0, +#ifdef LANG_KASHMIRI +LANG_KASHMIRI, +#else +0, +#endif +0,0, +}, +{"ku","kurdish",0,&lc_charsets[0],0, +#ifdef LANG_KURDISH +LANG_KURDISH, +#else +0, +#endif +0,0, +}, +{"ky","kirghiz",0,&lc_charsets[0],0, +#ifdef LANG_KIRGHIZ +LANG_KIRGHIZ, +#else +0, +#endif +0,0, +}, +{"la","latin",0,&lc_charsets[0],0, +#ifdef LANG_LATIN +LANG_LATIN, +#else +0, +#endif +0,0, +}, +{"ln","lingala",0,&lc_charsets[0],0, +#ifdef LANG_LINGALA +LANG_LINGALA, +#else +0, +#endif +0,0, +}, +{"lo","laothian",0,&lc_charsets[0],0, +#ifdef LANG_LAOTHIAN +LANG_LAOTHIAN, +#else +0, +#endif +0,0, +}, +{"lt","lithuanian","lit",&lc_charsets[10],0, +#ifdef LANG_LITHUANIAN +LANG_LITHUANIAN, +#else +0, +#endif +0,0, +}, +{"lv","latvian","lav",&lc_charsets[10],0, +#ifdef LANG_LATVIAN +LANG_LATVIAN, +#else +0, +#endif +0,0, +}, +{"mg","malagasy",0,&lc_charsets[0],0, +#ifdef LANG_MALAGASY +LANG_MALAGASY, +#else +0, +#endif +0,0, +}, +{"mi","maori",0,&lc_charsets[0],0, +#ifdef LANG_MAORI +LANG_MAORI, +#else +0, +#endif +0,0, +}, +{"mk","macedonian","mkd|mac",&lc_charsets[0],0, +#ifdef LANG_MACEDONIAN +LANG_MACEDONIAN, +#else +0, +#endif +0,0, +}, +{"ml","malayalam","mal",&lc_charsets[0],0, +#ifdef LANG_MALAYALAM +LANG_MALAYALAM, +#else +0, +#endif +0,0, +}, +{"mn","mongolian",0,&lc_charsets[0],0, +#ifdef LANG_MONGOLIAN +LANG_MONGOLIAN, +#else +0, +#endif +0,0, +}, +{"mo","moldavian",0,&lc_charsets[0],0, +#ifdef LANG_MOLDAVIAN +LANG_MOLDAVIAN, +#else +0, +#endif +0,0, +}, +{"mr","marathi",0,&lc_charsets[0],0, +#ifdef LANG_MARATHI +LANG_MARATHI, +#else +0, +#endif +0,0, +}, +{"ms","malay","msa|may",&lc_charsets[0],0, +#ifdef LANG_MALAY +LANG_MALAY, +#else +0, +#endif +0,0, +}, +{"mt","maltese",0,&lc_charsets[0],0, +#ifdef LANG_MALTESE +LANG_MALTESE, +#else +0, +#endif +0,0, +}, +{"my","burmese",0,&lc_charsets[0],0, +#ifdef LANG_BURMESE +LANG_BURMESE, +#else +0, +#endif +0,0, +}, +{"na","nauru",0,&lc_charsets[0],0, +#ifdef LANG_NAURU +LANG_NAURU, +#else +0, +#endif +0,0, +}, +{"nb","norwegian-bokmal","nob",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN_BOKMAL +LANG_NORWEGIAN_BOKMAL, +#else +0, +#endif +0,0, +}, +{"ne","nepali",0,&lc_charsets[0],0, +#ifdef LANG_NEPALI +LANG_NEPALI, +#else +0, +#endif +0,0, +}, +{"nl","dutch","nld|dut",&lc_charsets[0],0, +#ifdef LANG_DUTCH +LANG_DUTCH, +#else +0, +#endif +0,0, +}, +{"nn","norwegian-nynorsk","nno|non",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN_NYNORSK +LANG_NORWEGIAN_NYNORSK, +#else +0, +#endif +0,0, +}, +{"no","norwegian","nor",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN +LANG_NORWEGIAN, +#else +0, +#endif +0,0, +}, +{"oc","occitan",0,&lc_charsets[0],0, +#ifdef LANG_OCCITAN +LANG_OCCITAN, +#else +0, +#endif +0,0, +}, +{"om","oromo",0,&lc_charsets[0],0, +#ifdef LANG_OROMO +LANG_OROMO, +#else +0, +#endif +0,0, +}, +{"or","oriya",0,&lc_charsets[0],0, +#ifdef LANG_ORIYA +LANG_ORIYA, +#else +0, +#endif +0,0, +}, +{"pa","punjabi",0,&lc_charsets[0],0, +#ifdef LANG_PUNJABI +LANG_PUNJABI, +#else +0, +#endif +0,0, +}, +{"pl","polish","pol",&lc_charsets[1],0, +#ifdef LANG_POLISH +LANG_POLISH, +#else +0, +#endif +0,0, +}, +{"ps","pushto",0,&lc_charsets[0],0, +#ifdef LANG_PUSHTO +LANG_PUSHTO, +#else +0, +#endif +0,0, +}, +{"pt","portuguese","por",&lc_charsets[0],0, +#ifdef LANG_PORTUGUESE +LANG_PORTUGUESE, +#else +0, +#endif +0,0, +}, +{"qu","quechua",0,&lc_charsets[0],0, +#ifdef LANG_QUECHUA +LANG_QUECHUA, +#else +0, +#endif +0,0, +}, +{"rm","rhaeto-romance",0,&lc_charsets[0],0, +#ifdef LANG_RHAETO_ROMANCE +LANG_RHAETO_ROMANCE, +#else +0, +#endif +0,0, +}, +{"rn","kirundi",0,&lc_charsets[0],0, +#ifdef LANG_KIRUNDI +LANG_KIRUNDI, +#else +0, +#endif +0,0, +}, +{"ro","romanian","ron|rum",&lc_charsets[1],0, +#ifdef LANG_ROMANIAN +LANG_ROMANIAN, +#else +0, +#endif +0,0, +}, +{"ru","russian","rus",&lc_charsets[4],0, +#ifdef LANG_RUSSIAN +LANG_RUSSIAN, +#else +0, +#endif +0,0, +}, +{"rw","kinyarwanda",0,&lc_charsets[0],0, +#ifdef LANG_KINYARWANDA +LANG_KINYARWANDA, +#else +0, +#endif +0,0, +}, +{"sa","sanskrit",0,&lc_charsets[0],0, +#ifdef LANG_SANSKRIT +LANG_SANSKRIT, +#else +0, +#endif +0,0, +}, +{"sd","sindhi",0,&lc_charsets[0],0, +#ifdef LANG_SINDHI +LANG_SINDHI, +#else +0, +#endif +0,0, +}, +{"sg","sangro",0,&lc_charsets[0],0, +#ifdef LANG_SANGRO +LANG_SANGRO, +#else +0, +#endif +0,0, +}, +{"sh","serbo-croatian",0,&lc_charsets[0],0, +#ifdef LANG_SERBO_CROATIAN +LANG_SERBO_CROATIAN, +#else +0, +#endif +0,0, +}, +{"si","singhalese",0,&lc_charsets[0],0, +#ifdef LANG_SINGHALESE +LANG_SINGHALESE, +#else +0, +#endif +0,0, +}, +{"sk","slovak","slk|slo",&lc_charsets[1],0, +#ifdef LANG_SLOVAK +LANG_SLOVAK, +#else +0, +#endif +0,0, +}, +{"sl","slovenian","slv",&lc_charsets[1],0, +#ifdef LANG_SLOVENIAN +LANG_SLOVENIAN, +#else +0, +#endif +0,0, +}, +{"sm","samoan",0,&lc_charsets[0],0, +#ifdef LANG_SAMOAN +LANG_SAMOAN, +#else +0, +#endif +0,0, +}, +{"sn","shona",0,&lc_charsets[0],0, +#ifdef LANG_SHONA +LANG_SHONA, +#else +0, +#endif +0,0, +}, +{"so","somali",0,&lc_charsets[0],0, +#ifdef LANG_SOMALI +LANG_SOMALI, +#else +0, +#endif +0,0, +}, +{"sq","albanian","sqi|alb",&lc_charsets[0],0, +#ifdef LANG_ALBANIAN +LANG_ALBANIAN, +#else +0, +#endif +0,0, +}, +{"sr","serbian","srp",&lc_charsets[1],0, +#ifdef LANG_SERBIAN +LANG_SERBIAN, +#else +0, +#endif +0,0, +}, +{"ss","siswati",0,&lc_charsets[0],0, +#ifdef LANG_SISWATI +LANG_SISWATI, +#else +0, +#endif +0,0, +}, +{"st","sesotho",0,&lc_charsets[0],0, +#ifdef LANG_SESOTHO +LANG_SESOTHO, +#else +0, +#endif +0,0, +}, +{"su","sudanese",0,&lc_charsets[0],0, +#ifdef LANG_SUDANESE +LANG_SUDANESE, +#else +0, +#endif +0,0, +}, +{"sv","swedish","swe",&lc_charsets[0],0, +#ifdef LANG_SWEDISH +LANG_SWEDISH, +#else +0, +#endif +0,0, +}, +{"sw","swahili","swa",&lc_charsets[0],0, +#ifdef LANG_SWAHILI +LANG_SWAHILI, +#else +0, +#endif +0,0, +}, +{"ta","tamil",0,&lc_charsets[0],0, +#ifdef LANG_TAMIL +LANG_TAMIL, +#else +0, +#endif +0,0, +}, +{"te","telugu",0,&lc_charsets[0],0, +#ifdef LANG_TELUGU +LANG_TELUGU, +#else +0, +#endif +0,0, +}, +{"tg","tajik",0,&lc_charsets[0],0, +#ifdef LANG_TAJIK +LANG_TAJIK, +#else +0, +#endif +0,0, +}, +{"th","thai","tha",&lc_charsets[0],0, +#ifdef LANG_THAI +LANG_THAI, +#else +0, +#endif +0,0, +}, +{"ti","tigrinya",0,&lc_charsets[0],0, +#ifdef LANG_TIGRINYA +LANG_TIGRINYA, +#else +0, +#endif +0,0, +}, +{"tk","turkmen",0,&lc_charsets[0],0, +#ifdef LANG_TURKMEN +LANG_TURKMEN, +#else +0, +#endif +0,0, +}, +{"tl","tagalog",0,&lc_charsets[0],0, +#ifdef LANG_TAGALOG +LANG_TAGALOG, +#else +0, +#endif +0,0, +}, +{"tn","setswana",0,&lc_charsets[0],0, +#ifdef LANG_SETSWANA +LANG_SETSWANA, +#else +0, +#endif +0,0, +}, +{"to","tonga",0,&lc_charsets[0],0, +#ifdef LANG_TONGA +LANG_TONGA, +#else +0, +#endif +0,0, +}, +{"tr","turkish","tur",&lc_charsets[8],0, +#ifdef LANG_TURKISH +LANG_TURKISH, +#else +0, +#endif +0,0, +}, +{"ts","tsonga",0,&lc_charsets[0],0, +#ifdef LANG_TSONGA +LANG_TSONGA, +#else +0, +#endif +0,0, +}, +{"tt","tatar","tat",&lc_charsets[0],0, +#ifdef LANG_TATAR +LANG_TATAR, +#else +0, +#endif +0,0, +}, +{"tw","chinese-traditional","cht",&lc_charsets[0],0, +#ifdef LANG_CHINESE_TRADITIONAL +LANG_CHINESE_TRADITIONAL, +#else +0, +#endif +0,0, +}, +{"uk","ukrainian","ukr",&lc_charsets[4],0, +#ifdef LANG_UKRAINIAN +LANG_UKRAINIAN, +#else +0, +#endif +0,0, +}, +{"ur","urdu",0,&lc_charsets[0],0, +#ifdef LANG_URDU +LANG_URDU, +#else +0, +#endif +0,0, +}, +{"uz","uzbek","uzb",&lc_charsets[0],0, +#ifdef LANG_UZBEK +LANG_UZBEK, +#else +0, +#endif +0,0, +}, +{"vi","vietnamese",0,&lc_charsets[0],0, +#ifdef LANG_VIETNAMESE +LANG_VIETNAMESE, +#else +0, +#endif +0,0, +}, +{"vo","volapuk",0,&lc_charsets[0],0, +#ifdef LANG_VOLAPUK +LANG_VOLAPUK, +#else +0, +#endif +0,0, +}, +{"wo","wolof",0,&lc_charsets[0],0, +#ifdef LANG_WOLOF +LANG_WOLOF, +#else +0, +#endif +0,0, +}, +{"xh","xhosa",0,&lc_charsets[0],0, +#ifdef LANG_XHOSA +LANG_XHOSA, +#else +0, +#endif +0,0, +}, +{"yo","yoruba",0,&lc_charsets[0],0, +#ifdef LANG_YORUBA +LANG_YORUBA, +#else +0, +#endif +0,0, +}, +{"zh","chinese-simplified","zho|chi|chs",&lc_charsets[0],0, +#ifdef LANG_CHINESE_SIMPLIFIED +LANG_CHINESE_SIMPLIFIED, +#else +0, +#endif +0,0, +}, +{"zu","zulu",0,&lc_charsets[0],0, +#ifdef LANG_ZULU +LANG_ZULU, +#else +0, +#endif +0,0, +}, + 0 +}; + +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, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"an","netherlands-antilles",0, +#ifdef CTRY_NETHERLANDS_ANTILLES +CTRY_NETHERLANDS_ANTILLES, +#else +0, +#endif +&lc_languages[86],0,0,0, +#ifdef SUBLANG_DUTCH_NETHERLANDS_ANTILLES +SUBLANG_DUTCH_NETHERLANDS_ANTILLES, +#else +0, +#endif +0,0,0, +}, +{"ar","argentina",0, +#ifdef CTRY_ARGENTINA +CTRY_ARGENTINA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_ARGENTINA +SUBLANG_SPANISH_ARGENTINA, +#else +0, +#endif +0,0,0, +}, +{"at","austria",0, +#ifdef CTRY_AUSTRIA +CTRY_AUSTRIA, +#else +0, +#endif +&lc_languages[23],0,0,0, +#ifdef SUBLANG_GERMAN_AUSTRIA +SUBLANG_GERMAN_AUSTRIA, +#else +0, +#endif +0,0,0, +}, +{"au","australia",0, +#ifdef CTRY_AUSTRALIA +CTRY_AUSTRALIA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_AUSTRALIA +SUBLANG_ENGLISH_AUSTRALIA, +#else +0, +#endif +0,0,0, +}, +{"az","azerbaijan",0, +#ifdef CTRY_AZERBAIJAN +CTRY_AZERBAIJAN, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"be","belgium",0, +#ifdef CTRY_BELGIUM +CTRY_BELGIUM, +#else +0, +#endif +&lc_languages[86],&lc_languages[35],&lc_languages[23],0, +#ifdef SUBLANG_DUTCH_BELGIUM +SUBLANG_DUTCH_BELGIUM, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_BELGIUM +SUBLANG_FRENCH_BELGIUM, +#else +0, +#endif + +#ifdef SUBLANG_GERMAN_BELGIUM +SUBLANG_GERMAN_BELGIUM, +#else +0, +#endif +0, +}, +{"bg","bulgaria",0, +#ifdef CTRY_BULGARIA +CTRY_BULGARIA, +#else +0, +#endif +&lc_languages[12],0,0,0, +#ifdef SUBLANG_BULGARIAN_BULGARIA +SUBLANG_BULGARIAN_BULGARIA, +#else +0, +#endif +0,0,0, +}, +{"bn","brunei-darussalam",0, +#ifdef CTRY_BRUNEI_DARUSSALAM +CTRY_BRUNEI_DARUSSALAM, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_BRUNEI_DARUSSALAM +SUBLANG_ARABIC_BRUNEI_DARUSSALAM, +#else +0, +#endif +0,0,0, +}, +{"bo","bolivia",0, +#ifdef CTRY_BOLIVIA +CTRY_BOLIVIA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_BOLIVIA +SUBLANG_SPANISH_BOLIVIA, +#else +0, +#endif +0,0,0, +}, +{"br","brazil",0, +#ifdef CTRY_BRAZIL +CTRY_BRAZIL, +#else +0, +#endif +&lc_languages[95],0,0,0, +#ifdef SUBLANG_PORTUGUESE_BRAZIL +SUBLANG_PORTUGUESE_BRAZIL, +#else +0, +#endif +0,0,0, +}, +{"bw","botswana",0, +#ifdef CTRY_BOTSWANA +CTRY_BOTSWANA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_BOTSWANA +SUBLANG_ENGLISH_BOTSWANA, +#else +0, +#endif +0,0,0, +}, +{"by","belarus",0, +#ifdef CTRY_BELARUS +CTRY_BELARUS, +#else +0, +#endif +&lc_languages[100],0,0,0, +#ifdef SUBLANG_RUSSIAN_BELARUS +SUBLANG_RUSSIAN_BELARUS, +#else +0, +#endif +0,0,0, +}, +{"bz","belize",0, +#ifdef CTRY_BELIZE +CTRY_BELIZE, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_BELIZE +SUBLANG_ENGLISH_BELIZE, +#else +0, +#endif +0,0,0, +}, +{"ca","canada",0, +#ifdef CTRY_CANADA +CTRY_CANADA, +#else +0, +#endif +&lc_languages[26],&lc_languages[35],0,0, +#ifdef SUBLANG_ENGLISH_CANADA +SUBLANG_ENGLISH_CANADA, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_CANADA +SUBLANG_FRENCH_CANADA, +#else +0, +#endif +0,0, +}, +{"ch","switzerland",0, +#ifdef CTRY_SWITZERLAND +CTRY_SWITZERLAND, +#else +0, +#endif +&lc_languages[35],&lc_languages[23],&lc_languages[54],0, +#ifdef SUBLANG_FRENCH_SWITZERLAND +SUBLANG_FRENCH_SWITZERLAND, +#else +0, +#endif + +#ifdef SUBLANG_GERMAN_SWITZERLAND +SUBLANG_GERMAN_SWITZERLAND, +#else +0, +#endif + +#ifdef SUBLANG_ITALIAN_SWITZERLAND +SUBLANG_ITALIAN_SWITZERLAND, +#else +0, +#endif +0, +}, +{"cl","chile",0, +#ifdef CTRY_CHILE +CTRY_CHILE, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_CHILE +SUBLANG_SPANISH_CHILE, +#else +0, +#endif +0,0,0, +}, +{"cn","china",LC_primary, +#ifdef CTRY_CHINA +CTRY_CHINA, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_CHINA +SUBLANG_CHINESE_SIMPLIFIED_CHINA, +#else +0, +#endif +0,0,0, +}, +{"co","colombia",0, +#ifdef CTRY_COLOMBIA +CTRY_COLOMBIA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_COLOMBIA +SUBLANG_SPANISH_COLOMBIA, +#else +0, +#endif +0,0,0, +}, +{"cr","costa-rica",0, +#ifdef CTRY_COSTA_RICA +CTRY_COSTA_RICA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_COSTA_RICA +SUBLANG_SPANISH_COSTA_RICA, +#else +0, +#endif +0,0,0, +}, +{"cz","czech-republic",0, +#ifdef CTRY_CZECH_REPUBLIC +CTRY_CZECH_REPUBLIC, +#else +0, +#endif +&lc_languages[20],0,0,0, +#ifdef SUBLANG_CZECH_CZECH_REPUBLIC +SUBLANG_CZECH_CZECH_REPUBLIC, +#else +0, +#endif +0,0,0, +}, +{"de","germany",0, +#ifdef CTRY_GERMANY +CTRY_GERMANY, +#else +0, +#endif +&lc_languages[23],0,0,0, +#ifdef SUBLANG_GERMAN_GERMANY +SUBLANG_GERMAN_GERMANY, +#else +0, +#endif +0,0,0, +}, +{"dk","denmark",0, +#ifdef CTRY_DENMARK +CTRY_DENMARK, +#else +0, +#endif +&lc_languages[22],&lc_languages[26],0,0, +#ifdef SUBLANG_DANISH_DENMARK +SUBLANG_DANISH_DENMARK, +#else +0, +#endif + +#ifdef SUBLANG_ENGLISH_DENMARK +SUBLANG_ENGLISH_DENMARK, +#else +0, +#endif +0,0, +}, +{"do","dominican-republic",0, +#ifdef CTRY_DOMINICAN_REPUBLIC +CTRY_DOMINICAN_REPUBLIC, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_DOMINICAN_REPUBLIC +SUBLANG_SPANISH_DOMINICAN_REPUBLIC, +#else +0, +#endif +0,0,0, +}, +{"dz","algeria",0, +#ifdef CTRY_ALGERIA +CTRY_ALGERIA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"ec","ecuador",0, +#ifdef CTRY_ECUADOR +CTRY_ECUADOR, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_ECUADOR +SUBLANG_SPANISH_ECUADOR, +#else +0, +#endif +0,0,0, +}, +{"ee","estonia",0, +#ifdef CTRY_ESTONIA +CTRY_ESTONIA, +#else +0, +#endif +&lc_languages[29],0,0,0, +#ifdef SUBLANG_ESTONIAN_ESTONIA +SUBLANG_ESTONIAN_ESTONIA, +#else +0, +#endif +0,0,0, +}, +{"eg","egypt",0, +#ifdef CTRY_EGYPT +CTRY_EGYPT, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_EGYPT +SUBLANG_ARABIC_EGYPT, +#else +0, +#endif +0,0,0, +}, +{"es","spain",0, +#ifdef CTRY_SPAIN +CTRY_SPAIN, +#else +0, +#endif +&lc_languages[28],&lc_languages[18],&lc_languages[30],&lc_languages[39], +#ifdef SUBLANG_SPANISH_SPAIN +SUBLANG_SPANISH_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_CATALAN_SPAIN +SUBLANG_CATALAN_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_BASQUE_SPAIN +SUBLANG_BASQUE_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_GALICIAN_SPAIN +SUBLANG_GALICIAN_SPAIN, +#else +0, +#endif + +}, +{"fi","finland",0, +#ifdef CTRY_FINLAND +CTRY_FINLAND, +#else +0, +#endif +&lc_languages[117],0,0,0, +#ifdef SUBLANG_SWEDISH_FINLAND +SUBLANG_SWEDISH_FINLAND, +#else +0, +#endif +0,0,0, +}, +{"fo","faroe-islands",0, +#ifdef CTRY_FAROE_ISLANDS +CTRY_FAROE_ISLANDS, +#else +0, +#endif +&lc_languages[34],0,0,0, +#ifdef SUBLANG_FAEROESE_FAROE_ISLANDS +SUBLANG_FAEROESE_FAROE_ISLANDS, +#else +0, +#endif +0,0,0, +}, +{"fr","france",0, +#ifdef CTRY_FRANCE +CTRY_FRANCE, +#else +0, +#endif +&lc_languages[35],0,0,0, +#ifdef SUBLANG_FRENCH_FRANCE +SUBLANG_FRENCH_FRANCE, +#else +0, +#endif +0,0,0, +}, +{"gb","united-kingdom|great-britain|england",LC_primary, +#ifdef CTRY_UNITED_KINGDOM +CTRY_UNITED_KINGDOM, +#else +#ifdef CTRY_GREAT_BRITAIN +CTRY_GREAT_BRITAIN, +#else +#ifdef CTRY_ENGLAND +CTRY_ENGLAND, +#else +0, +#endif +#endif +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_KINGDOM +SUBLANG_ENGLISH_UNITED_KINGDOM, +#else +#ifdef SUBLANG_ENGLISH_GREAT_BRITAIN +SUBLANG_ENGLISH_GREAT_BRITAIN, +#else +#ifdef SUBLANG_ENGLISH_ENGLAND +SUBLANG_ENGLISH_ENGLAND, +#else +0, +#endif +#endif +#endif +0,0,0, +}, +{"gl","greenland",0, +#ifdef CTRY_GREENLAND +CTRY_GREENLAND, +#else +0, +#endif +&lc_languages[61],0,0,0, +#ifdef SUBLANG_GREENLANDIC_GREENLAND +SUBLANG_GREENLANDIC_GREENLAND, +#else +0, +#endif +0,0,0, +}, +{"gr","greece",0, +#ifdef CTRY_GREECE +CTRY_GREECE, +#else +0, +#endif +&lc_languages[25],0,0,0, +#ifdef SUBLANG_GREEK_GREECE +SUBLANG_GREEK_GREECE, +#else +0, +#endif +0,0,0, +}, +{"gt","guatemala",0, +#ifdef CTRY_GUATEMALA +CTRY_GUATEMALA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_GUATEMALA +SUBLANG_SPANISH_GUATEMALA, +#else +0, +#endif +0,0,0, +}, +{"hk","hong-kong",0, +#ifdef CTRY_HONG_KONG +CTRY_HONG_KONG, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_HONG_KONG +SUBLANG_CHINESE_SIMPLIFIED_HONG_KONG, +#else +0, +#endif +0,0,0, +}, +{"hn","honduras",0, +#ifdef CTRY_HONDURAS +CTRY_HONDURAS, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_HONDURAS +SUBLANG_SPANISH_HONDURAS, +#else +0, +#endif +0,0,0, +}, +{"hr","croatia",0, +#ifdef CTRY_CROATIA +CTRY_CROATIA, +#else +0, +#endif +&lc_languages[45],0,0,0, +#ifdef SUBLANG_CROATIAN_CROATIA +SUBLANG_CROATIAN_CROATIA, +#else +0, +#endif +0,0,0, +}, +{"hu","hungary",0, +#ifdef CTRY_HUNGARY +CTRY_HUNGARY, +#else +0, +#endif +&lc_languages[46],0,0,0, +#ifdef SUBLANG_HUNGARIAN_HUNGARY +SUBLANG_HUNGARIAN_HUNGARY, +#else +0, +#endif +0,0,0, +}, +{"id","indonesia",0, +#ifdef CTRY_INDONESIA +CTRY_INDONESIA, +#else +0, +#endif +&lc_languages[49],0,0,0, +#ifdef SUBLANG_INDONESIAN_INDONESIA +SUBLANG_INDONESIAN_INDONESIA, +#else +0, +#endif +0,0,0, +}, +{"ie","ireland",0, +#ifdef CTRY_IRELAND +CTRY_IRELAND, +#else +0, +#endif +&lc_languages[26],&lc_languages[37],0,0, +#ifdef SUBLANG_ENGLISH_IRELAND +SUBLANG_ENGLISH_IRELAND, +#else +0, +#endif + +#ifdef SUBLANG_IRISH_IRELAND +SUBLANG_IRISH_IRELAND, +#else +0, +#endif +0,0, +}, +{"il","israel",0, +#ifdef CTRY_ISRAEL +CTRY_ISRAEL, +#else +0, +#endif +&lc_languages[43],0,0,0, +#ifdef SUBLANG_HEBREW_ISRAEL +SUBLANG_HEBREW_ISRAEL, +#else +0, +#endif +0,0,0, +}, +{"iq","iraq",0, +#ifdef CTRY_IRAQ +CTRY_IRAQ, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_IRAQ +SUBLANG_ARABIC_IRAQ, +#else +0, +#endif +0,0,0, +}, +{"is","iceland",0, +#ifdef CTRY_ICELAND +CTRY_ICELAND, +#else +0, +#endif +&lc_languages[53],0,0,0, +#ifdef SUBLANG_ICELANDIC_ICELAND +SUBLANG_ICELANDIC_ICELAND, +#else +0, +#endif +0,0,0, +}, +{"it","italy",0, +#ifdef CTRY_ITALY +CTRY_ITALY, +#else +0, +#endif +&lc_languages[54],0,0,0, +#ifdef SUBLANG_ITALIAN_ITALY +SUBLANG_ITALIAN_ITALY, +#else +0, +#endif +0,0,0, +}, +{"jm","jamaica",0, +#ifdef CTRY_JAMAICA +CTRY_JAMAICA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_JAMAICA +SUBLANG_ENGLISH_JAMAICA, +#else +0, +#endif +0,0,0, +}, +{"jo","jordan",0, +#ifdef CTRY_JORDAN +CTRY_JORDAN, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_JORDAN +SUBLANG_ARABIC_JORDAN, +#else +0, +#endif +0,0,0, +}, +{"jp","japan",0, +#ifdef CTRY_JAPAN +CTRY_JAPAN, +#else +0, +#endif +&lc_languages[56],0,0,0, +#ifdef SUBLANG_JAPANESE_JAPAN +SUBLANG_JAPANESE_JAPAN, +#else +0, +#endif +0,0,0, +}, +{"ke","kenya",0, +#ifdef CTRY_KENYA +CTRY_KENYA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"kr","south-korea",0, +#ifdef CTRY_SOUTH_KOREA +CTRY_SOUTH_KOREA, +#else +0, +#endif +&lc_languages[64],0,0,0, +#ifdef SUBLANG_KOREAN_SOUTH_KOREA +SUBLANG_KOREAN_SOUTH_KOREA, +#else +0, +#endif +0,0,0, +}, +{"kw","kuwait",0, +#ifdef CTRY_KUWAIT +CTRY_KUWAIT, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_KUWAIT +SUBLANG_ARABIC_KUWAIT, +#else +0, +#endif +0,0,0, +}, +{"lb","lebanon",0, +#ifdef CTRY_LEBANON +CTRY_LEBANON, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_LEBANON +SUBLANG_ARABIC_LEBANON, +#else +0, +#endif +0,0,0, +}, +{"li","liechtenstein",0, +#ifdef CTRY_LIECHTENSTEIN +CTRY_LIECHTENSTEIN, +#else +0, +#endif +&lc_languages[23],&lc_languages[35],0,0, +#ifdef SUBLANG_GERMAN_LIECHTENSTEIN +SUBLANG_GERMAN_LIECHTENSTEIN, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_LIECHTENSTEIN +SUBLANG_FRENCH_LIECHTENSTEIN, +#else +0, +#endif +0,0, +}, +{"lt","lithuania",0, +#ifdef CTRY_LITHUANIA +CTRY_LITHUANIA, +#else +0, +#endif +&lc_languages[71],0,0,0, +#ifdef SUBLANG_LITHUANIAN_LITHUANIA +SUBLANG_LITHUANIAN_LITHUANIA, +#else +0, +#endif +0,0,0, +}, +{"lu","luxembourg",0, +#ifdef CTRY_LUXEMBOURG +CTRY_LUXEMBOURG, +#else +0, +#endif +&lc_languages[23],&lc_languages[35],0,0, +#ifdef SUBLANG_GERMAN_LUXEMBOURG +SUBLANG_GERMAN_LUXEMBOURG, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_LUXEMBOURG +SUBLANG_FRENCH_LUXEMBOURG, +#else +0, +#endif +0,0, +}, +{"lv","latvia",0, +#ifdef CTRY_LATVIA +CTRY_LATVIA, +#else +0, +#endif +&lc_languages[72],0,0,0, +#ifdef SUBLANG_LATVIAN_LATVIA +SUBLANG_LATVIAN_LATVIA, +#else +0, +#endif +0,0,0, +}, +{"ly","libya",0, +#ifdef CTRY_LIBYA +CTRY_LIBYA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_LIBYA +SUBLANG_ARABIC_LIBYA, +#else +0, +#endif +0,0,0, +}, +{"ma","morocco",0, +#ifdef CTRY_MOROCCO +CTRY_MOROCCO, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_MOROCCO +SUBLANG_ARABIC_MOROCCO, +#else +0, +#endif +0,0,0, +}, +{"mk","macedonia",0, +#ifdef CTRY_MACEDONIA +CTRY_MACEDONIA, +#else +0, +#endif +&lc_languages[75],0,0,0, +#ifdef SUBLANG_MACEDONIAN_MACEDONIA +SUBLANG_MACEDONIAN_MACEDONIA, +#else +0, +#endif +0,0,0, +}, +{"mo","macau",0, +#ifdef CTRY_MACAU +CTRY_MACAU, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_MACAU +SUBLANG_CHINESE_SIMPLIFIED_MACAU, +#else +0, +#endif +0,0,0, +}, +{"mx","mexico",0, +#ifdef CTRY_MEXICO +CTRY_MEXICO, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_MEXICO +SUBLANG_SPANISH_MEXICO, +#else +0, +#endif +0,0,0, +}, +{"my","malaysia",0, +#ifdef CTRY_MALAYSIA +CTRY_MALAYSIA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"ni","nicaragua",0, +#ifdef CTRY_NICARAGUA +CTRY_NICARAGUA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_NICARAGUA +SUBLANG_SPANISH_NICARAGUA, +#else +0, +#endif +0,0,0, +}, +{"nl","netherlands",0, +#ifdef CTRY_NETHERLANDS +CTRY_NETHERLANDS, +#else +0, +#endif +&lc_languages[86],0,0,0, +#ifdef SUBLANG_DUTCH_NETHERLANDS +SUBLANG_DUTCH_NETHERLANDS, +#else +0, +#endif +0,0,0, +}, +{"no","norway",0, +#ifdef CTRY_NORWAY +CTRY_NORWAY, +#else +0, +#endif +&lc_languages[84],&lc_languages[88],&lc_languages[87],0, +#ifdef SUBLANG_NORWEGIAN_BOKMAL_NORWAY +SUBLANG_NORWEGIAN_BOKMAL_NORWAY, +#else +0, +#endif + +#ifdef SUBLANG_NORWEGIAN_NORWAY +SUBLANG_NORWEGIAN_NORWAY, +#else +0, +#endif + +#ifdef SUBLANG_NORWEGIAN_NYNORSK_NORWAY +SUBLANG_NORWEGIAN_NYNORSK_NORWAY, +#else +0, +#endif +0, +}, +{"nz","new-zealand",0, +#ifdef CTRY_NEW_ZEALAND +CTRY_NEW_ZEALAND, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_NEW_ZEALAND +SUBLANG_ENGLISH_NEW_ZEALAND, +#else +0, +#endif +0,0,0, +}, +{"om","oman",0, +#ifdef CTRY_OMAN +CTRY_OMAN, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_OMAN +SUBLANG_ARABIC_OMAN, +#else +0, +#endif +0,0,0, +}, +{"pa","panama",0, +#ifdef CTRY_PANAMA +CTRY_PANAMA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PANAMA +SUBLANG_SPANISH_PANAMA, +#else +0, +#endif +0,0,0, +}, +{"pe","peru",0, +#ifdef CTRY_PERU +CTRY_PERU, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PERU +SUBLANG_SPANISH_PERU, +#else +0, +#endif +0,0,0, +}, +{"pl","poland",0, +#ifdef CTRY_POLAND +CTRY_POLAND, +#else +0, +#endif +&lc_languages[93],0,0,0, +#ifdef SUBLANG_POLISH_POLAND +SUBLANG_POLISH_POLAND, +#else +0, +#endif +0,0,0, +}, +{"pr","puerto-rico",0, +#ifdef CTRY_PUERTO_RICO +CTRY_PUERTO_RICO, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PUERTO_RICO +SUBLANG_SPANISH_PUERTO_RICO, +#else +0, +#endif +0,0,0, +}, +{"pt","portugal",0, +#ifdef CTRY_PORTUGAL +CTRY_PORTUGAL, +#else +0, +#endif +&lc_languages[95],0,0,0, +#ifdef SUBLANG_PORTUGUESE_PORTUGAL +SUBLANG_PORTUGUESE_PORTUGAL, +#else +0, +#endif +0,0,0, +}, +{"py","paraguay",0, +#ifdef CTRY_PARAGUAY +CTRY_PARAGUAY, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PARAGUAY +SUBLANG_SPANISH_PARAGUAY, +#else +0, +#endif +0,0,0, +}, +{"ro","romania",0, +#ifdef CTRY_ROMANIA +CTRY_ROMANIA, +#else +0, +#endif +&lc_languages[99],0,0,0, +#ifdef SUBLANG_ROMANIAN_ROMANIA +SUBLANG_ROMANIAN_ROMANIA, +#else +0, +#endif +0,0,0, +}, +{"ru","russia",0, +#ifdef CTRY_RUSSIA +CTRY_RUSSIA, +#else +0, +#endif +&lc_languages[100],0,0,0, +#ifdef SUBLANG_RUSSIAN_RUSSIA +SUBLANG_RUSSIAN_RUSSIA, +#else +0, +#endif +0,0,0, +}, +{"sa","saudi-arabia",0, +#ifdef CTRY_SAUDI_ARABIA +CTRY_SAUDI_ARABIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_SAUDI_ARABIA +SUBLANG_ARABIC_SAUDI_ARABIA, +#else +0, +#endif +0,0,0, +}, +{"se","sweden",LC_primary, +#ifdef CTRY_SWEDEN +CTRY_SWEDEN, +#else +0, +#endif +&lc_languages[117],0,0,0, +#ifdef SUBLANG_SWEDISH_SWEDEN +SUBLANG_SWEDISH_SWEDEN, +#else +0, +#endif +0,0,0, +}, +{"sg","singapore",0, +#ifdef CTRY_SINGAPORE +CTRY_SINGAPORE, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_SINGAPORE +SUBLANG_CHINESE_SIMPLIFIED_SINGAPORE, +#else +0, +#endif +0,0,0, +}, +{"si","slovenia",0, +#ifdef CTRY_SLOVENIA +CTRY_SLOVENIA, +#else +0, +#endif +&lc_languages[108],0,0,0, +#ifdef SUBLANG_SLOVENIAN_SLOVENIA +SUBLANG_SLOVENIAN_SLOVENIA, +#else +0, +#endif +0,0,0, +}, +{"sk","slovakia",0, +#ifdef CTRY_SLOVAKIA +CTRY_SLOVAKIA, +#else +0, +#endif +&lc_languages[107],0,0,0, +#ifdef SUBLANG_SLOVAK_SLOVAKIA +SUBLANG_SLOVAK_SLOVAKIA, +#else +0, +#endif +0,0,0, +}, +{"sp","serbia",0, +#ifdef CTRY_SERBIA +CTRY_SERBIA, +#else +0, +#endif +&lc_languages[113],0,0,0, +#ifdef SUBLANG_SERBIAN_SERBIA +SUBLANG_SERBIAN_SERBIA, +#else +0, +#endif +0,0,0, +}, +{"sv","el-salvador",0, +#ifdef CTRY_EL_SALVADOR +CTRY_EL_SALVADOR, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_EL_SALVADOR +SUBLANG_SPANISH_EL_SALVADOR, +#else +0, +#endif +0,0,0, +}, +{"sy","syria",0, +#ifdef CTRY_SYRIA +CTRY_SYRIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_SYRIA +SUBLANG_ARABIC_SYRIA, +#else +0, +#endif +0,0,0, +}, +{"th","thailand",0, +#ifdef CTRY_THAILAND +CTRY_THAILAND, +#else +0, +#endif +&lc_languages[122],0,0,0, +#ifdef SUBLANG_THAI_THAILAND +SUBLANG_THAI_THAILAND, +#else +0, +#endif +0,0,0, +}, +{"tn","tunisia",0, +#ifdef CTRY_TUNISIA +CTRY_TUNISIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_TUNISIA +SUBLANG_ARABIC_TUNISIA, +#else +0, +#endif +0,0,0, +}, +{"tr","turkey",0, +#ifdef CTRY_TURKEY +CTRY_TURKEY, +#else +0, +#endif +&lc_languages[128],0,0,0, +#ifdef SUBLANG_TURKISH_TURKEY +SUBLANG_TURKISH_TURKEY, +#else +0, +#endif +0,0,0, +}, +{"tt","trinidad&tobago",0, +#ifdef CTRY_TRINIDAD_TOBAGO +CTRY_TRINIDAD_TOBAGO, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_TRINIDAD_TOBAGO +SUBLANG_ENGLISH_TRINIDAD_TOBAGO, +#else +0, +#endif +0,0,0, +}, +{"tw","taiwan",0, +#ifdef CTRY_TAIWAN +CTRY_TAIWAN, +#else +0, +#endif +&lc_languages[131],0,0,0, +#ifdef SUBLANG_CHINESE_TRADITIONAL_TAIWAN +SUBLANG_CHINESE_TRADITIONAL_TAIWAN, +#else +0, +#endif +0,0,0, +}, +{"ua","ukraine",0, +#ifdef CTRY_UKRAINE +CTRY_UKRAINE, +#else +0, +#endif +&lc_languages[132],&lc_languages[100],0,0, +#ifdef SUBLANG_UKRAINIAN_UKRAINE +SUBLANG_UKRAINIAN_UKRAINE, +#else +0, +#endif + +#ifdef SUBLANG_RUSSIAN_UKRAINE +SUBLANG_RUSSIAN_UKRAINE, +#else +0, +#endif +0,0, +}, +{"uk","united-kingdom",LC_primary, +#ifdef CTRY_UNITED_KINGDOM +CTRY_UNITED_KINGDOM, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_KINGDOM +SUBLANG_ENGLISH_UNITED_KINGDOM, +#else +0, +#endif +0,0,0, +}, +{"us","united-states|usa",0, +#ifdef CTRY_UNITED_STATES +CTRY_UNITED_STATES, +#else +#ifdef CTRY_USA +CTRY_USA, +#else +0, +#endif +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_STATES +SUBLANG_ENGLISH_UNITED_STATES, +#else +#ifdef SUBLANG_ENGLISH_USA +SUBLANG_ENGLISH_USA, +#else +0, +#endif +#endif +0,0,0, +}, +{"uy","uruguay",0, +#ifdef CTRY_URUGUAY +CTRY_URUGUAY, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_URUGUAY +SUBLANG_SPANISH_URUGUAY, +#else +0, +#endif +0,0,0, +}, +{"ve","venezuela",0, +#ifdef CTRY_VENEZUELA +CTRY_VENEZUELA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_VENEZUELA +SUBLANG_SPANISH_VENEZUELA, +#else +0, +#endif +0,0,0, +}, +{"yu","yugoslavia",0, +#ifdef CTRY_YUGOSLAVIA +CTRY_YUGOSLAVIA, +#else +0, +#endif +&lc_languages[113],0,0,0, +#ifdef SUBLANG_SERBIAN_YUGOSLAVIA +SUBLANG_SERBIAN_YUGOSLAVIA, +#else +0, +#endif +0,0,0, +}, +{"za","south-africa",0, +#ifdef CTRY_SOUTH_AFRICA +CTRY_SOUTH_AFRICA, +#else +0, +#endif +&lc_languages[4],0,0,0, +#ifdef SUBLANG_AFRIKAANS_SOUTH_AFRICA +SUBLANG_AFRIKAANS_SOUTH_AFRICA, +#else +0, +#endif +0,0,0, +}, +{"zw","zimbabwe",0, +#ifdef CTRY_ZIMBABWE +CTRY_ZIMBABWE, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_ZIMBABWE +SUBLANG_ENGLISH_ZIMBABWE, +#else +0, +#endif +0,0,0, +}, + 0 +}; + +const Lc_map_t lc_maps[] = +{ +{"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/cmd/ast/libast/i386/FEATURE/align b/usr/src/cmd/ast/libast/i386/FEATURE/align new file mode 100644 index 0000000000..6feb6d9238 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/align @@ -0,0 +1,32 @@ +/* : : 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 ok */ + +#define ALIGN_CHUNK 8192 +#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)) + +#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/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 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 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 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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/ccode b/usr/src/cmd/ast/libast/i386/FEATURE/ccode new file mode 100644 index 0000000000..30603c443a --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/ccode @@ -0,0 +1,29 @@ +/* : : 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 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/cmd/ast/libast/i386/FEATURE/common b/usr/src/cmd/ast/libast/i386/FEATURE/common new file mode 100644 index 0000000000..0719bea0e7 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/common @@ -0,0 +1,211 @@ +/* : : 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 ok */ +#define _hdr_pthread 1 /* #include ok */ +#define _hdr_stdarg 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdint 1 /* #include ok */ +#define _hdr_inttypes 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include 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 _hdr_stdio 1 /* #include ok */ +#define _typ___va_list 1 /* __va_list is a type */ +#define _sys_stat 1 /* #include ok */ +#define _sys_socket 1 /* #include 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__, if defined, 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_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 +#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 */ +#define _typ_uintptr_t 1 /* uintptr_t is a type */ + +#ifndef va_listref +#ifndef va_start +#if __STD_C +#include +#else +#include +#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 +# endif +# if _sys_types +# include +# endif +# if _hdr_stdint +# include +# else +# if _hdr_inttypes +# include +# 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 +# define _def_map_ast 1 +# if !_def_map_ast +# include +# endif +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/dirent b/usr/src/cmd/ast/libast/i386/FEATURE/dirent new file mode 100644 index 0000000000..18f89fa388 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/dirent @@ -0,0 +1,106 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _nxt_dirent <../include/dirent.h> /* include path for the native */ +#define _nxt_dirent_str "../include/dirent.h" /* include string for the native */ +/* + * for [fl]stat64 and off64_t + */ + +#ifndef _AST_STD_H + +#include <../include/dirent.h> /* the native */ + +#else + +#ifndef _DIR64_H +#define _DIR64_H + +#include + +#if _typ_off64_t +#undef off_t +#endif + +#include <../include/dirent.h> /* the native */ + +#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/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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/errno b/usr/src/cmd/ast/libast/i386/FEATURE/errno new file mode 100644 index 0000000000..1107a008c7 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/errno @@ -0,0 +1,7 @@ +/* : : 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 ok */ +#define _dat_sys_nerr 1 /* sys_nerr in default libs */ +#define _dat_sys_errlist 1 /* sys_errlist in default libs */ +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/fcntl b/usr/src/cmd/ast/libast/i386/FEATURE/fcntl new file mode 100644 index 0000000000..9c2328f31b --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/fcntl @@ -0,0 +1,116 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ + + +#if _typ_off64_t +#undef off_t +#ifdef __STDC__ +#define off_t off_t +#endif +#endif + +#include + +#if _typ_off64_t +#undef off_t +#ifdef __STDC__ +#define off_t off_t +#endif +#endif + +#include +#include + +#define F_dupfd_cloexec F_DUPFD_CLOEXEC +#define O_BINARY 0 +#define O_cloexec O_CLOEXEC +#define O_TEMPORARY 0 +#define O_TEXT 0 + +#include +#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/cmd/ast/libast/i386/FEATURE/float b/usr/src/cmd/ast/libast/i386/FEATURE/float new file mode 100644 index 0000000000..7e6922cdfd --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/float @@ -0,0 +1,219 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_float 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _hdr_values 1 /* #include ok */ +#define _LIB_m 1 /* -lm is a library */ +#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_isnanl 1 /* isnanl() 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 +#include +#include +#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,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/cmd/ast/libast/i386/FEATURE/fs b/usr/src/cmd/ast/libast/i386/FEATURE/fs new file mode 100644 index 0000000000..cdba4ad12e --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/fs @@ -0,0 +1,148 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _sys_stat 1 /* #include 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 +#include +#define FS_default "ufs" +#if defined(__STDPP__directive) && defined(__STDPP__initial) +__STDPP__directive pragma pp:noinitial +#endif +#define _hdr_stdio 1 /* #include ok */ +#define _sys_mntent 1 /* #include ok */ +#define _sys_mnttab 1 /* #include ok */ +#define _sys_param 1 /* #include ok */ +#define _sys_ucred 1 /* #include ok */ +#define _sys_mount 1 /* #include ok */ +#define _sys_statfs 1 /* #include ok */ +#define _sys_statvfs 1 /* #include ok */ +#define _sys_vfs 1 /* #include 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 _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 +#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/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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/iconv b/usr/src/cmd/ast/libast/i386/FEATURE/iconv new file mode 100644 index 0000000000..f81d5fc8fa --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/iconv @@ -0,0 +1,150 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_iconv 1 /* #include 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 */ +#define _nxt_iconv_str "../include/iconv.h" /* include string for the native */ +#include +#include +#include <../include/iconv.h> /* the native iconv.h */ + +#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 +#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 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__ +#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, 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, Iconv_disc_t*)); +extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, Iconv_disc_t*)); +#endif +#endif + +#undef __MANGLE__ +#define __MANGLE__ __LINKAGE__ + +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/lib b/usr/src/cmd/ast/libast/i386/FEATURE/lib new file mode 100644 index 0000000000..ade8e11b3b --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/lib @@ -0,0 +1,177 @@ +/* : : 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 ok */ +#define _hdr_dirent 1 /* #include ok */ +#define _hdr_fmtmsg 1 /* #include ok */ +#define _hdr_fnmatch 1 /* #include ok */ +#define _hdr_libgen 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +#define _hdr_locale 1 /* #include ok */ +#define _hdr_nl_types 1 /* #include ok */ +#define _hdr_spawn 1 /* #include ok */ +#define _hdr_syslog 1 /* #include ok */ +#define _hdr_utime 1 /* #include ok */ +#define _hdr_wchar 1 /* and isw*() really work */ +#define _hdr_wchar 1 /* #include ok */ +#define _hdr_wctype 1 /* #include 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) */ +#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 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 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 _mem_dd_fd_DIR 1 /* dd_fd is a member of DIR */ +#define _sys_filio 1 /* #include ok */ +#define _sys_jioctl 1 /* #include ok */ +#define _sys_localedef 1 /* #include ok */ +#define _sys_resource 1 /* #include ok */ +#define _sys_socket 1 /* #include ok */ +#define _sys_stream 1 /* #include ok */ +#define _sys_systeminfo 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include 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 ok */ +#define _lib_select 1 /* select() has standard 5 arg interface */ +#define _sys_select 1 /* select() requires */ +#define _pipe_rw 1 /* full duplex pipes */ +#define _hdr_unistd 1 /* #include 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 _stream_peek 1 /* ioctl(I_PEEK) works on pipe() */ +#define _socket_peek 1 /* recv(MSG_PEEK) works on socketpair() */ +#define _hdr_string 1 /* #include ok */ +#define _lib_memcmp 1 /* standard memcmp interface that works */ +#define _hdr_fcntl 1 /* #include ok */ +#define _sys_stat 1 /* #include ok */ +#define _sys_mman 1 /* #include 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/cmd/ast/libast/i386/FEATURE/libpath b/usr/src/cmd/ast/libast/i386/FEATURE/libpath new file mode 100644 index 0000000000..d272a4015d --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/libpath @@ -0,0 +1,6 @@ +/* : : 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 ok */ +#define CONF_LIBPATH "lib/64:LD_LIBRARY_PATH_64:sol.*64*,lib/32:LD_LIBRARY_PATH_32,lib:LD_LIBRARY_PATH" +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/limits b/usr/src/cmd/ast/libast/i386/FEATURE/limits new file mode 100644 index 0000000000..9fd982fd5a --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/limits @@ -0,0 +1,107 @@ +/* : : 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 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/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 ok */ +#define _locale_utf8_str "UTF-8" +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/map b/usr/src/cmd/ast/libast/i386/FEATURE/map new file mode 100644 index 0000000000..30c7f4e2b5 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/map @@ -0,0 +1,466 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ + + +/* + * prototypes provided for standard interfaces hijacked + * by ast and mapped to _ast_* but already prototyped + * unmapped in native headers included by + */ + +#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)); + +#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/cmd/ast/libast/i386/FEATURE/mmap b/usr/src/cmd/ast/libast/i386/FEATURE/mmap new file mode 100644 index 0000000000..12d991f9a6 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/mmap @@ -0,0 +1,26 @@ +/* : : 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 ok */ +#define _sys_mman 1 /* #include 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 */ + +/* 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/cmd/ast/libast/i386/FEATURE/mode b/usr/src/cmd/ast/libast/i386/FEATURE/mode new file mode 100644 index 0000000000..f2ec3091fa --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/mode @@ -0,0 +1,14 @@ +/* : : 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 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/cmd/ast/libast/i386/FEATURE/ndbm b/usr/src/cmd/ast/libast/i386/FEATURE/ndbm new file mode 100644 index 0000000000..0e55ff820d --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/ndbm @@ -0,0 +1,9 @@ +/* : : 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 ok */ +#define _hdr_ndbm 1 /* #include ok */ +#include +#define _use_ndbm 1 + +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/nl_types b/usr/src/cmd/ast/libast/i386/FEATURE/nl_types new file mode 100644 index 0000000000..d8c540626e --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/nl_types @@ -0,0 +1,102 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 ok */ +#define _hdr_langinfo 1 /* #include ok */ +#define _nxt_nl_types <../include/nl_types.h> /* include path for the native */ +#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native */ +#include +#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/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 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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/param b/usr/src/cmd/ast/libast/i386/FEATURE/param new file mode 100644 index 0000000000..8c200b4462 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/param @@ -0,0 +1,9 @@ +/* : : 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 ok */ +#include +#ifndef S_IFDIR +#include +#endif +#endif 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 ok */ +/* preroot not enabled */ +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/prog b/usr/src/cmd/ast/libast/i386/FEATURE/prog new file mode 100644 index 0000000000..592037efb7 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/prog @@ -0,0 +1,7 @@ +/* : : 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 ok */ +#define _lib_getexecname 1 /* getexecname() in default lib(s) */ +#define _PROC_PROG "/proc/self/path/a.out" +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/sfinit b/usr/src/cmd/ast/libast/i386/FEATURE/sfinit new file mode 100644 index 0000000000..756d559262 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/sfinit @@ -0,0 +1,5332 @@ +/* : : 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 ok */ + +static const float sf_flt_pow10[] = +{ + 1E0F, + 1E1F, + 1E2F, + 1E3F, + 1E4F, + 1E5F, + 1E6F, + 1E7F, + 1E8F, + 1E9F, + 1E10F, + 1E11F, + 1E12F, + 1E13F, + 1E14F, + 1E15F, + 1E16F, + 1E17F, + 1E18F, + 1E19F, + 1E20F, + 1E21F, + 1E22F, + 1E23F, + 1E24F, + 1E25F, + 1E26F, + 1E27F, + 1E28F, + 1E29F, + 1E30F, + 1E31F, + 1E32F, + 1E33F, + 1E34F, + 1E35F, + 1E36F, + 1E37F, + 1E38F, +}; + +static const double sf_dbl_pow10[] = +{ + 1E0, + 1E1, + 1E2, + 1E3, + 1E4, + 1E5, + 1E6, + 1E7, + 1E8, + 1E9, + 1E10, + 1E11, + 1E12, + 1E13, + 1E14, + 1E15, + 1E16, + 1E17, + 1E18, + 1E19, + 1E20, + 1E21, + 1E22, + 1E23, + 1E24, + 1E25, + 1E26, + 1E27, + 1E28, + 1E29, + 1E30, + 1E31, + 1E32, + 1E33, + 1E34, + 1E35, + 1E36, + 1E37, + 1E38, + 1E39, + 1E40, + 1E41, + 1E42, + 1E43, + 1E44, + 1E45, + 1E46, + 1E47, + 1E48, + 1E49, + 1E50, + 1E51, + 1E52, + 1E53, + 1E54, + 1E55, + 1E56, + 1E57, + 1E58, + 1E59, + 1E60, + 1E61, + 1E62, + 1E63, + 1E64, + 1E65, + 1E66, + 1E67, + 1E68, + 1E69, + 1E70, + 1E71, + 1E72, + 1E73, + 1E74, + 1E75, + 1E76, + 1E77, + 1E78, + 1E79, + 1E80, + 1E81, + 1E82, + 1E83, + 1E84, + 1E85, + 1E86, + 1E87, + 1E88, + 1E89, + 1E90, + 1E91, + 1E92, + 1E93, + 1E94, + 1E95, + 1E96, + 1E97, + 1E98, + 1E99, + 1E100, + 1E101, + 1E102, + 1E103, + 1E104, + 1E105, + 1E106, + 1E107, + 1E108, + 1E109, + 1E110, + 1E111, + 1E112, + 1E113, + 1E114, + 1E115, + 1E116, + 1E117, + 1E118, + 1E119, + 1E120, + 1E121, + 1E122, + 1E123, + 1E124, + 1E125, + 1E126, + 1E127, + 1E128, + 1E129, + 1E130, + 1E131, + 1E132, + 1E133, + 1E134, + 1E135, + 1E136, + 1E137, + 1E138, + 1E139, + 1E140, + 1E141, + 1E142, + 1E143, + 1E144, + 1E145, + 1E146, + 1E147, + 1E148, + 1E149, + 1E150, + 1E151, + 1E152, + 1E153, + 1E154, + 1E155, + 1E156, + 1E157, + 1E158, + 1E159, + 1E160, + 1E161, + 1E162, + 1E163, + 1E164, + 1E165, + 1E166, + 1E167, + 1E168, + 1E169, + 1E170, + 1E171, + 1E172, + 1E173, + 1E174, + 1E175, + 1E176, + 1E177, + 1E178, + 1E179, + 1E180, + 1E181, + 1E182, + 1E183, + 1E184, + 1E185, + 1E186, + 1E187, + 1E188, + 1E189, + 1E190, + 1E191, + 1E192, + 1E193, + 1E194, + 1E195, + 1E196, + 1E197, + 1E198, + 1E199, + 1E200, + 1E201, + 1E202, + 1E203, + 1E204, + 1E205, + 1E206, + 1E207, + 1E208, + 1E209, + 1E210, + 1E211, + 1E212, + 1E213, + 1E214, + 1E215, + 1E216, + 1E217, + 1E218, + 1E219, + 1E220, + 1E221, + 1E222, + 1E223, + 1E224, + 1E225, + 1E226, + 1E227, + 1E228, + 1E229, + 1E230, + 1E231, + 1E232, + 1E233, + 1E234, + 1E235, + 1E236, + 1E237, + 1E238, + 1E239, + 1E240, + 1E241, + 1E242, + 1E243, + 1E244, + 1E245, + 1E246, + 1E247, + 1E248, + 1E249, + 1E250, + 1E251, + 1E252, + 1E253, + 1E254, + 1E255, + 1E256, + 1E257, + 1E258, + 1E259, + 1E260, + 1E261, + 1E262, + 1E263, + 1E264, + 1E265, + 1E266, + 1E267, + 1E268, + 1E269, + 1E270, + 1E271, + 1E272, + 1E273, + 1E274, + 1E275, + 1E276, + 1E277, + 1E278, + 1E279, + 1E280, + 1E281, + 1E282, + 1E283, + 1E284, + 1E285, + 1E286, + 1E287, + 1E288, + 1E289, + 1E290, + 1E291, + 1E292, + 1E293, + 1E294, + 1E295, + 1E296, + 1E297, + 1E298, + 1E299, + 1E300, + 1E301, + 1E302, + 1E303, + 1E304, + 1E305, + 1E306, + 1E307, + 1E308, +}; + +static const _ast_fltmax_t sf_ldbl_pow10[] = +{ + 1E0L, + 1E1L, + 1E2L, + 1E3L, + 1E4L, + 1E5L, + 1E6L, + 1E7L, + 1E8L, + 1E9L, + 1E10L, + 1E11L, + 1E12L, + 1E13L, + 1E14L, + 1E15L, + 1E16L, + 1E17L, + 1E18L, + 1E19L, + 1E20L, + 1E21L, + 1E22L, + 1E23L, + 1E24L, + 1E25L, + 1E26L, + 1E27L, + 1E28L, + 1E29L, + 1E30L, + 1E31L, + 1E32L, + 1E33L, + 1E34L, + 1E35L, + 1E36L, + 1E37L, + 1E38L, + 1E39L, + 1E40L, + 1E41L, + 1E42L, + 1E43L, + 1E44L, + 1E45L, + 1E46L, + 1E47L, + 1E48L, + 1E49L, + 1E50L, + 1E51L, + 1E52L, + 1E53L, + 1E54L, + 1E55L, + 1E56L, + 1E57L, + 1E58L, + 1E59L, + 1E60L, + 1E61L, + 1E62L, + 1E63L, + 1E64L, + 1E65L, + 1E66L, + 1E67L, + 1E68L, + 1E69L, + 1E70L, + 1E71L, + 1E72L, + 1E73L, + 1E74L, + 1E75L, + 1E76L, + 1E77L, + 1E78L, + 1E79L, + 1E80L, + 1E81L, + 1E82L, + 1E83L, + 1E84L, + 1E85L, + 1E86L, + 1E87L, + 1E88L, + 1E89L, + 1E90L, + 1E91L, + 1E92L, + 1E93L, + 1E94L, + 1E95L, + 1E96L, + 1E97L, + 1E98L, + 1E99L, + 1E100L, + 1E101L, + 1E102L, + 1E103L, + 1E104L, + 1E105L, + 1E106L, + 1E107L, + 1E108L, + 1E109L, + 1E110L, + 1E111L, + 1E112L, + 1E113L, + 1E114L, + 1E115L, + 1E116L, + 1E117L, + 1E118L, + 1E119L, + 1E120L, + 1E121L, + 1E122L, + 1E123L, + 1E124L, + 1E125L, + 1E126L, + 1E127L, + 1E128L, + 1E129L, + 1E130L, + 1E131L, + 1E132L, + 1E133L, + 1E134L, + 1E135L, + 1E136L, + 1E137L, + 1E138L, + 1E139L, + 1E140L, + 1E141L, + 1E142L, + 1E143L, + 1E144L, + 1E145L, + 1E146L, + 1E147L, + 1E148L, + 1E149L, + 1E150L, + 1E151L, + 1E152L, + 1E153L, + 1E154L, + 1E155L, + 1E156L, + 1E157L, + 1E158L, + 1E159L, + 1E160L, + 1E161L, + 1E162L, + 1E163L, + 1E164L, + 1E165L, + 1E166L, + 1E167L, + 1E168L, + 1E169L, + 1E170L, + 1E171L, + 1E172L, + 1E173L, + 1E174L, + 1E175L, + 1E176L, + 1E177L, + 1E178L, + 1E179L, + 1E180L, + 1E181L, + 1E182L, + 1E183L, + 1E184L, + 1E185L, + 1E186L, + 1E187L, + 1E188L, + 1E189L, + 1E190L, + 1E191L, + 1E192L, + 1E193L, + 1E194L, + 1E195L, + 1E196L, + 1E197L, + 1E198L, + 1E199L, + 1E200L, + 1E201L, + 1E202L, + 1E203L, + 1E204L, + 1E205L, + 1E206L, + 1E207L, + 1E208L, + 1E209L, + 1E210L, + 1E211L, + 1E212L, + 1E213L, + 1E214L, + 1E215L, + 1E216L, + 1E217L, + 1E218L, + 1E219L, + 1E220L, + 1E221L, + 1E222L, + 1E223L, + 1E224L, + 1E225L, + 1E226L, + 1E227L, + 1E228L, + 1E229L, + 1E230L, + 1E231L, + 1E232L, + 1E233L, + 1E234L, + 1E235L, + 1E236L, + 1E237L, + 1E238L, + 1E239L, + 1E240L, + 1E241L, + 1E242L, + 1E243L, + 1E244L, + 1E245L, + 1E246L, + 1E247L, + 1E248L, + 1E249L, + 1E250L, + 1E251L, + 1E252L, + 1E253L, + 1E254L, + 1E255L, + 1E256L, + 1E257L, + 1E258L, + 1E259L, + 1E260L, + 1E261L, + 1E262L, + 1E263L, + 1E264L, + 1E265L, + 1E266L, + 1E267L, + 1E268L, + 1E269L, + 1E270L, + 1E271L, + 1E272L, + 1E273L, + 1E274L, + 1E275L, + 1E276L, + 1E277L, + 1E278L, + 1E279L, + 1E280L, + 1E281L, + 1E282L, + 1E283L, + 1E284L, + 1E285L, + 1E286L, + 1E287L, + 1E288L, + 1E289L, + 1E290L, + 1E291L, + 1E292L, + 1E293L, + 1E294L, + 1E295L, + 1E296L, + 1E297L, + 1E298L, + 1E299L, + 1E300L, + 1E301L, + 1E302L, + 1E303L, + 1E304L, + 1E305L, + 1E306L, + 1E307L, + 1E308L, + 1E309L, + 1E310L, + 1E311L, + 1E312L, + 1E313L, + 1E314L, + 1E315L, + 1E316L, + 1E317L, + 1E318L, + 1E319L, + 1E320L, + 1E321L, + 1E322L, + 1E323L, + 1E324L, + 1E325L, + 1E326L, + 1E327L, + 1E328L, + 1E329L, + 1E330L, + 1E331L, + 1E332L, + 1E333L, + 1E334L, + 1E335L, + 1E336L, + 1E337L, + 1E338L, + 1E339L, + 1E340L, + 1E341L, + 1E342L, + 1E343L, + 1E344L, + 1E345L, + 1E346L, + 1E347L, + 1E348L, + 1E349L, + 1E350L, + 1E351L, + 1E352L, + 1E353L, + 1E354L, + 1E355L, + 1E356L, + 1E357L, + 1E358L, + 1E359L, + 1E360L, + 1E361L, + 1E362L, + 1E363L, + 1E364L, + 1E365L, + 1E366L, + 1E367L, + 1E368L, + 1E369L, + 1E370L, + 1E371L, + 1E372L, + 1E373L, + 1E374L, + 1E375L, + 1E376L, + 1E377L, + 1E378L, + 1E379L, + 1E380L, + 1E381L, + 1E382L, + 1E383L, + 1E384L, + 1E385L, + 1E386L, + 1E387L, + 1E388L, + 1E389L, + 1E390L, + 1E391L, + 1E392L, + 1E393L, + 1E394L, + 1E395L, + 1E396L, + 1E397L, + 1E398L, + 1E399L, + 1E400L, + 1E401L, + 1E402L, + 1E403L, + 1E404L, + 1E405L, + 1E406L, + 1E407L, + 1E408L, + 1E409L, + 1E410L, + 1E411L, + 1E412L, + 1E413L, + 1E414L, + 1E415L, + 1E416L, + 1E417L, + 1E418L, + 1E419L, + 1E420L, + 1E421L, + 1E422L, + 1E423L, + 1E424L, + 1E425L, + 1E426L, + 1E427L, + 1E428L, + 1E429L, + 1E430L, + 1E431L, + 1E432L, + 1E433L, + 1E434L, + 1E435L, + 1E436L, + 1E437L, + 1E438L, + 1E439L, + 1E440L, + 1E441L, + 1E442L, + 1E443L, + 1E444L, + 1E445L, + 1E446L, + 1E447L, + 1E448L, + 1E449L, + 1E450L, + 1E451L, + 1E452L, + 1E453L, + 1E454L, + 1E455L, + 1E456L, + 1E457L, + 1E458L, + 1E459L, + 1E460L, + 1E461L, + 1E462L, + 1E463L, + 1E464L, + 1E465L, + 1E466L, + 1E467L, + 1E468L, + 1E469L, + 1E470L, + 1E471L, + 1E472L, + 1E473L, + 1E474L, + 1E475L, + 1E476L, + 1E477L, + 1E478L, + 1E479L, + 1E480L, + 1E481L, + 1E482L, + 1E483L, + 1E484L, + 1E485L, + 1E486L, + 1E487L, + 1E488L, + 1E489L, + 1E490L, + 1E491L, + 1E492L, + 1E493L, + 1E494L, + 1E495L, + 1E496L, + 1E497L, + 1E498L, + 1E499L, + 1E500L, + 1E501L, + 1E502L, + 1E503L, + 1E504L, + 1E505L, + 1E506L, + 1E507L, + 1E508L, + 1E509L, + 1E510L, + 1E511L, + 1E512L, + 1E513L, + 1E514L, + 1E515L, + 1E516L, + 1E517L, + 1E518L, + 1E519L, + 1E520L, + 1E521L, + 1E522L, + 1E523L, + 1E524L, + 1E525L, + 1E526L, + 1E527L, + 1E528L, + 1E529L, + 1E530L, + 1E531L, + 1E532L, + 1E533L, + 1E534L, + 1E535L, + 1E536L, + 1E537L, + 1E538L, + 1E539L, + 1E540L, + 1E541L, + 1E542L, + 1E543L, + 1E544L, + 1E545L, + 1E546L, + 1E547L, + 1E548L, + 1E549L, + 1E550L, + 1E551L, + 1E552L, + 1E553L, + 1E554L, + 1E555L, + 1E556L, + 1E557L, + 1E558L, + 1E559L, + 1E560L, + 1E561L, + 1E562L, + 1E563L, + 1E564L, + 1E565L, + 1E566L, + 1E567L, + 1E568L, + 1E569L, + 1E570L, + 1E571L, + 1E572L, + 1E573L, + 1E574L, + 1E575L, + 1E576L, + 1E577L, + 1E578L, + 1E579L, + 1E580L, + 1E581L, + 1E582L, + 1E583L, + 1E584L, + 1E585L, + 1E586L, + 1E587L, + 1E588L, + 1E589L, + 1E590L, + 1E591L, + 1E592L, + 1E593L, + 1E594L, + 1E595L, + 1E596L, + 1E597L, + 1E598L, + 1E599L, + 1E600L, + 1E601L, + 1E602L, + 1E603L, + 1E604L, + 1E605L, + 1E606L, + 1E607L, + 1E608L, + 1E609L, + 1E610L, + 1E611L, + 1E612L, + 1E613L, + 1E614L, + 1E615L, + 1E616L, + 1E617L, + 1E618L, + 1E619L, + 1E620L, + 1E621L, + 1E622L, + 1E623L, + 1E624L, + 1E625L, + 1E626L, + 1E627L, + 1E628L, + 1E629L, + 1E630L, + 1E631L, + 1E632L, + 1E633L, + 1E634L, + 1E635L, + 1E636L, + 1E637L, + 1E638L, + 1E639L, + 1E640L, + 1E641L, + 1E642L, + 1E643L, + 1E644L, + 1E645L, + 1E646L, + 1E647L, + 1E648L, + 1E649L, + 1E650L, + 1E651L, + 1E652L, + 1E653L, + 1E654L, + 1E655L, + 1E656L, + 1E657L, + 1E658L, + 1E659L, + 1E660L, + 1E661L, + 1E662L, + 1E663L, + 1E664L, + 1E665L, + 1E666L, + 1E667L, + 1E668L, + 1E669L, + 1E670L, + 1E671L, + 1E672L, + 1E673L, + 1E674L, + 1E675L, + 1E676L, + 1E677L, + 1E678L, + 1E679L, + 1E680L, + 1E681L, + 1E682L, + 1E683L, + 1E684L, + 1E685L, + 1E686L, + 1E687L, + 1E688L, + 1E689L, + 1E690L, + 1E691L, + 1E692L, + 1E693L, + 1E694L, + 1E695L, + 1E696L, + 1E697L, + 1E698L, + 1E699L, + 1E700L, + 1E701L, + 1E702L, + 1E703L, + 1E704L, + 1E705L, + 1E706L, + 1E707L, + 1E708L, + 1E709L, + 1E710L, + 1E711L, + 1E712L, + 1E713L, + 1E714L, + 1E715L, + 1E716L, + 1E717L, + 1E718L, + 1E719L, + 1E720L, + 1E721L, + 1E722L, + 1E723L, + 1E724L, + 1E725L, + 1E726L, + 1E727L, + 1E728L, + 1E729L, + 1E730L, + 1E731L, + 1E732L, + 1E733L, + 1E734L, + 1E735L, + 1E736L, + 1E737L, + 1E738L, + 1E739L, + 1E740L, + 1E741L, + 1E742L, + 1E743L, + 1E744L, + 1E745L, + 1E746L, + 1E747L, + 1E748L, + 1E749L, + 1E750L, + 1E751L, + 1E752L, + 1E753L, + 1E754L, + 1E755L, + 1E756L, + 1E757L, + 1E758L, + 1E759L, + 1E760L, + 1E761L, + 1E762L, + 1E763L, + 1E764L, + 1E765L, + 1E766L, + 1E767L, + 1E768L, + 1E769L, + 1E770L, + 1E771L, + 1E772L, + 1E773L, + 1E774L, + 1E775L, + 1E776L, + 1E777L, + 1E778L, + 1E779L, + 1E780L, + 1E781L, + 1E782L, + 1E783L, + 1E784L, + 1E785L, + 1E786L, + 1E787L, + 1E788L, + 1E789L, + 1E790L, + 1E791L, + 1E792L, + 1E793L, + 1E794L, + 1E795L, + 1E796L, + 1E797L, + 1E798L, + 1E799L, + 1E800L, + 1E801L, + 1E802L, + 1E803L, + 1E804L, + 1E805L, + 1E806L, + 1E807L, + 1E808L, + 1E809L, + 1E810L, + 1E811L, + 1E812L, + 1E813L, + 1E814L, + 1E815L, + 1E816L, + 1E817L, + 1E818L, + 1E819L, + 1E820L, + 1E821L, + 1E822L, + 1E823L, + 1E824L, + 1E825L, + 1E826L, + 1E827L, + 1E828L, + 1E829L, + 1E830L, + 1E831L, + 1E832L, + 1E833L, + 1E834L, + 1E835L, + 1E836L, + 1E837L, + 1E838L, + 1E839L, + 1E840L, + 1E841L, + 1E842L, + 1E843L, + 1E844L, + 1E845L, + 1E846L, + 1E847L, + 1E848L, + 1E849L, + 1E850L, + 1E851L, + 1E852L, + 1E853L, + 1E854L, + 1E855L, + 1E856L, + 1E857L, + 1E858L, + 1E859L, + 1E860L, + 1E861L, + 1E862L, + 1E863L, + 1E864L, + 1E865L, + 1E866L, + 1E867L, + 1E868L, + 1E869L, + 1E870L, + 1E871L, + 1E872L, + 1E873L, + 1E874L, + 1E875L, + 1E876L, + 1E877L, + 1E878L, + 1E879L, + 1E880L, + 1E881L, + 1E882L, + 1E883L, + 1E884L, + 1E885L, + 1E886L, + 1E887L, + 1E888L, + 1E889L, + 1E890L, + 1E891L, + 1E892L, + 1E893L, + 1E894L, + 1E895L, + 1E896L, + 1E897L, + 1E898L, + 1E899L, + 1E900L, + 1E901L, + 1E902L, + 1E903L, + 1E904L, + 1E905L, + 1E906L, + 1E907L, + 1E908L, + 1E909L, + 1E910L, + 1E911L, + 1E912L, + 1E913L, + 1E914L, + 1E915L, + 1E916L, + 1E917L, + 1E918L, + 1E919L, + 1E920L, + 1E921L, + 1E922L, + 1E923L, + 1E924L, + 1E925L, + 1E926L, + 1E927L, + 1E928L, + 1E929L, + 1E930L, + 1E931L, + 1E932L, + 1E933L, + 1E934L, + 1E935L, + 1E936L, + 1E937L, + 1E938L, + 1E939L, + 1E940L, + 1E941L, + 1E942L, + 1E943L, + 1E944L, + 1E945L, + 1E946L, + 1E947L, + 1E948L, + 1E949L, + 1E950L, + 1E951L, + 1E952L, + 1E953L, + 1E954L, + 1E955L, + 1E956L, + 1E957L, + 1E958L, + 1E959L, + 1E960L, + 1E961L, + 1E962L, + 1E963L, + 1E964L, + 1E965L, + 1E966L, + 1E967L, + 1E968L, + 1E969L, + 1E970L, + 1E971L, + 1E972L, + 1E973L, + 1E974L, + 1E975L, + 1E976L, + 1E977L, + 1E978L, + 1E979L, + 1E980L, + 1E981L, + 1E982L, + 1E983L, + 1E984L, + 1E985L, + 1E986L, + 1E987L, + 1E988L, + 1E989L, + 1E990L, + 1E991L, + 1E992L, + 1E993L, + 1E994L, + 1E995L, + 1E996L, + 1E997L, + 1E998L, + 1E999L, + 1E1000L, + 1E1001L, + 1E1002L, + 1E1003L, + 1E1004L, + 1E1005L, + 1E1006L, + 1E1007L, + 1E1008L, + 1E1009L, + 1E1010L, + 1E1011L, + 1E1012L, + 1E1013L, + 1E1014L, + 1E1015L, + 1E1016L, + 1E1017L, + 1E1018L, + 1E1019L, + 1E1020L, + 1E1021L, + 1E1022L, + 1E1023L, + 1E1024L, + 1E1025L, + 1E1026L, + 1E1027L, + 1E1028L, + 1E1029L, + 1E1030L, + 1E1031L, + 1E1032L, + 1E1033L, + 1E1034L, + 1E1035L, + 1E1036L, + 1E1037L, + 1E1038L, + 1E1039L, + 1E1040L, + 1E1041L, + 1E1042L, + 1E1043L, + 1E1044L, + 1E1045L, + 1E1046L, + 1E1047L, + 1E1048L, + 1E1049L, + 1E1050L, + 1E1051L, + 1E1052L, + 1E1053L, + 1E1054L, + 1E1055L, + 1E1056L, + 1E1057L, + 1E1058L, + 1E1059L, + 1E1060L, + 1E1061L, + 1E1062L, + 1E1063L, + 1E1064L, + 1E1065L, + 1E1066L, + 1E1067L, + 1E1068L, + 1E1069L, + 1E1070L, + 1E1071L, + 1E1072L, + 1E1073L, + 1E1074L, + 1E1075L, + 1E1076L, + 1E1077L, + 1E1078L, + 1E1079L, + 1E1080L, + 1E1081L, + 1E1082L, + 1E1083L, + 1E1084L, + 1E1085L, + 1E1086L, + 1E1087L, + 1E1088L, + 1E1089L, + 1E1090L, + 1E1091L, + 1E1092L, + 1E1093L, + 1E1094L, + 1E1095L, + 1E1096L, + 1E1097L, + 1E1098L, + 1E1099L, + 1E1100L, + 1E1101L, + 1E1102L, + 1E1103L, + 1E1104L, + 1E1105L, + 1E1106L, + 1E1107L, + 1E1108L, + 1E1109L, + 1E1110L, + 1E1111L, + 1E1112L, + 1E1113L, + 1E1114L, + 1E1115L, + 1E1116L, + 1E1117L, + 1E1118L, + 1E1119L, + 1E1120L, + 1E1121L, + 1E1122L, + 1E1123L, + 1E1124L, + 1E1125L, + 1E1126L, + 1E1127L, + 1E1128L, + 1E1129L, + 1E1130L, + 1E1131L, + 1E1132L, + 1E1133L, + 1E1134L, + 1E1135L, + 1E1136L, + 1E1137L, + 1E1138L, + 1E1139L, + 1E1140L, + 1E1141L, + 1E1142L, + 1E1143L, + 1E1144L, + 1E1145L, + 1E1146L, + 1E1147L, + 1E1148L, + 1E1149L, + 1E1150L, + 1E1151L, + 1E1152L, + 1E1153L, + 1E1154L, + 1E1155L, + 1E1156L, + 1E1157L, + 1E1158L, + 1E1159L, + 1E1160L, + 1E1161L, + 1E1162L, + 1E1163L, + 1E1164L, + 1E1165L, + 1E1166L, + 1E1167L, + 1E1168L, + 1E1169L, + 1E1170L, + 1E1171L, + 1E1172L, + 1E1173L, + 1E1174L, + 1E1175L, + 1E1176L, + 1E1177L, + 1E1178L, + 1E1179L, + 1E1180L, + 1E1181L, + 1E1182L, + 1E1183L, + 1E1184L, + 1E1185L, + 1E1186L, + 1E1187L, + 1E1188L, + 1E1189L, + 1E1190L, + 1E1191L, + 1E1192L, + 1E1193L, + 1E1194L, + 1E1195L, + 1E1196L, + 1E1197L, + 1E1198L, + 1E1199L, + 1E1200L, + 1E1201L, + 1E1202L, + 1E1203L, + 1E1204L, + 1E1205L, + 1E1206L, + 1E1207L, + 1E1208L, + 1E1209L, + 1E1210L, + 1E1211L, + 1E1212L, + 1E1213L, + 1E1214L, + 1E1215L, + 1E1216L, + 1E1217L, + 1E1218L, + 1E1219L, + 1E1220L, + 1E1221L, + 1E1222L, + 1E1223L, + 1E1224L, + 1E1225L, + 1E1226L, + 1E1227L, + 1E1228L, + 1E1229L, + 1E1230L, + 1E1231L, + 1E1232L, + 1E1233L, + 1E1234L, + 1E1235L, + 1E1236L, + 1E1237L, + 1E1238L, + 1E1239L, + 1E1240L, + 1E1241L, + 1E1242L, + 1E1243L, + 1E1244L, + 1E1245L, + 1E1246L, + 1E1247L, + 1E1248L, + 1E1249L, + 1E1250L, + 1E1251L, + 1E1252L, + 1E1253L, + 1E1254L, + 1E1255L, + 1E1256L, + 1E1257L, + 1E1258L, + 1E1259L, + 1E1260L, + 1E1261L, + 1E1262L, + 1E1263L, + 1E1264L, + 1E1265L, + 1E1266L, + 1E1267L, + 1E1268L, + 1E1269L, + 1E1270L, + 1E1271L, + 1E1272L, + 1E1273L, + 1E1274L, + 1E1275L, + 1E1276L, + 1E1277L, + 1E1278L, + 1E1279L, + 1E1280L, + 1E1281L, + 1E1282L, + 1E1283L, + 1E1284L, + 1E1285L, + 1E1286L, + 1E1287L, + 1E1288L, + 1E1289L, + 1E1290L, + 1E1291L, + 1E1292L, + 1E1293L, + 1E1294L, + 1E1295L, + 1E1296L, + 1E1297L, + 1E1298L, + 1E1299L, + 1E1300L, + 1E1301L, + 1E1302L, + 1E1303L, + 1E1304L, + 1E1305L, + 1E1306L, + 1E1307L, + 1E1308L, + 1E1309L, + 1E1310L, + 1E1311L, + 1E1312L, + 1E1313L, + 1E1314L, + 1E1315L, + 1E1316L, + 1E1317L, + 1E1318L, + 1E1319L, + 1E1320L, + 1E1321L, + 1E1322L, + 1E1323L, + 1E1324L, + 1E1325L, + 1E1326L, + 1E1327L, + 1E1328L, + 1E1329L, + 1E1330L, + 1E1331L, + 1E1332L, + 1E1333L, + 1E1334L, + 1E1335L, + 1E1336L, + 1E1337L, + 1E1338L, + 1E1339L, + 1E1340L, + 1E1341L, + 1E1342L, + 1E1343L, + 1E1344L, + 1E1345L, + 1E1346L, + 1E1347L, + 1E1348L, + 1E1349L, + 1E1350L, + 1E1351L, + 1E1352L, + 1E1353L, + 1E1354L, + 1E1355L, + 1E1356L, + 1E1357L, + 1E1358L, + 1E1359L, + 1E1360L, + 1E1361L, + 1E1362L, + 1E1363L, + 1E1364L, + 1E1365L, + 1E1366L, + 1E1367L, + 1E1368L, + 1E1369L, + 1E1370L, + 1E1371L, + 1E1372L, + 1E1373L, + 1E1374L, + 1E1375L, + 1E1376L, + 1E1377L, + 1E1378L, + 1E1379L, + 1E1380L, + 1E1381L, + 1E1382L, + 1E1383L, + 1E1384L, + 1E1385L, + 1E1386L, + 1E1387L, + 1E1388L, + 1E1389L, + 1E1390L, + 1E1391L, + 1E1392L, + 1E1393L, + 1E1394L, + 1E1395L, + 1E1396L, + 1E1397L, + 1E1398L, + 1E1399L, + 1E1400L, + 1E1401L, + 1E1402L, + 1E1403L, + 1E1404L, + 1E1405L, + 1E1406L, + 1E1407L, + 1E1408L, + 1E1409L, + 1E1410L, + 1E1411L, + 1E1412L, + 1E1413L, + 1E1414L, + 1E1415L, + 1E1416L, + 1E1417L, + 1E1418L, + 1E1419L, + 1E1420L, + 1E1421L, + 1E1422L, + 1E1423L, + 1E1424L, + 1E1425L, + 1E1426L, + 1E1427L, + 1E1428L, + 1E1429L, + 1E1430L, + 1E1431L, + 1E1432L, + 1E1433L, + 1E1434L, + 1E1435L, + 1E1436L, + 1E1437L, + 1E1438L, + 1E1439L, + 1E1440L, + 1E1441L, + 1E1442L, + 1E1443L, + 1E1444L, + 1E1445L, + 1E1446L, + 1E1447L, + 1E1448L, + 1E1449L, + 1E1450L, + 1E1451L, + 1E1452L, + 1E1453L, + 1E1454L, + 1E1455L, + 1E1456L, + 1E1457L, + 1E1458L, + 1E1459L, + 1E1460L, + 1E1461L, + 1E1462L, + 1E1463L, + 1E1464L, + 1E1465L, + 1E1466L, + 1E1467L, + 1E1468L, + 1E1469L, + 1E1470L, + 1E1471L, + 1E1472L, + 1E1473L, + 1E1474L, + 1E1475L, + 1E1476L, + 1E1477L, + 1E1478L, + 1E1479L, + 1E1480L, + 1E1481L, + 1E1482L, + 1E1483L, + 1E1484L, + 1E1485L, + 1E1486L, + 1E1487L, + 1E1488L, + 1E1489L, + 1E1490L, + 1E1491L, + 1E1492L, + 1E1493L, + 1E1494L, + 1E1495L, + 1E1496L, + 1E1497L, + 1E1498L, + 1E1499L, + 1E1500L, + 1E1501L, + 1E1502L, + 1E1503L, + 1E1504L, + 1E1505L, + 1E1506L, + 1E1507L, + 1E1508L, + 1E1509L, + 1E1510L, + 1E1511L, + 1E1512L, + 1E1513L, + 1E1514L, + 1E1515L, + 1E1516L, + 1E1517L, + 1E1518L, + 1E1519L, + 1E1520L, + 1E1521L, + 1E1522L, + 1E1523L, + 1E1524L, + 1E1525L, + 1E1526L, + 1E1527L, + 1E1528L, + 1E1529L, + 1E1530L, + 1E1531L, + 1E1532L, + 1E1533L, + 1E1534L, + 1E1535L, + 1E1536L, + 1E1537L, + 1E1538L, + 1E1539L, + 1E1540L, + 1E1541L, + 1E1542L, + 1E1543L, + 1E1544L, + 1E1545L, + 1E1546L, + 1E1547L, + 1E1548L, + 1E1549L, + 1E1550L, + 1E1551L, + 1E1552L, + 1E1553L, + 1E1554L, + 1E1555L, + 1E1556L, + 1E1557L, + 1E1558L, + 1E1559L, + 1E1560L, + 1E1561L, + 1E1562L, + 1E1563L, + 1E1564L, + 1E1565L, + 1E1566L, + 1E1567L, + 1E1568L, + 1E1569L, + 1E1570L, + 1E1571L, + 1E1572L, + 1E1573L, + 1E1574L, + 1E1575L, + 1E1576L, + 1E1577L, + 1E1578L, + 1E1579L, + 1E1580L, + 1E1581L, + 1E1582L, + 1E1583L, + 1E1584L, + 1E1585L, + 1E1586L, + 1E1587L, + 1E1588L, + 1E1589L, + 1E1590L, + 1E1591L, + 1E1592L, + 1E1593L, + 1E1594L, + 1E1595L, + 1E1596L, + 1E1597L, + 1E1598L, + 1E1599L, + 1E1600L, + 1E1601L, + 1E1602L, + 1E1603L, + 1E1604L, + 1E1605L, + 1E1606L, + 1E1607L, + 1E1608L, + 1E1609L, + 1E1610L, + 1E1611L, + 1E1612L, + 1E1613L, + 1E1614L, + 1E1615L, + 1E1616L, + 1E1617L, + 1E1618L, + 1E1619L, + 1E1620L, + 1E1621L, + 1E1622L, + 1E1623L, + 1E1624L, + 1E1625L, + 1E1626L, + 1E1627L, + 1E1628L, + 1E1629L, + 1E1630L, + 1E1631L, + 1E1632L, + 1E1633L, + 1E1634L, + 1E1635L, + 1E1636L, + 1E1637L, + 1E1638L, + 1E1639L, + 1E1640L, + 1E1641L, + 1E1642L, + 1E1643L, + 1E1644L, + 1E1645L, + 1E1646L, + 1E1647L, + 1E1648L, + 1E1649L, + 1E1650L, + 1E1651L, + 1E1652L, + 1E1653L, + 1E1654L, + 1E1655L, + 1E1656L, + 1E1657L, + 1E1658L, + 1E1659L, + 1E1660L, + 1E1661L, + 1E1662L, + 1E1663L, + 1E1664L, + 1E1665L, + 1E1666L, + 1E1667L, + 1E1668L, + 1E1669L, + 1E1670L, + 1E1671L, + 1E1672L, + 1E1673L, + 1E1674L, + 1E1675L, + 1E1676L, + 1E1677L, + 1E1678L, + 1E1679L, + 1E1680L, + 1E1681L, + 1E1682L, + 1E1683L, + 1E1684L, + 1E1685L, + 1E1686L, + 1E1687L, + 1E1688L, + 1E1689L, + 1E1690L, + 1E1691L, + 1E1692L, + 1E1693L, + 1E1694L, + 1E1695L, + 1E1696L, + 1E1697L, + 1E1698L, + 1E1699L, + 1E1700L, + 1E1701L, + 1E1702L, + 1E1703L, + 1E1704L, + 1E1705L, + 1E1706L, + 1E1707L, + 1E1708L, + 1E1709L, + 1E1710L, + 1E1711L, + 1E1712L, + 1E1713L, + 1E1714L, + 1E1715L, + 1E1716L, + 1E1717L, + 1E1718L, + 1E1719L, + 1E1720L, + 1E1721L, + 1E1722L, + 1E1723L, + 1E1724L, + 1E1725L, + 1E1726L, + 1E1727L, + 1E1728L, + 1E1729L, + 1E1730L, + 1E1731L, + 1E1732L, + 1E1733L, + 1E1734L, + 1E1735L, + 1E1736L, + 1E1737L, + 1E1738L, + 1E1739L, + 1E1740L, + 1E1741L, + 1E1742L, + 1E1743L, + 1E1744L, + 1E1745L, + 1E1746L, + 1E1747L, + 1E1748L, + 1E1749L, + 1E1750L, + 1E1751L, + 1E1752L, + 1E1753L, + 1E1754L, + 1E1755L, + 1E1756L, + 1E1757L, + 1E1758L, + 1E1759L, + 1E1760L, + 1E1761L, + 1E1762L, + 1E1763L, + 1E1764L, + 1E1765L, + 1E1766L, + 1E1767L, + 1E1768L, + 1E1769L, + 1E1770L, + 1E1771L, + 1E1772L, + 1E1773L, + 1E1774L, + 1E1775L, + 1E1776L, + 1E1777L, + 1E1778L, + 1E1779L, + 1E1780L, + 1E1781L, + 1E1782L, + 1E1783L, + 1E1784L, + 1E1785L, + 1E1786L, + 1E1787L, + 1E1788L, + 1E1789L, + 1E1790L, + 1E1791L, + 1E1792L, + 1E1793L, + 1E1794L, + 1E1795L, + 1E1796L, + 1E1797L, + 1E1798L, + 1E1799L, + 1E1800L, + 1E1801L, + 1E1802L, + 1E1803L, + 1E1804L, + 1E1805L, + 1E1806L, + 1E1807L, + 1E1808L, + 1E1809L, + 1E1810L, + 1E1811L, + 1E1812L, + 1E1813L, + 1E1814L, + 1E1815L, + 1E1816L, + 1E1817L, + 1E1818L, + 1E1819L, + 1E1820L, + 1E1821L, + 1E1822L, + 1E1823L, + 1E1824L, + 1E1825L, + 1E1826L, + 1E1827L, + 1E1828L, + 1E1829L, + 1E1830L, + 1E1831L, + 1E1832L, + 1E1833L, + 1E1834L, + 1E1835L, + 1E1836L, + 1E1837L, + 1E1838L, + 1E1839L, + 1E1840L, + 1E1841L, + 1E1842L, + 1E1843L, + 1E1844L, + 1E1845L, + 1E1846L, + 1E1847L, + 1E1848L, + 1E1849L, + 1E1850L, + 1E1851L, + 1E1852L, + 1E1853L, + 1E1854L, + 1E1855L, + 1E1856L, + 1E1857L, + 1E1858L, + 1E1859L, + 1E1860L, + 1E1861L, + 1E1862L, + 1E1863L, + 1E1864L, + 1E1865L, + 1E1866L, + 1E1867L, + 1E1868L, + 1E1869L, + 1E1870L, + 1E1871L, + 1E1872L, + 1E1873L, + 1E1874L, + 1E1875L, + 1E1876L, + 1E1877L, + 1E1878L, + 1E1879L, + 1E1880L, + 1E1881L, + 1E1882L, + 1E1883L, + 1E1884L, + 1E1885L, + 1E1886L, + 1E1887L, + 1E1888L, + 1E1889L, + 1E1890L, + 1E1891L, + 1E1892L, + 1E1893L, + 1E1894L, + 1E1895L, + 1E1896L, + 1E1897L, + 1E1898L, + 1E1899L, + 1E1900L, + 1E1901L, + 1E1902L, + 1E1903L, + 1E1904L, + 1E1905L, + 1E1906L, + 1E1907L, + 1E1908L, + 1E1909L, + 1E1910L, + 1E1911L, + 1E1912L, + 1E1913L, + 1E1914L, + 1E1915L, + 1E1916L, + 1E1917L, + 1E1918L, + 1E1919L, + 1E1920L, + 1E1921L, + 1E1922L, + 1E1923L, + 1E1924L, + 1E1925L, + 1E1926L, + 1E1927L, + 1E1928L, + 1E1929L, + 1E1930L, + 1E1931L, + 1E1932L, + 1E1933L, + 1E1934L, + 1E1935L, + 1E1936L, + 1E1937L, + 1E1938L, + 1E1939L, + 1E1940L, + 1E1941L, + 1E1942L, + 1E1943L, + 1E1944L, + 1E1945L, + 1E1946L, + 1E1947L, + 1E1948L, + 1E1949L, + 1E1950L, + 1E1951L, + 1E1952L, + 1E1953L, + 1E1954L, + 1E1955L, + 1E1956L, + 1E1957L, + 1E1958L, + 1E1959L, + 1E1960L, + 1E1961L, + 1E1962L, + 1E1963L, + 1E1964L, + 1E1965L, + 1E1966L, + 1E1967L, + 1E1968L, + 1E1969L, + 1E1970L, + 1E1971L, + 1E1972L, + 1E1973L, + 1E1974L, + 1E1975L, + 1E1976L, + 1E1977L, + 1E1978L, + 1E1979L, + 1E1980L, + 1E1981L, + 1E1982L, + 1E1983L, + 1E1984L, + 1E1985L, + 1E1986L, + 1E1987L, + 1E1988L, + 1E1989L, + 1E1990L, + 1E1991L, + 1E1992L, + 1E1993L, + 1E1994L, + 1E1995L, + 1E1996L, + 1E1997L, + 1E1998L, + 1E1999L, + 1E2000L, + 1E2001L, + 1E2002L, + 1E2003L, + 1E2004L, + 1E2005L, + 1E2006L, + 1E2007L, + 1E2008L, + 1E2009L, + 1E2010L, + 1E2011L, + 1E2012L, + 1E2013L, + 1E2014L, + 1E2015L, + 1E2016L, + 1E2017L, + 1E2018L, + 1E2019L, + 1E2020L, + 1E2021L, + 1E2022L, + 1E2023L, + 1E2024L, + 1E2025L, + 1E2026L, + 1E2027L, + 1E2028L, + 1E2029L, + 1E2030L, + 1E2031L, + 1E2032L, + 1E2033L, + 1E2034L, + 1E2035L, + 1E2036L, + 1E2037L, + 1E2038L, + 1E2039L, + 1E2040L, + 1E2041L, + 1E2042L, + 1E2043L, + 1E2044L, + 1E2045L, + 1E2046L, + 1E2047L, + 1E2048L, + 1E2049L, + 1E2050L, + 1E2051L, + 1E2052L, + 1E2053L, + 1E2054L, + 1E2055L, + 1E2056L, + 1E2057L, + 1E2058L, + 1E2059L, + 1E2060L, + 1E2061L, + 1E2062L, + 1E2063L, + 1E2064L, + 1E2065L, + 1E2066L, + 1E2067L, + 1E2068L, + 1E2069L, + 1E2070L, + 1E2071L, + 1E2072L, + 1E2073L, + 1E2074L, + 1E2075L, + 1E2076L, + 1E2077L, + 1E2078L, + 1E2079L, + 1E2080L, + 1E2081L, + 1E2082L, + 1E2083L, + 1E2084L, + 1E2085L, + 1E2086L, + 1E2087L, + 1E2088L, + 1E2089L, + 1E2090L, + 1E2091L, + 1E2092L, + 1E2093L, + 1E2094L, + 1E2095L, + 1E2096L, + 1E2097L, + 1E2098L, + 1E2099L, + 1E2100L, + 1E2101L, + 1E2102L, + 1E2103L, + 1E2104L, + 1E2105L, + 1E2106L, + 1E2107L, + 1E2108L, + 1E2109L, + 1E2110L, + 1E2111L, + 1E2112L, + 1E2113L, + 1E2114L, + 1E2115L, + 1E2116L, + 1E2117L, + 1E2118L, + 1E2119L, + 1E2120L, + 1E2121L, + 1E2122L, + 1E2123L, + 1E2124L, + 1E2125L, + 1E2126L, + 1E2127L, + 1E2128L, + 1E2129L, + 1E2130L, + 1E2131L, + 1E2132L, + 1E2133L, + 1E2134L, + 1E2135L, + 1E2136L, + 1E2137L, + 1E2138L, + 1E2139L, + 1E2140L, + 1E2141L, + 1E2142L, + 1E2143L, + 1E2144L, + 1E2145L, + 1E2146L, + 1E2147L, + 1E2148L, + 1E2149L, + 1E2150L, + 1E2151L, + 1E2152L, + 1E2153L, + 1E2154L, + 1E2155L, + 1E2156L, + 1E2157L, + 1E2158L, + 1E2159L, + 1E2160L, + 1E2161L, + 1E2162L, + 1E2163L, + 1E2164L, + 1E2165L, + 1E2166L, + 1E2167L, + 1E2168L, + 1E2169L, + 1E2170L, + 1E2171L, + 1E2172L, + 1E2173L, + 1E2174L, + 1E2175L, + 1E2176L, + 1E2177L, + 1E2178L, + 1E2179L, + 1E2180L, + 1E2181L, + 1E2182L, + 1E2183L, + 1E2184L, + 1E2185L, + 1E2186L, + 1E2187L, + 1E2188L, + 1E2189L, + 1E2190L, + 1E2191L, + 1E2192L, + 1E2193L, + 1E2194L, + 1E2195L, + 1E2196L, + 1E2197L, + 1E2198L, + 1E2199L, + 1E2200L, + 1E2201L, + 1E2202L, + 1E2203L, + 1E2204L, + 1E2205L, + 1E2206L, + 1E2207L, + 1E2208L, + 1E2209L, + 1E2210L, + 1E2211L, + 1E2212L, + 1E2213L, + 1E2214L, + 1E2215L, + 1E2216L, + 1E2217L, + 1E2218L, + 1E2219L, + 1E2220L, + 1E2221L, + 1E2222L, + 1E2223L, + 1E2224L, + 1E2225L, + 1E2226L, + 1E2227L, + 1E2228L, + 1E2229L, + 1E2230L, + 1E2231L, + 1E2232L, + 1E2233L, + 1E2234L, + 1E2235L, + 1E2236L, + 1E2237L, + 1E2238L, + 1E2239L, + 1E2240L, + 1E2241L, + 1E2242L, + 1E2243L, + 1E2244L, + 1E2245L, + 1E2246L, + 1E2247L, + 1E2248L, + 1E2249L, + 1E2250L, + 1E2251L, + 1E2252L, + 1E2253L, + 1E2254L, + 1E2255L, + 1E2256L, + 1E2257L, + 1E2258L, + 1E2259L, + 1E2260L, + 1E2261L, + 1E2262L, + 1E2263L, + 1E2264L, + 1E2265L, + 1E2266L, + 1E2267L, + 1E2268L, + 1E2269L, + 1E2270L, + 1E2271L, + 1E2272L, + 1E2273L, + 1E2274L, + 1E2275L, + 1E2276L, + 1E2277L, + 1E2278L, + 1E2279L, + 1E2280L, + 1E2281L, + 1E2282L, + 1E2283L, + 1E2284L, + 1E2285L, + 1E2286L, + 1E2287L, + 1E2288L, + 1E2289L, + 1E2290L, + 1E2291L, + 1E2292L, + 1E2293L, + 1E2294L, + 1E2295L, + 1E2296L, + 1E2297L, + 1E2298L, + 1E2299L, + 1E2300L, + 1E2301L, + 1E2302L, + 1E2303L, + 1E2304L, + 1E2305L, + 1E2306L, + 1E2307L, + 1E2308L, + 1E2309L, + 1E2310L, + 1E2311L, + 1E2312L, + 1E2313L, + 1E2314L, + 1E2315L, + 1E2316L, + 1E2317L, + 1E2318L, + 1E2319L, + 1E2320L, + 1E2321L, + 1E2322L, + 1E2323L, + 1E2324L, + 1E2325L, + 1E2326L, + 1E2327L, + 1E2328L, + 1E2329L, + 1E2330L, + 1E2331L, + 1E2332L, + 1E2333L, + 1E2334L, + 1E2335L, + 1E2336L, + 1E2337L, + 1E2338L, + 1E2339L, + 1E2340L, + 1E2341L, + 1E2342L, + 1E2343L, + 1E2344L, + 1E2345L, + 1E2346L, + 1E2347L, + 1E2348L, + 1E2349L, + 1E2350L, + 1E2351L, + 1E2352L, + 1E2353L, + 1E2354L, + 1E2355L, + 1E2356L, + 1E2357L, + 1E2358L, + 1E2359L, + 1E2360L, + 1E2361L, + 1E2362L, + 1E2363L, + 1E2364L, + 1E2365L, + 1E2366L, + 1E2367L, + 1E2368L, + 1E2369L, + 1E2370L, + 1E2371L, + 1E2372L, + 1E2373L, + 1E2374L, + 1E2375L, + 1E2376L, + 1E2377L, + 1E2378L, + 1E2379L, + 1E2380L, + 1E2381L, + 1E2382L, + 1E2383L, + 1E2384L, + 1E2385L, + 1E2386L, + 1E2387L, + 1E2388L, + 1E2389L, + 1E2390L, + 1E2391L, + 1E2392L, + 1E2393L, + 1E2394L, + 1E2395L, + 1E2396L, + 1E2397L, + 1E2398L, + 1E2399L, + 1E2400L, + 1E2401L, + 1E2402L, + 1E2403L, + 1E2404L, + 1E2405L, + 1E2406L, + 1E2407L, + 1E2408L, + 1E2409L, + 1E2410L, + 1E2411L, + 1E2412L, + 1E2413L, + 1E2414L, + 1E2415L, + 1E2416L, + 1E2417L, + 1E2418L, + 1E2419L, + 1E2420L, + 1E2421L, + 1E2422L, + 1E2423L, + 1E2424L, + 1E2425L, + 1E2426L, + 1E2427L, + 1E2428L, + 1E2429L, + 1E2430L, + 1E2431L, + 1E2432L, + 1E2433L, + 1E2434L, + 1E2435L, + 1E2436L, + 1E2437L, + 1E2438L, + 1E2439L, + 1E2440L, + 1E2441L, + 1E2442L, + 1E2443L, + 1E2444L, + 1E2445L, + 1E2446L, + 1E2447L, + 1E2448L, + 1E2449L, + 1E2450L, + 1E2451L, + 1E2452L, + 1E2453L, + 1E2454L, + 1E2455L, + 1E2456L, + 1E2457L, + 1E2458L, + 1E2459L, + 1E2460L, + 1E2461L, + 1E2462L, + 1E2463L, + 1E2464L, + 1E2465L, + 1E2466L, + 1E2467L, + 1E2468L, + 1E2469L, + 1E2470L, + 1E2471L, + 1E2472L, + 1E2473L, + 1E2474L, + 1E2475L, + 1E2476L, + 1E2477L, + 1E2478L, + 1E2479L, + 1E2480L, + 1E2481L, + 1E2482L, + 1E2483L, + 1E2484L, + 1E2485L, + 1E2486L, + 1E2487L, + 1E2488L, + 1E2489L, + 1E2490L, + 1E2491L, + 1E2492L, + 1E2493L, + 1E2494L, + 1E2495L, + 1E2496L, + 1E2497L, + 1E2498L, + 1E2499L, + 1E2500L, + 1E2501L, + 1E2502L, + 1E2503L, + 1E2504L, + 1E2505L, + 1E2506L, + 1E2507L, + 1E2508L, + 1E2509L, + 1E2510L, + 1E2511L, + 1E2512L, + 1E2513L, + 1E2514L, + 1E2515L, + 1E2516L, + 1E2517L, + 1E2518L, + 1E2519L, + 1E2520L, + 1E2521L, + 1E2522L, + 1E2523L, + 1E2524L, + 1E2525L, + 1E2526L, + 1E2527L, + 1E2528L, + 1E2529L, + 1E2530L, + 1E2531L, + 1E2532L, + 1E2533L, + 1E2534L, + 1E2535L, + 1E2536L, + 1E2537L, + 1E2538L, + 1E2539L, + 1E2540L, + 1E2541L, + 1E2542L, + 1E2543L, + 1E2544L, + 1E2545L, + 1E2546L, + 1E2547L, + 1E2548L, + 1E2549L, + 1E2550L, + 1E2551L, + 1E2552L, + 1E2553L, + 1E2554L, + 1E2555L, + 1E2556L, + 1E2557L, + 1E2558L, + 1E2559L, + 1E2560L, + 1E2561L, + 1E2562L, + 1E2563L, + 1E2564L, + 1E2565L, + 1E2566L, + 1E2567L, + 1E2568L, + 1E2569L, + 1E2570L, + 1E2571L, + 1E2572L, + 1E2573L, + 1E2574L, + 1E2575L, + 1E2576L, + 1E2577L, + 1E2578L, + 1E2579L, + 1E2580L, + 1E2581L, + 1E2582L, + 1E2583L, + 1E2584L, + 1E2585L, + 1E2586L, + 1E2587L, + 1E2588L, + 1E2589L, + 1E2590L, + 1E2591L, + 1E2592L, + 1E2593L, + 1E2594L, + 1E2595L, + 1E2596L, + 1E2597L, + 1E2598L, + 1E2599L, + 1E2600L, + 1E2601L, + 1E2602L, + 1E2603L, + 1E2604L, + 1E2605L, + 1E2606L, + 1E2607L, + 1E2608L, + 1E2609L, + 1E2610L, + 1E2611L, + 1E2612L, + 1E2613L, + 1E2614L, + 1E2615L, + 1E2616L, + 1E2617L, + 1E2618L, + 1E2619L, + 1E2620L, + 1E2621L, + 1E2622L, + 1E2623L, + 1E2624L, + 1E2625L, + 1E2626L, + 1E2627L, + 1E2628L, + 1E2629L, + 1E2630L, + 1E2631L, + 1E2632L, + 1E2633L, + 1E2634L, + 1E2635L, + 1E2636L, + 1E2637L, + 1E2638L, + 1E2639L, + 1E2640L, + 1E2641L, + 1E2642L, + 1E2643L, + 1E2644L, + 1E2645L, + 1E2646L, + 1E2647L, + 1E2648L, + 1E2649L, + 1E2650L, + 1E2651L, + 1E2652L, + 1E2653L, + 1E2654L, + 1E2655L, + 1E2656L, + 1E2657L, + 1E2658L, + 1E2659L, + 1E2660L, + 1E2661L, + 1E2662L, + 1E2663L, + 1E2664L, + 1E2665L, + 1E2666L, + 1E2667L, + 1E2668L, + 1E2669L, + 1E2670L, + 1E2671L, + 1E2672L, + 1E2673L, + 1E2674L, + 1E2675L, + 1E2676L, + 1E2677L, + 1E2678L, + 1E2679L, + 1E2680L, + 1E2681L, + 1E2682L, + 1E2683L, + 1E2684L, + 1E2685L, + 1E2686L, + 1E2687L, + 1E2688L, + 1E2689L, + 1E2690L, + 1E2691L, + 1E2692L, + 1E2693L, + 1E2694L, + 1E2695L, + 1E2696L, + 1E2697L, + 1E2698L, + 1E2699L, + 1E2700L, + 1E2701L, + 1E2702L, + 1E2703L, + 1E2704L, + 1E2705L, + 1E2706L, + 1E2707L, + 1E2708L, + 1E2709L, + 1E2710L, + 1E2711L, + 1E2712L, + 1E2713L, + 1E2714L, + 1E2715L, + 1E2716L, + 1E2717L, + 1E2718L, + 1E2719L, + 1E2720L, + 1E2721L, + 1E2722L, + 1E2723L, + 1E2724L, + 1E2725L, + 1E2726L, + 1E2727L, + 1E2728L, + 1E2729L, + 1E2730L, + 1E2731L, + 1E2732L, + 1E2733L, + 1E2734L, + 1E2735L, + 1E2736L, + 1E2737L, + 1E2738L, + 1E2739L, + 1E2740L, + 1E2741L, + 1E2742L, + 1E2743L, + 1E2744L, + 1E2745L, + 1E2746L, + 1E2747L, + 1E2748L, + 1E2749L, + 1E2750L, + 1E2751L, + 1E2752L, + 1E2753L, + 1E2754L, + 1E2755L, + 1E2756L, + 1E2757L, + 1E2758L, + 1E2759L, + 1E2760L, + 1E2761L, + 1E2762L, + 1E2763L, + 1E2764L, + 1E2765L, + 1E2766L, + 1E2767L, + 1E2768L, + 1E2769L, + 1E2770L, + 1E2771L, + 1E2772L, + 1E2773L, + 1E2774L, + 1E2775L, + 1E2776L, + 1E2777L, + 1E2778L, + 1E2779L, + 1E2780L, + 1E2781L, + 1E2782L, + 1E2783L, + 1E2784L, + 1E2785L, + 1E2786L, + 1E2787L, + 1E2788L, + 1E2789L, + 1E2790L, + 1E2791L, + 1E2792L, + 1E2793L, + 1E2794L, + 1E2795L, + 1E2796L, + 1E2797L, + 1E2798L, + 1E2799L, + 1E2800L, + 1E2801L, + 1E2802L, + 1E2803L, + 1E2804L, + 1E2805L, + 1E2806L, + 1E2807L, + 1E2808L, + 1E2809L, + 1E2810L, + 1E2811L, + 1E2812L, + 1E2813L, + 1E2814L, + 1E2815L, + 1E2816L, + 1E2817L, + 1E2818L, + 1E2819L, + 1E2820L, + 1E2821L, + 1E2822L, + 1E2823L, + 1E2824L, + 1E2825L, + 1E2826L, + 1E2827L, + 1E2828L, + 1E2829L, + 1E2830L, + 1E2831L, + 1E2832L, + 1E2833L, + 1E2834L, + 1E2835L, + 1E2836L, + 1E2837L, + 1E2838L, + 1E2839L, + 1E2840L, + 1E2841L, + 1E2842L, + 1E2843L, + 1E2844L, + 1E2845L, + 1E2846L, + 1E2847L, + 1E2848L, + 1E2849L, + 1E2850L, + 1E2851L, + 1E2852L, + 1E2853L, + 1E2854L, + 1E2855L, + 1E2856L, + 1E2857L, + 1E2858L, + 1E2859L, + 1E2860L, + 1E2861L, + 1E2862L, + 1E2863L, + 1E2864L, + 1E2865L, + 1E2866L, + 1E2867L, + 1E2868L, + 1E2869L, + 1E2870L, + 1E2871L, + 1E2872L, + 1E2873L, + 1E2874L, + 1E2875L, + 1E2876L, + 1E2877L, + 1E2878L, + 1E2879L, + 1E2880L, + 1E2881L, + 1E2882L, + 1E2883L, + 1E2884L, + 1E2885L, + 1E2886L, + 1E2887L, + 1E2888L, + 1E2889L, + 1E2890L, + 1E2891L, + 1E2892L, + 1E2893L, + 1E2894L, + 1E2895L, + 1E2896L, + 1E2897L, + 1E2898L, + 1E2899L, + 1E2900L, + 1E2901L, + 1E2902L, + 1E2903L, + 1E2904L, + 1E2905L, + 1E2906L, + 1E2907L, + 1E2908L, + 1E2909L, + 1E2910L, + 1E2911L, + 1E2912L, + 1E2913L, + 1E2914L, + 1E2915L, + 1E2916L, + 1E2917L, + 1E2918L, + 1E2919L, + 1E2920L, + 1E2921L, + 1E2922L, + 1E2923L, + 1E2924L, + 1E2925L, + 1E2926L, + 1E2927L, + 1E2928L, + 1E2929L, + 1E2930L, + 1E2931L, + 1E2932L, + 1E2933L, + 1E2934L, + 1E2935L, + 1E2936L, + 1E2937L, + 1E2938L, + 1E2939L, + 1E2940L, + 1E2941L, + 1E2942L, + 1E2943L, + 1E2944L, + 1E2945L, + 1E2946L, + 1E2947L, + 1E2948L, + 1E2949L, + 1E2950L, + 1E2951L, + 1E2952L, + 1E2953L, + 1E2954L, + 1E2955L, + 1E2956L, + 1E2957L, + 1E2958L, + 1E2959L, + 1E2960L, + 1E2961L, + 1E2962L, + 1E2963L, + 1E2964L, + 1E2965L, + 1E2966L, + 1E2967L, + 1E2968L, + 1E2969L, + 1E2970L, + 1E2971L, + 1E2972L, + 1E2973L, + 1E2974L, + 1E2975L, + 1E2976L, + 1E2977L, + 1E2978L, + 1E2979L, + 1E2980L, + 1E2981L, + 1E2982L, + 1E2983L, + 1E2984L, + 1E2985L, + 1E2986L, + 1E2987L, + 1E2988L, + 1E2989L, + 1E2990L, + 1E2991L, + 1E2992L, + 1E2993L, + 1E2994L, + 1E2995L, + 1E2996L, + 1E2997L, + 1E2998L, + 1E2999L, + 1E3000L, + 1E3001L, + 1E3002L, + 1E3003L, + 1E3004L, + 1E3005L, + 1E3006L, + 1E3007L, + 1E3008L, + 1E3009L, + 1E3010L, + 1E3011L, + 1E3012L, + 1E3013L, + 1E3014L, + 1E3015L, + 1E3016L, + 1E3017L, + 1E3018L, + 1E3019L, + 1E3020L, + 1E3021L, + 1E3022L, + 1E3023L, + 1E3024L, + 1E3025L, + 1E3026L, + 1E3027L, + 1E3028L, + 1E3029L, + 1E3030L, + 1E3031L, + 1E3032L, + 1E3033L, + 1E3034L, + 1E3035L, + 1E3036L, + 1E3037L, + 1E3038L, + 1E3039L, + 1E3040L, + 1E3041L, + 1E3042L, + 1E3043L, + 1E3044L, + 1E3045L, + 1E3046L, + 1E3047L, + 1E3048L, + 1E3049L, + 1E3050L, + 1E3051L, + 1E3052L, + 1E3053L, + 1E3054L, + 1E3055L, + 1E3056L, + 1E3057L, + 1E3058L, + 1E3059L, + 1E3060L, + 1E3061L, + 1E3062L, + 1E3063L, + 1E3064L, + 1E3065L, + 1E3066L, + 1E3067L, + 1E3068L, + 1E3069L, + 1E3070L, + 1E3071L, + 1E3072L, + 1E3073L, + 1E3074L, + 1E3075L, + 1E3076L, + 1E3077L, + 1E3078L, + 1E3079L, + 1E3080L, + 1E3081L, + 1E3082L, + 1E3083L, + 1E3084L, + 1E3085L, + 1E3086L, + 1E3087L, + 1E3088L, + 1E3089L, + 1E3090L, + 1E3091L, + 1E3092L, + 1E3093L, + 1E3094L, + 1E3095L, + 1E3096L, + 1E3097L, + 1E3098L, + 1E3099L, + 1E3100L, + 1E3101L, + 1E3102L, + 1E3103L, + 1E3104L, + 1E3105L, + 1E3106L, + 1E3107L, + 1E3108L, + 1E3109L, + 1E3110L, + 1E3111L, + 1E3112L, + 1E3113L, + 1E3114L, + 1E3115L, + 1E3116L, + 1E3117L, + 1E3118L, + 1E3119L, + 1E3120L, + 1E3121L, + 1E3122L, + 1E3123L, + 1E3124L, + 1E3125L, + 1E3126L, + 1E3127L, + 1E3128L, + 1E3129L, + 1E3130L, + 1E3131L, + 1E3132L, + 1E3133L, + 1E3134L, + 1E3135L, + 1E3136L, + 1E3137L, + 1E3138L, + 1E3139L, + 1E3140L, + 1E3141L, + 1E3142L, + 1E3143L, + 1E3144L, + 1E3145L, + 1E3146L, + 1E3147L, + 1E3148L, + 1E3149L, + 1E3150L, + 1E3151L, + 1E3152L, + 1E3153L, + 1E3154L, + 1E3155L, + 1E3156L, + 1E3157L, + 1E3158L, + 1E3159L, + 1E3160L, + 1E3161L, + 1E3162L, + 1E3163L, + 1E3164L, + 1E3165L, + 1E3166L, + 1E3167L, + 1E3168L, + 1E3169L, + 1E3170L, + 1E3171L, + 1E3172L, + 1E3173L, + 1E3174L, + 1E3175L, + 1E3176L, + 1E3177L, + 1E3178L, + 1E3179L, + 1E3180L, + 1E3181L, + 1E3182L, + 1E3183L, + 1E3184L, + 1E3185L, + 1E3186L, + 1E3187L, + 1E3188L, + 1E3189L, + 1E3190L, + 1E3191L, + 1E3192L, + 1E3193L, + 1E3194L, + 1E3195L, + 1E3196L, + 1E3197L, + 1E3198L, + 1E3199L, + 1E3200L, + 1E3201L, + 1E3202L, + 1E3203L, + 1E3204L, + 1E3205L, + 1E3206L, + 1E3207L, + 1E3208L, + 1E3209L, + 1E3210L, + 1E3211L, + 1E3212L, + 1E3213L, + 1E3214L, + 1E3215L, + 1E3216L, + 1E3217L, + 1E3218L, + 1E3219L, + 1E3220L, + 1E3221L, + 1E3222L, + 1E3223L, + 1E3224L, + 1E3225L, + 1E3226L, + 1E3227L, + 1E3228L, + 1E3229L, + 1E3230L, + 1E3231L, + 1E3232L, + 1E3233L, + 1E3234L, + 1E3235L, + 1E3236L, + 1E3237L, + 1E3238L, + 1E3239L, + 1E3240L, + 1E3241L, + 1E3242L, + 1E3243L, + 1E3244L, + 1E3245L, + 1E3246L, + 1E3247L, + 1E3248L, + 1E3249L, + 1E3250L, + 1E3251L, + 1E3252L, + 1E3253L, + 1E3254L, + 1E3255L, + 1E3256L, + 1E3257L, + 1E3258L, + 1E3259L, + 1E3260L, + 1E3261L, + 1E3262L, + 1E3263L, + 1E3264L, + 1E3265L, + 1E3266L, + 1E3267L, + 1E3268L, + 1E3269L, + 1E3270L, + 1E3271L, + 1E3272L, + 1E3273L, + 1E3274L, + 1E3275L, + 1E3276L, + 1E3277L, + 1E3278L, + 1E3279L, + 1E3280L, + 1E3281L, + 1E3282L, + 1E3283L, + 1E3284L, + 1E3285L, + 1E3286L, + 1E3287L, + 1E3288L, + 1E3289L, + 1E3290L, + 1E3291L, + 1E3292L, + 1E3293L, + 1E3294L, + 1E3295L, + 1E3296L, + 1E3297L, + 1E3298L, + 1E3299L, + 1E3300L, + 1E3301L, + 1E3302L, + 1E3303L, + 1E3304L, + 1E3305L, + 1E3306L, + 1E3307L, + 1E3308L, + 1E3309L, + 1E3310L, + 1E3311L, + 1E3312L, + 1E3313L, + 1E3314L, + 1E3315L, + 1E3316L, + 1E3317L, + 1E3318L, + 1E3319L, + 1E3320L, + 1E3321L, + 1E3322L, + 1E3323L, + 1E3324L, + 1E3325L, + 1E3326L, + 1E3327L, + 1E3328L, + 1E3329L, + 1E3330L, + 1E3331L, + 1E3332L, + 1E3333L, + 1E3334L, + 1E3335L, + 1E3336L, + 1E3337L, + 1E3338L, + 1E3339L, + 1E3340L, + 1E3341L, + 1E3342L, + 1E3343L, + 1E3344L, + 1E3345L, + 1E3346L, + 1E3347L, + 1E3348L, + 1E3349L, + 1E3350L, + 1E3351L, + 1E3352L, + 1E3353L, + 1E3354L, + 1E3355L, + 1E3356L, + 1E3357L, + 1E3358L, + 1E3359L, + 1E3360L, + 1E3361L, + 1E3362L, + 1E3363L, + 1E3364L, + 1E3365L, + 1E3366L, + 1E3367L, + 1E3368L, + 1E3369L, + 1E3370L, + 1E3371L, + 1E3372L, + 1E3373L, + 1E3374L, + 1E3375L, + 1E3376L, + 1E3377L, + 1E3378L, + 1E3379L, + 1E3380L, + 1E3381L, + 1E3382L, + 1E3383L, + 1E3384L, + 1E3385L, + 1E3386L, + 1E3387L, + 1E3388L, + 1E3389L, + 1E3390L, + 1E3391L, + 1E3392L, + 1E3393L, + 1E3394L, + 1E3395L, + 1E3396L, + 1E3397L, + 1E3398L, + 1E3399L, + 1E3400L, + 1E3401L, + 1E3402L, + 1E3403L, + 1E3404L, + 1E3405L, + 1E3406L, + 1E3407L, + 1E3408L, + 1E3409L, + 1E3410L, + 1E3411L, + 1E3412L, + 1E3413L, + 1E3414L, + 1E3415L, + 1E3416L, + 1E3417L, + 1E3418L, + 1E3419L, + 1E3420L, + 1E3421L, + 1E3422L, + 1E3423L, + 1E3424L, + 1E3425L, + 1E3426L, + 1E3427L, + 1E3428L, + 1E3429L, + 1E3430L, + 1E3431L, + 1E3432L, + 1E3433L, + 1E3434L, + 1E3435L, + 1E3436L, + 1E3437L, + 1E3438L, + 1E3439L, + 1E3440L, + 1E3441L, + 1E3442L, + 1E3443L, + 1E3444L, + 1E3445L, + 1E3446L, + 1E3447L, + 1E3448L, + 1E3449L, + 1E3450L, + 1E3451L, + 1E3452L, + 1E3453L, + 1E3454L, + 1E3455L, + 1E3456L, + 1E3457L, + 1E3458L, + 1E3459L, + 1E3460L, + 1E3461L, + 1E3462L, + 1E3463L, + 1E3464L, + 1E3465L, + 1E3466L, + 1E3467L, + 1E3468L, + 1E3469L, + 1E3470L, + 1E3471L, + 1E3472L, + 1E3473L, + 1E3474L, + 1E3475L, + 1E3476L, + 1E3477L, + 1E3478L, + 1E3479L, + 1E3480L, + 1E3481L, + 1E3482L, + 1E3483L, + 1E3484L, + 1E3485L, + 1E3486L, + 1E3487L, + 1E3488L, + 1E3489L, + 1E3490L, + 1E3491L, + 1E3492L, + 1E3493L, + 1E3494L, + 1E3495L, + 1E3496L, + 1E3497L, + 1E3498L, + 1E3499L, + 1E3500L, + 1E3501L, + 1E3502L, + 1E3503L, + 1E3504L, + 1E3505L, + 1E3506L, + 1E3507L, + 1E3508L, + 1E3509L, + 1E3510L, + 1E3511L, + 1E3512L, + 1E3513L, + 1E3514L, + 1E3515L, + 1E3516L, + 1E3517L, + 1E3518L, + 1E3519L, + 1E3520L, + 1E3521L, + 1E3522L, + 1E3523L, + 1E3524L, + 1E3525L, + 1E3526L, + 1E3527L, + 1E3528L, + 1E3529L, + 1E3530L, + 1E3531L, + 1E3532L, + 1E3533L, + 1E3534L, + 1E3535L, + 1E3536L, + 1E3537L, + 1E3538L, + 1E3539L, + 1E3540L, + 1E3541L, + 1E3542L, + 1E3543L, + 1E3544L, + 1E3545L, + 1E3546L, + 1E3547L, + 1E3548L, + 1E3549L, + 1E3550L, + 1E3551L, + 1E3552L, + 1E3553L, + 1E3554L, + 1E3555L, + 1E3556L, + 1E3557L, + 1E3558L, + 1E3559L, + 1E3560L, + 1E3561L, + 1E3562L, + 1E3563L, + 1E3564L, + 1E3565L, + 1E3566L, + 1E3567L, + 1E3568L, + 1E3569L, + 1E3570L, + 1E3571L, + 1E3572L, + 1E3573L, + 1E3574L, + 1E3575L, + 1E3576L, + 1E3577L, + 1E3578L, + 1E3579L, + 1E3580L, + 1E3581L, + 1E3582L, + 1E3583L, + 1E3584L, + 1E3585L, + 1E3586L, + 1E3587L, + 1E3588L, + 1E3589L, + 1E3590L, + 1E3591L, + 1E3592L, + 1E3593L, + 1E3594L, + 1E3595L, + 1E3596L, + 1E3597L, + 1E3598L, + 1E3599L, + 1E3600L, + 1E3601L, + 1E3602L, + 1E3603L, + 1E3604L, + 1E3605L, + 1E3606L, + 1E3607L, + 1E3608L, + 1E3609L, + 1E3610L, + 1E3611L, + 1E3612L, + 1E3613L, + 1E3614L, + 1E3615L, + 1E3616L, + 1E3617L, + 1E3618L, + 1E3619L, + 1E3620L, + 1E3621L, + 1E3622L, + 1E3623L, + 1E3624L, + 1E3625L, + 1E3626L, + 1E3627L, + 1E3628L, + 1E3629L, + 1E3630L, + 1E3631L, + 1E3632L, + 1E3633L, + 1E3634L, + 1E3635L, + 1E3636L, + 1E3637L, + 1E3638L, + 1E3639L, + 1E3640L, + 1E3641L, + 1E3642L, + 1E3643L, + 1E3644L, + 1E3645L, + 1E3646L, + 1E3647L, + 1E3648L, + 1E3649L, + 1E3650L, + 1E3651L, + 1E3652L, + 1E3653L, + 1E3654L, + 1E3655L, + 1E3656L, + 1E3657L, + 1E3658L, + 1E3659L, + 1E3660L, + 1E3661L, + 1E3662L, + 1E3663L, + 1E3664L, + 1E3665L, + 1E3666L, + 1E3667L, + 1E3668L, + 1E3669L, + 1E3670L, + 1E3671L, + 1E3672L, + 1E3673L, + 1E3674L, + 1E3675L, + 1E3676L, + 1E3677L, + 1E3678L, + 1E3679L, + 1E3680L, + 1E3681L, + 1E3682L, + 1E3683L, + 1E3684L, + 1E3685L, + 1E3686L, + 1E3687L, + 1E3688L, + 1E3689L, + 1E3690L, + 1E3691L, + 1E3692L, + 1E3693L, + 1E3694L, + 1E3695L, + 1E3696L, + 1E3697L, + 1E3698L, + 1E3699L, + 1E3700L, + 1E3701L, + 1E3702L, + 1E3703L, + 1E3704L, + 1E3705L, + 1E3706L, + 1E3707L, + 1E3708L, + 1E3709L, + 1E3710L, + 1E3711L, + 1E3712L, + 1E3713L, + 1E3714L, + 1E3715L, + 1E3716L, + 1E3717L, + 1E3718L, + 1E3719L, + 1E3720L, + 1E3721L, + 1E3722L, + 1E3723L, + 1E3724L, + 1E3725L, + 1E3726L, + 1E3727L, + 1E3728L, + 1E3729L, + 1E3730L, + 1E3731L, + 1E3732L, + 1E3733L, + 1E3734L, + 1E3735L, + 1E3736L, + 1E3737L, + 1E3738L, + 1E3739L, + 1E3740L, + 1E3741L, + 1E3742L, + 1E3743L, + 1E3744L, + 1E3745L, + 1E3746L, + 1E3747L, + 1E3748L, + 1E3749L, + 1E3750L, + 1E3751L, + 1E3752L, + 1E3753L, + 1E3754L, + 1E3755L, + 1E3756L, + 1E3757L, + 1E3758L, + 1E3759L, + 1E3760L, + 1E3761L, + 1E3762L, + 1E3763L, + 1E3764L, + 1E3765L, + 1E3766L, + 1E3767L, + 1E3768L, + 1E3769L, + 1E3770L, + 1E3771L, + 1E3772L, + 1E3773L, + 1E3774L, + 1E3775L, + 1E3776L, + 1E3777L, + 1E3778L, + 1E3779L, + 1E3780L, + 1E3781L, + 1E3782L, + 1E3783L, + 1E3784L, + 1E3785L, + 1E3786L, + 1E3787L, + 1E3788L, + 1E3789L, + 1E3790L, + 1E3791L, + 1E3792L, + 1E3793L, + 1E3794L, + 1E3795L, + 1E3796L, + 1E3797L, + 1E3798L, + 1E3799L, + 1E3800L, + 1E3801L, + 1E3802L, + 1E3803L, + 1E3804L, + 1E3805L, + 1E3806L, + 1E3807L, + 1E3808L, + 1E3809L, + 1E3810L, + 1E3811L, + 1E3812L, + 1E3813L, + 1E3814L, + 1E3815L, + 1E3816L, + 1E3817L, + 1E3818L, + 1E3819L, + 1E3820L, + 1E3821L, + 1E3822L, + 1E3823L, + 1E3824L, + 1E3825L, + 1E3826L, + 1E3827L, + 1E3828L, + 1E3829L, + 1E3830L, + 1E3831L, + 1E3832L, + 1E3833L, + 1E3834L, + 1E3835L, + 1E3836L, + 1E3837L, + 1E3838L, + 1E3839L, + 1E3840L, + 1E3841L, + 1E3842L, + 1E3843L, + 1E3844L, + 1E3845L, + 1E3846L, + 1E3847L, + 1E3848L, + 1E3849L, + 1E3850L, + 1E3851L, + 1E3852L, + 1E3853L, + 1E3854L, + 1E3855L, + 1E3856L, + 1E3857L, + 1E3858L, + 1E3859L, + 1E3860L, + 1E3861L, + 1E3862L, + 1E3863L, + 1E3864L, + 1E3865L, + 1E3866L, + 1E3867L, + 1E3868L, + 1E3869L, + 1E3870L, + 1E3871L, + 1E3872L, + 1E3873L, + 1E3874L, + 1E3875L, + 1E3876L, + 1E3877L, + 1E3878L, + 1E3879L, + 1E3880L, + 1E3881L, + 1E3882L, + 1E3883L, + 1E3884L, + 1E3885L, + 1E3886L, + 1E3887L, + 1E3888L, + 1E3889L, + 1E3890L, + 1E3891L, + 1E3892L, + 1E3893L, + 1E3894L, + 1E3895L, + 1E3896L, + 1E3897L, + 1E3898L, + 1E3899L, + 1E3900L, + 1E3901L, + 1E3902L, + 1E3903L, + 1E3904L, + 1E3905L, + 1E3906L, + 1E3907L, + 1E3908L, + 1E3909L, + 1E3910L, + 1E3911L, + 1E3912L, + 1E3913L, + 1E3914L, + 1E3915L, + 1E3916L, + 1E3917L, + 1E3918L, + 1E3919L, + 1E3920L, + 1E3921L, + 1E3922L, + 1E3923L, + 1E3924L, + 1E3925L, + 1E3926L, + 1E3927L, + 1E3928L, + 1E3929L, + 1E3930L, + 1E3931L, + 1E3932L, + 1E3933L, + 1E3934L, + 1E3935L, + 1E3936L, + 1E3937L, + 1E3938L, + 1E3939L, + 1E3940L, + 1E3941L, + 1E3942L, + 1E3943L, + 1E3944L, + 1E3945L, + 1E3946L, + 1E3947L, + 1E3948L, + 1E3949L, + 1E3950L, + 1E3951L, + 1E3952L, + 1E3953L, + 1E3954L, + 1E3955L, + 1E3956L, + 1E3957L, + 1E3958L, + 1E3959L, + 1E3960L, + 1E3961L, + 1E3962L, + 1E3963L, + 1E3964L, + 1E3965L, + 1E3966L, + 1E3967L, + 1E3968L, + 1E3969L, + 1E3970L, + 1E3971L, + 1E3972L, + 1E3973L, + 1E3974L, + 1E3975L, + 1E3976L, + 1E3977L, + 1E3978L, + 1E3979L, + 1E3980L, + 1E3981L, + 1E3982L, + 1E3983L, + 1E3984L, + 1E3985L, + 1E3986L, + 1E3987L, + 1E3988L, + 1E3989L, + 1E3990L, + 1E3991L, + 1E3992L, + 1E3993L, + 1E3994L, + 1E3995L, + 1E3996L, + 1E3997L, + 1E3998L, + 1E3999L, + 1E4000L, + 1E4001L, + 1E4002L, + 1E4003L, + 1E4004L, + 1E4005L, + 1E4006L, + 1E4007L, + 1E4008L, + 1E4009L, + 1E4010L, + 1E4011L, + 1E4012L, + 1E4013L, + 1E4014L, + 1E4015L, + 1E4016L, + 1E4017L, + 1E4018L, + 1E4019L, + 1E4020L, + 1E4021L, + 1E4022L, + 1E4023L, + 1E4024L, + 1E4025L, + 1E4026L, + 1E4027L, + 1E4028L, + 1E4029L, + 1E4030L, + 1E4031L, + 1E4032L, + 1E4033L, + 1E4034L, + 1E4035L, + 1E4036L, + 1E4037L, + 1E4038L, + 1E4039L, + 1E4040L, + 1E4041L, + 1E4042L, + 1E4043L, + 1E4044L, + 1E4045L, + 1E4046L, + 1E4047L, + 1E4048L, + 1E4049L, + 1E4050L, + 1E4051L, + 1E4052L, + 1E4053L, + 1E4054L, + 1E4055L, + 1E4056L, + 1E4057L, + 1E4058L, + 1E4059L, + 1E4060L, + 1E4061L, + 1E4062L, + 1E4063L, + 1E4064L, + 1E4065L, + 1E4066L, + 1E4067L, + 1E4068L, + 1E4069L, + 1E4070L, + 1E4071L, + 1E4072L, + 1E4073L, + 1E4074L, + 1E4075L, + 1E4076L, + 1E4077L, + 1E4078L, + 1E4079L, + 1E4080L, + 1E4081L, + 1E4082L, + 1E4083L, + 1E4084L, + 1E4085L, + 1E4086L, + 1E4087L, + 1E4088L, + 1E4089L, + 1E4090L, + 1E4091L, + 1E4092L, + 1E4093L, + 1E4094L, + 1E4095L, + 1E4096L, + 1E4097L, + 1E4098L, + 1E4099L, + 1E4100L, + 1E4101L, + 1E4102L, + 1E4103L, + 1E4104L, + 1E4105L, + 1E4106L, + 1E4107L, + 1E4108L, + 1E4109L, + 1E4110L, + 1E4111L, + 1E4112L, + 1E4113L, + 1E4114L, + 1E4115L, + 1E4116L, + 1E4117L, + 1E4118L, + 1E4119L, + 1E4120L, + 1E4121L, + 1E4122L, + 1E4123L, + 1E4124L, + 1E4125L, + 1E4126L, + 1E4127L, + 1E4128L, + 1E4129L, + 1E4130L, + 1E4131L, + 1E4132L, + 1E4133L, + 1E4134L, + 1E4135L, + 1E4136L, + 1E4137L, + 1E4138L, + 1E4139L, + 1E4140L, + 1E4141L, + 1E4142L, + 1E4143L, + 1E4144L, + 1E4145L, + 1E4146L, + 1E4147L, + 1E4148L, + 1E4149L, + 1E4150L, + 1E4151L, + 1E4152L, + 1E4153L, + 1E4154L, + 1E4155L, + 1E4156L, + 1E4157L, + 1E4158L, + 1E4159L, + 1E4160L, + 1E4161L, + 1E4162L, + 1E4163L, + 1E4164L, + 1E4165L, + 1E4166L, + 1E4167L, + 1E4168L, + 1E4169L, + 1E4170L, + 1E4171L, + 1E4172L, + 1E4173L, + 1E4174L, + 1E4175L, + 1E4176L, + 1E4177L, + 1E4178L, + 1E4179L, + 1E4180L, + 1E4181L, + 1E4182L, + 1E4183L, + 1E4184L, + 1E4185L, + 1E4186L, + 1E4187L, + 1E4188L, + 1E4189L, + 1E4190L, + 1E4191L, + 1E4192L, + 1E4193L, + 1E4194L, + 1E4195L, + 1E4196L, + 1E4197L, + 1E4198L, + 1E4199L, + 1E4200L, + 1E4201L, + 1E4202L, + 1E4203L, + 1E4204L, + 1E4205L, + 1E4206L, + 1E4207L, + 1E4208L, + 1E4209L, + 1E4210L, + 1E4211L, + 1E4212L, + 1E4213L, + 1E4214L, + 1E4215L, + 1E4216L, + 1E4217L, + 1E4218L, + 1E4219L, + 1E4220L, + 1E4221L, + 1E4222L, + 1E4223L, + 1E4224L, + 1E4225L, + 1E4226L, + 1E4227L, + 1E4228L, + 1E4229L, + 1E4230L, + 1E4231L, + 1E4232L, + 1E4233L, + 1E4234L, + 1E4235L, + 1E4236L, + 1E4237L, + 1E4238L, + 1E4239L, + 1E4240L, + 1E4241L, + 1E4242L, + 1E4243L, + 1E4244L, + 1E4245L, + 1E4246L, + 1E4247L, + 1E4248L, + 1E4249L, + 1E4250L, + 1E4251L, + 1E4252L, + 1E4253L, + 1E4254L, + 1E4255L, + 1E4256L, + 1E4257L, + 1E4258L, + 1E4259L, + 1E4260L, + 1E4261L, + 1E4262L, + 1E4263L, + 1E4264L, + 1E4265L, + 1E4266L, + 1E4267L, + 1E4268L, + 1E4269L, + 1E4270L, + 1E4271L, + 1E4272L, + 1E4273L, + 1E4274L, + 1E4275L, + 1E4276L, + 1E4277L, + 1E4278L, + 1E4279L, + 1E4280L, + 1E4281L, + 1E4282L, + 1E4283L, + 1E4284L, + 1E4285L, + 1E4286L, + 1E4287L, + 1E4288L, + 1E4289L, + 1E4290L, + 1E4291L, + 1E4292L, + 1E4293L, + 1E4294L, + 1E4295L, + 1E4296L, + 1E4297L, + 1E4298L, + 1E4299L, + 1E4300L, + 1E4301L, + 1E4302L, + 1E4303L, + 1E4304L, + 1E4305L, + 1E4306L, + 1E4307L, + 1E4308L, + 1E4309L, + 1E4310L, + 1E4311L, + 1E4312L, + 1E4313L, + 1E4314L, + 1E4315L, + 1E4316L, + 1E4317L, + 1E4318L, + 1E4319L, + 1E4320L, + 1E4321L, + 1E4322L, + 1E4323L, + 1E4324L, + 1E4325L, + 1E4326L, + 1E4327L, + 1E4328L, + 1E4329L, + 1E4330L, + 1E4331L, + 1E4332L, + 1E4333L, + 1E4334L, + 1E4335L, + 1E4336L, + 1E4337L, + 1E4338L, + 1E4339L, + 1E4340L, + 1E4341L, + 1E4342L, + 1E4343L, + 1E4344L, + 1E4345L, + 1E4346L, + 1E4347L, + 1E4348L, + 1E4349L, + 1E4350L, + 1E4351L, + 1E4352L, + 1E4353L, + 1E4354L, + 1E4355L, + 1E4356L, + 1E4357L, + 1E4358L, + 1E4359L, + 1E4360L, + 1E4361L, + 1E4362L, + 1E4363L, + 1E4364L, + 1E4365L, + 1E4366L, + 1E4367L, + 1E4368L, + 1E4369L, + 1E4370L, + 1E4371L, + 1E4372L, + 1E4373L, + 1E4374L, + 1E4375L, + 1E4376L, + 1E4377L, + 1E4378L, + 1E4379L, + 1E4380L, + 1E4381L, + 1E4382L, + 1E4383L, + 1E4384L, + 1E4385L, + 1E4386L, + 1E4387L, + 1E4388L, + 1E4389L, + 1E4390L, + 1E4391L, + 1E4392L, + 1E4393L, + 1E4394L, + 1E4395L, + 1E4396L, + 1E4397L, + 1E4398L, + 1E4399L, + 1E4400L, + 1E4401L, + 1E4402L, + 1E4403L, + 1E4404L, + 1E4405L, + 1E4406L, + 1E4407L, + 1E4408L, + 1E4409L, + 1E4410L, + 1E4411L, + 1E4412L, + 1E4413L, + 1E4414L, + 1E4415L, + 1E4416L, + 1E4417L, + 1E4418L, + 1E4419L, + 1E4420L, + 1E4421L, + 1E4422L, + 1E4423L, + 1E4424L, + 1E4425L, + 1E4426L, + 1E4427L, + 1E4428L, + 1E4429L, + 1E4430L, + 1E4431L, + 1E4432L, + 1E4433L, + 1E4434L, + 1E4435L, + 1E4436L, + 1E4437L, + 1E4438L, + 1E4439L, + 1E4440L, + 1E4441L, + 1E4442L, + 1E4443L, + 1E4444L, + 1E4445L, + 1E4446L, + 1E4447L, + 1E4448L, + 1E4449L, + 1E4450L, + 1E4451L, + 1E4452L, + 1E4453L, + 1E4454L, + 1E4455L, + 1E4456L, + 1E4457L, + 1E4458L, + 1E4459L, + 1E4460L, + 1E4461L, + 1E4462L, + 1E4463L, + 1E4464L, + 1E4465L, + 1E4466L, + 1E4467L, + 1E4468L, + 1E4469L, + 1E4470L, + 1E4471L, + 1E4472L, + 1E4473L, + 1E4474L, + 1E4475L, + 1E4476L, + 1E4477L, + 1E4478L, + 1E4479L, + 1E4480L, + 1E4481L, + 1E4482L, + 1E4483L, + 1E4484L, + 1E4485L, + 1E4486L, + 1E4487L, + 1E4488L, + 1E4489L, + 1E4490L, + 1E4491L, + 1E4492L, + 1E4493L, + 1E4494L, + 1E4495L, + 1E4496L, + 1E4497L, + 1E4498L, + 1E4499L, + 1E4500L, + 1E4501L, + 1E4502L, + 1E4503L, + 1E4504L, + 1E4505L, + 1E4506L, + 1E4507L, + 1E4508L, + 1E4509L, + 1E4510L, + 1E4511L, + 1E4512L, + 1E4513L, + 1E4514L, + 1E4515L, + 1E4516L, + 1E4517L, + 1E4518L, + 1E4519L, + 1E4520L, + 1E4521L, + 1E4522L, + 1E4523L, + 1E4524L, + 1E4525L, + 1E4526L, + 1E4527L, + 1E4528L, + 1E4529L, + 1E4530L, + 1E4531L, + 1E4532L, + 1E4533L, + 1E4534L, + 1E4535L, + 1E4536L, + 1E4537L, + 1E4538L, + 1E4539L, + 1E4540L, + 1E4541L, + 1E4542L, + 1E4543L, + 1E4544L, + 1E4545L, + 1E4546L, + 1E4547L, + 1E4548L, + 1E4549L, + 1E4550L, + 1E4551L, + 1E4552L, + 1E4553L, + 1E4554L, + 1E4555L, + 1E4556L, + 1E4557L, + 1E4558L, + 1E4559L, + 1E4560L, + 1E4561L, + 1E4562L, + 1E4563L, + 1E4564L, + 1E4565L, + 1E4566L, + 1E4567L, + 1E4568L, + 1E4569L, + 1E4570L, + 1E4571L, + 1E4572L, + 1E4573L, + 1E4574L, + 1E4575L, + 1E4576L, + 1E4577L, + 1E4578L, + 1E4579L, + 1E4580L, + 1E4581L, + 1E4582L, + 1E4583L, + 1E4584L, + 1E4585L, + 1E4586L, + 1E4587L, + 1E4588L, + 1E4589L, + 1E4590L, + 1E4591L, + 1E4592L, + 1E4593L, + 1E4594L, + 1E4595L, + 1E4596L, + 1E4597L, + 1E4598L, + 1E4599L, + 1E4600L, + 1E4601L, + 1E4602L, + 1E4603L, + 1E4604L, + 1E4605L, + 1E4606L, + 1E4607L, + 1E4608L, + 1E4609L, + 1E4610L, + 1E4611L, + 1E4612L, + 1E4613L, + 1E4614L, + 1E4615L, + 1E4616L, + 1E4617L, + 1E4618L, + 1E4619L, + 1E4620L, + 1E4621L, + 1E4622L, + 1E4623L, + 1E4624L, + 1E4625L, + 1E4626L, + 1E4627L, + 1E4628L, + 1E4629L, + 1E4630L, + 1E4631L, + 1E4632L, + 1E4633L, + 1E4634L, + 1E4635L, + 1E4636L, + 1E4637L, + 1E4638L, + 1E4639L, + 1E4640L, + 1E4641L, + 1E4642L, + 1E4643L, + 1E4644L, + 1E4645L, + 1E4646L, + 1E4647L, + 1E4648L, + 1E4649L, + 1E4650L, + 1E4651L, + 1E4652L, + 1E4653L, + 1E4654L, + 1E4655L, + 1E4656L, + 1E4657L, + 1E4658L, + 1E4659L, + 1E4660L, + 1E4661L, + 1E4662L, + 1E4663L, + 1E4664L, + 1E4665L, + 1E4666L, + 1E4667L, + 1E4668L, + 1E4669L, + 1E4670L, + 1E4671L, + 1E4672L, + 1E4673L, + 1E4674L, + 1E4675L, + 1E4676L, + 1E4677L, + 1E4678L, + 1E4679L, + 1E4680L, + 1E4681L, + 1E4682L, + 1E4683L, + 1E4684L, + 1E4685L, + 1E4686L, + 1E4687L, + 1E4688L, + 1E4689L, + 1E4690L, + 1E4691L, + 1E4692L, + 1E4693L, + 1E4694L, + 1E4695L, + 1E4696L, + 1E4697L, + 1E4698L, + 1E4699L, + 1E4700L, + 1E4701L, + 1E4702L, + 1E4703L, + 1E4704L, + 1E4705L, + 1E4706L, + 1E4707L, + 1E4708L, + 1E4709L, + 1E4710L, + 1E4711L, + 1E4712L, + 1E4713L, + 1E4714L, + 1E4715L, + 1E4716L, + 1E4717L, + 1E4718L, + 1E4719L, + 1E4720L, + 1E4721L, + 1E4722L, + 1E4723L, + 1E4724L, + 1E4725L, + 1E4726L, + 1E4727L, + 1E4728L, + 1E4729L, + 1E4730L, + 1E4731L, + 1E4732L, + 1E4733L, + 1E4734L, + 1E4735L, + 1E4736L, + 1E4737L, + 1E4738L, + 1E4739L, + 1E4740L, + 1E4741L, + 1E4742L, + 1E4743L, + 1E4744L, + 1E4745L, + 1E4746L, + 1E4747L, + 1E4748L, + 1E4749L, + 1E4750L, + 1E4751L, + 1E4752L, + 1E4753L, + 1E4754L, + 1E4755L, + 1E4756L, + 1E4757L, + 1E4758L, + 1E4759L, + 1E4760L, + 1E4761L, + 1E4762L, + 1E4763L, + 1E4764L, + 1E4765L, + 1E4766L, + 1E4767L, + 1E4768L, + 1E4769L, + 1E4770L, + 1E4771L, + 1E4772L, + 1E4773L, + 1E4774L, + 1E4775L, + 1E4776L, + 1E4777L, + 1E4778L, + 1E4779L, + 1E4780L, + 1E4781L, + 1E4782L, + 1E4783L, + 1E4784L, + 1E4785L, + 1E4786L, + 1E4787L, + 1E4788L, + 1E4789L, + 1E4790L, + 1E4791L, + 1E4792L, + 1E4793L, + 1E4794L, + 1E4795L, + 1E4796L, + 1E4797L, + 1E4798L, + 1E4799L, + 1E4800L, + 1E4801L, + 1E4802L, + 1E4803L, + 1E4804L, + 1E4805L, + 1E4806L, + 1E4807L, + 1E4808L, + 1E4809L, + 1E4810L, + 1E4811L, + 1E4812L, + 1E4813L, + 1E4814L, + 1E4815L, + 1E4816L, + 1E4817L, + 1E4818L, + 1E4819L, + 1E4820L, + 1E4821L, + 1E4822L, + 1E4823L, + 1E4824L, + 1E4825L, + 1E4826L, + 1E4827L, + 1E4828L, + 1E4829L, + 1E4830L, + 1E4831L, + 1E4832L, + 1E4833L, + 1E4834L, + 1E4835L, + 1E4836L, + 1E4837L, + 1E4838L, + 1E4839L, + 1E4840L, + 1E4841L, + 1E4842L, + 1E4843L, + 1E4844L, + 1E4845L, + 1E4846L, + 1E4847L, + 1E4848L, + 1E4849L, + 1E4850L, + 1E4851L, + 1E4852L, + 1E4853L, + 1E4854L, + 1E4855L, + 1E4856L, + 1E4857L, + 1E4858L, + 1E4859L, + 1E4860L, + 1E4861L, + 1E4862L, + 1E4863L, + 1E4864L, + 1E4865L, + 1E4866L, + 1E4867L, + 1E4868L, + 1E4869L, + 1E4870L, + 1E4871L, + 1E4872L, + 1E4873L, + 1E4874L, + 1E4875L, + 1E4876L, + 1E4877L, + 1E4878L, + 1E4879L, + 1E4880L, + 1E4881L, + 1E4882L, + 1E4883L, + 1E4884L, + 1E4885L, + 1E4886L, + 1E4887L, + 1E4888L, + 1E4889L, + 1E4890L, + 1E4891L, + 1E4892L, + 1E4893L, + 1E4894L, + 1E4895L, + 1E4896L, + 1E4897L, + 1E4898L, + 1E4899L, + 1E4900L, + 1E4901L, + 1E4902L, + 1E4903L, + 1E4904L, + 1E4905L, + 1E4906L, + 1E4907L, + 1E4908L, + 1E4909L, + 1E4910L, + 1E4911L, + 1E4912L, + 1E4913L, + 1E4914L, + 1E4915L, + 1E4916L, + 1E4917L, + 1E4918L, + 1E4919L, + 1E4920L, + 1E4921L, + 1E4922L, + 1E4923L, + 1E4924L, + 1E4925L, + 1E4926L, + 1E4927L, + 1E4928L, + 1E4929L, + 1E4930L, + 1E4931L, + 1E4932L, +}; + +Sftab_t _Sftable = +{ + { 1E1L, 1E2L, 1E4L, 1E8L, 1E16L, 1E32L }, + { 1E-1L, 1E-2L, 1E-4L, 1E-8L, 1E-16L, 1E-32L }, + { '0','0', '0','1', '0','2', '0','3', '0','4', + '0','5', '0','6', '0','7', '0','8', '0','9', + '1','0', '1','1', '1','2', '1','3', '1','4', + '1','5', '1','6', '1','7', '1','8', '1','9', + '2','0', '2','1', '2','2', '2','3', '2','4', + '2','5', '2','6', '2','7', '2','8', '2','9', + '3','0', '3','1', '3','2', '3','3', '3','4', + '3','5', '3','6', '3','7', '3','8', '3','9', + '4','0', '4','1', '4','2', '4','3', '4','4', + '4','5', '4','6', '4','7', '4','8', '4','9', + '5','0', '5','1', '5','2', '5','3', '5','4', + '5','5', '5','6', '5','7', '5','8', '5','9', + '6','0', '6','1', '6','2', '6','3', '6','4', + '6','5', '6','6', '6','7', '6','8', '6','9', + '7','0', '7','1', '7','2', '7','3', '7','4', + '7','5', '7','6', '7','7', '7','8', '7','9', + '8','0', '8','1', '8','2', '8','3', '8','4', + '8','5', '8','6', '8','7', '8','8', '8','9', + '9','0', '9','1', '9','2', '9','3', '9','4', + '9','5', '9','6', '9','7', '9','8', '9','9', + }, + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_", + sfcvinit, 0, + sffmtpos, + sffmtint, + (float*)&sf_flt_pow10[0], + (double*)&sf_dbl_pow10[0], + (_ast_fltmax_t*)&sf_ldbl_pow10[0], +}; +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/sfio b/usr/src/cmd/ast/libast/i386/FEATURE/sfio new file mode 100644 index 0000000000..da0e42b2fa --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/sfio @@ -0,0 +1,15 @@ +/* : : 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 ok */ +#define _hdr_float 1 /* #include ok */ +#define _hdr_floatingpoint 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _hdr_values 1 /* #include ok */ +#define _sys_filio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include 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/cmd/ast/libast/i386/FEATURE/sig b/usr/src/cmd/ast/libast/i386/FEATURE/sig new file mode 100644 index 0000000000..03020573f3 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/sig @@ -0,0 +1,138 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 +#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/cmd/ast/libast/i386/FEATURE/siglist b/usr/src/cmd/ast/libast/i386/FEATURE/siglist new file mode 100644 index 0000000000..7ac817cdd9 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/siglist @@ -0,0 +1,131 @@ +/* : : 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 ok */ +#define _hdr_string 1 /* #include ok */ +#define _hdr_signal 1 /* #include ok */ +#define _lib_strsignal 1 /* strsignal() in default lib(s) */ +#if defined(SIGHUP) && !defined(HAD_SIGHUP) +0,"HUP",SIGHUP, +#endif +#if defined(SIGINT) && !defined(HAD_SIGINT) +0,"INT",SIGINT, +#endif +#if defined(SIGQUIT) && !defined(HAD_SIGQUIT) +0,"QUIT",SIGQUIT, +#endif +#if defined(SIGILL) && !defined(HAD_SIGILL) +0,"ILL",SIGILL, +#endif +#if defined(SIGTRAP) && !defined(HAD_SIGTRAP) +0,"TRAP",SIGTRAP, +#endif +#if defined(SIGIOT) && !defined(HAD_SIGIOT) +0,"IOT",SIGIOT, +#endif +#if defined(SIGEMT) && !defined(HAD_SIGEMT) +0,"EMT",SIGEMT, +#endif +#if defined(SIGFPE) && !defined(HAD_SIGFPE) +0,"FPE",SIGFPE, +#endif +#if defined(SIGKILL) && !defined(HAD_SIGKILL) +0,"KILL",SIGKILL, +#endif +#if defined(SIGBUS) && !defined(HAD_SIGBUS) +0,"BUS",SIGBUS, +#endif +#if defined(SIGSEGV) && !defined(HAD_SIGSEGV) +0,"SEGV",SIGSEGV, +#endif +#if defined(SIGSYS) && !defined(HAD_SIGSYS) +0,"SYS",SIGSYS, +#endif +#if defined(SIGPIPE) && !defined(HAD_SIGPIPE) +0,"PIPE",SIGPIPE, +#endif +#if defined(SIGALRM) && !defined(HAD_SIGALRM) +0,"ALRM",SIGALRM, +#endif +#if defined(SIGTERM) && !defined(HAD_SIGTERM) +0,"TERM",SIGTERM, +#endif +#if defined(SIGUSR1) && !defined(HAD_SIGUSR1) +0,"USR1",SIGUSR1, +#endif +#if defined(SIGUSR2) && !defined(HAD_SIGUSR2) +0,"USR2",SIGUSR2, +#endif +#if defined(SIGCHLD) && !defined(HAD_SIGCHLD) +0,"CHLD",SIGCHLD, +#endif +#if defined(SIGPWR) && !defined(HAD_SIGPWR) +0,"PWR",SIGPWR, +#endif +#if defined(SIGWINCH) && !defined(HAD_SIGWINCH) +0,"WINCH",SIGWINCH, +#endif +#if defined(SIGURG) && !defined(HAD_SIGURG) +0,"URG",SIGURG, +#endif +#if defined(SIGPOLL) && !defined(HAD_SIGPOLL) +0,"POLL",SIGPOLL, +#endif +#if defined(SIGSTOP) && !defined(HAD_SIGSTOP) +0,"STOP",SIGSTOP, +#endif +#if defined(SIGTSTP) && !defined(HAD_SIGTSTP) +0,"TSTP",SIGTSTP, +#endif +#if defined(SIGCONT) && !defined(HAD_SIGCONT) +0,"CONT",SIGCONT, +#endif +#if defined(SIGTTIN) && !defined(HAD_SIGTTIN) +0,"TTIN",SIGTTIN, +#endif +#if defined(SIGTTOU) && !defined(HAD_SIGTTOU) +0,"TTOU",SIGTTOU, +#endif +#if defined(SIGVTALRM) && !defined(HAD_SIGVTALRM) +0,"VTALRM",SIGVTALRM, +#endif +#if defined(SIGPROF) && !defined(HAD_SIGPROF) +0,"PROF",SIGPROF, +#endif +#if defined(SIGXCPU) && !defined(HAD_SIGXCPU) +0,"XCPU",SIGXCPU, +#endif +#if defined(SIGXFSZ) && !defined(HAD_SIGXFSZ) +0,"XFSZ",SIGXFSZ, +#endif +#if defined(SIGWAITING) && !defined(HAD_SIGWAITING) +0,"WAITING",SIGWAITING, +#endif +#if defined(SIGLWP) && !defined(HAD_SIGLWP) +0,"LWP",SIGLWP, +#endif +#if defined(SIGFREEZE) && !defined(HAD_SIGFREEZE) +0,"FREEZE",SIGFREEZE, +#endif +#if defined(SIGTHAW) && !defined(HAD_SIGTHAW) +0,"THAW",SIGTHAW, +#endif +#if defined(SIGCANCEL) && !defined(HAD_SIGCANCEL) +0,"CANCEL",SIGCANCEL, +#endif +#if defined(SIGLOST) && !defined(HAD_SIGLOST) +0,"LOST",SIGLOST, +#endif +#if defined(SIGXRES) && !defined(HAD_SIGXRES) +0,"XRES",SIGXRES, +#endif +#if defined(SIGJVM1) && !defined(HAD_SIGJVM1) +0,"JVM1",SIGJVM1, +#endif +#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/cmd/ast/libast/i386/FEATURE/signal b/usr/src/cmd/ast/libast/i386/FEATURE/signal new file mode 100644 index 0000000000..43b48f1dda --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/signal @@ -0,0 +1,225 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_signal_ast 1 +#define _sys_types 1 /* #include ok */ + +#define SIG_MAX 73 + +static const char* const sig_name[] = +{ + "0", + "HUP", + "INT", + "QUIT", + "ILL", + "TRAP", + "IOT", + "EMT", + "FPE", + "KILL", + "BUS", + "SEGV", + "SYS", + "PIPE", + "ALRM", + "TERM", + "USR1", + "USR2", + "CHLD", + "PWR", + "WINCH", + "URG", + "IO", + "STOP", + "TSTP", + "CONT", + "TTIN", + "TTOU", + "VTALRM", + "PROF", + "XCPU", + "XFSZ", + "WAITING", + "LWP", + "FREEZE", + "THAW", + "CANCEL", + "LOST", + "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", + "RTMAX", + 0 +}; + +static const char* const sig_text[] = +{ + "Signal 0", + "Hangup", + "Interrupt", + "Quit", + "Illegal instruction", + "Trace trap", + "IOT trap", + "EMT trap", + "Floating exception", + "Killed", + "Bus error", + "Memory fault", + "Bad system call", + "Broken pipe", + "Alarm call", + "Terminated", + "User signal 1", + "User signal 2", + "Child status change", + "Power fail", + "Window change", + "Urgent IO", + "IO possible", + "Stopped (signal)", + "Stopped", + "Stopped process continued", + "Stopped (tty input)", + "Stopped (tty output)", + "Virtual timer alarm", + "Profile timer alarm", + "CPU time limit", + "File size limit", + "All threads blocked", + "Thread event", + "CPR freeze", + "CPR thaw", + "Thread Cancellation", + "Resources lost", + "Resource Control Exceeded", + "Reserved for JVM 1", + "Reserved for JVM 2", + "Information Request", + "Realtime priority 0 (lo)", + "Realtime priority 1", + "Realtime priority 2", + "Realtime priority 3", + "Realtime priority 4", + "Realtime priority 5", + "Realtime priority 6", + "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 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 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/cmd/ast/libast/i386/FEATURE/stdio b/usr/src/cmd/ast/libast/i386/FEATURE/stdio new file mode 100644 index 0000000000..458447d900 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/stdio @@ -0,0 +1,587 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 + +#include + +#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/cmd/ast/libast/i386/FEATURE/sys b/usr/src/cmd/ast/libast/i386/FEATURE/sys new file mode 100644 index 0000000000..c02852888c --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/sys @@ -0,0 +1,159 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 +#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 +#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 !_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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include 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 ok */ +#define _hdr_wchar 1 /* #include 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 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__ 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)); +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 +#else +#include +#endif +#endif + +#endif 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 ok */ +#define _lib_sysgetcwd 1 /* syscall(SYS_getcwd,buf,len) implemented */ +#include + +#define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b) + +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/time b/usr/src/cmd/ast/libast/i386/FEATURE/time new file mode 100644 index 0000000000..fba3ba062b --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/time @@ -0,0 +1,83 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */ +#define _lib_usleep 1 /* usleep() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _typ_clock_t 1 /* clock_t is a type */ +#define _typ_time_t 1 /* time_t is a type */ +#include + +#include + +#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK) +#define CLOCKS_PER_SEC CLK_TCK +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/tmlib b/usr/src/cmd/ast/libast/i386/FEATURE/tmlib new file mode 100644 index 0000000000..6162b62ea8 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/tmlib @@ -0,0 +1,71 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_tmlib_ast 1 +#define _sys_types 1 /* #include ok */ +#define _tzset_environ 1 /* tzset() bypasses user getenv() */ +#define tmlocaltime(p) _tm_localtime(p) + +extern __MANGLE__ struct tm* _tm_localtime __PROTO__((const time_t*)); + +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/tmx b/usr/src/cmd/ast/libast/i386/FEATURE/tmx new file mode 100644 index 0000000000..6ad4804a4b --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/tmx @@ -0,0 +1,130 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 +#include + +#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/cmd/ast/libast/i386/FEATURE/tty b/usr/src/cmd/ast/libast/i386/FEATURE/tty new file mode 100644 index 0000000000..1d39c122ed --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/tty @@ -0,0 +1,134 @@ +/* : : 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 ok */ +#define _hdr_termios 1 /* #include ok */ +#define _hdr_termio 1 /* #include ok */ +#define _hdr_sgtty 1 /* #include ok */ +#define _sys_termios 1 /* #include ok */ +#define _sys_termio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include 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 +#else +# if defined(_sys_termios) && defined(_lib_tcgetattr) +# include +# 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 +# else +# ifdef _sys_termio +# include +# 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 +# endif /* _sys_bsdtty */ +# else +# ifdef _hdr_sgtty +# include +# ifndef LPENDIN +# ifdef _sys_nttyio +# include +# 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 +# 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/cmd/ast/libast/i386/FEATURE/tv b/usr/src/cmd/ast/libast/i386/FEATURE/tv new file mode 100644 index 0000000000..0caab4a20a --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/tv @@ -0,0 +1,111 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 + +#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/cmd/ast/libast/i386/FEATURE/tvlib b/usr/src/cmd/ast/libast/i386/FEATURE/tvlib new file mode 100644 index 0000000000..3121038298 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/tvlib @@ -0,0 +1,19 @@ +/* : : 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 ok */ +#define _hdr_time 1 /* #include ok */ +#define _lib_clock_settime 1 /* clock_settime() in default lib(s) */ +#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */ +#define _lib_settimeofday 1 /* settimeofday() in default lib(s) */ +#define _lib_stime 1 /* stime() in default lib(s) */ +#define _lib_utimes 1 /* utimes() in default lib(s) */ +#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */ +#define _lib_usleep 1 /* usleep() in default lib(s) */ +#define _sys_stat 1 /* #include ok */ +#define _lib_utimensat 1 /* complete utimensat implementation */ +#define _sys_time 1 /* #include ok */ +#define _lib_clock_gettime 1 /* execute{\ passed */ +#define tmgettimeofday(p) gettimeofday(p,(struct timezone*)0) +#define tmsettimeofday(p) settimeofday(p,(struct timezone*)0) +#endif 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 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/cmd/ast/libast/i386/FEATURE/vfork b/usr/src/cmd/ast/libast/i386/FEATURE/vfork new file mode 100644 index 0000000000..b555d25c80 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/vfork @@ -0,0 +1,68 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +extern __MANGLE__ pid_t vfork(void) __attribute__((__returns_twice__)); +#pragma unknown_control_flow(vfork) +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/vmalloc b/usr/src/cmd/ast/libast/i386/FEATURE/vmalloc new file mode 100644 index 0000000000..0be84333de --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/vmalloc @@ -0,0 +1,36 @@ +/* : : 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 ok */ +#define _lib_atexit 1 /* atexit() in default lib(s) */ +#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */ +#define _lib_memalign 1 /* memalign() in default lib(s) */ +#define _lib_strdup 1 /* strdup() in default lib(s) */ +#define _lib_valloc 1 /* valloc() in default lib(s) */ +#define _hdr_alloca 1 /* #include ok */ +#define _hdr_malloc 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _mem_arena_mallinfo 1 /* arena is a member of struct mallinfo */ +#define _sys_stat 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _typ_ssize_t 1 /* ssize_t is a type */ +#define _mem_sbrk 1 /* brk()/sbrk() work as expected */ +#define _lib_alloca 1 /* alloca exists */ +#define _stk_down 1 /* stack grows downward */ +#include "FEATURE/mmap" +#if _BLD_INSTRUMENT || cray || _UWIN && _BLD_ast +#undef _map_malloc +#define _std_malloc 1 /* defer to standard malloc */ +#endif +#if _mmap_anon +#define _mem_mmap_anon 1 +#endif +#if _mmap_devzero +#define _mem_mmap_zero 1 +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/wait b/usr/src/cmd/ast/libast/i386/FEATURE/wait new file mode 100644 index 0000000000..36ae8feef1 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/wait @@ -0,0 +1,11 @@ +/* : : 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 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 ok */ +#define _ok_wif 1 /* posix wait macros ok */ +#endif diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/wchar b/usr/src/cmd/ast/libast/i386/FEATURE/wchar new file mode 100644 index 0000000000..2616f8f168 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/FEATURE/wchar @@ -0,0 +1,198 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 _sys_types 1 /* #include ok */ +#ifndef _AST_WCHAR_H +#define _AST_WCHAR_H 1 + +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _hdr_wchar 1 /* #include 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 ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _typ_mbstate_t 1 /* mbstate_t is a type */ +#define _nxt_wchar <../include/wchar.h> /* include path for the native */ +#define _nxt_wchar_str "../include/wchar.h" /* include string for the native */ +#ifndef _SFSTDIO_H +#include +#include +#endif + +#define _hdr_unistd 1 /* #include ok */ +#include /* includes */ + +#if _hdr_wchar && defined(_nxt_wchar) +#include <../include/wchar.h> /* the native wchar.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__ + +#else + +/* on some systems 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 ok */ +#define _nxt_wctype <../include/wctype.h> /* include path for the native */ +#define _nxt_wctype_str "../include/wctype.h" /* include string for the native */ +#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/cmd/ast/libast/i386/Makefile b/usr/src/cmd/ast/libast/i386/Makefile new file mode 100644 index 0000000000..d12c90ab57 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/Makefile @@ -0,0 +1,42 @@ +# +# 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. +# + +# Platform-specific config +# Note that "HOSTTYPE" matches the value used by AT&T upstream. +ASTPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"' + +# platform-specific sources +OBJECTS= conftab.o lctab.o + +include ../Makefile.com + +# Use big PIC since libast is too big for pic on 64bit +# (and on 32bit it is close to the barrier) +i386_C_PICFLAGS = $(C_BIGPICFLAGS) + +install: all $(ROOTLIBS) $(ROOTLINKS) 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 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/cmd/ast/libast/i386/conftab.c b/usr/src/cmd/ast/libast/i386/conftab.c new file mode 100644 index 0000000000..3fda0c607d --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/conftab.c @@ -0,0 +1,393 @@ +#include "FEATURE/standards" +#include "FEATURE/common" +#include +#include +#include +#if !defined(SYS_NMLEN) +#define SYS_NMLEN 9 +#endif +#include +#include "FEATURE/param" +#include "conftab.h" + +/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */ + +/* + * prefix strings -- the first few are indexed by Conf_t.standard + */ + +const Prefix_t prefix[] = +{ + "C", 1, CONF_C, -1, + "POSIX", 5, CONF_POSIX, -1, + "SVID", 4, CONF_SVID, -1, + "XOPEN", 5, CONF_XOPEN, -1, + "SUN", 3, CONF_SUN, -1, + "XBS5", 4, CONF_XBS5, -1, + "SCO", 3, CONF_SCO, -1, + "AST", 3, CONF_AST, -1, + "AES", 3, CONF_AES, -1, + "XPG", 3, CONF_XPG, -1, + "GNU", 3, CONF_GNU, -1, + "TRUSTEDBSD", 10, CONF_TRUSTEDBSD, -1, + "XX", 2, CONF_POSIX, CONF_nop, + "CS", 2, CONF_POSIX, CONF_confstr, + "PC", 2, CONF_POSIX, CONF_pathconf, + "SC", 2, CONF_POSIX, CONF_sysconf, + "SI", 2, CONF_SVID, CONF_sysinfo, +}; + +const int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]); + +/* + * conf strings sorted in ascending order + */ + +const Conf_t conf[] = +{ +{ "ABI_AIO_XFER_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ABI_ASYNCHRONOUS_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ABI_ASYNC_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ADVISORY_INFO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_ADVISORY_INFO }, +{ "AIO_LISTIO_MAX", { 0ULL, 0 }, { _POSIX_AIO_LISTIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_LISTIO_MAX }, +{ "AIO_MAX", { 0ULL, 0 }, { _POSIX_AIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_MAX }, +{ "AIO_PRIO_DELTA_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_PRIO_DELTA_MAX }, +{ "ALLOC_SIZE_MIN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_ALLOC_SIZE_MIN }, +{ "ARCHITECTURE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_ARCHITECTURE }, +{ "ARG_MAX", { 0ULL, 0 }, { _POSIX_ARG_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_ARG_MAX }, +{ "ASYNCHRONOUS_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_ASYNCHRONOUS_IO }, +{ "ASYNC_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_ASYNC_IO }, +{ "ATEXIT_MAX", { 0ULL, 0 }, { 32ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_XOPEN, 1, CONF_sysconf, _SC_ATEXIT_MAX }, +{ "AUDIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "AVAIL_PROCESSORS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "AVPHYS_PAGES", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SUN, 1, CONF_sysconf, _SC_AVPHYS_PAGES }, +{ "BARRIERS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_BARRIERS }, +{ "BC_BASE_MAX", { 0ULL, 0 }, { _POSIX2_BC_BASE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_BASE_MAX }, +{ "BC_DIM_MAX", { 0ULL, 0 }, { _POSIX2_BC_DIM_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_DIM_MAX }, +{ "BC_SCALE_MAX", { 0ULL, 0 }, { _POSIX2_BC_SCALE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_SCALE_MAX }, +{ "BC_STRING_MAX", { 0ULL, 0 }, { _POSIX2_BC_STRING_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_STRING_MAX }, +{ "BUSTYPES", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "CHARCLASS_NAME_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "CHAR_BIT", { 8ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_MAX", { 127ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_MIN", { -127LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_TERM", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_CHAR_TERM }, +{ "CHILD_MAX", { 0ULL, 0 }, { _POSIX_CHILD_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_CHILD_MAX }, +{ "CHOWN_RESTRICTED", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_CHOWN_RESTRICTED }, +{ "CKPT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "CLK_TCK", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_POSIX, 1, CONF_sysconf, _SC_CLK_TCK }, +{ "CLOCKRES_MIN", { 0ULL, 0 }, { _POSIX_CLOCKRES_MIN, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "CLOCKS_PER_SEC", { 1000000ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_LIMIT|CONF_LIMIT_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CLOCK_SELECTION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_CLOCK_SELECTION }, +{ "COLL_WEIGHTS_MAX", { 0ULL, 0 }, { _POSIX2_COLL_WEIGHTS_MAX, 0 }, CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_COLL_WEIGHTS_MAX }, +{ "CPUTIME", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_CPUTIME }, +{ "CPU_KEYBITS1", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CPU_VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CRYPT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_CRYPT }, +{ "C_BIND", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_BIND }, +{ "C_DEV", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_DEV }, +{ "C_VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_VERSION }, +{ "DATAKEYS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "DELAYTIMER_MAX", { 0ULL, 0 }, { _POSIX_DELAYTIMER_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_DELAYTIMER_MAX }, +{ "ENH_I18N", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_ENH_I18N }, +{ "EQUIV_CLASS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "EXEC_INTERPRETER_LENGTH", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "EXPR_NEST_MAX", { 0ULL, 0 }, { _POSIX2_EXPR_NEST_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_EXPR_NEST_MAX }, +{ "FCHR_MAX", { 0ULL, 0 }, { LONG_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "FILESIZEBITS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_FILESIZEBITS }, +{ "FILE_LOCKING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "FORT_DEV", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_FORT_DEV }, +{ "FORT_RUN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_FORT_RUN }, +{ "FSYNC", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_FSYNC }, +{ "GETGR_R_SIZE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_sysconf, _SC_GETGR_R_SIZE_MAX }, +{ "GETPW_R_SIZE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_sysconf, _SC_GETPW_R_SIZE_MAX }, +{ "HOSTID", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "HOSTNAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_HOSTNAME }, +{ "HOST_NAME_MAX", { 0ULL, 0 }, { _POSIX_HOST_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_HOST_NAME_MAX }, +{ "HW_PROVIDER", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_HW_PROVIDER }, +{ "HW_SERIAL", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ILP32_OFF32", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "ILP32_OFF32_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "ILP32_OFFBIG_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "INITTAB_NAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "INT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "INT_MIN", { -2147483647LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "IOV_MAX", { 0ULL, 0 }, { _XOPEN_IOV_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_XOPEN, 1, CONF_sysconf, _SC_IOV_MAX }, +{ "IO_TYPE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "IPV6", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_IPV6 }, +{ "IP_SECOPTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "JOB_CONTROL", { 0ULL, 0 }, { 1ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_JOB_CONTROL }, +{ "KERNEL_CLIST", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_CLIST_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DISK", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DISK_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DMABUF", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DMABUF_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FILE", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FILE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FLCKREC", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FLCKREC_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_INODE", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_INODE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_MOUNT", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_MOUNT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PINODE", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PINODE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PROC", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PROC_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_REGION", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_REGION_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_S5INODE", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_S5INODE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_STAMP", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "KERN_POINTERS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "KERN_SIM", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "LEGACY", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "LFS64_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_CFLAGS }, +{ "LFS64_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LDFLAGS }, +{ "LFS64_LIBS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LIBS }, +{ "LFS64_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LINTFLAGS }, +{ "LFS_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_CFLAGS }, +{ "LFS_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LDFLAGS }, +{ "LFS_LIBS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LIBS }, +{ "LFS_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LINTFLAGS }, +{ "LINE_MAX", { 0ULL, 0 }, { _POSIX2_LINE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_LINE_MAX }, +{ "LINK_MAX", { 0ULL, 0 }, { _POSIX_LINK_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_LINK_MAX }, +{ "LLONG_MAX", { 9223372036854775807ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LLONG_MIN", { -9223372036854775807LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LOCALEDEF", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_LOCALEDEF }, +{ "LOGIN_NAME_MAX", { 0ULL, 0 }, { _POSIX_LOGIN_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_LOGIN_NAME_MAX }, +{ "LOGNAME_MAX", { 0ULL, 0 }, { 8ULL, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, _SC_LOGNAME_MAX }, +{ "LONG_BIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "LONG_MAX", { 2147483647ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LONG_MIN", { -2147483647LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LP64_OFF64", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "LP64_OFF64_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "LPBIG_OFFBIG_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "MACHINE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_MACHINE }, +{ "MAPPED_FILES", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MAPPED_FILES }, +{ "MAX_CANON", { 0ULL, 0 }, { _POSIX_MAX_CANON, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_MAX_CANON }, +{ "MAX_INPUT", { 0ULL, 0 }, { _POSIX_MAX_INPUT, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_MAX_INPUT }, +{ "MB_LEN_MAX", { 5ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "MCAS_OFFSET", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MEMLOCK", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMLOCK }, +{ "MEMLOCK_RANGE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMLOCK_RANGE }, +{ "MEMORY_PROTECTION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMORY_PROTECTION }, +{ "MESSAGE_PASSING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MESSAGE_PASSING }, +{ "MMAP_FIXED_ALIGNMENT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MONOTONIC_CLOCK", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MONOTONIC_CLOCK }, +{ "MQ_OPEN_MAX", { 0ULL, 0 }, { _POSIX_MQ_OPEN_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_MQ_OPEN_MAX }, +{ "MQ_PRIO_MAX", { 0ULL, 0 }, { _POSIX_MQ_PRIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_MQ_PRIO_MAX }, +{ "MSEM_LOCKID", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MULTI_PROCESS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "NACLS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "NAME_MAX", { 0ULL, 0 }, { _POSIX_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_NAME_MAX }, +{ "NGROUPS_MAX", { 0ULL, 0 }, { _POSIX_NGROUPS_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_NGROUPS_MAX }, +{ "NL_ARGMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_LANGMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NL_MSGMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_NMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_SETMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_SPECMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NL_TEXTMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NO_TRUNC", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_NO_TRUNC }, +{ "NPROCESSORS_CONF", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_CONF }, +{ "NPROCESSORS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_MAX }, +{ "NPROCESSORS_ONLN", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_ONLN }, +{ "NPROC_CONF", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NPROC_ONLN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NSS_BUFLEN_GROUP", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NSS_BUFLEN_PASSWD", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NUM_PROCESSORS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NZERO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "OPEN_MAX", { 0ULL, 0 }, { _POSIX_OPEN_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_OPEN_MAX }, +{ "OPEN_MAX_CEIL", { OPEN_MAX, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_AST, 1, CONF_nop, -1 }, +{ "OSREL_MAJ", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OSREL_MIN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OSREL_PATCH", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OS_BASE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "OS_PROVIDER", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "OS_VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE, CONF_AES, 1, CONF_sysconf, -1 }, +{ "PAGESIZE", { 0ULL, 0 }, { 4096ULL, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_PAGESIZE }, +{ "PAGE_SIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_MINMAX|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, _SC_PAGE_SIZE }, +{ "PASS_MAX", { 0ULL, 0 }, { 8ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, _SC_PASS_MAX }, +{ "PATH", { 0, 0 }, { 0, "/bin:/usr/bin" }, CONF_DEFER_CALL|CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_confstr, _CS_PATH }, +{ "PATH_MAX", { 0ULL, 0 }, { _POSIX_PATH_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_PATH_MAX }, +{ "PBS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS }, +{ "PBS_ACCOUNTING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_ACCOUNTING }, +{ "PBS_CHECKPOINT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_CHECKPOINT }, +{ "PBS_LOCATE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_LOCATE }, +{ "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 }, { 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 }, +{ "PII_INTERNET_STREAM", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_CLTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_COTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_M", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_SOCKET", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_XTI", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PIPE_BUF", { 0ULL, 0 }, { _POSIX_PIPE_BUF, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_PIPE_BUF }, +{ "POLL", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PRIORITIZED_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_PRIORITIZED_IO }, +{ "PRIORITY_SCHEDULING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_PRIORITY_SCHEDULING }, +{ "PRIO_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_PRIO_IO }, +{ "PROC_RSRC_MGR", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_DESTRUCTOR_ITERATIONS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_KEYS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_STACK_MIN", { 4096ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_LIMIT|CONF_LIMIT_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_THREADS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTRDIFF_MAX", { 2147483647ULL, 0 }, { 65535ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "PTRDIFF_MIN", { -2147483647LL-1LL, 0 }, { -65535LL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "RAW_SOCKETS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_RAW_SOCKETS }, +{ "READER_WRITER_LOCKS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_READER_WRITER_LOCKS }, +{ "REALTIME", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "REALTIME_SIGNALS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_REALTIME_SIGNALS }, +{ "REALTIME_THREADS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "REC_INCR_XFER_SIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_INCR_XFER_SIZE }, +{ "REC_MAX_XFER_SIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_MAX_XFER_SIZE }, +{ "REC_MIN_XFER_SIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_MIN_XFER_SIZE }, +{ "REC_XFER_ALIGN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_XFER_ALIGN }, +{ "REENTRANT_FUNCTIONS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "REGEXP", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_REGEXP }, +{ "REGEX_VERSION", { 0ULL, 0 }, { 20030916ULL, 0 }, CONF_FEATURE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "RELEASE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_AST, 1, CONF_nop, -1 }, +{ "RESOURCE_LIMITS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "RE_DUP_MAX", { 0ULL, 0 }, { _POSIX2_RE_DUP_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_RE_DUP_MAX }, +{ "RTSIG_MAX", { 0ULL, 0 }, { _POSIX_RTSIG_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_RTSIG_MAX }, +{ "SAVED_IDS", { 0ULL, 0 }, { 1ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SAVED_IDS }, +{ "SCHAR_MAX", { 127ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SCHAR_MIN", { -127LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SECURITY_CLASS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SELECT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "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 }, +{ "SHM", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_SHM }, +{ "SHRT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "SHRT_MIN", { -32767LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIGQUEUE_MAX", { 0ULL, 0 }, { _POSIX_SIGQUEUE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SIGQUEUE_MAX }, +{ "SIGRT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_SIGRT_MAX }, +{ "SIGRT_MIN", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_SIGRT_MIN }, +{ "SIG_ATOMIC_MAX", { 2147483647ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIG_ATOMIC_MIN", { -2147483647LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIZE_MAX", { UINT_MAX, 0 }, { 65535ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SLVM_MAXNODES", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SOCK_MAXBUF", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SOFTPOWER", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SPAWN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPAWN }, +{ "SPIN_LOCKS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPIN_LOCKS }, +{ "SPORADIC_SERVER", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPORADIC_SERVER }, +{ "SRPC_DOMAIN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SSIZE_MAX", { INT_MAX, 0 }, { _POSIX_SSIZE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SS_REPL_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SS_REPL_MAX }, +{ "STD_BLK", { 0ULL, 0 }, { 1024ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "STREAMS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_STREAMS }, +{ "STREAM_MAX", { 0ULL, 0 }, { _POSIX_STREAM_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_STREAM_MAX }, +{ "SW_DEV", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_SW_DEV }, +{ "SYMLINKS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_pathconf, _PC_2_SYMLINKS }, +{ "SYMLINK_MAX", { 0ULL, 0 }, { _POSIX_SYMLINK_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_SYMLINK_MAX }, +{ "SYMLOOP_MAX", { 0ULL, 0 }, { _POSIX_SYMLOOP_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SYMLOOP_MAX }, +{ "SYNCHRONIZED_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SYNCHRONIZED_IO }, +{ "SYNC_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_SYNC_IO }, +{ "SYSNAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_SYSNAME }, +{ "SYSPID_MAX", { 0ULL, 0 }, { 2ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "THREADS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREADS }, +{ "THREADS_PRIO_CEILING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "THREADS_PRIO_INHERIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "THREAD_ATTR_STACKADDR", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_ATTR_STACKADDR }, +{ "THREAD_ATTR_STACKSIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_ATTR_STACKSIZE }, +{ "THREAD_CPUTIME", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_CPUTIME }, +{ "THREAD_DESTRUCTOR_ITERATIONS", { 0ULL, 0 }, { _POSIX_THREAD_DESTRUCTOR_ITERATIONS, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_DESTRUCTOR_ITERATIONS }, +{ "THREAD_KEYS_MAX", { 0ULL, 0 }, { _POSIX_THREAD_KEYS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_KEYS_MAX }, +{ "THREAD_PRIORITY_SCHEDULING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIORITY_SCHEDULING }, +{ "THREAD_PRIO_INHERIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIO_INHERIT }, +{ "THREAD_PRIO_PROTECT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIO_PROTECT }, +{ "THREAD_PROCESS_SHARED", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PROCESS_SHARED }, +{ "THREAD_SAFE_FUNCTIONS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_SAFE_FUNCTIONS }, +{ "THREAD_SPORADIC_SERVER", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_SPORADIC_SERVER }, +{ "THREAD_STACK_MIN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_STACK_MIN }, +{ "THREAD_THREADS_MAX", { 0ULL, 0 }, { _POSIX_THREAD_THREADS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_THREADS_MAX }, +{ "TIMEOUTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TIMEOUTS }, +{ "TIMERS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TIMERS }, +{ "TIMER_MAX", { 0ULL, 0 }, { _POSIX_TIMER_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TIMER_MAX }, +{ "TMP", { 0, 0 }, { 0, "/tmp" }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_AST, 1, CONF_confstr, -1 }, +{ "TMP_MAX", { 17576ULL, 0 }, { 10000ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_sysconf, -1 }, +{ "TRACE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE }, +{ "TRACE_EVENT_FILTER", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_EVENT_FILTER }, +{ "TRACE_EVENT_NAME_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_EVENT_NAME_MAX }, +{ "TRACE_INHERIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_INHERIT }, +{ "TRACE_LOG", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_LOG }, +{ "TRACE_NAME_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_NAME_MAX }, +{ "TRACE_SYS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_SYS_MAX }, +{ "TRACE_USER_EVENT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_USER_EVENT_MAX }, +{ "TTY_NAME_MAX", { 0ULL, 0 }, { _POSIX_TTY_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TTY_NAME_MAX }, +{ "TYPED_MEMORY_OBJECTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TYPED_MEMORY_OBJECTS }, +{ "TZNAME_MAX", { 0ULL, 0 }, { _POSIX_TZNAME_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TZNAME_MAX }, +{ "T_IOV_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_C, 1, CONF_sysconf, _SC_T_IOV_MAX }, +{ "UCHAR_MAX", { 255ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "UCHAR_MIN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "UID_MAX", { 0ULL, 0 }, { 60002ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "UINT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "UIO_MAXIOV", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ULLONG_MAX", { 18446744073709551615ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "ULONG_MAX", { 4294967295ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "UNIX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_UNIX }, +{ "UPE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_UPE }, +{ "USER_LIMIT", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "USHRT_MAX", { 65535ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "V6_ILP32_OFF32", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_ILP32_OFF32 }, +{ "V6_ILP32_OFFBIG", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_ILP32_OFFBIG }, +{ "V6_LP64_OFF64", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_LP64_OFF64 }, +{ "V6_LPBIG_OFFBIG", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_LPBIG_OFFBIG }, +{ "VDISABLE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_VDISABLE }, +{ "VERSION", { 0, 0 }, { 0, 0 }, CONF_PREFIXED|CONF_STANDARD|CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "VERSION", { 0ULL, 0 }, { 200112ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION", { 0ULL, 0 }, { 200112ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, -1 }, +{ "VERSION", { 0ULL, 0 }, { 600ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_VERSION }, +{ "VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XPG, 3, CONF_sysconf, -1 }, +{ "VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XPG, 4, CONF_sysconf, -1 }, +{ "VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_MINMAX|CONF_PREFIXED|CONF_STANDARD, CONF_AST, 1, CONF_nop, -1 }, +{ "VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIXED|CONF_STANDARD, CONF_GNU, 1, CONF_nop, -1 }, +{ "VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIXED|CONF_STANDARD, CONF_TRUSTEDBSD, 1, CONF_nop, -1 }, +{ "VERSION_88", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_88", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "VERSION_90", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_90", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "VERSION_93", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_93", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "WCHAR_MAX", { 2147483647ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WCHAR_MIN", { -2147483647LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WINT_MAX", { 2147483647ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WINT_MIN", { -2147483647LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WORD_BIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XCU_VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_XCU_VERSION }, +{ "XPG2", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XPG3", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XPG4", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +}; + +const int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]); diff --git a/usr/src/cmd/ast/libast/i386/conftab.h b/usr/src/cmd/ast/libast/i386/conftab.h new file mode 100644 index 0000000000..a15714e8cb --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/conftab.h @@ -0,0 +1,94 @@ +#ifndef _CONFTAB_H +#define _CONFTAB_H + +#if !defined(SYS_NMLEN) +#define SYS_NMLEN 9 +#endif +#include + +/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */ + +#if !defined(const) && !defined(__STDC__) && !defined(__cplusplus) && !defined(c_plusplus) +#define const +#endif + +#define conf _ast_conf_data +#define conf_elements _ast_conf_ndata + +#define prefix _ast_conf_prefix +#define prefix_elements _ast_conf_nprefix + +#define CONF_nop 0 +#define CONF_confstr 1 +#define CONF_pathconf 2 +#define CONF_sysconf 3 +#define CONF_sysinfo 4 + +#define CONF_C 0 +#define CONF_POSIX 1 +#define CONF_SVID 2 +#define CONF_XOPEN 3 +#define CONF_SUN 4 +#define CONF_XBS5 5 +#define CONF_SCO 6 +#define CONF_AST 7 +#define CONF_AES 8 +#define CONF_XPG 9 +#define CONF_GNU 10 +#define CONF_TRUSTEDBSD 11 +#define CONF_call 12 + +#define _pth_getconf "/usr/bin/getconf" +#define _pth_getconf_a "-a" + +#define CONF_DEFER_CALL 0x0001 +#define CONF_DEFER_MM 0x0002 +#define CONF_FEATURE 0x0004 +#define CONF_LIMIT 0x0008 +#define CONF_LIMIT_DEF 0x0010 +#define CONF_MINMAX 0x0020 +#define CONF_MINMAX_DEF 0x0040 +#define CONF_NOSECTION 0x0080 +#define CONF_NOUNDERSCORE 0x0100 +#define CONF_PREFIX_ONLY 0x0200 +#define CONF_PREFIXED 0x0400 +#define CONF_STANDARD 0x0800 +#define CONF_STRING 0x1000 +#define CONF_UNDERSCORE 0x2000 +#define CONF_USER 0x4000 + +struct Conf_s; typedef struct Conf_s Conf_t; + +typedef struct Value_s +{ + intmax_t number; + const char* string; +} Value_t; + +struct Conf_s +{ + const char name[32]; + Value_t limit; + Value_t minmax; + unsigned int flags; + short standard; + short section; + short call; + short op; +}; + +typedef struct Prefix_s +{ + const char name[16]; + short length; + short standard; + short call; +} Prefix_t; + +extern const Conf_t conf[]; +extern const int conf_elements; + +extern const Prefix_t prefix[]; +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 + +#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/cmd/ast/libast/i386/lctab.c b/usr/src/cmd/ast/libast/i386/lctab.c new file mode 100644 index 0000000000..2afc20e2b5 --- /dev/null +++ b/usr/src/cmd/ast/libast/i386/lctab.c @@ -0,0 +1,2635 @@ +/* : : generated by cmd/ast/tools/lcgen : : */ + +#include "lclib.h" +#include "lclang.h" + + +const Lc_attribute_t attribute_es[] = +{ +{"traditional",LC_default, +#ifdef SUBLANG_SPANISH_TRADITIONAL +SUBLANG_SPANISH_TRADITIONAL, +#else +0, +#endif + +}, +{"modern",0, +#ifdef SUBLANG_SPANISH_MODERN +SUBLANG_SPANISH_MODERN, +#else +0, +#endif + +}, +}; + +const Lc_charset_t lc_charsets[] = +{ +{"iso8859-1","latin1|west-europe","1252",}, +{"iso8859-2","latin2|east-europe","1250",}, +{"iso8859-3","latin3|south-europe","1257",}, +{"iso8859-4","latin4|north-europe",0}, +{"iso8859-5","cyrillic","1251",}, +{"iso8859-6","arabic","1256",}, +{"iso8859-7","greek","1253",}, +{"iso8859-8","hebrew","1255",}, +{"iso8859-9","latin5|turkish","1254",}, +{"iso8859-10","latin6|nordic",0}, +{"iso8859-13","latin7",0}, +{"iso8859-14","latin8|celtic",0}, +{"iso8859-15","latin0",0}, +{"iso2022","japanese|korean",0}, +{"iso4873","japanese-ascii|korean-ascii",0}, +{"koi8-r","russian",0}, +{"utf8","plan9",0}, + 0 +}; + +const Lc_language_t lc_languages[] = +{ +{"C","C","POSIX",&lc_charsets[0],LC_default,0,0,0,}, +{"debug","debug",0,&lc_charsets[0],LC_debug,0,0,0,}, +{"aa","afar",0,&lc_charsets[0],0, +#ifdef LANG_AFAR +LANG_AFAR, +#else +0, +#endif +0,0, +}, +{"ab","abkhazian",0,&lc_charsets[0],0, +#ifdef LANG_ABKHAZIAN +LANG_ABKHAZIAN, +#else +0, +#endif +0,0, +}, +{"af","afrikaans","afr",&lc_charsets[0],0, +#ifdef LANG_AFRIKAANS +LANG_AFRIKAANS, +#else +0, +#endif +0,0, +}, +{"am","amharic",0,&lc_charsets[0],0, +#ifdef LANG_AMHARIC +LANG_AMHARIC, +#else +0, +#endif +0,0, +}, +{"ar","arabic","ara",&lc_charsets[5],0, +#ifdef LANG_ARABIC +LANG_ARABIC, +#else +0, +#endif +0,0, +}, +{"as","assamese",0,&lc_charsets[0],0, +#ifdef LANG_ASSAMESE +LANG_ASSAMESE, +#else +0, +#endif +0,0, +}, +{"ay","aymara",0,&lc_charsets[0],0, +#ifdef LANG_AYMARA +LANG_AYMARA, +#else +0, +#endif +0,0, +}, +{"az","azerbaijani",0,&lc_charsets[0],0, +#ifdef LANG_AZERBAIJANI +LANG_AZERBAIJANI, +#else +0, +#endif +0,0, +}, +{"ba","bashkir",0,&lc_charsets[0],0, +#ifdef LANG_BASHKIR +LANG_BASHKIR, +#else +0, +#endif +0,0, +}, +{"be","belarusian","bel",&lc_charsets[0],0, +#ifdef LANG_BELARUSIAN +LANG_BELARUSIAN, +#else +0, +#endif +0,0, +}, +{"bg","bulgarian","bul",&lc_charsets[4],0, +#ifdef LANG_BULGARIAN +LANG_BULGARIAN, +#else +0, +#endif +0,0, +}, +{"bh","bihari",0,&lc_charsets[0],0, +#ifdef LANG_BIHARI +LANG_BIHARI, +#else +0, +#endif +0,0, +}, +{"bi","bislama",0,&lc_charsets[0],0, +#ifdef LANG_BISLAMA +LANG_BISLAMA, +#else +0, +#endif +0,0, +}, +{"bn","bengali-bangla",0,&lc_charsets[0],0, +#ifdef LANG_BENGALI_BANGLA +LANG_BENGALI_BANGLA, +#else +0, +#endif +0,0, +}, +{"bo","tibetan",0,&lc_charsets[0],0, +#ifdef LANG_TIBETAN +LANG_TIBETAN, +#else +0, +#endif +0,0, +}, +{"br","breton",0,&lc_charsets[0],0, +#ifdef LANG_BRETON +LANG_BRETON, +#else +0, +#endif +0,0, +}, +{"ca","catalan","cat",&lc_charsets[0],0, +#ifdef LANG_CATALAN +LANG_CATALAN, +#else +0, +#endif +0,0, +}, +{"co","corsican",0,&lc_charsets[0],0, +#ifdef LANG_CORSICAN +LANG_CORSICAN, +#else +0, +#endif +0,0, +}, +{"cs","czech","ces|cze",&lc_charsets[1],0, +#ifdef LANG_CZECH +LANG_CZECH, +#else +0, +#endif +0,0, +}, +{"cy","welsh",0,&lc_charsets[0],0, +#ifdef LANG_WELSH +LANG_WELSH, +#else +0, +#endif +0,0, +}, +{"da","danish","dan",&lc_charsets[0],0, +#ifdef LANG_DANISH +LANG_DANISH, +#else +0, +#endif +0,0, +}, +{"de","german","deu|ger",&lc_charsets[0],0, +#ifdef LANG_GERMAN +LANG_GERMAN, +#else +0, +#endif +0,0, +}, +{"dz","bhutani",0,&lc_charsets[0],0, +#ifdef LANG_BHUTANI +LANG_BHUTANI, +#else +0, +#endif +0,0, +}, +{"el","greek","ell|gre",&lc_charsets[6],0, +#ifdef LANG_GREEK +LANG_GREEK, +#else +0, +#endif +0,0, +}, +{"en","english","eng",&lc_charsets[0],0, +#ifdef LANG_ENGLISH +LANG_ENGLISH, +#else +0, +#endif +0,0, +}, +{"eo","esperanto",0,&lc_charsets[0],0, +#ifdef LANG_ESPERANTO +LANG_ESPERANTO, +#else +0, +#endif +0,0, +}, +{"es","spanish","spa",&lc_charsets[0],0, +#ifdef LANG_SPANISH +LANG_SPANISH, +#else +0, +#endif +&attribute_es[0],&attribute_es[1], +}, +{"et","estonian","est",&lc_charsets[2],0, +#ifdef LANG_ESTONIAN +LANG_ESTONIAN, +#else +0, +#endif +0,0, +}, +{"eu","basque","eus|baq",&lc_charsets[0],0, +#ifdef LANG_BASQUE +LANG_BASQUE, +#else +0, +#endif +0,0, +}, +{"fa","persian",0,&lc_charsets[0],0, +#ifdef LANG_PERSIAN +LANG_PERSIAN, +#else +0, +#endif +0,0, +}, +{"fi","finnish","fin",&lc_charsets[0],0, +#ifdef LANG_FINNISH +LANG_FINNISH, +#else +0, +#endif +0,0, +}, +{"fj","fiji",0,&lc_charsets[0],0, +#ifdef LANG_FIJI +LANG_FIJI, +#else +0, +#endif +0,0, +}, +{"fo","faeroese",0,&lc_charsets[0],0, +#ifdef LANG_FAEROESE +LANG_FAEROESE, +#else +0, +#endif +0,0, +}, +{"fr","french","fra|fre",&lc_charsets[0],0, +#ifdef LANG_FRENCH +LANG_FRENCH, +#else +0, +#endif +0,0, +}, +{"fy","frisian",0,&lc_charsets[0],0, +#ifdef LANG_FRISIAN +LANG_FRISIAN, +#else +0, +#endif +0,0, +}, +{"ga","irish",0,&lc_charsets[11],0, +#ifdef LANG_IRISH +LANG_IRISH, +#else +0, +#endif +0,0, +}, +{"gd","scots-gaelic",0,&lc_charsets[11],0, +#ifdef LANG_SCOTS_GAELIC +LANG_SCOTS_GAELIC, +#else +0, +#endif +0,0, +}, +{"gl","galician",0,&lc_charsets[0],0, +#ifdef LANG_GALICIAN +LANG_GALICIAN, +#else +0, +#endif +0,0, +}, +{"gn","guarani",0,&lc_charsets[0],0, +#ifdef LANG_GUARANI +LANG_GUARANI, +#else +0, +#endif +0,0, +}, +{"gu","gujarati",0,&lc_charsets[0],0, +#ifdef LANG_GUJARATI +LANG_GUJARATI, +#else +0, +#endif +0,0, +}, +{"ha","hausa",0,&lc_charsets[0],0, +#ifdef LANG_HAUSA +LANG_HAUSA, +#else +0, +#endif +0,0, +}, +{"he","hebrew","heb",&lc_charsets[7],0, +#ifdef LANG_HEBREW +LANG_HEBREW, +#else +0, +#endif +0,0, +}, +{"hi","hindi",0,&lc_charsets[0],0, +#ifdef LANG_HINDI +LANG_HINDI, +#else +0, +#endif +0,0, +}, +{"hr","croatian","hrv|scr",&lc_charsets[1],0, +#ifdef LANG_CROATIAN +LANG_CROATIAN, +#else +0, +#endif +0,0, +}, +{"hu","hungarian","hun",&lc_charsets[1],0, +#ifdef LANG_HUNGARIAN +LANG_HUNGARIAN, +#else +0, +#endif +0,0, +}, +{"hy","armenian",0,&lc_charsets[0],0, +#ifdef LANG_ARMENIAN +LANG_ARMENIAN, +#else +0, +#endif +0,0, +}, +{"ia","interlingua",0,&lc_charsets[0],0, +#ifdef LANG_INTERLINGUA +LANG_INTERLINGUA, +#else +0, +#endif +0,0, +}, +{"id","indonesian","ind",&lc_charsets[0],0, +#ifdef LANG_INDONESIAN +LANG_INDONESIAN, +#else +0, +#endif +0,0, +}, +{"ie","interlingue",0,&lc_charsets[0],0, +#ifdef LANG_INTERLINGUE +LANG_INTERLINGUE, +#else +0, +#endif +0,0, +}, +{"ik","inupiak",0,&lc_charsets[0],0, +#ifdef LANG_INUPIAK +LANG_INUPIAK, +#else +0, +#endif +0,0, +}, +{"in","indonesian",0,&lc_charsets[0],0, +#ifdef LANG_INDONESIAN +LANG_INDONESIAN, +#else +0, +#endif +0,0, +}, +{"is","icelandic","isl|ice",&lc_charsets[0],0, +#ifdef LANG_ICELANDIC +LANG_ICELANDIC, +#else +0, +#endif +0,0, +}, +{"it","italian","ita",&lc_charsets[0],0, +#ifdef LANG_ITALIAN +LANG_ITALIAN, +#else +0, +#endif +0,0, +}, +{"iw","hebrew",0,&lc_charsets[0],0, +#ifdef LANG_HEBREW +LANG_HEBREW, +#else +0, +#endif +0,0, +}, +{"ja","japanese","jpn",&lc_charsets[0],0, +#ifdef LANG_JAPANESE +LANG_JAPANESE, +#else +0, +#endif +0,0, +}, +{"ji","yiddish",0,&lc_charsets[0],0, +#ifdef LANG_YIDDISH +LANG_YIDDISH, +#else +0, +#endif +0,0, +}, +{"jw","javanese",0,&lc_charsets[0],0, +#ifdef LANG_JAVANESE +LANG_JAVANESE, +#else +0, +#endif +0,0, +}, +{"ka","georgian",0,&lc_charsets[0],0, +#ifdef LANG_GEORGIAN +LANG_GEORGIAN, +#else +0, +#endif +0,0, +}, +{"kk","kazakh","kaz",&lc_charsets[0],0, +#ifdef LANG_KAZAKH +LANG_KAZAKH, +#else +0, +#endif +0,0, +}, +{"kl","greenlandic",0,&lc_charsets[0],0, +#ifdef LANG_GREENLANDIC +LANG_GREENLANDIC, +#else +0, +#endif +0,0, +}, +{"km","cambodian",0,&lc_charsets[0],0, +#ifdef LANG_CAMBODIAN +LANG_CAMBODIAN, +#else +0, +#endif +0,0, +}, +{"kn","kannada",0,&lc_charsets[0],0, +#ifdef LANG_KANNADA +LANG_KANNADA, +#else +0, +#endif +0,0, +}, +{"ko","korean","kor",&lc_charsets[0],0, +#ifdef LANG_KOREAN +LANG_KOREAN, +#else +0, +#endif +0,0, +}, +{"ks","kashmiri",0,&lc_charsets[0],0, +#ifdef LANG_KASHMIRI +LANG_KASHMIRI, +#else +0, +#endif +0,0, +}, +{"ku","kurdish",0,&lc_charsets[0],0, +#ifdef LANG_KURDISH +LANG_KURDISH, +#else +0, +#endif +0,0, +}, +{"ky","kirghiz",0,&lc_charsets[0],0, +#ifdef LANG_KIRGHIZ +LANG_KIRGHIZ, +#else +0, +#endif +0,0, +}, +{"la","latin",0,&lc_charsets[0],0, +#ifdef LANG_LATIN +LANG_LATIN, +#else +0, +#endif +0,0, +}, +{"ln","lingala",0,&lc_charsets[0],0, +#ifdef LANG_LINGALA +LANG_LINGALA, +#else +0, +#endif +0,0, +}, +{"lo","laothian",0,&lc_charsets[0],0, +#ifdef LANG_LAOTHIAN +LANG_LAOTHIAN, +#else +0, +#endif +0,0, +}, +{"lt","lithuanian","lit",&lc_charsets[10],0, +#ifdef LANG_LITHUANIAN +LANG_LITHUANIAN, +#else +0, +#endif +0,0, +}, +{"lv","latvian","lav",&lc_charsets[10],0, +#ifdef LANG_LATVIAN +LANG_LATVIAN, +#else +0, +#endif +0,0, +}, +{"mg","malagasy",0,&lc_charsets[0],0, +#ifdef LANG_MALAGASY +LANG_MALAGASY, +#else +0, +#endif +0,0, +}, +{"mi","maori",0,&lc_charsets[0],0, +#ifdef LANG_MAORI +LANG_MAORI, +#else +0, +#endif +0,0, +}, +{"mk","macedonian","mkd|mac",&lc_charsets[0],0, +#ifdef LANG_MACEDONIAN +LANG_MACEDONIAN, +#else +0, +#endif +0,0, +}, +{"ml","malayalam","mal",&lc_charsets[0],0, +#ifdef LANG_MALAYALAM +LANG_MALAYALAM, +#else +0, +#endif +0,0, +}, +{"mn","mongolian",0,&lc_charsets[0],0, +#ifdef LANG_MONGOLIAN +LANG_MONGOLIAN, +#else +0, +#endif +0,0, +}, +{"mo","moldavian",0,&lc_charsets[0],0, +#ifdef LANG_MOLDAVIAN +LANG_MOLDAVIAN, +#else +0, +#endif +0,0, +}, +{"mr","marathi",0,&lc_charsets[0],0, +#ifdef LANG_MARATHI +LANG_MARATHI, +#else +0, +#endif +0,0, +}, +{"ms","malay","msa|may",&lc_charsets[0],0, +#ifdef LANG_MALAY +LANG_MALAY, +#else +0, +#endif +0,0, +}, +{"mt","maltese",0,&lc_charsets[0],0, +#ifdef LANG_MALTESE +LANG_MALTESE, +#else +0, +#endif +0,0, +}, +{"my","burmese",0,&lc_charsets[0],0, +#ifdef LANG_BURMESE +LANG_BURMESE, +#else +0, +#endif +0,0, +}, +{"na","nauru",0,&lc_charsets[0],0, +#ifdef LANG_NAURU +LANG_NAURU, +#else +0, +#endif +0,0, +}, +{"nb","norwegian-bokmal","nob",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN_BOKMAL +LANG_NORWEGIAN_BOKMAL, +#else +0, +#endif +0,0, +}, +{"ne","nepali",0,&lc_charsets[0],0, +#ifdef LANG_NEPALI +LANG_NEPALI, +#else +0, +#endif +0,0, +}, +{"nl","dutch","nld|dut",&lc_charsets[0],0, +#ifdef LANG_DUTCH +LANG_DUTCH, +#else +0, +#endif +0,0, +}, +{"nn","norwegian-nynorsk","nno|non",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN_NYNORSK +LANG_NORWEGIAN_NYNORSK, +#else +0, +#endif +0,0, +}, +{"no","norwegian","nor",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN +LANG_NORWEGIAN, +#else +0, +#endif +0,0, +}, +{"oc","occitan",0,&lc_charsets[0],0, +#ifdef LANG_OCCITAN +LANG_OCCITAN, +#else +0, +#endif +0,0, +}, +{"om","oromo",0,&lc_charsets[0],0, +#ifdef LANG_OROMO +LANG_OROMO, +#else +0, +#endif +0,0, +}, +{"or","oriya",0,&lc_charsets[0],0, +#ifdef LANG_ORIYA +LANG_ORIYA, +#else +0, +#endif +0,0, +}, +{"pa","punjabi",0,&lc_charsets[0],0, +#ifdef LANG_PUNJABI +LANG_PUNJABI, +#else +0, +#endif +0,0, +}, +{"pl","polish","pol",&lc_charsets[1],0, +#ifdef LANG_POLISH +LANG_POLISH, +#else +0, +#endif +0,0, +}, +{"ps","pushto",0,&lc_charsets[0],0, +#ifdef LANG_PUSHTO +LANG_PUSHTO, +#else +0, +#endif +0,0, +}, +{"pt","portuguese","por",&lc_charsets[0],0, +#ifdef LANG_PORTUGUESE +LANG_PORTUGUESE, +#else +0, +#endif +0,0, +}, +{"qu","quechua",0,&lc_charsets[0],0, +#ifdef LANG_QUECHUA +LANG_QUECHUA, +#else +0, +#endif +0,0, +}, +{"rm","rhaeto-romance",0,&lc_charsets[0],0, +#ifdef LANG_RHAETO_ROMANCE +LANG_RHAETO_ROMANCE, +#else +0, +#endif +0,0, +}, +{"rn","kirundi",0,&lc_charsets[0],0, +#ifdef LANG_KIRUNDI +LANG_KIRUNDI, +#else +0, +#endif +0,0, +}, +{"ro","romanian","ron|rum",&lc_charsets[1],0, +#ifdef LANG_ROMANIAN +LANG_ROMANIAN, +#else +0, +#endif +0,0, +}, +{"ru","russian","rus",&lc_charsets[4],0, +#ifdef LANG_RUSSIAN +LANG_RUSSIAN, +#else +0, +#endif +0,0, +}, +{"rw","kinyarwanda",0,&lc_charsets[0],0, +#ifdef LANG_KINYARWANDA +LANG_KINYARWANDA, +#else +0, +#endif +0,0, +}, +{"sa","sanskrit",0,&lc_charsets[0],0, +#ifdef LANG_SANSKRIT +LANG_SANSKRIT, +#else +0, +#endif +0,0, +}, +{"sd","sindhi",0,&lc_charsets[0],0, +#ifdef LANG_SINDHI +LANG_SINDHI, +#else +0, +#endif +0,0, +}, +{"sg","sangro",0,&lc_charsets[0],0, +#ifdef LANG_SANGRO +LANG_SANGRO, +#else +0, +#endif +0,0, +}, +{"sh","serbo-croatian",0,&lc_charsets[0],0, +#ifdef LANG_SERBO_CROATIAN +LANG_SERBO_CROATIAN, +#else +0, +#endif +0,0, +}, +{"si","singhalese",0,&lc_charsets[0],0, +#ifdef LANG_SINGHALESE +LANG_SINGHALESE, +#else +0, +#endif +0,0, +}, +{"sk","slovak","slk|slo",&lc_charsets[1],0, +#ifdef LANG_SLOVAK +LANG_SLOVAK, +#else +0, +#endif +0,0, +}, +{"sl","slovenian","slv",&lc_charsets[1],0, +#ifdef LANG_SLOVENIAN +LANG_SLOVENIAN, +#else +0, +#endif +0,0, +}, +{"sm","samoan",0,&lc_charsets[0],0, +#ifdef LANG_SAMOAN +LANG_SAMOAN, +#else +0, +#endif +0,0, +}, +{"sn","shona",0,&lc_charsets[0],0, +#ifdef LANG_SHONA +LANG_SHONA, +#else +0, +#endif +0,0, +}, +{"so","somali",0,&lc_charsets[0],0, +#ifdef LANG_SOMALI +LANG_SOMALI, +#else +0, +#endif +0,0, +}, +{"sq","albanian","sqi|alb",&lc_charsets[0],0, +#ifdef LANG_ALBANIAN +LANG_ALBANIAN, +#else +0, +#endif +0,0, +}, +{"sr","serbian","srp",&lc_charsets[1],0, +#ifdef LANG_SERBIAN +LANG_SERBIAN, +#else +0, +#endif +0,0, +}, +{"ss","siswati",0,&lc_charsets[0],0, +#ifdef LANG_SISWATI +LANG_SISWATI, +#else +0, +#endif +0,0, +}, +{"st","sesotho",0,&lc_charsets[0],0, +#ifdef LANG_SESOTHO +LANG_SESOTHO, +#else +0, +#endif +0,0, +}, +{"su","sudanese",0,&lc_charsets[0],0, +#ifdef LANG_SUDANESE +LANG_SUDANESE, +#else +0, +#endif +0,0, +}, +{"sv","swedish","swe",&lc_charsets[0],0, +#ifdef LANG_SWEDISH +LANG_SWEDISH, +#else +0, +#endif +0,0, +}, +{"sw","swahili","swa",&lc_charsets[0],0, +#ifdef LANG_SWAHILI +LANG_SWAHILI, +#else +0, +#endif +0,0, +}, +{"ta","tamil",0,&lc_charsets[0],0, +#ifdef LANG_TAMIL +LANG_TAMIL, +#else +0, +#endif +0,0, +}, +{"te","telugu",0,&lc_charsets[0],0, +#ifdef LANG_TELUGU +LANG_TELUGU, +#else +0, +#endif +0,0, +}, +{"tg","tajik",0,&lc_charsets[0],0, +#ifdef LANG_TAJIK +LANG_TAJIK, +#else +0, +#endif +0,0, +}, +{"th","thai","tha",&lc_charsets[0],0, +#ifdef LANG_THAI +LANG_THAI, +#else +0, +#endif +0,0, +}, +{"ti","tigrinya",0,&lc_charsets[0],0, +#ifdef LANG_TIGRINYA +LANG_TIGRINYA, +#else +0, +#endif +0,0, +}, +{"tk","turkmen",0,&lc_charsets[0],0, +#ifdef LANG_TURKMEN +LANG_TURKMEN, +#else +0, +#endif +0,0, +}, +{"tl","tagalog",0,&lc_charsets[0],0, +#ifdef LANG_TAGALOG +LANG_TAGALOG, +#else +0, +#endif +0,0, +}, +{"tn","setswana",0,&lc_charsets[0],0, +#ifdef LANG_SETSWANA +LANG_SETSWANA, +#else +0, +#endif +0,0, +}, +{"to","tonga",0,&lc_charsets[0],0, +#ifdef LANG_TONGA +LANG_TONGA, +#else +0, +#endif +0,0, +}, +{"tr","turkish","tur",&lc_charsets[8],0, +#ifdef LANG_TURKISH +LANG_TURKISH, +#else +0, +#endif +0,0, +}, +{"ts","tsonga",0,&lc_charsets[0],0, +#ifdef LANG_TSONGA +LANG_TSONGA, +#else +0, +#endif +0,0, +}, +{"tt","tatar","tat",&lc_charsets[0],0, +#ifdef LANG_TATAR +LANG_TATAR, +#else +0, +#endif +0,0, +}, +{"tw","chinese-traditional","cht",&lc_charsets[0],0, +#ifdef LANG_CHINESE_TRADITIONAL +LANG_CHINESE_TRADITIONAL, +#else +0, +#endif +0,0, +}, +{"uk","ukrainian","ukr",&lc_charsets[4],0, +#ifdef LANG_UKRAINIAN +LANG_UKRAINIAN, +#else +0, +#endif +0,0, +}, +{"ur","urdu",0,&lc_charsets[0],0, +#ifdef LANG_URDU +LANG_URDU, +#else +0, +#endif +0,0, +}, +{"uz","uzbek","uzb",&lc_charsets[0],0, +#ifdef LANG_UZBEK +LANG_UZBEK, +#else +0, +#endif +0,0, +}, +{"vi","vietnamese",0,&lc_charsets[0],0, +#ifdef LANG_VIETNAMESE +LANG_VIETNAMESE, +#else +0, +#endif +0,0, +}, +{"vo","volapuk",0,&lc_charsets[0],0, +#ifdef LANG_VOLAPUK +LANG_VOLAPUK, +#else +0, +#endif +0,0, +}, +{"wo","wolof",0,&lc_charsets[0],0, +#ifdef LANG_WOLOF +LANG_WOLOF, +#else +0, +#endif +0,0, +}, +{"xh","xhosa",0,&lc_charsets[0],0, +#ifdef LANG_XHOSA +LANG_XHOSA, +#else +0, +#endif +0,0, +}, +{"yo","yoruba",0,&lc_charsets[0],0, +#ifdef LANG_YORUBA +LANG_YORUBA, +#else +0, +#endif +0,0, +}, +{"zh","chinese-simplified","zho|chi|chs",&lc_charsets[0],0, +#ifdef LANG_CHINESE_SIMPLIFIED +LANG_CHINESE_SIMPLIFIED, +#else +0, +#endif +0,0, +}, +{"zu","zulu",0,&lc_charsets[0],0, +#ifdef LANG_ZULU +LANG_ZULU, +#else +0, +#endif +0,0, +}, + 0 +}; + +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, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"an","netherlands-antilles",0, +#ifdef CTRY_NETHERLANDS_ANTILLES +CTRY_NETHERLANDS_ANTILLES, +#else +0, +#endif +&lc_languages[86],0,0,0, +#ifdef SUBLANG_DUTCH_NETHERLANDS_ANTILLES +SUBLANG_DUTCH_NETHERLANDS_ANTILLES, +#else +0, +#endif +0,0,0, +}, +{"ar","argentina",0, +#ifdef CTRY_ARGENTINA +CTRY_ARGENTINA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_ARGENTINA +SUBLANG_SPANISH_ARGENTINA, +#else +0, +#endif +0,0,0, +}, +{"at","austria",0, +#ifdef CTRY_AUSTRIA +CTRY_AUSTRIA, +#else +0, +#endif +&lc_languages[23],0,0,0, +#ifdef SUBLANG_GERMAN_AUSTRIA +SUBLANG_GERMAN_AUSTRIA, +#else +0, +#endif +0,0,0, +}, +{"au","australia",0, +#ifdef CTRY_AUSTRALIA +CTRY_AUSTRALIA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_AUSTRALIA +SUBLANG_ENGLISH_AUSTRALIA, +#else +0, +#endif +0,0,0, +}, +{"az","azerbaijan",0, +#ifdef CTRY_AZERBAIJAN +CTRY_AZERBAIJAN, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"be","belgium",0, +#ifdef CTRY_BELGIUM +CTRY_BELGIUM, +#else +0, +#endif +&lc_languages[86],&lc_languages[35],&lc_languages[23],0, +#ifdef SUBLANG_DUTCH_BELGIUM +SUBLANG_DUTCH_BELGIUM, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_BELGIUM +SUBLANG_FRENCH_BELGIUM, +#else +0, +#endif + +#ifdef SUBLANG_GERMAN_BELGIUM +SUBLANG_GERMAN_BELGIUM, +#else +0, +#endif +0, +}, +{"bg","bulgaria",0, +#ifdef CTRY_BULGARIA +CTRY_BULGARIA, +#else +0, +#endif +&lc_languages[12],0,0,0, +#ifdef SUBLANG_BULGARIAN_BULGARIA +SUBLANG_BULGARIAN_BULGARIA, +#else +0, +#endif +0,0,0, +}, +{"bn","brunei-darussalam",0, +#ifdef CTRY_BRUNEI_DARUSSALAM +CTRY_BRUNEI_DARUSSALAM, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_BRUNEI_DARUSSALAM +SUBLANG_ARABIC_BRUNEI_DARUSSALAM, +#else +0, +#endif +0,0,0, +}, +{"bo","bolivia",0, +#ifdef CTRY_BOLIVIA +CTRY_BOLIVIA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_BOLIVIA +SUBLANG_SPANISH_BOLIVIA, +#else +0, +#endif +0,0,0, +}, +{"br","brazil",0, +#ifdef CTRY_BRAZIL +CTRY_BRAZIL, +#else +0, +#endif +&lc_languages[95],0,0,0, +#ifdef SUBLANG_PORTUGUESE_BRAZIL +SUBLANG_PORTUGUESE_BRAZIL, +#else +0, +#endif +0,0,0, +}, +{"bw","botswana",0, +#ifdef CTRY_BOTSWANA +CTRY_BOTSWANA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_BOTSWANA +SUBLANG_ENGLISH_BOTSWANA, +#else +0, +#endif +0,0,0, +}, +{"by","belarus",0, +#ifdef CTRY_BELARUS +CTRY_BELARUS, +#else +0, +#endif +&lc_languages[100],0,0,0, +#ifdef SUBLANG_RUSSIAN_BELARUS +SUBLANG_RUSSIAN_BELARUS, +#else +0, +#endif +0,0,0, +}, +{"bz","belize",0, +#ifdef CTRY_BELIZE +CTRY_BELIZE, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_BELIZE +SUBLANG_ENGLISH_BELIZE, +#else +0, +#endif +0,0,0, +}, +{"ca","canada",0, +#ifdef CTRY_CANADA +CTRY_CANADA, +#else +0, +#endif +&lc_languages[26],&lc_languages[35],0,0, +#ifdef SUBLANG_ENGLISH_CANADA +SUBLANG_ENGLISH_CANADA, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_CANADA +SUBLANG_FRENCH_CANADA, +#else +0, +#endif +0,0, +}, +{"ch","switzerland",0, +#ifdef CTRY_SWITZERLAND +CTRY_SWITZERLAND, +#else +0, +#endif +&lc_languages[35],&lc_languages[23],&lc_languages[54],0, +#ifdef SUBLANG_FRENCH_SWITZERLAND +SUBLANG_FRENCH_SWITZERLAND, +#else +0, +#endif + +#ifdef SUBLANG_GERMAN_SWITZERLAND +SUBLANG_GERMAN_SWITZERLAND, +#else +0, +#endif + +#ifdef SUBLANG_ITALIAN_SWITZERLAND +SUBLANG_ITALIAN_SWITZERLAND, +#else +0, +#endif +0, +}, +{"cl","chile",0, +#ifdef CTRY_CHILE +CTRY_CHILE, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_CHILE +SUBLANG_SPANISH_CHILE, +#else +0, +#endif +0,0,0, +}, +{"cn","china",LC_primary, +#ifdef CTRY_CHINA +CTRY_CHINA, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_CHINA +SUBLANG_CHINESE_SIMPLIFIED_CHINA, +#else +0, +#endif +0,0,0, +}, +{"co","colombia",0, +#ifdef CTRY_COLOMBIA +CTRY_COLOMBIA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_COLOMBIA +SUBLANG_SPANISH_COLOMBIA, +#else +0, +#endif +0,0,0, +}, +{"cr","costa-rica",0, +#ifdef CTRY_COSTA_RICA +CTRY_COSTA_RICA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_COSTA_RICA +SUBLANG_SPANISH_COSTA_RICA, +#else +0, +#endif +0,0,0, +}, +{"cz","czech-republic",0, +#ifdef CTRY_CZECH_REPUBLIC +CTRY_CZECH_REPUBLIC, +#else +0, +#endif +&lc_languages[20],0,0,0, +#ifdef SUBLANG_CZECH_CZECH_REPUBLIC +SUBLANG_CZECH_CZECH_REPUBLIC, +#else +0, +#endif +0,0,0, +}, +{"de","germany",0, +#ifdef CTRY_GERMANY +CTRY_GERMANY, +#else +0, +#endif +&lc_languages[23],0,0,0, +#ifdef SUBLANG_GERMAN_GERMANY +SUBLANG_GERMAN_GERMANY, +#else +0, +#endif +0,0,0, +}, +{"dk","denmark",0, +#ifdef CTRY_DENMARK +CTRY_DENMARK, +#else +0, +#endif +&lc_languages[22],&lc_languages[26],0,0, +#ifdef SUBLANG_DANISH_DENMARK +SUBLANG_DANISH_DENMARK, +#else +0, +#endif + +#ifdef SUBLANG_ENGLISH_DENMARK +SUBLANG_ENGLISH_DENMARK, +#else +0, +#endif +0,0, +}, +{"do","dominican-republic",0, +#ifdef CTRY_DOMINICAN_REPUBLIC +CTRY_DOMINICAN_REPUBLIC, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_DOMINICAN_REPUBLIC +SUBLANG_SPANISH_DOMINICAN_REPUBLIC, +#else +0, +#endif +0,0,0, +}, +{"dz","algeria",0, +#ifdef CTRY_ALGERIA +CTRY_ALGERIA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"ec","ecuador",0, +#ifdef CTRY_ECUADOR +CTRY_ECUADOR, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_ECUADOR +SUBLANG_SPANISH_ECUADOR, +#else +0, +#endif +0,0,0, +}, +{"ee","estonia",0, +#ifdef CTRY_ESTONIA +CTRY_ESTONIA, +#else +0, +#endif +&lc_languages[29],0,0,0, +#ifdef SUBLANG_ESTONIAN_ESTONIA +SUBLANG_ESTONIAN_ESTONIA, +#else +0, +#endif +0,0,0, +}, +{"eg","egypt",0, +#ifdef CTRY_EGYPT +CTRY_EGYPT, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_EGYPT +SUBLANG_ARABIC_EGYPT, +#else +0, +#endif +0,0,0, +}, +{"es","spain",0, +#ifdef CTRY_SPAIN +CTRY_SPAIN, +#else +0, +#endif +&lc_languages[28],&lc_languages[18],&lc_languages[30],&lc_languages[39], +#ifdef SUBLANG_SPANISH_SPAIN +SUBLANG_SPANISH_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_CATALAN_SPAIN +SUBLANG_CATALAN_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_BASQUE_SPAIN +SUBLANG_BASQUE_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_GALICIAN_SPAIN +SUBLANG_GALICIAN_SPAIN, +#else +0, +#endif + +}, +{"fi","finland",0, +#ifdef CTRY_FINLAND +CTRY_FINLAND, +#else +0, +#endif +&lc_languages[117],0,0,0, +#ifdef SUBLANG_SWEDISH_FINLAND +SUBLANG_SWEDISH_FINLAND, +#else +0, +#endif +0,0,0, +}, +{"fo","faroe-islands",0, +#ifdef CTRY_FAROE_ISLANDS +CTRY_FAROE_ISLANDS, +#else +0, +#endif +&lc_languages[34],0,0,0, +#ifdef SUBLANG_FAEROESE_FAROE_ISLANDS +SUBLANG_FAEROESE_FAROE_ISLANDS, +#else +0, +#endif +0,0,0, +}, +{"fr","france",0, +#ifdef CTRY_FRANCE +CTRY_FRANCE, +#else +0, +#endif +&lc_languages[35],0,0,0, +#ifdef SUBLANG_FRENCH_FRANCE +SUBLANG_FRENCH_FRANCE, +#else +0, +#endif +0,0,0, +}, +{"gb","united-kingdom|great-britain|england",LC_primary, +#ifdef CTRY_UNITED_KINGDOM +CTRY_UNITED_KINGDOM, +#else +#ifdef CTRY_GREAT_BRITAIN +CTRY_GREAT_BRITAIN, +#else +#ifdef CTRY_ENGLAND +CTRY_ENGLAND, +#else +0, +#endif +#endif +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_KINGDOM +SUBLANG_ENGLISH_UNITED_KINGDOM, +#else +#ifdef SUBLANG_ENGLISH_GREAT_BRITAIN +SUBLANG_ENGLISH_GREAT_BRITAIN, +#else +#ifdef SUBLANG_ENGLISH_ENGLAND +SUBLANG_ENGLISH_ENGLAND, +#else +0, +#endif +#endif +#endif +0,0,0, +}, +{"gl","greenland",0, +#ifdef CTRY_GREENLAND +CTRY_GREENLAND, +#else +0, +#endif +&lc_languages[61],0,0,0, +#ifdef SUBLANG_GREENLANDIC_GREENLAND +SUBLANG_GREENLANDIC_GREENLAND, +#else +0, +#endif +0,0,0, +}, +{"gr","greece",0, +#ifdef CTRY_GREECE +CTRY_GREECE, +#else +0, +#endif +&lc_languages[25],0,0,0, +#ifdef SUBLANG_GREEK_GREECE +SUBLANG_GREEK_GREECE, +#else +0, +#endif +0,0,0, +}, +{"gt","guatemala",0, +#ifdef CTRY_GUATEMALA +CTRY_GUATEMALA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_GUATEMALA +SUBLANG_SPANISH_GUATEMALA, +#else +0, +#endif +0,0,0, +}, +{"hk","hong-kong",0, +#ifdef CTRY_HONG_KONG +CTRY_HONG_KONG, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_HONG_KONG +SUBLANG_CHINESE_SIMPLIFIED_HONG_KONG, +#else +0, +#endif +0,0,0, +}, +{"hn","honduras",0, +#ifdef CTRY_HONDURAS +CTRY_HONDURAS, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_HONDURAS +SUBLANG_SPANISH_HONDURAS, +#else +0, +#endif +0,0,0, +}, +{"hr","croatia",0, +#ifdef CTRY_CROATIA +CTRY_CROATIA, +#else +0, +#endif +&lc_languages[45],0,0,0, +#ifdef SUBLANG_CROATIAN_CROATIA +SUBLANG_CROATIAN_CROATIA, +#else +0, +#endif +0,0,0, +}, +{"hu","hungary",0, +#ifdef CTRY_HUNGARY +CTRY_HUNGARY, +#else +0, +#endif +&lc_languages[46],0,0,0, +#ifdef SUBLANG_HUNGARIAN_HUNGARY +SUBLANG_HUNGARIAN_HUNGARY, +#else +0, +#endif +0,0,0, +}, +{"id","indonesia",0, +#ifdef CTRY_INDONESIA +CTRY_INDONESIA, +#else +0, +#endif +&lc_languages[49],0,0,0, +#ifdef SUBLANG_INDONESIAN_INDONESIA +SUBLANG_INDONESIAN_INDONESIA, +#else +0, +#endif +0,0,0, +}, +{"ie","ireland",0, +#ifdef CTRY_IRELAND +CTRY_IRELAND, +#else +0, +#endif +&lc_languages[26],&lc_languages[37],0,0, +#ifdef SUBLANG_ENGLISH_IRELAND +SUBLANG_ENGLISH_IRELAND, +#else +0, +#endif + +#ifdef SUBLANG_IRISH_IRELAND +SUBLANG_IRISH_IRELAND, +#else +0, +#endif +0,0, +}, +{"il","israel",0, +#ifdef CTRY_ISRAEL +CTRY_ISRAEL, +#else +0, +#endif +&lc_languages[43],0,0,0, +#ifdef SUBLANG_HEBREW_ISRAEL +SUBLANG_HEBREW_ISRAEL, +#else +0, +#endif +0,0,0, +}, +{"iq","iraq",0, +#ifdef CTRY_IRAQ +CTRY_IRAQ, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_IRAQ +SUBLANG_ARABIC_IRAQ, +#else +0, +#endif +0,0,0, +}, +{"is","iceland",0, +#ifdef CTRY_ICELAND +CTRY_ICELAND, +#else +0, +#endif +&lc_languages[53],0,0,0, +#ifdef SUBLANG_ICELANDIC_ICELAND +SUBLANG_ICELANDIC_ICELAND, +#else +0, +#endif +0,0,0, +}, +{"it","italy",0, +#ifdef CTRY_ITALY +CTRY_ITALY, +#else +0, +#endif +&lc_languages[54],0,0,0, +#ifdef SUBLANG_ITALIAN_ITALY +SUBLANG_ITALIAN_ITALY, +#else +0, +#endif +0,0,0, +}, +{"jm","jamaica",0, +#ifdef CTRY_JAMAICA +CTRY_JAMAICA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_JAMAICA +SUBLANG_ENGLISH_JAMAICA, +#else +0, +#endif +0,0,0, +}, +{"jo","jordan",0, +#ifdef CTRY_JORDAN +CTRY_JORDAN, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_JORDAN +SUBLANG_ARABIC_JORDAN, +#else +0, +#endif +0,0,0, +}, +{"jp","japan",0, +#ifdef CTRY_JAPAN +CTRY_JAPAN, +#else +0, +#endif +&lc_languages[56],0,0,0, +#ifdef SUBLANG_JAPANESE_JAPAN +SUBLANG_JAPANESE_JAPAN, +#else +0, +#endif +0,0,0, +}, +{"ke","kenya",0, +#ifdef CTRY_KENYA +CTRY_KENYA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"kr","south-korea",0, +#ifdef CTRY_SOUTH_KOREA +CTRY_SOUTH_KOREA, +#else +0, +#endif +&lc_languages[64],0,0,0, +#ifdef SUBLANG_KOREAN_SOUTH_KOREA +SUBLANG_KOREAN_SOUTH_KOREA, +#else +0, +#endif +0,0,0, +}, +{"kw","kuwait",0, +#ifdef CTRY_KUWAIT +CTRY_KUWAIT, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_KUWAIT +SUBLANG_ARABIC_KUWAIT, +#else +0, +#endif +0,0,0, +}, +{"lb","lebanon",0, +#ifdef CTRY_LEBANON +CTRY_LEBANON, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_LEBANON +SUBLANG_ARABIC_LEBANON, +#else +0, +#endif +0,0,0, +}, +{"li","liechtenstein",0, +#ifdef CTRY_LIECHTENSTEIN +CTRY_LIECHTENSTEIN, +#else +0, +#endif +&lc_languages[23],&lc_languages[35],0,0, +#ifdef SUBLANG_GERMAN_LIECHTENSTEIN +SUBLANG_GERMAN_LIECHTENSTEIN, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_LIECHTENSTEIN +SUBLANG_FRENCH_LIECHTENSTEIN, +#else +0, +#endif +0,0, +}, +{"lt","lithuania",0, +#ifdef CTRY_LITHUANIA +CTRY_LITHUANIA, +#else +0, +#endif +&lc_languages[71],0,0,0, +#ifdef SUBLANG_LITHUANIAN_LITHUANIA +SUBLANG_LITHUANIAN_LITHUANIA, +#else +0, +#endif +0,0,0, +}, +{"lu","luxembourg",0, +#ifdef CTRY_LUXEMBOURG +CTRY_LUXEMBOURG, +#else +0, +#endif +&lc_languages[23],&lc_languages[35],0,0, +#ifdef SUBLANG_GERMAN_LUXEMBOURG +SUBLANG_GERMAN_LUXEMBOURG, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_LUXEMBOURG +SUBLANG_FRENCH_LUXEMBOURG, +#else +0, +#endif +0,0, +}, +{"lv","latvia",0, +#ifdef CTRY_LATVIA +CTRY_LATVIA, +#else +0, +#endif +&lc_languages[72],0,0,0, +#ifdef SUBLANG_LATVIAN_LATVIA +SUBLANG_LATVIAN_LATVIA, +#else +0, +#endif +0,0,0, +}, +{"ly","libya",0, +#ifdef CTRY_LIBYA +CTRY_LIBYA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_LIBYA +SUBLANG_ARABIC_LIBYA, +#else +0, +#endif +0,0,0, +}, +{"ma","morocco",0, +#ifdef CTRY_MOROCCO +CTRY_MOROCCO, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_MOROCCO +SUBLANG_ARABIC_MOROCCO, +#else +0, +#endif +0,0,0, +}, +{"mk","macedonia",0, +#ifdef CTRY_MACEDONIA +CTRY_MACEDONIA, +#else +0, +#endif +&lc_languages[75],0,0,0, +#ifdef SUBLANG_MACEDONIAN_MACEDONIA +SUBLANG_MACEDONIAN_MACEDONIA, +#else +0, +#endif +0,0,0, +}, +{"mo","macau",0, +#ifdef CTRY_MACAU +CTRY_MACAU, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_MACAU +SUBLANG_CHINESE_SIMPLIFIED_MACAU, +#else +0, +#endif +0,0,0, +}, +{"mx","mexico",0, +#ifdef CTRY_MEXICO +CTRY_MEXICO, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_MEXICO +SUBLANG_SPANISH_MEXICO, +#else +0, +#endif +0,0,0, +}, +{"my","malaysia",0, +#ifdef CTRY_MALAYSIA +CTRY_MALAYSIA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"ni","nicaragua",0, +#ifdef CTRY_NICARAGUA +CTRY_NICARAGUA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_NICARAGUA +SUBLANG_SPANISH_NICARAGUA, +#else +0, +#endif +0,0,0, +}, +{"nl","netherlands",0, +#ifdef CTRY_NETHERLANDS +CTRY_NETHERLANDS, +#else +0, +#endif +&lc_languages[86],0,0,0, +#ifdef SUBLANG_DUTCH_NETHERLANDS +SUBLANG_DUTCH_NETHERLANDS, +#else +0, +#endif +0,0,0, +}, +{"no","norway",0, +#ifdef CTRY_NORWAY +CTRY_NORWAY, +#else +0, +#endif +&lc_languages[84],&lc_languages[88],&lc_languages[87],0, +#ifdef SUBLANG_NORWEGIAN_BOKMAL_NORWAY +SUBLANG_NORWEGIAN_BOKMAL_NORWAY, +#else +0, +#endif + +#ifdef SUBLANG_NORWEGIAN_NORWAY +SUBLANG_NORWEGIAN_NORWAY, +#else +0, +#endif + +#ifdef SUBLANG_NORWEGIAN_NYNORSK_NORWAY +SUBLANG_NORWEGIAN_NYNORSK_NORWAY, +#else +0, +#endif +0, +}, +{"nz","new-zealand",0, +#ifdef CTRY_NEW_ZEALAND +CTRY_NEW_ZEALAND, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_NEW_ZEALAND +SUBLANG_ENGLISH_NEW_ZEALAND, +#else +0, +#endif +0,0,0, +}, +{"om","oman",0, +#ifdef CTRY_OMAN +CTRY_OMAN, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_OMAN +SUBLANG_ARABIC_OMAN, +#else +0, +#endif +0,0,0, +}, +{"pa","panama",0, +#ifdef CTRY_PANAMA +CTRY_PANAMA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PANAMA +SUBLANG_SPANISH_PANAMA, +#else +0, +#endif +0,0,0, +}, +{"pe","peru",0, +#ifdef CTRY_PERU +CTRY_PERU, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PERU +SUBLANG_SPANISH_PERU, +#else +0, +#endif +0,0,0, +}, +{"pl","poland",0, +#ifdef CTRY_POLAND +CTRY_POLAND, +#else +0, +#endif +&lc_languages[93],0,0,0, +#ifdef SUBLANG_POLISH_POLAND +SUBLANG_POLISH_POLAND, +#else +0, +#endif +0,0,0, +}, +{"pr","puerto-rico",0, +#ifdef CTRY_PUERTO_RICO +CTRY_PUERTO_RICO, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PUERTO_RICO +SUBLANG_SPANISH_PUERTO_RICO, +#else +0, +#endif +0,0,0, +}, +{"pt","portugal",0, +#ifdef CTRY_PORTUGAL +CTRY_PORTUGAL, +#else +0, +#endif +&lc_languages[95],0,0,0, +#ifdef SUBLANG_PORTUGUESE_PORTUGAL +SUBLANG_PORTUGUESE_PORTUGAL, +#else +0, +#endif +0,0,0, +}, +{"py","paraguay",0, +#ifdef CTRY_PARAGUAY +CTRY_PARAGUAY, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PARAGUAY +SUBLANG_SPANISH_PARAGUAY, +#else +0, +#endif +0,0,0, +}, +{"ro","romania",0, +#ifdef CTRY_ROMANIA +CTRY_ROMANIA, +#else +0, +#endif +&lc_languages[99],0,0,0, +#ifdef SUBLANG_ROMANIAN_ROMANIA +SUBLANG_ROMANIAN_ROMANIA, +#else +0, +#endif +0,0,0, +}, +{"ru","russia",0, +#ifdef CTRY_RUSSIA +CTRY_RUSSIA, +#else +0, +#endif +&lc_languages[100],0,0,0, +#ifdef SUBLANG_RUSSIAN_RUSSIA +SUBLANG_RUSSIAN_RUSSIA, +#else +0, +#endif +0,0,0, +}, +{"sa","saudi-arabia",0, +#ifdef CTRY_SAUDI_ARABIA +CTRY_SAUDI_ARABIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_SAUDI_ARABIA +SUBLANG_ARABIC_SAUDI_ARABIA, +#else +0, +#endif +0,0,0, +}, +{"se","sweden",LC_primary, +#ifdef CTRY_SWEDEN +CTRY_SWEDEN, +#else +0, +#endif +&lc_languages[117],0,0,0, +#ifdef SUBLANG_SWEDISH_SWEDEN +SUBLANG_SWEDISH_SWEDEN, +#else +0, +#endif +0,0,0, +}, +{"sg","singapore",0, +#ifdef CTRY_SINGAPORE +CTRY_SINGAPORE, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_SINGAPORE +SUBLANG_CHINESE_SIMPLIFIED_SINGAPORE, +#else +0, +#endif +0,0,0, +}, +{"si","slovenia",0, +#ifdef CTRY_SLOVENIA +CTRY_SLOVENIA, +#else +0, +#endif +&lc_languages[108],0,0,0, +#ifdef SUBLANG_SLOVENIAN_SLOVENIA +SUBLANG_SLOVENIAN_SLOVENIA, +#else +0, +#endif +0,0,0, +}, +{"sk","slovakia",0, +#ifdef CTRY_SLOVAKIA +CTRY_SLOVAKIA, +#else +0, +#endif +&lc_languages[107],0,0,0, +#ifdef SUBLANG_SLOVAK_SLOVAKIA +SUBLANG_SLOVAK_SLOVAKIA, +#else +0, +#endif +0,0,0, +}, +{"sp","serbia",0, +#ifdef CTRY_SERBIA +CTRY_SERBIA, +#else +0, +#endif +&lc_languages[113],0,0,0, +#ifdef SUBLANG_SERBIAN_SERBIA +SUBLANG_SERBIAN_SERBIA, +#else +0, +#endif +0,0,0, +}, +{"sv","el-salvador",0, +#ifdef CTRY_EL_SALVADOR +CTRY_EL_SALVADOR, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_EL_SALVADOR +SUBLANG_SPANISH_EL_SALVADOR, +#else +0, +#endif +0,0,0, +}, +{"sy","syria",0, +#ifdef CTRY_SYRIA +CTRY_SYRIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_SYRIA +SUBLANG_ARABIC_SYRIA, +#else +0, +#endif +0,0,0, +}, +{"th","thailand",0, +#ifdef CTRY_THAILAND +CTRY_THAILAND, +#else +0, +#endif +&lc_languages[122],0,0,0, +#ifdef SUBLANG_THAI_THAILAND +SUBLANG_THAI_THAILAND, +#else +0, +#endif +0,0,0, +}, +{"tn","tunisia",0, +#ifdef CTRY_TUNISIA +CTRY_TUNISIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_TUNISIA +SUBLANG_ARABIC_TUNISIA, +#else +0, +#endif +0,0,0, +}, +{"tr","turkey",0, +#ifdef CTRY_TURKEY +CTRY_TURKEY, +#else +0, +#endif +&lc_languages[128],0,0,0, +#ifdef SUBLANG_TURKISH_TURKEY +SUBLANG_TURKISH_TURKEY, +#else +0, +#endif +0,0,0, +}, +{"tt","trinidad&tobago",0, +#ifdef CTRY_TRINIDAD_TOBAGO +CTRY_TRINIDAD_TOBAGO, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_TRINIDAD_TOBAGO +SUBLANG_ENGLISH_TRINIDAD_TOBAGO, +#else +0, +#endif +0,0,0, +}, +{"tw","taiwan",0, +#ifdef CTRY_TAIWAN +CTRY_TAIWAN, +#else +0, +#endif +&lc_languages[131],0,0,0, +#ifdef SUBLANG_CHINESE_TRADITIONAL_TAIWAN +SUBLANG_CHINESE_TRADITIONAL_TAIWAN, +#else +0, +#endif +0,0,0, +}, +{"ua","ukraine",0, +#ifdef CTRY_UKRAINE +CTRY_UKRAINE, +#else +0, +#endif +&lc_languages[132],&lc_languages[100],0,0, +#ifdef SUBLANG_UKRAINIAN_UKRAINE +SUBLANG_UKRAINIAN_UKRAINE, +#else +0, +#endif + +#ifdef SUBLANG_RUSSIAN_UKRAINE +SUBLANG_RUSSIAN_UKRAINE, +#else +0, +#endif +0,0, +}, +{"uk","united-kingdom",LC_primary, +#ifdef CTRY_UNITED_KINGDOM +CTRY_UNITED_KINGDOM, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_KINGDOM +SUBLANG_ENGLISH_UNITED_KINGDOM, +#else +0, +#endif +0,0,0, +}, +{"us","united-states|usa",0, +#ifdef CTRY_UNITED_STATES +CTRY_UNITED_STATES, +#else +#ifdef CTRY_USA +CTRY_USA, +#else +0, +#endif +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_STATES +SUBLANG_ENGLISH_UNITED_STATES, +#else +#ifdef SUBLANG_ENGLISH_USA +SUBLANG_ENGLISH_USA, +#else +0, +#endif +#endif +0,0,0, +}, +{"uy","uruguay",0, +#ifdef CTRY_URUGUAY +CTRY_URUGUAY, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_URUGUAY +SUBLANG_SPANISH_URUGUAY, +#else +0, +#endif +0,0,0, +}, +{"ve","venezuela",0, +#ifdef CTRY_VENEZUELA +CTRY_VENEZUELA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_VENEZUELA +SUBLANG_SPANISH_VENEZUELA, +#else +0, +#endif +0,0,0, +}, +{"yu","yugoslavia",0, +#ifdef CTRY_YUGOSLAVIA +CTRY_YUGOSLAVIA, +#else +0, +#endif +&lc_languages[113],0,0,0, +#ifdef SUBLANG_SERBIAN_YUGOSLAVIA +SUBLANG_SERBIAN_YUGOSLAVIA, +#else +0, +#endif +0,0,0, +}, +{"za","south-africa",0, +#ifdef CTRY_SOUTH_AFRICA +CTRY_SOUTH_AFRICA, +#else +0, +#endif +&lc_languages[4],0,0,0, +#ifdef SUBLANG_AFRIKAANS_SOUTH_AFRICA +SUBLANG_AFRIKAANS_SOUTH_AFRICA, +#else +0, +#endif +0,0,0, +}, +{"zw","zimbabwe",0, +#ifdef CTRY_ZIMBABWE +CTRY_ZIMBABWE, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_ZIMBABWE +SUBLANG_ENGLISH_ZIMBABWE, +#else +0, +#endif +0,0,0, +}, + 0 +}; + +const Lc_map_t lc_maps[] = +{ +{"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/cmd/ast/libast/mapfile-vers b/usr/src/cmd/ast/libast/mapfile-vers new file mode 100644 index 0000000000..305122da93 --- /dev/null +++ b/usr/src/cmd/ast/libast/mapfile-vers @@ -0,0 +1,750 @@ +# +# 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. +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object versioning must comply with the rules detailed in +# +# usr/src/lib/README.mapfiles +# +# You should not be making modifications here until you've read the most current +# copy of that file. If you need help, contact a gatekeeper for guidance. +# +# MAPFILE HEADER END +# + +$mapfile_version 2 + +# functions +SYMBOL_VERSION SUNWprivate_1.1 { + global: + _Sfextern; + _Sfi; + _Sfmaxr; + _Sftable; + _Vmextern; + _Vmheap; + _ast___getdelim; + _ast__filbuf; + _ast_asprintf; + _ast_basename; + _ast_calloc; + _ast_catclose; + _ast_catgets; + _ast_catopen; + _ast_cfree; + _ast_clearerr; + _ast_clearerr_unlocked; + _ast_dirname; + _ast_doprnt; + _ast_doscan; + _ast_eaccess; + _ast_execvpe; + _ast_fclose; + _ast_fcloseall; + _ast_fdopen; + _ast_feof_unlocked; + _ast_ferror_unlocked; + _ast_fflush; + _ast_fflush_unlocked; + _ast_fgetc; + _ast_fgetc_unlocked; + _ast_fgetpos64; + _ast_fgetpos; + _ast_fgets; + _ast_fgets_unlocked; + _ast_fgetwc; + _ast_fgetws; + _ast_fileno_unlocked; + _ast_flockfile; + _ast_fmemopen; + _ast_fnmatch; + _ast_fopen; + _ast_fprintf; + _ast_fpurge; + _ast_fputc_unlocked; + _ast_fputs; + _ast_fputs_unlocked; + _ast_fputwc; + _ast_fputws; + _ast_fread; + _ast_fread_unlocked; + _ast_free; + _ast_freopen; + _ast_fscanf; + _ast_fseek64; + _ast_fseek; + _ast_fseeko64; + _ast_fseeko; + _ast_fsetpos64; + _ast_fsetpos; + _ast_ftell64; + _ast_ftell; + _ast_ftello64; + _ast_ftello; + _ast_ftrylockfile; + _ast_fts_children; + _ast_fts_close; + _ast_fts_flags; + _ast_fts_notify; + _ast_fts_open; + _ast_fts_read; + _ast_fts_set; + _ast_ftw; + _ast_ftwalk; + _ast_ftwflags; + _ast_funlockfile; + _ast_fwide; + _ast_fwprintf; + _ast_fwrite; + _ast_fwrite_unlocked; + _ast_fwscanf; + _ast_getc_unlocked; + _ast_getchar_unlocked; + _ast_getcwd; + _ast_getdate; + _ast_getdelim; + _ast_getenv; + _ast_getline; + _ast_getopt; + _ast_getopt_long; + _ast_getopt_long_only; + _ast_getpgrp; + _ast_gets; + _ast_getsubopt; + _ast_getw; + _ast_getwc; + _ast_getwchar; + _ast_getwd; + _ast_getws; + _ast_glob; + _ast_globfree; + _ast_iconv; + _ast_iconv_close; + _ast_iconv_list; + _ast_iconv_move; + _ast_iconv_name; + _ast_iconv_open; + _ast_iconv_write; + _ast_info; + _ast_intercepts; + _ast_lc_categories; + _ast_lc_charsets; + _ast_lc_languages; + _ast_lc_maps; + _ast_lc_territories; + _ast_localeconv; + _ast_locales; + _ast_malloc; + _ast_memalign; + _ast_memdup; + _ast_memfatal; + _ast_memhash; + _ast_memsum; + _ast_mkstemp; + _ast_mktemp; + _ast_mktime; + _ast_nftw; + _ast_optarg; + _ast_optctx; + _ast_opterr; + _ast_optesc; + _ast_optget; + _ast_opthelp; + _ast_optind; + _ast_optjoin; + _ast_optopt; + _ast_optstr; + _ast_optusage; + _ast_pathaccess; + _ast_pathaccess_20100601; + _ast_pathbin; + _ast_pathcanon; + _ast_pathcanon_20100601; + _ast_pathcat; + _ast_pathcd; + _ast_pathcheck; + _ast_pathexists; + _ast_pathfind; + _ast_pathgetlink; + _ast_pathinclude; + _ast_pathkey; + _ast_pathnative; + _ast_pathpath; + _ast_pathpath_20100601; + _ast_pathposix; + _ast_pathprobe; + _ast_pathprobe_20100601; + _ast_pathprog; + _ast_pathrepl; + _ast_pathsetlink; + _ast_pathshell; + _ast_pathstat; + _ast_pathtemp; + _ast_pathtmp; + _ast_pclose; + _ast_popen; + _ast_printf; + _ast_procclose; + _ast_procfree; + _ast_procopen; + _ast_putc_unlocked; + _ast_putchar_unlocked; + _ast_putenv; + _ast_puts; + _ast_putw; + _ast_putwc; + _ast_putwchar; + _ast_re_comp; + _ast_re_exec; + _ast_realloc; + _ast_realpath; + _ast_regaddclass; + _ast_regalloc; + _ast_regcache; + _ast_regclass; + _ast_regcmp; + _ast_regcollate; + _ast_regcomb; + _ast_regcomp; + _ast_regdup; + _ast_regerror; + _ast_regex; + _ast_regexec; + _ast_regexec_20120528; + _ast_regfatal; + _ast_regfatalpat; + _ast_regfree; + _ast_regncomp; + _ast_regnexec; + _ast_regrecord; + _ast_regrexec; + _ast_regstat; + _ast_regsub; + _ast_regsubcomp; + _ast_regsubexec; + _ast_regsubexec_20120528; + _ast_regsubflags; + _ast_regsubfree; + _ast_remove; + _ast_resolvepath; + _ast_rewind; + _ast_scanf; + _ast_setbuf; + _ast_setbuffer; + _ast_setenv; + _ast_setenviron; + _ast_setlinebuf; + _ast_setlocale; + _ast_setvbuf; + _ast_sfkeyprintf_20000308; + _ast_sigcritical; + _ast_signal; + _ast_sigunblock; + _ast_snprintf; + _ast_sprintf; + _ast_sscanf; + _ast_stracmp; + _ast_strcopy; + _ast_strdup; + _ast_strelapsed; + _ast_strerror; + _ast_stresc; + _ast_streval; + _ast_strexpr; + _ast_strftime; + _ast_strgid; + _ast_strgrpmatch; + _ast_strhash; + _ast_strkey; + _ast_strlcat; + _ast_strlcpy; + _ast_strlook; + _ast_strmatch; + _ast_strmode; + _ast_strnacmp; + _ast_strncopy; + _ast_strntod; + _ast_strntol; + _ast_strntold; + _ast_strntoll; + _ast_strntoul; + _ast_strntoull; + _ast_stropt; + _ast_strperm; + _ast_strpsearch; + _ast_strptime; + _ast_strsearch; + _ast_strsort; + _ast_strsubmatch; + _ast_strsum; + _ast_strtape; + _ast_strtod; + _ast_strtoip4; + _ast_strtol; + _ast_strtold; + _ast_strtoll; + _ast_strton; + _ast_strtonll; + _ast_strtoul; + _ast_strtoull; + _ast_struid; + _ast_struniq; + _ast_swprintf; + _ast_swscanf; + _ast_system; + _ast_tempnam; + _ast_tmpfile; + _ast_tmpnam; + _ast_touch; + _ast_translate; + _ast_ungetc; + _ast_ungetwc; + _ast_unsetenv; + _ast_valloc; + _ast_vasprintf; + _ast_vfprintf; + _ast_vfscanf; + _ast_vfwprintf; + _ast_vfwscanf; + _ast_vprintf; + _ast_vscanf; + _ast_vsnprintf; + _ast_vsprintf; + _ast_vsscanf; + _ast_vswprintf; + _ast_vswscanf; + _ast_vwprintf; + _ast_vwscanf; + _ast_wordexp; + _ast_wordfree; + _ast_wprintf; + _ast_wscanf; + _ccmapcpy; + _ccmapstr; + _dtopen; + _error_info_; + _fini; + _hash_info_; + _iblocks; + _init; + _lib_version; + _mode_permmap_; + _mode_table_; + _opt_info_; + _proc_info_; + _re_comp; + _re_exec; + _re_putc; + _reg_alloc; + _reg_classfun; + _reg_drop; + _reg_fatal; + _reg_state; + _sfcvt; + _sfdlen; + _sfexcept; + _sffilbuf; + _sfflsbuf; + _sfgetl2; + _sfgetl; + _sfgetu2; + _sfgetu; + _sfllen; + _sfmode; + _sfopen; + _sfpclose; + _sfpopen; + _sfputd; + _sfputl; + _sfputm; + _sfputu; + _sfrsrv; + _sfsetpool; + _sfstrtod; + _sftype; + _sig_info_; + _stdgets; + _stdopen; + _stdprintf; + _stdscanf; + _stdsetvbuf; + _stdsprintf; + _stdvsnprintf; + _stdvsprintf; + _stdvsscanf; + _stkseek; + _vmbestcheck; + astconf; + astconfdisc; + astconflist; + astcopy; + astgetconf; + astintercept; + astlicense; + astquery; + astwinsize; + base64decode; + base64encode; + ccmapid; + ccmaplist; + ccmapname; + ccnative; + chresc; + chrexp; + chrtoi; + conformance; + dtclose; + dtdisc; + dtextract; + dtflatten; + dtmethod; + dtnew; + dtopen; + dtrestore; + dtsize; + dtstat; + dtstrhash; + dtview; + dtwalk; + error; + error_break; + errorf; + errormsg; + errorv; + errorx; + findclose; + findopen; + findread; + findwrite; + fmtbase; + fmtbasell; + fmtbuf; + fmtclock; + fmtdev; + fmtelapsed; + fmterror; + fmtesc; + fmtesq; + fmtfmt; + fmtfs; + fmtgid; + fmtident; + fmtint; + fmtip4; + fmtls; + fmtmatch; + fmtmode; + fmtnesq; + fmtnum; + fmtperm; + fmtquote; + fmtre; + fmtrec; + fmtscale; + fmtsignal; + fmttime; + fmttmx; + fmttv; + fmtuid; + fmtversion; + fs3d; + fs3d_mount; + hashalloc; + hashdone; + hashdump; + hashfree; + hashlast; + hashlook; + hashnext; + hashscan; + hashsize; + hashview; + hashwalk; + lccanon; + lccategories; + lcindex; + lcinfo; + lcmake; + lcscan; + magicclose; + magiclist; + magicload; + magicopen; + magictype; + mcclose; + mcdump; + mcfind; + mcget; + mcindex; + mcopen; + mcput; + mimeclose; + mimecmp; + mimehead; + mimelist; + mimeload; + mimeopen; + mimeset; + mimetype; + mimeview; + mntclose; + mntopen; + mntread; + mntwrite; + modei; + modex; + recfmt; + reclen; + recstr; + sfaprints; + sfclose; + sfclrerr; + sfclrlock; + sfdcdio; + sfdcdos; + sfdcfilter; + sfdcmore; + sfdcprefix; + sfdcseekable; + sfdcslow; + sfdcsubstream; + sfdctee; + sfdcunion; + sfdisc; + sfdlen; + sfecvt; + sfeof; + sferror; + sffcvt; + sffileno; + sfgetc; + sfgetd; + sfgetl; + sfgetm; + sfgetr; + sfgetu; + sfkeyprintf; + sfllen; + sfmove; + sfmutex; + sfnew; + sfnotify; + sfnputc; + sfopen; + sfpeek; + sfpkrd; + sfpoll; + sfpool; + sfpopen; + sfprintf; + sfprints; + sfpurge; + sfputc; + sfputd; + sfputl; + sfputm; + sfputr; + sfputu; + sfraise; + sfrd; + sfread; + sfreserve; + sfresize; + sfscanf; + sfseek; + sfset; + sfsetbuf; + sfsetfd; + sfsize; + sfsk; + sfslen; + sfsprintf; + sfsscanf; + sfstack; + sfstacked; + sfswap; + sfsync; + sftell; + sftmp; + sfulen; + sfungetc; + sfvalue; + sfvaprints; + sfvprintf; + sfvprints; + sfvscanf; + sfvsprintf; + sfvsscanf; + sfwr; + sfwrite; + spawnlp; + spawnve; + spawnveg; + spawnvp; + spawnvpe; + stackalloc; + stackclear; + stackfree; + stackget; + stackpop; + stackpush; + stacktell; + stkalloc; + stkclose; + stkcopy; + stkfreeze; + stkinstall; + stklink; + stkopen; + stkset; + swapget; + swapmem; + swapop; + swapput; + systrace; + tmdate; + tmequiv; + tmfix; + tmfmt; + tmform; + tmgoff; + tminit; + tmleap; + tmlex; + tmlocale; + tmmake; + tmpoff; + tmscan; + tmsleep; + tmtime; + tmtype; + tmweek; + tmword; + tmxdate; + tmxfmt; + tmxgettime; + tmxleap; + tmxmake; + tmxscan; + tmxsettime; + tmxsleep; + tmxtime; + tmxtouch; + tmzone; + tokclose; + tokline; + tokopen; + tokread; + tokscan; + tvcmp; + tvgettime; + tvsettime; + tvsleep; + tvtouch; + typefix; + univ_env; + vecargs; + vecfile; + vecfree; + vecload; + vecstring; + vmclear; + vmclose; + vmdbcheck; + vmdbwatch; + vmdebug; + vmdisc; + vmgetmem; + vmmopen; + vmopen; + vmprofile; + vmregion; + vmsegment; + vmset; + vmstat; + vmstrdup; + vmtrace; + vmtrbusy; + vmwalk; + wc2utf8; + local: + *; +}; + +# data +SYMBOL_VERSION SUNWprivate_1.1 { + global: + Dtbag; + Dthash; + Dtlist; + Dtobag; + Dtoset; + Dtqueue; + Dtset; + Dtstack; + Dttree; + Vmbest; + Vmdcheap; + Vmdcsbrk; + Vmdebug; + Vmheap; + Vmlast; + Vmpool; + Vmprofile; + Vmregion; + _DATA_dtlist; + _DATA_dttree; + _DATA_sigdata; + _DATA_vmbest; + _DATA_vmdcheap; + _DATA_vmdebug; + _DATA_vmlast; + _DATA_vmpool; + _DATA_vmprofile; + _Sfstderr; + _Sfstdin; + _Sfstdout; + _Stak_data; + _ast_conf_data; + _ast_conf_ndata; + _ast_conf_nprefix; + _ast_conf_prefix; + _ccmap; + _error_infop_; + _opt_infop_; + _tm_data_; + _tm_datap_; + _tm_info_; + _tm_infop_; + sfstderr; + sfstdin; + sfstdout; + local: + *; +}; diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/align b/usr/src/cmd/ast/libast/sparc/FEATURE/align new file mode 100644 index 0000000000..d7c53efe9c --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/align @@ -0,0 +1,32 @@ +/* : : 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 ok */ + +#define ALIGN_CHUNK 8192 +#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)) + +#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/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 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 ok */ +/* atomic_cas_64 */ +#include +#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 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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/ccode b/usr/src/cmd/ast/libast/sparc/FEATURE/ccode new file mode 100644 index 0000000000..30603c443a --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/ccode @@ -0,0 +1,29 @@ +/* : : 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 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/cmd/ast/libast/sparc/FEATURE/common b/usr/src/cmd/ast/libast/sparc/FEATURE/common new file mode 100644 index 0000000000..d8fdc6e652 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/common @@ -0,0 +1,211 @@ +/* : : 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 ok */ +#define _hdr_pthread 1 /* #include ok */ +#define _hdr_stdarg 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdint 1 /* #include ok */ +#define _hdr_inttypes 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include 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 _hdr_stdio 1 /* #include ok */ +#define _typ___va_list 1 /* __va_list is a type */ +#define _sys_stat 1 /* #include ok */ +#define _sys_socket 1 /* #include 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__, if defined, 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_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 +#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 */ +#define _typ_uintptr_t 1 /* uintptr_t is a type */ + +#ifndef va_listref +#ifndef va_start +#if __STD_C +#include +#else +#include +#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 +# endif +# if _sys_types +# include +# endif +# if _hdr_stdint +# include +# else +# if _hdr_inttypes +# include +# 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 +# define _def_map_ast 1 +# if !_def_map_ast +# include +# endif +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/dirent b/usr/src/cmd/ast/libast/sparc/FEATURE/dirent new file mode 100644 index 0000000000..18f89fa388 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/dirent @@ -0,0 +1,106 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _nxt_dirent <../include/dirent.h> /* include path for the native */ +#define _nxt_dirent_str "../include/dirent.h" /* include string for the native */ +/* + * for [fl]stat64 and off64_t + */ + +#ifndef _AST_STD_H + +#include <../include/dirent.h> /* the native */ + +#else + +#ifndef _DIR64_H +#define _DIR64_H + +#include + +#if _typ_off64_t +#undef off_t +#endif + +#include <../include/dirent.h> /* the native */ + +#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/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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/errno b/usr/src/cmd/ast/libast/sparc/FEATURE/errno new file mode 100644 index 0000000000..1107a008c7 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/errno @@ -0,0 +1,7 @@ +/* : : 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 ok */ +#define _dat_sys_nerr 1 /* sys_nerr in default libs */ +#define _dat_sys_errlist 1 /* sys_errlist in default libs */ +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/fcntl b/usr/src/cmd/ast/libast/sparc/FEATURE/fcntl new file mode 100644 index 0000000000..9c2328f31b --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/fcntl @@ -0,0 +1,116 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ + + +#if _typ_off64_t +#undef off_t +#ifdef __STDC__ +#define off_t off_t +#endif +#endif + +#include + +#if _typ_off64_t +#undef off_t +#ifdef __STDC__ +#define off_t off_t +#endif +#endif + +#include +#include + +#define F_dupfd_cloexec F_DUPFD_CLOEXEC +#define O_BINARY 0 +#define O_cloexec O_CLOEXEC +#define O_TEMPORARY 0 +#define O_TEXT 0 + +#include +#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/cmd/ast/libast/sparc/FEATURE/float b/usr/src/cmd/ast/libast/sparc/FEATURE/float new file mode 100644 index 0000000000..afc779a98e --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/float @@ -0,0 +1,219 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_float 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _hdr_values 1 /* #include ok */ +#define _LIB_m 1 /* -lm is a library */ +#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_isnanl 1 /* isnanl() 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 +#include +#include +#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/cmd/ast/libast/sparc/FEATURE/fs b/usr/src/cmd/ast/libast/sparc/FEATURE/fs new file mode 100644 index 0000000000..3ff682685a --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/fs @@ -0,0 +1,144 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _sys_stat 1 /* #include 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 +#include +#define FS_default "ufs" +#if defined(__STDPP__directive) && defined(__STDPP__initial) +__STDPP__directive pragma pp:noinitial +#endif +#define _hdr_stdio 1 /* #include ok */ +#define _sys_mntent 1 /* #include ok */ +#define _sys_mnttab 1 /* #include ok */ +#define _sys_param 1 /* #include ok */ +#define _sys_ucred 1 /* #include ok */ +#define _sys_mount 1 /* #include ok */ +#define _sys_statfs 1 /* #include ok */ +#define _sys_statvfs 1 /* #include ok */ +#define _sys_vfs 1 /* #include 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 _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 +#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/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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/iconv b/usr/src/cmd/ast/libast/sparc/FEATURE/iconv new file mode 100644 index 0000000000..f81d5fc8fa --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/iconv @@ -0,0 +1,150 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_iconv 1 /* #include 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 */ +#define _nxt_iconv_str "../include/iconv.h" /* include string for the native */ +#include +#include +#include <../include/iconv.h> /* the native iconv.h */ + +#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 +#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 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__ +#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, 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, Iconv_disc_t*)); +extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, Iconv_disc_t*)); +#endif +#endif + +#undef __MANGLE__ +#define __MANGLE__ __LINKAGE__ + +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/lib b/usr/src/cmd/ast/libast/sparc/FEATURE/lib new file mode 100644 index 0000000000..ade8e11b3b --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/lib @@ -0,0 +1,177 @@ +/* : : 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 ok */ +#define _hdr_dirent 1 /* #include ok */ +#define _hdr_fmtmsg 1 /* #include ok */ +#define _hdr_fnmatch 1 /* #include ok */ +#define _hdr_libgen 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +#define _hdr_locale 1 /* #include ok */ +#define _hdr_nl_types 1 /* #include ok */ +#define _hdr_spawn 1 /* #include ok */ +#define _hdr_syslog 1 /* #include ok */ +#define _hdr_utime 1 /* #include ok */ +#define _hdr_wchar 1 /* and isw*() really work */ +#define _hdr_wchar 1 /* #include ok */ +#define _hdr_wctype 1 /* #include 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) */ +#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 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 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 _mem_dd_fd_DIR 1 /* dd_fd is a member of DIR */ +#define _sys_filio 1 /* #include ok */ +#define _sys_jioctl 1 /* #include ok */ +#define _sys_localedef 1 /* #include ok */ +#define _sys_resource 1 /* #include ok */ +#define _sys_socket 1 /* #include ok */ +#define _sys_stream 1 /* #include ok */ +#define _sys_systeminfo 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include 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 ok */ +#define _lib_select 1 /* select() has standard 5 arg interface */ +#define _sys_select 1 /* select() requires */ +#define _pipe_rw 1 /* full duplex pipes */ +#define _hdr_unistd 1 /* #include 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 _stream_peek 1 /* ioctl(I_PEEK) works on pipe() */ +#define _socket_peek 1 /* recv(MSG_PEEK) works on socketpair() */ +#define _hdr_string 1 /* #include ok */ +#define _lib_memcmp 1 /* standard memcmp interface that works */ +#define _hdr_fcntl 1 /* #include ok */ +#define _sys_stat 1 /* #include ok */ +#define _sys_mman 1 /* #include 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/cmd/ast/libast/sparc/FEATURE/libpath b/usr/src/cmd/ast/libast/sparc/FEATURE/libpath new file mode 100644 index 0000000000..d272a4015d --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/libpath @@ -0,0 +1,6 @@ +/* : : 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 ok */ +#define CONF_LIBPATH "lib/64:LD_LIBRARY_PATH_64:sol.*64*,lib/32:LD_LIBRARY_PATH_32,lib:LD_LIBRARY_PATH" +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/limits b/usr/src/cmd/ast/libast/sparc/FEATURE/limits new file mode 100644 index 0000000000..9fd982fd5a --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/limits @@ -0,0 +1,107 @@ +/* : : 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 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/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 ok */ +#define _locale_utf8_str "UTF-8" +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/map b/usr/src/cmd/ast/libast/sparc/FEATURE/map new file mode 100644 index 0000000000..30c7f4e2b5 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/map @@ -0,0 +1,466 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ + + +/* + * prototypes provided for standard interfaces hijacked + * by ast and mapped to _ast_* but already prototyped + * unmapped in native headers included by + */ + +#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)); + +#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/cmd/ast/libast/sparc/FEATURE/mmap b/usr/src/cmd/ast/libast/sparc/FEATURE/mmap new file mode 100644 index 0000000000..12d991f9a6 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/mmap @@ -0,0 +1,26 @@ +/* : : 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 ok */ +#define _sys_mman 1 /* #include 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 */ + +/* 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/cmd/ast/libast/sparc/FEATURE/mode b/usr/src/cmd/ast/libast/sparc/FEATURE/mode new file mode 100644 index 0000000000..f2ec3091fa --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/mode @@ -0,0 +1,14 @@ +/* : : 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 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/cmd/ast/libast/sparc/FEATURE/ndbm b/usr/src/cmd/ast/libast/sparc/FEATURE/ndbm new file mode 100644 index 0000000000..0e55ff820d --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/ndbm @@ -0,0 +1,9 @@ +/* : : 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 ok */ +#define _hdr_ndbm 1 /* #include ok */ +#include +#define _use_ndbm 1 + +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/nl_types b/usr/src/cmd/ast/libast/sparc/FEATURE/nl_types new file mode 100644 index 0000000000..d8c540626e --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/nl_types @@ -0,0 +1,102 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 ok */ +#define _hdr_langinfo 1 /* #include ok */ +#define _nxt_nl_types <../include/nl_types.h> /* include path for the native */ +#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native */ +#include +#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/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 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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/param b/usr/src/cmd/ast/libast/sparc/FEATURE/param new file mode 100644 index 0000000000..8c200b4462 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/param @@ -0,0 +1,9 @@ +/* : : 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 ok */ +#include +#ifndef S_IFDIR +#include +#endif +#endif 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 ok */ +/* preroot not enabled */ +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/prog b/usr/src/cmd/ast/libast/sparc/FEATURE/prog new file mode 100644 index 0000000000..592037efb7 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/prog @@ -0,0 +1,7 @@ +/* : : 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 ok */ +#define _lib_getexecname 1 /* getexecname() in default lib(s) */ +#define _PROC_PROG "/proc/self/path/a.out" +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/sfinit b/usr/src/cmd/ast/libast/sparc/FEATURE/sfinit new file mode 100644 index 0000000000..756d559262 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/sfinit @@ -0,0 +1,5332 @@ +/* : : 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 ok */ + +static const float sf_flt_pow10[] = +{ + 1E0F, + 1E1F, + 1E2F, + 1E3F, + 1E4F, + 1E5F, + 1E6F, + 1E7F, + 1E8F, + 1E9F, + 1E10F, + 1E11F, + 1E12F, + 1E13F, + 1E14F, + 1E15F, + 1E16F, + 1E17F, + 1E18F, + 1E19F, + 1E20F, + 1E21F, + 1E22F, + 1E23F, + 1E24F, + 1E25F, + 1E26F, + 1E27F, + 1E28F, + 1E29F, + 1E30F, + 1E31F, + 1E32F, + 1E33F, + 1E34F, + 1E35F, + 1E36F, + 1E37F, + 1E38F, +}; + +static const double sf_dbl_pow10[] = +{ + 1E0, + 1E1, + 1E2, + 1E3, + 1E4, + 1E5, + 1E6, + 1E7, + 1E8, + 1E9, + 1E10, + 1E11, + 1E12, + 1E13, + 1E14, + 1E15, + 1E16, + 1E17, + 1E18, + 1E19, + 1E20, + 1E21, + 1E22, + 1E23, + 1E24, + 1E25, + 1E26, + 1E27, + 1E28, + 1E29, + 1E30, + 1E31, + 1E32, + 1E33, + 1E34, + 1E35, + 1E36, + 1E37, + 1E38, + 1E39, + 1E40, + 1E41, + 1E42, + 1E43, + 1E44, + 1E45, + 1E46, + 1E47, + 1E48, + 1E49, + 1E50, + 1E51, + 1E52, + 1E53, + 1E54, + 1E55, + 1E56, + 1E57, + 1E58, + 1E59, + 1E60, + 1E61, + 1E62, + 1E63, + 1E64, + 1E65, + 1E66, + 1E67, + 1E68, + 1E69, + 1E70, + 1E71, + 1E72, + 1E73, + 1E74, + 1E75, + 1E76, + 1E77, + 1E78, + 1E79, + 1E80, + 1E81, + 1E82, + 1E83, + 1E84, + 1E85, + 1E86, + 1E87, + 1E88, + 1E89, + 1E90, + 1E91, + 1E92, + 1E93, + 1E94, + 1E95, + 1E96, + 1E97, + 1E98, + 1E99, + 1E100, + 1E101, + 1E102, + 1E103, + 1E104, + 1E105, + 1E106, + 1E107, + 1E108, + 1E109, + 1E110, + 1E111, + 1E112, + 1E113, + 1E114, + 1E115, + 1E116, + 1E117, + 1E118, + 1E119, + 1E120, + 1E121, + 1E122, + 1E123, + 1E124, + 1E125, + 1E126, + 1E127, + 1E128, + 1E129, + 1E130, + 1E131, + 1E132, + 1E133, + 1E134, + 1E135, + 1E136, + 1E137, + 1E138, + 1E139, + 1E140, + 1E141, + 1E142, + 1E143, + 1E144, + 1E145, + 1E146, + 1E147, + 1E148, + 1E149, + 1E150, + 1E151, + 1E152, + 1E153, + 1E154, + 1E155, + 1E156, + 1E157, + 1E158, + 1E159, + 1E160, + 1E161, + 1E162, + 1E163, + 1E164, + 1E165, + 1E166, + 1E167, + 1E168, + 1E169, + 1E170, + 1E171, + 1E172, + 1E173, + 1E174, + 1E175, + 1E176, + 1E177, + 1E178, + 1E179, + 1E180, + 1E181, + 1E182, + 1E183, + 1E184, + 1E185, + 1E186, + 1E187, + 1E188, + 1E189, + 1E190, + 1E191, + 1E192, + 1E193, + 1E194, + 1E195, + 1E196, + 1E197, + 1E198, + 1E199, + 1E200, + 1E201, + 1E202, + 1E203, + 1E204, + 1E205, + 1E206, + 1E207, + 1E208, + 1E209, + 1E210, + 1E211, + 1E212, + 1E213, + 1E214, + 1E215, + 1E216, + 1E217, + 1E218, + 1E219, + 1E220, + 1E221, + 1E222, + 1E223, + 1E224, + 1E225, + 1E226, + 1E227, + 1E228, + 1E229, + 1E230, + 1E231, + 1E232, + 1E233, + 1E234, + 1E235, + 1E236, + 1E237, + 1E238, + 1E239, + 1E240, + 1E241, + 1E242, + 1E243, + 1E244, + 1E245, + 1E246, + 1E247, + 1E248, + 1E249, + 1E250, + 1E251, + 1E252, + 1E253, + 1E254, + 1E255, + 1E256, + 1E257, + 1E258, + 1E259, + 1E260, + 1E261, + 1E262, + 1E263, + 1E264, + 1E265, + 1E266, + 1E267, + 1E268, + 1E269, + 1E270, + 1E271, + 1E272, + 1E273, + 1E274, + 1E275, + 1E276, + 1E277, + 1E278, + 1E279, + 1E280, + 1E281, + 1E282, + 1E283, + 1E284, + 1E285, + 1E286, + 1E287, + 1E288, + 1E289, + 1E290, + 1E291, + 1E292, + 1E293, + 1E294, + 1E295, + 1E296, + 1E297, + 1E298, + 1E299, + 1E300, + 1E301, + 1E302, + 1E303, + 1E304, + 1E305, + 1E306, + 1E307, + 1E308, +}; + +static const _ast_fltmax_t sf_ldbl_pow10[] = +{ + 1E0L, + 1E1L, + 1E2L, + 1E3L, + 1E4L, + 1E5L, + 1E6L, + 1E7L, + 1E8L, + 1E9L, + 1E10L, + 1E11L, + 1E12L, + 1E13L, + 1E14L, + 1E15L, + 1E16L, + 1E17L, + 1E18L, + 1E19L, + 1E20L, + 1E21L, + 1E22L, + 1E23L, + 1E24L, + 1E25L, + 1E26L, + 1E27L, + 1E28L, + 1E29L, + 1E30L, + 1E31L, + 1E32L, + 1E33L, + 1E34L, + 1E35L, + 1E36L, + 1E37L, + 1E38L, + 1E39L, + 1E40L, + 1E41L, + 1E42L, + 1E43L, + 1E44L, + 1E45L, + 1E46L, + 1E47L, + 1E48L, + 1E49L, + 1E50L, + 1E51L, + 1E52L, + 1E53L, + 1E54L, + 1E55L, + 1E56L, + 1E57L, + 1E58L, + 1E59L, + 1E60L, + 1E61L, + 1E62L, + 1E63L, + 1E64L, + 1E65L, + 1E66L, + 1E67L, + 1E68L, + 1E69L, + 1E70L, + 1E71L, + 1E72L, + 1E73L, + 1E74L, + 1E75L, + 1E76L, + 1E77L, + 1E78L, + 1E79L, + 1E80L, + 1E81L, + 1E82L, + 1E83L, + 1E84L, + 1E85L, + 1E86L, + 1E87L, + 1E88L, + 1E89L, + 1E90L, + 1E91L, + 1E92L, + 1E93L, + 1E94L, + 1E95L, + 1E96L, + 1E97L, + 1E98L, + 1E99L, + 1E100L, + 1E101L, + 1E102L, + 1E103L, + 1E104L, + 1E105L, + 1E106L, + 1E107L, + 1E108L, + 1E109L, + 1E110L, + 1E111L, + 1E112L, + 1E113L, + 1E114L, + 1E115L, + 1E116L, + 1E117L, + 1E118L, + 1E119L, + 1E120L, + 1E121L, + 1E122L, + 1E123L, + 1E124L, + 1E125L, + 1E126L, + 1E127L, + 1E128L, + 1E129L, + 1E130L, + 1E131L, + 1E132L, + 1E133L, + 1E134L, + 1E135L, + 1E136L, + 1E137L, + 1E138L, + 1E139L, + 1E140L, + 1E141L, + 1E142L, + 1E143L, + 1E144L, + 1E145L, + 1E146L, + 1E147L, + 1E148L, + 1E149L, + 1E150L, + 1E151L, + 1E152L, + 1E153L, + 1E154L, + 1E155L, + 1E156L, + 1E157L, + 1E158L, + 1E159L, + 1E160L, + 1E161L, + 1E162L, + 1E163L, + 1E164L, + 1E165L, + 1E166L, + 1E167L, + 1E168L, + 1E169L, + 1E170L, + 1E171L, + 1E172L, + 1E173L, + 1E174L, + 1E175L, + 1E176L, + 1E177L, + 1E178L, + 1E179L, + 1E180L, + 1E181L, + 1E182L, + 1E183L, + 1E184L, + 1E185L, + 1E186L, + 1E187L, + 1E188L, + 1E189L, + 1E190L, + 1E191L, + 1E192L, + 1E193L, + 1E194L, + 1E195L, + 1E196L, + 1E197L, + 1E198L, + 1E199L, + 1E200L, + 1E201L, + 1E202L, + 1E203L, + 1E204L, + 1E205L, + 1E206L, + 1E207L, + 1E208L, + 1E209L, + 1E210L, + 1E211L, + 1E212L, + 1E213L, + 1E214L, + 1E215L, + 1E216L, + 1E217L, + 1E218L, + 1E219L, + 1E220L, + 1E221L, + 1E222L, + 1E223L, + 1E224L, + 1E225L, + 1E226L, + 1E227L, + 1E228L, + 1E229L, + 1E230L, + 1E231L, + 1E232L, + 1E233L, + 1E234L, + 1E235L, + 1E236L, + 1E237L, + 1E238L, + 1E239L, + 1E240L, + 1E241L, + 1E242L, + 1E243L, + 1E244L, + 1E245L, + 1E246L, + 1E247L, + 1E248L, + 1E249L, + 1E250L, + 1E251L, + 1E252L, + 1E253L, + 1E254L, + 1E255L, + 1E256L, + 1E257L, + 1E258L, + 1E259L, + 1E260L, + 1E261L, + 1E262L, + 1E263L, + 1E264L, + 1E265L, + 1E266L, + 1E267L, + 1E268L, + 1E269L, + 1E270L, + 1E271L, + 1E272L, + 1E273L, + 1E274L, + 1E275L, + 1E276L, + 1E277L, + 1E278L, + 1E279L, + 1E280L, + 1E281L, + 1E282L, + 1E283L, + 1E284L, + 1E285L, + 1E286L, + 1E287L, + 1E288L, + 1E289L, + 1E290L, + 1E291L, + 1E292L, + 1E293L, + 1E294L, + 1E295L, + 1E296L, + 1E297L, + 1E298L, + 1E299L, + 1E300L, + 1E301L, + 1E302L, + 1E303L, + 1E304L, + 1E305L, + 1E306L, + 1E307L, + 1E308L, + 1E309L, + 1E310L, + 1E311L, + 1E312L, + 1E313L, + 1E314L, + 1E315L, + 1E316L, + 1E317L, + 1E318L, + 1E319L, + 1E320L, + 1E321L, + 1E322L, + 1E323L, + 1E324L, + 1E325L, + 1E326L, + 1E327L, + 1E328L, + 1E329L, + 1E330L, + 1E331L, + 1E332L, + 1E333L, + 1E334L, + 1E335L, + 1E336L, + 1E337L, + 1E338L, + 1E339L, + 1E340L, + 1E341L, + 1E342L, + 1E343L, + 1E344L, + 1E345L, + 1E346L, + 1E347L, + 1E348L, + 1E349L, + 1E350L, + 1E351L, + 1E352L, + 1E353L, + 1E354L, + 1E355L, + 1E356L, + 1E357L, + 1E358L, + 1E359L, + 1E360L, + 1E361L, + 1E362L, + 1E363L, + 1E364L, + 1E365L, + 1E366L, + 1E367L, + 1E368L, + 1E369L, + 1E370L, + 1E371L, + 1E372L, + 1E373L, + 1E374L, + 1E375L, + 1E376L, + 1E377L, + 1E378L, + 1E379L, + 1E380L, + 1E381L, + 1E382L, + 1E383L, + 1E384L, + 1E385L, + 1E386L, + 1E387L, + 1E388L, + 1E389L, + 1E390L, + 1E391L, + 1E392L, + 1E393L, + 1E394L, + 1E395L, + 1E396L, + 1E397L, + 1E398L, + 1E399L, + 1E400L, + 1E401L, + 1E402L, + 1E403L, + 1E404L, + 1E405L, + 1E406L, + 1E407L, + 1E408L, + 1E409L, + 1E410L, + 1E411L, + 1E412L, + 1E413L, + 1E414L, + 1E415L, + 1E416L, + 1E417L, + 1E418L, + 1E419L, + 1E420L, + 1E421L, + 1E422L, + 1E423L, + 1E424L, + 1E425L, + 1E426L, + 1E427L, + 1E428L, + 1E429L, + 1E430L, + 1E431L, + 1E432L, + 1E433L, + 1E434L, + 1E435L, + 1E436L, + 1E437L, + 1E438L, + 1E439L, + 1E440L, + 1E441L, + 1E442L, + 1E443L, + 1E444L, + 1E445L, + 1E446L, + 1E447L, + 1E448L, + 1E449L, + 1E450L, + 1E451L, + 1E452L, + 1E453L, + 1E454L, + 1E455L, + 1E456L, + 1E457L, + 1E458L, + 1E459L, + 1E460L, + 1E461L, + 1E462L, + 1E463L, + 1E464L, + 1E465L, + 1E466L, + 1E467L, + 1E468L, + 1E469L, + 1E470L, + 1E471L, + 1E472L, + 1E473L, + 1E474L, + 1E475L, + 1E476L, + 1E477L, + 1E478L, + 1E479L, + 1E480L, + 1E481L, + 1E482L, + 1E483L, + 1E484L, + 1E485L, + 1E486L, + 1E487L, + 1E488L, + 1E489L, + 1E490L, + 1E491L, + 1E492L, + 1E493L, + 1E494L, + 1E495L, + 1E496L, + 1E497L, + 1E498L, + 1E499L, + 1E500L, + 1E501L, + 1E502L, + 1E503L, + 1E504L, + 1E505L, + 1E506L, + 1E507L, + 1E508L, + 1E509L, + 1E510L, + 1E511L, + 1E512L, + 1E513L, + 1E514L, + 1E515L, + 1E516L, + 1E517L, + 1E518L, + 1E519L, + 1E520L, + 1E521L, + 1E522L, + 1E523L, + 1E524L, + 1E525L, + 1E526L, + 1E527L, + 1E528L, + 1E529L, + 1E530L, + 1E531L, + 1E532L, + 1E533L, + 1E534L, + 1E535L, + 1E536L, + 1E537L, + 1E538L, + 1E539L, + 1E540L, + 1E541L, + 1E542L, + 1E543L, + 1E544L, + 1E545L, + 1E546L, + 1E547L, + 1E548L, + 1E549L, + 1E550L, + 1E551L, + 1E552L, + 1E553L, + 1E554L, + 1E555L, + 1E556L, + 1E557L, + 1E558L, + 1E559L, + 1E560L, + 1E561L, + 1E562L, + 1E563L, + 1E564L, + 1E565L, + 1E566L, + 1E567L, + 1E568L, + 1E569L, + 1E570L, + 1E571L, + 1E572L, + 1E573L, + 1E574L, + 1E575L, + 1E576L, + 1E577L, + 1E578L, + 1E579L, + 1E580L, + 1E581L, + 1E582L, + 1E583L, + 1E584L, + 1E585L, + 1E586L, + 1E587L, + 1E588L, + 1E589L, + 1E590L, + 1E591L, + 1E592L, + 1E593L, + 1E594L, + 1E595L, + 1E596L, + 1E597L, + 1E598L, + 1E599L, + 1E600L, + 1E601L, + 1E602L, + 1E603L, + 1E604L, + 1E605L, + 1E606L, + 1E607L, + 1E608L, + 1E609L, + 1E610L, + 1E611L, + 1E612L, + 1E613L, + 1E614L, + 1E615L, + 1E616L, + 1E617L, + 1E618L, + 1E619L, + 1E620L, + 1E621L, + 1E622L, + 1E623L, + 1E624L, + 1E625L, + 1E626L, + 1E627L, + 1E628L, + 1E629L, + 1E630L, + 1E631L, + 1E632L, + 1E633L, + 1E634L, + 1E635L, + 1E636L, + 1E637L, + 1E638L, + 1E639L, + 1E640L, + 1E641L, + 1E642L, + 1E643L, + 1E644L, + 1E645L, + 1E646L, + 1E647L, + 1E648L, + 1E649L, + 1E650L, + 1E651L, + 1E652L, + 1E653L, + 1E654L, + 1E655L, + 1E656L, + 1E657L, + 1E658L, + 1E659L, + 1E660L, + 1E661L, + 1E662L, + 1E663L, + 1E664L, + 1E665L, + 1E666L, + 1E667L, + 1E668L, + 1E669L, + 1E670L, + 1E671L, + 1E672L, + 1E673L, + 1E674L, + 1E675L, + 1E676L, + 1E677L, + 1E678L, + 1E679L, + 1E680L, + 1E681L, + 1E682L, + 1E683L, + 1E684L, + 1E685L, + 1E686L, + 1E687L, + 1E688L, + 1E689L, + 1E690L, + 1E691L, + 1E692L, + 1E693L, + 1E694L, + 1E695L, + 1E696L, + 1E697L, + 1E698L, + 1E699L, + 1E700L, + 1E701L, + 1E702L, + 1E703L, + 1E704L, + 1E705L, + 1E706L, + 1E707L, + 1E708L, + 1E709L, + 1E710L, + 1E711L, + 1E712L, + 1E713L, + 1E714L, + 1E715L, + 1E716L, + 1E717L, + 1E718L, + 1E719L, + 1E720L, + 1E721L, + 1E722L, + 1E723L, + 1E724L, + 1E725L, + 1E726L, + 1E727L, + 1E728L, + 1E729L, + 1E730L, + 1E731L, + 1E732L, + 1E733L, + 1E734L, + 1E735L, + 1E736L, + 1E737L, + 1E738L, + 1E739L, + 1E740L, + 1E741L, + 1E742L, + 1E743L, + 1E744L, + 1E745L, + 1E746L, + 1E747L, + 1E748L, + 1E749L, + 1E750L, + 1E751L, + 1E752L, + 1E753L, + 1E754L, + 1E755L, + 1E756L, + 1E757L, + 1E758L, + 1E759L, + 1E760L, + 1E761L, + 1E762L, + 1E763L, + 1E764L, + 1E765L, + 1E766L, + 1E767L, + 1E768L, + 1E769L, + 1E770L, + 1E771L, + 1E772L, + 1E773L, + 1E774L, + 1E775L, + 1E776L, + 1E777L, + 1E778L, + 1E779L, + 1E780L, + 1E781L, + 1E782L, + 1E783L, + 1E784L, + 1E785L, + 1E786L, + 1E787L, + 1E788L, + 1E789L, + 1E790L, + 1E791L, + 1E792L, + 1E793L, + 1E794L, + 1E795L, + 1E796L, + 1E797L, + 1E798L, + 1E799L, + 1E800L, + 1E801L, + 1E802L, + 1E803L, + 1E804L, + 1E805L, + 1E806L, + 1E807L, + 1E808L, + 1E809L, + 1E810L, + 1E811L, + 1E812L, + 1E813L, + 1E814L, + 1E815L, + 1E816L, + 1E817L, + 1E818L, + 1E819L, + 1E820L, + 1E821L, + 1E822L, + 1E823L, + 1E824L, + 1E825L, + 1E826L, + 1E827L, + 1E828L, + 1E829L, + 1E830L, + 1E831L, + 1E832L, + 1E833L, + 1E834L, + 1E835L, + 1E836L, + 1E837L, + 1E838L, + 1E839L, + 1E840L, + 1E841L, + 1E842L, + 1E843L, + 1E844L, + 1E845L, + 1E846L, + 1E847L, + 1E848L, + 1E849L, + 1E850L, + 1E851L, + 1E852L, + 1E853L, + 1E854L, + 1E855L, + 1E856L, + 1E857L, + 1E858L, + 1E859L, + 1E860L, + 1E861L, + 1E862L, + 1E863L, + 1E864L, + 1E865L, + 1E866L, + 1E867L, + 1E868L, + 1E869L, + 1E870L, + 1E871L, + 1E872L, + 1E873L, + 1E874L, + 1E875L, + 1E876L, + 1E877L, + 1E878L, + 1E879L, + 1E880L, + 1E881L, + 1E882L, + 1E883L, + 1E884L, + 1E885L, + 1E886L, + 1E887L, + 1E888L, + 1E889L, + 1E890L, + 1E891L, + 1E892L, + 1E893L, + 1E894L, + 1E895L, + 1E896L, + 1E897L, + 1E898L, + 1E899L, + 1E900L, + 1E901L, + 1E902L, + 1E903L, + 1E904L, + 1E905L, + 1E906L, + 1E907L, + 1E908L, + 1E909L, + 1E910L, + 1E911L, + 1E912L, + 1E913L, + 1E914L, + 1E915L, + 1E916L, + 1E917L, + 1E918L, + 1E919L, + 1E920L, + 1E921L, + 1E922L, + 1E923L, + 1E924L, + 1E925L, + 1E926L, + 1E927L, + 1E928L, + 1E929L, + 1E930L, + 1E931L, + 1E932L, + 1E933L, + 1E934L, + 1E935L, + 1E936L, + 1E937L, + 1E938L, + 1E939L, + 1E940L, + 1E941L, + 1E942L, + 1E943L, + 1E944L, + 1E945L, + 1E946L, + 1E947L, + 1E948L, + 1E949L, + 1E950L, + 1E951L, + 1E952L, + 1E953L, + 1E954L, + 1E955L, + 1E956L, + 1E957L, + 1E958L, + 1E959L, + 1E960L, + 1E961L, + 1E962L, + 1E963L, + 1E964L, + 1E965L, + 1E966L, + 1E967L, + 1E968L, + 1E969L, + 1E970L, + 1E971L, + 1E972L, + 1E973L, + 1E974L, + 1E975L, + 1E976L, + 1E977L, + 1E978L, + 1E979L, + 1E980L, + 1E981L, + 1E982L, + 1E983L, + 1E984L, + 1E985L, + 1E986L, + 1E987L, + 1E988L, + 1E989L, + 1E990L, + 1E991L, + 1E992L, + 1E993L, + 1E994L, + 1E995L, + 1E996L, + 1E997L, + 1E998L, + 1E999L, + 1E1000L, + 1E1001L, + 1E1002L, + 1E1003L, + 1E1004L, + 1E1005L, + 1E1006L, + 1E1007L, + 1E1008L, + 1E1009L, + 1E1010L, + 1E1011L, + 1E1012L, + 1E1013L, + 1E1014L, + 1E1015L, + 1E1016L, + 1E1017L, + 1E1018L, + 1E1019L, + 1E1020L, + 1E1021L, + 1E1022L, + 1E1023L, + 1E1024L, + 1E1025L, + 1E1026L, + 1E1027L, + 1E1028L, + 1E1029L, + 1E1030L, + 1E1031L, + 1E1032L, + 1E1033L, + 1E1034L, + 1E1035L, + 1E1036L, + 1E1037L, + 1E1038L, + 1E1039L, + 1E1040L, + 1E1041L, + 1E1042L, + 1E1043L, + 1E1044L, + 1E1045L, + 1E1046L, + 1E1047L, + 1E1048L, + 1E1049L, + 1E1050L, + 1E1051L, + 1E1052L, + 1E1053L, + 1E1054L, + 1E1055L, + 1E1056L, + 1E1057L, + 1E1058L, + 1E1059L, + 1E1060L, + 1E1061L, + 1E1062L, + 1E1063L, + 1E1064L, + 1E1065L, + 1E1066L, + 1E1067L, + 1E1068L, + 1E1069L, + 1E1070L, + 1E1071L, + 1E1072L, + 1E1073L, + 1E1074L, + 1E1075L, + 1E1076L, + 1E1077L, + 1E1078L, + 1E1079L, + 1E1080L, + 1E1081L, + 1E1082L, + 1E1083L, + 1E1084L, + 1E1085L, + 1E1086L, + 1E1087L, + 1E1088L, + 1E1089L, + 1E1090L, + 1E1091L, + 1E1092L, + 1E1093L, + 1E1094L, + 1E1095L, + 1E1096L, + 1E1097L, + 1E1098L, + 1E1099L, + 1E1100L, + 1E1101L, + 1E1102L, + 1E1103L, + 1E1104L, + 1E1105L, + 1E1106L, + 1E1107L, + 1E1108L, + 1E1109L, + 1E1110L, + 1E1111L, + 1E1112L, + 1E1113L, + 1E1114L, + 1E1115L, + 1E1116L, + 1E1117L, + 1E1118L, + 1E1119L, + 1E1120L, + 1E1121L, + 1E1122L, + 1E1123L, + 1E1124L, + 1E1125L, + 1E1126L, + 1E1127L, + 1E1128L, + 1E1129L, + 1E1130L, + 1E1131L, + 1E1132L, + 1E1133L, + 1E1134L, + 1E1135L, + 1E1136L, + 1E1137L, + 1E1138L, + 1E1139L, + 1E1140L, + 1E1141L, + 1E1142L, + 1E1143L, + 1E1144L, + 1E1145L, + 1E1146L, + 1E1147L, + 1E1148L, + 1E1149L, + 1E1150L, + 1E1151L, + 1E1152L, + 1E1153L, + 1E1154L, + 1E1155L, + 1E1156L, + 1E1157L, + 1E1158L, + 1E1159L, + 1E1160L, + 1E1161L, + 1E1162L, + 1E1163L, + 1E1164L, + 1E1165L, + 1E1166L, + 1E1167L, + 1E1168L, + 1E1169L, + 1E1170L, + 1E1171L, + 1E1172L, + 1E1173L, + 1E1174L, + 1E1175L, + 1E1176L, + 1E1177L, + 1E1178L, + 1E1179L, + 1E1180L, + 1E1181L, + 1E1182L, + 1E1183L, + 1E1184L, + 1E1185L, + 1E1186L, + 1E1187L, + 1E1188L, + 1E1189L, + 1E1190L, + 1E1191L, + 1E1192L, + 1E1193L, + 1E1194L, + 1E1195L, + 1E1196L, + 1E1197L, + 1E1198L, + 1E1199L, + 1E1200L, + 1E1201L, + 1E1202L, + 1E1203L, + 1E1204L, + 1E1205L, + 1E1206L, + 1E1207L, + 1E1208L, + 1E1209L, + 1E1210L, + 1E1211L, + 1E1212L, + 1E1213L, + 1E1214L, + 1E1215L, + 1E1216L, + 1E1217L, + 1E1218L, + 1E1219L, + 1E1220L, + 1E1221L, + 1E1222L, + 1E1223L, + 1E1224L, + 1E1225L, + 1E1226L, + 1E1227L, + 1E1228L, + 1E1229L, + 1E1230L, + 1E1231L, + 1E1232L, + 1E1233L, + 1E1234L, + 1E1235L, + 1E1236L, + 1E1237L, + 1E1238L, + 1E1239L, + 1E1240L, + 1E1241L, + 1E1242L, + 1E1243L, + 1E1244L, + 1E1245L, + 1E1246L, + 1E1247L, + 1E1248L, + 1E1249L, + 1E1250L, + 1E1251L, + 1E1252L, + 1E1253L, + 1E1254L, + 1E1255L, + 1E1256L, + 1E1257L, + 1E1258L, + 1E1259L, + 1E1260L, + 1E1261L, + 1E1262L, + 1E1263L, + 1E1264L, + 1E1265L, + 1E1266L, + 1E1267L, + 1E1268L, + 1E1269L, + 1E1270L, + 1E1271L, + 1E1272L, + 1E1273L, + 1E1274L, + 1E1275L, + 1E1276L, + 1E1277L, + 1E1278L, + 1E1279L, + 1E1280L, + 1E1281L, + 1E1282L, + 1E1283L, + 1E1284L, + 1E1285L, + 1E1286L, + 1E1287L, + 1E1288L, + 1E1289L, + 1E1290L, + 1E1291L, + 1E1292L, + 1E1293L, + 1E1294L, + 1E1295L, + 1E1296L, + 1E1297L, + 1E1298L, + 1E1299L, + 1E1300L, + 1E1301L, + 1E1302L, + 1E1303L, + 1E1304L, + 1E1305L, + 1E1306L, + 1E1307L, + 1E1308L, + 1E1309L, + 1E1310L, + 1E1311L, + 1E1312L, + 1E1313L, + 1E1314L, + 1E1315L, + 1E1316L, + 1E1317L, + 1E1318L, + 1E1319L, + 1E1320L, + 1E1321L, + 1E1322L, + 1E1323L, + 1E1324L, + 1E1325L, + 1E1326L, + 1E1327L, + 1E1328L, + 1E1329L, + 1E1330L, + 1E1331L, + 1E1332L, + 1E1333L, + 1E1334L, + 1E1335L, + 1E1336L, + 1E1337L, + 1E1338L, + 1E1339L, + 1E1340L, + 1E1341L, + 1E1342L, + 1E1343L, + 1E1344L, + 1E1345L, + 1E1346L, + 1E1347L, + 1E1348L, + 1E1349L, + 1E1350L, + 1E1351L, + 1E1352L, + 1E1353L, + 1E1354L, + 1E1355L, + 1E1356L, + 1E1357L, + 1E1358L, + 1E1359L, + 1E1360L, + 1E1361L, + 1E1362L, + 1E1363L, + 1E1364L, + 1E1365L, + 1E1366L, + 1E1367L, + 1E1368L, + 1E1369L, + 1E1370L, + 1E1371L, + 1E1372L, + 1E1373L, + 1E1374L, + 1E1375L, + 1E1376L, + 1E1377L, + 1E1378L, + 1E1379L, + 1E1380L, + 1E1381L, + 1E1382L, + 1E1383L, + 1E1384L, + 1E1385L, + 1E1386L, + 1E1387L, + 1E1388L, + 1E1389L, + 1E1390L, + 1E1391L, + 1E1392L, + 1E1393L, + 1E1394L, + 1E1395L, + 1E1396L, + 1E1397L, + 1E1398L, + 1E1399L, + 1E1400L, + 1E1401L, + 1E1402L, + 1E1403L, + 1E1404L, + 1E1405L, + 1E1406L, + 1E1407L, + 1E1408L, + 1E1409L, + 1E1410L, + 1E1411L, + 1E1412L, + 1E1413L, + 1E1414L, + 1E1415L, + 1E1416L, + 1E1417L, + 1E1418L, + 1E1419L, + 1E1420L, + 1E1421L, + 1E1422L, + 1E1423L, + 1E1424L, + 1E1425L, + 1E1426L, + 1E1427L, + 1E1428L, + 1E1429L, + 1E1430L, + 1E1431L, + 1E1432L, + 1E1433L, + 1E1434L, + 1E1435L, + 1E1436L, + 1E1437L, + 1E1438L, + 1E1439L, + 1E1440L, + 1E1441L, + 1E1442L, + 1E1443L, + 1E1444L, + 1E1445L, + 1E1446L, + 1E1447L, + 1E1448L, + 1E1449L, + 1E1450L, + 1E1451L, + 1E1452L, + 1E1453L, + 1E1454L, + 1E1455L, + 1E1456L, + 1E1457L, + 1E1458L, + 1E1459L, + 1E1460L, + 1E1461L, + 1E1462L, + 1E1463L, + 1E1464L, + 1E1465L, + 1E1466L, + 1E1467L, + 1E1468L, + 1E1469L, + 1E1470L, + 1E1471L, + 1E1472L, + 1E1473L, + 1E1474L, + 1E1475L, + 1E1476L, + 1E1477L, + 1E1478L, + 1E1479L, + 1E1480L, + 1E1481L, + 1E1482L, + 1E1483L, + 1E1484L, + 1E1485L, + 1E1486L, + 1E1487L, + 1E1488L, + 1E1489L, + 1E1490L, + 1E1491L, + 1E1492L, + 1E1493L, + 1E1494L, + 1E1495L, + 1E1496L, + 1E1497L, + 1E1498L, + 1E1499L, + 1E1500L, + 1E1501L, + 1E1502L, + 1E1503L, + 1E1504L, + 1E1505L, + 1E1506L, + 1E1507L, + 1E1508L, + 1E1509L, + 1E1510L, + 1E1511L, + 1E1512L, + 1E1513L, + 1E1514L, + 1E1515L, + 1E1516L, + 1E1517L, + 1E1518L, + 1E1519L, + 1E1520L, + 1E1521L, + 1E1522L, + 1E1523L, + 1E1524L, + 1E1525L, + 1E1526L, + 1E1527L, + 1E1528L, + 1E1529L, + 1E1530L, + 1E1531L, + 1E1532L, + 1E1533L, + 1E1534L, + 1E1535L, + 1E1536L, + 1E1537L, + 1E1538L, + 1E1539L, + 1E1540L, + 1E1541L, + 1E1542L, + 1E1543L, + 1E1544L, + 1E1545L, + 1E1546L, + 1E1547L, + 1E1548L, + 1E1549L, + 1E1550L, + 1E1551L, + 1E1552L, + 1E1553L, + 1E1554L, + 1E1555L, + 1E1556L, + 1E1557L, + 1E1558L, + 1E1559L, + 1E1560L, + 1E1561L, + 1E1562L, + 1E1563L, + 1E1564L, + 1E1565L, + 1E1566L, + 1E1567L, + 1E1568L, + 1E1569L, + 1E1570L, + 1E1571L, + 1E1572L, + 1E1573L, + 1E1574L, + 1E1575L, + 1E1576L, + 1E1577L, + 1E1578L, + 1E1579L, + 1E1580L, + 1E1581L, + 1E1582L, + 1E1583L, + 1E1584L, + 1E1585L, + 1E1586L, + 1E1587L, + 1E1588L, + 1E1589L, + 1E1590L, + 1E1591L, + 1E1592L, + 1E1593L, + 1E1594L, + 1E1595L, + 1E1596L, + 1E1597L, + 1E1598L, + 1E1599L, + 1E1600L, + 1E1601L, + 1E1602L, + 1E1603L, + 1E1604L, + 1E1605L, + 1E1606L, + 1E1607L, + 1E1608L, + 1E1609L, + 1E1610L, + 1E1611L, + 1E1612L, + 1E1613L, + 1E1614L, + 1E1615L, + 1E1616L, + 1E1617L, + 1E1618L, + 1E1619L, + 1E1620L, + 1E1621L, + 1E1622L, + 1E1623L, + 1E1624L, + 1E1625L, + 1E1626L, + 1E1627L, + 1E1628L, + 1E1629L, + 1E1630L, + 1E1631L, + 1E1632L, + 1E1633L, + 1E1634L, + 1E1635L, + 1E1636L, + 1E1637L, + 1E1638L, + 1E1639L, + 1E1640L, + 1E1641L, + 1E1642L, + 1E1643L, + 1E1644L, + 1E1645L, + 1E1646L, + 1E1647L, + 1E1648L, + 1E1649L, + 1E1650L, + 1E1651L, + 1E1652L, + 1E1653L, + 1E1654L, + 1E1655L, + 1E1656L, + 1E1657L, + 1E1658L, + 1E1659L, + 1E1660L, + 1E1661L, + 1E1662L, + 1E1663L, + 1E1664L, + 1E1665L, + 1E1666L, + 1E1667L, + 1E1668L, + 1E1669L, + 1E1670L, + 1E1671L, + 1E1672L, + 1E1673L, + 1E1674L, + 1E1675L, + 1E1676L, + 1E1677L, + 1E1678L, + 1E1679L, + 1E1680L, + 1E1681L, + 1E1682L, + 1E1683L, + 1E1684L, + 1E1685L, + 1E1686L, + 1E1687L, + 1E1688L, + 1E1689L, + 1E1690L, + 1E1691L, + 1E1692L, + 1E1693L, + 1E1694L, + 1E1695L, + 1E1696L, + 1E1697L, + 1E1698L, + 1E1699L, + 1E1700L, + 1E1701L, + 1E1702L, + 1E1703L, + 1E1704L, + 1E1705L, + 1E1706L, + 1E1707L, + 1E1708L, + 1E1709L, + 1E1710L, + 1E1711L, + 1E1712L, + 1E1713L, + 1E1714L, + 1E1715L, + 1E1716L, + 1E1717L, + 1E1718L, + 1E1719L, + 1E1720L, + 1E1721L, + 1E1722L, + 1E1723L, + 1E1724L, + 1E1725L, + 1E1726L, + 1E1727L, + 1E1728L, + 1E1729L, + 1E1730L, + 1E1731L, + 1E1732L, + 1E1733L, + 1E1734L, + 1E1735L, + 1E1736L, + 1E1737L, + 1E1738L, + 1E1739L, + 1E1740L, + 1E1741L, + 1E1742L, + 1E1743L, + 1E1744L, + 1E1745L, + 1E1746L, + 1E1747L, + 1E1748L, + 1E1749L, + 1E1750L, + 1E1751L, + 1E1752L, + 1E1753L, + 1E1754L, + 1E1755L, + 1E1756L, + 1E1757L, + 1E1758L, + 1E1759L, + 1E1760L, + 1E1761L, + 1E1762L, + 1E1763L, + 1E1764L, + 1E1765L, + 1E1766L, + 1E1767L, + 1E1768L, + 1E1769L, + 1E1770L, + 1E1771L, + 1E1772L, + 1E1773L, + 1E1774L, + 1E1775L, + 1E1776L, + 1E1777L, + 1E1778L, + 1E1779L, + 1E1780L, + 1E1781L, + 1E1782L, + 1E1783L, + 1E1784L, + 1E1785L, + 1E1786L, + 1E1787L, + 1E1788L, + 1E1789L, + 1E1790L, + 1E1791L, + 1E1792L, + 1E1793L, + 1E1794L, + 1E1795L, + 1E1796L, + 1E1797L, + 1E1798L, + 1E1799L, + 1E1800L, + 1E1801L, + 1E1802L, + 1E1803L, + 1E1804L, + 1E1805L, + 1E1806L, + 1E1807L, + 1E1808L, + 1E1809L, + 1E1810L, + 1E1811L, + 1E1812L, + 1E1813L, + 1E1814L, + 1E1815L, + 1E1816L, + 1E1817L, + 1E1818L, + 1E1819L, + 1E1820L, + 1E1821L, + 1E1822L, + 1E1823L, + 1E1824L, + 1E1825L, + 1E1826L, + 1E1827L, + 1E1828L, + 1E1829L, + 1E1830L, + 1E1831L, + 1E1832L, + 1E1833L, + 1E1834L, + 1E1835L, + 1E1836L, + 1E1837L, + 1E1838L, + 1E1839L, + 1E1840L, + 1E1841L, + 1E1842L, + 1E1843L, + 1E1844L, + 1E1845L, + 1E1846L, + 1E1847L, + 1E1848L, + 1E1849L, + 1E1850L, + 1E1851L, + 1E1852L, + 1E1853L, + 1E1854L, + 1E1855L, + 1E1856L, + 1E1857L, + 1E1858L, + 1E1859L, + 1E1860L, + 1E1861L, + 1E1862L, + 1E1863L, + 1E1864L, + 1E1865L, + 1E1866L, + 1E1867L, + 1E1868L, + 1E1869L, + 1E1870L, + 1E1871L, + 1E1872L, + 1E1873L, + 1E1874L, + 1E1875L, + 1E1876L, + 1E1877L, + 1E1878L, + 1E1879L, + 1E1880L, + 1E1881L, + 1E1882L, + 1E1883L, + 1E1884L, + 1E1885L, + 1E1886L, + 1E1887L, + 1E1888L, + 1E1889L, + 1E1890L, + 1E1891L, + 1E1892L, + 1E1893L, + 1E1894L, + 1E1895L, + 1E1896L, + 1E1897L, + 1E1898L, + 1E1899L, + 1E1900L, + 1E1901L, + 1E1902L, + 1E1903L, + 1E1904L, + 1E1905L, + 1E1906L, + 1E1907L, + 1E1908L, + 1E1909L, + 1E1910L, + 1E1911L, + 1E1912L, + 1E1913L, + 1E1914L, + 1E1915L, + 1E1916L, + 1E1917L, + 1E1918L, + 1E1919L, + 1E1920L, + 1E1921L, + 1E1922L, + 1E1923L, + 1E1924L, + 1E1925L, + 1E1926L, + 1E1927L, + 1E1928L, + 1E1929L, + 1E1930L, + 1E1931L, + 1E1932L, + 1E1933L, + 1E1934L, + 1E1935L, + 1E1936L, + 1E1937L, + 1E1938L, + 1E1939L, + 1E1940L, + 1E1941L, + 1E1942L, + 1E1943L, + 1E1944L, + 1E1945L, + 1E1946L, + 1E1947L, + 1E1948L, + 1E1949L, + 1E1950L, + 1E1951L, + 1E1952L, + 1E1953L, + 1E1954L, + 1E1955L, + 1E1956L, + 1E1957L, + 1E1958L, + 1E1959L, + 1E1960L, + 1E1961L, + 1E1962L, + 1E1963L, + 1E1964L, + 1E1965L, + 1E1966L, + 1E1967L, + 1E1968L, + 1E1969L, + 1E1970L, + 1E1971L, + 1E1972L, + 1E1973L, + 1E1974L, + 1E1975L, + 1E1976L, + 1E1977L, + 1E1978L, + 1E1979L, + 1E1980L, + 1E1981L, + 1E1982L, + 1E1983L, + 1E1984L, + 1E1985L, + 1E1986L, + 1E1987L, + 1E1988L, + 1E1989L, + 1E1990L, + 1E1991L, + 1E1992L, + 1E1993L, + 1E1994L, + 1E1995L, + 1E1996L, + 1E1997L, + 1E1998L, + 1E1999L, + 1E2000L, + 1E2001L, + 1E2002L, + 1E2003L, + 1E2004L, + 1E2005L, + 1E2006L, + 1E2007L, + 1E2008L, + 1E2009L, + 1E2010L, + 1E2011L, + 1E2012L, + 1E2013L, + 1E2014L, + 1E2015L, + 1E2016L, + 1E2017L, + 1E2018L, + 1E2019L, + 1E2020L, + 1E2021L, + 1E2022L, + 1E2023L, + 1E2024L, + 1E2025L, + 1E2026L, + 1E2027L, + 1E2028L, + 1E2029L, + 1E2030L, + 1E2031L, + 1E2032L, + 1E2033L, + 1E2034L, + 1E2035L, + 1E2036L, + 1E2037L, + 1E2038L, + 1E2039L, + 1E2040L, + 1E2041L, + 1E2042L, + 1E2043L, + 1E2044L, + 1E2045L, + 1E2046L, + 1E2047L, + 1E2048L, + 1E2049L, + 1E2050L, + 1E2051L, + 1E2052L, + 1E2053L, + 1E2054L, + 1E2055L, + 1E2056L, + 1E2057L, + 1E2058L, + 1E2059L, + 1E2060L, + 1E2061L, + 1E2062L, + 1E2063L, + 1E2064L, + 1E2065L, + 1E2066L, + 1E2067L, + 1E2068L, + 1E2069L, + 1E2070L, + 1E2071L, + 1E2072L, + 1E2073L, + 1E2074L, + 1E2075L, + 1E2076L, + 1E2077L, + 1E2078L, + 1E2079L, + 1E2080L, + 1E2081L, + 1E2082L, + 1E2083L, + 1E2084L, + 1E2085L, + 1E2086L, + 1E2087L, + 1E2088L, + 1E2089L, + 1E2090L, + 1E2091L, + 1E2092L, + 1E2093L, + 1E2094L, + 1E2095L, + 1E2096L, + 1E2097L, + 1E2098L, + 1E2099L, + 1E2100L, + 1E2101L, + 1E2102L, + 1E2103L, + 1E2104L, + 1E2105L, + 1E2106L, + 1E2107L, + 1E2108L, + 1E2109L, + 1E2110L, + 1E2111L, + 1E2112L, + 1E2113L, + 1E2114L, + 1E2115L, + 1E2116L, + 1E2117L, + 1E2118L, + 1E2119L, + 1E2120L, + 1E2121L, + 1E2122L, + 1E2123L, + 1E2124L, + 1E2125L, + 1E2126L, + 1E2127L, + 1E2128L, + 1E2129L, + 1E2130L, + 1E2131L, + 1E2132L, + 1E2133L, + 1E2134L, + 1E2135L, + 1E2136L, + 1E2137L, + 1E2138L, + 1E2139L, + 1E2140L, + 1E2141L, + 1E2142L, + 1E2143L, + 1E2144L, + 1E2145L, + 1E2146L, + 1E2147L, + 1E2148L, + 1E2149L, + 1E2150L, + 1E2151L, + 1E2152L, + 1E2153L, + 1E2154L, + 1E2155L, + 1E2156L, + 1E2157L, + 1E2158L, + 1E2159L, + 1E2160L, + 1E2161L, + 1E2162L, + 1E2163L, + 1E2164L, + 1E2165L, + 1E2166L, + 1E2167L, + 1E2168L, + 1E2169L, + 1E2170L, + 1E2171L, + 1E2172L, + 1E2173L, + 1E2174L, + 1E2175L, + 1E2176L, + 1E2177L, + 1E2178L, + 1E2179L, + 1E2180L, + 1E2181L, + 1E2182L, + 1E2183L, + 1E2184L, + 1E2185L, + 1E2186L, + 1E2187L, + 1E2188L, + 1E2189L, + 1E2190L, + 1E2191L, + 1E2192L, + 1E2193L, + 1E2194L, + 1E2195L, + 1E2196L, + 1E2197L, + 1E2198L, + 1E2199L, + 1E2200L, + 1E2201L, + 1E2202L, + 1E2203L, + 1E2204L, + 1E2205L, + 1E2206L, + 1E2207L, + 1E2208L, + 1E2209L, + 1E2210L, + 1E2211L, + 1E2212L, + 1E2213L, + 1E2214L, + 1E2215L, + 1E2216L, + 1E2217L, + 1E2218L, + 1E2219L, + 1E2220L, + 1E2221L, + 1E2222L, + 1E2223L, + 1E2224L, + 1E2225L, + 1E2226L, + 1E2227L, + 1E2228L, + 1E2229L, + 1E2230L, + 1E2231L, + 1E2232L, + 1E2233L, + 1E2234L, + 1E2235L, + 1E2236L, + 1E2237L, + 1E2238L, + 1E2239L, + 1E2240L, + 1E2241L, + 1E2242L, + 1E2243L, + 1E2244L, + 1E2245L, + 1E2246L, + 1E2247L, + 1E2248L, + 1E2249L, + 1E2250L, + 1E2251L, + 1E2252L, + 1E2253L, + 1E2254L, + 1E2255L, + 1E2256L, + 1E2257L, + 1E2258L, + 1E2259L, + 1E2260L, + 1E2261L, + 1E2262L, + 1E2263L, + 1E2264L, + 1E2265L, + 1E2266L, + 1E2267L, + 1E2268L, + 1E2269L, + 1E2270L, + 1E2271L, + 1E2272L, + 1E2273L, + 1E2274L, + 1E2275L, + 1E2276L, + 1E2277L, + 1E2278L, + 1E2279L, + 1E2280L, + 1E2281L, + 1E2282L, + 1E2283L, + 1E2284L, + 1E2285L, + 1E2286L, + 1E2287L, + 1E2288L, + 1E2289L, + 1E2290L, + 1E2291L, + 1E2292L, + 1E2293L, + 1E2294L, + 1E2295L, + 1E2296L, + 1E2297L, + 1E2298L, + 1E2299L, + 1E2300L, + 1E2301L, + 1E2302L, + 1E2303L, + 1E2304L, + 1E2305L, + 1E2306L, + 1E2307L, + 1E2308L, + 1E2309L, + 1E2310L, + 1E2311L, + 1E2312L, + 1E2313L, + 1E2314L, + 1E2315L, + 1E2316L, + 1E2317L, + 1E2318L, + 1E2319L, + 1E2320L, + 1E2321L, + 1E2322L, + 1E2323L, + 1E2324L, + 1E2325L, + 1E2326L, + 1E2327L, + 1E2328L, + 1E2329L, + 1E2330L, + 1E2331L, + 1E2332L, + 1E2333L, + 1E2334L, + 1E2335L, + 1E2336L, + 1E2337L, + 1E2338L, + 1E2339L, + 1E2340L, + 1E2341L, + 1E2342L, + 1E2343L, + 1E2344L, + 1E2345L, + 1E2346L, + 1E2347L, + 1E2348L, + 1E2349L, + 1E2350L, + 1E2351L, + 1E2352L, + 1E2353L, + 1E2354L, + 1E2355L, + 1E2356L, + 1E2357L, + 1E2358L, + 1E2359L, + 1E2360L, + 1E2361L, + 1E2362L, + 1E2363L, + 1E2364L, + 1E2365L, + 1E2366L, + 1E2367L, + 1E2368L, + 1E2369L, + 1E2370L, + 1E2371L, + 1E2372L, + 1E2373L, + 1E2374L, + 1E2375L, + 1E2376L, + 1E2377L, + 1E2378L, + 1E2379L, + 1E2380L, + 1E2381L, + 1E2382L, + 1E2383L, + 1E2384L, + 1E2385L, + 1E2386L, + 1E2387L, + 1E2388L, + 1E2389L, + 1E2390L, + 1E2391L, + 1E2392L, + 1E2393L, + 1E2394L, + 1E2395L, + 1E2396L, + 1E2397L, + 1E2398L, + 1E2399L, + 1E2400L, + 1E2401L, + 1E2402L, + 1E2403L, + 1E2404L, + 1E2405L, + 1E2406L, + 1E2407L, + 1E2408L, + 1E2409L, + 1E2410L, + 1E2411L, + 1E2412L, + 1E2413L, + 1E2414L, + 1E2415L, + 1E2416L, + 1E2417L, + 1E2418L, + 1E2419L, + 1E2420L, + 1E2421L, + 1E2422L, + 1E2423L, + 1E2424L, + 1E2425L, + 1E2426L, + 1E2427L, + 1E2428L, + 1E2429L, + 1E2430L, + 1E2431L, + 1E2432L, + 1E2433L, + 1E2434L, + 1E2435L, + 1E2436L, + 1E2437L, + 1E2438L, + 1E2439L, + 1E2440L, + 1E2441L, + 1E2442L, + 1E2443L, + 1E2444L, + 1E2445L, + 1E2446L, + 1E2447L, + 1E2448L, + 1E2449L, + 1E2450L, + 1E2451L, + 1E2452L, + 1E2453L, + 1E2454L, + 1E2455L, + 1E2456L, + 1E2457L, + 1E2458L, + 1E2459L, + 1E2460L, + 1E2461L, + 1E2462L, + 1E2463L, + 1E2464L, + 1E2465L, + 1E2466L, + 1E2467L, + 1E2468L, + 1E2469L, + 1E2470L, + 1E2471L, + 1E2472L, + 1E2473L, + 1E2474L, + 1E2475L, + 1E2476L, + 1E2477L, + 1E2478L, + 1E2479L, + 1E2480L, + 1E2481L, + 1E2482L, + 1E2483L, + 1E2484L, + 1E2485L, + 1E2486L, + 1E2487L, + 1E2488L, + 1E2489L, + 1E2490L, + 1E2491L, + 1E2492L, + 1E2493L, + 1E2494L, + 1E2495L, + 1E2496L, + 1E2497L, + 1E2498L, + 1E2499L, + 1E2500L, + 1E2501L, + 1E2502L, + 1E2503L, + 1E2504L, + 1E2505L, + 1E2506L, + 1E2507L, + 1E2508L, + 1E2509L, + 1E2510L, + 1E2511L, + 1E2512L, + 1E2513L, + 1E2514L, + 1E2515L, + 1E2516L, + 1E2517L, + 1E2518L, + 1E2519L, + 1E2520L, + 1E2521L, + 1E2522L, + 1E2523L, + 1E2524L, + 1E2525L, + 1E2526L, + 1E2527L, + 1E2528L, + 1E2529L, + 1E2530L, + 1E2531L, + 1E2532L, + 1E2533L, + 1E2534L, + 1E2535L, + 1E2536L, + 1E2537L, + 1E2538L, + 1E2539L, + 1E2540L, + 1E2541L, + 1E2542L, + 1E2543L, + 1E2544L, + 1E2545L, + 1E2546L, + 1E2547L, + 1E2548L, + 1E2549L, + 1E2550L, + 1E2551L, + 1E2552L, + 1E2553L, + 1E2554L, + 1E2555L, + 1E2556L, + 1E2557L, + 1E2558L, + 1E2559L, + 1E2560L, + 1E2561L, + 1E2562L, + 1E2563L, + 1E2564L, + 1E2565L, + 1E2566L, + 1E2567L, + 1E2568L, + 1E2569L, + 1E2570L, + 1E2571L, + 1E2572L, + 1E2573L, + 1E2574L, + 1E2575L, + 1E2576L, + 1E2577L, + 1E2578L, + 1E2579L, + 1E2580L, + 1E2581L, + 1E2582L, + 1E2583L, + 1E2584L, + 1E2585L, + 1E2586L, + 1E2587L, + 1E2588L, + 1E2589L, + 1E2590L, + 1E2591L, + 1E2592L, + 1E2593L, + 1E2594L, + 1E2595L, + 1E2596L, + 1E2597L, + 1E2598L, + 1E2599L, + 1E2600L, + 1E2601L, + 1E2602L, + 1E2603L, + 1E2604L, + 1E2605L, + 1E2606L, + 1E2607L, + 1E2608L, + 1E2609L, + 1E2610L, + 1E2611L, + 1E2612L, + 1E2613L, + 1E2614L, + 1E2615L, + 1E2616L, + 1E2617L, + 1E2618L, + 1E2619L, + 1E2620L, + 1E2621L, + 1E2622L, + 1E2623L, + 1E2624L, + 1E2625L, + 1E2626L, + 1E2627L, + 1E2628L, + 1E2629L, + 1E2630L, + 1E2631L, + 1E2632L, + 1E2633L, + 1E2634L, + 1E2635L, + 1E2636L, + 1E2637L, + 1E2638L, + 1E2639L, + 1E2640L, + 1E2641L, + 1E2642L, + 1E2643L, + 1E2644L, + 1E2645L, + 1E2646L, + 1E2647L, + 1E2648L, + 1E2649L, + 1E2650L, + 1E2651L, + 1E2652L, + 1E2653L, + 1E2654L, + 1E2655L, + 1E2656L, + 1E2657L, + 1E2658L, + 1E2659L, + 1E2660L, + 1E2661L, + 1E2662L, + 1E2663L, + 1E2664L, + 1E2665L, + 1E2666L, + 1E2667L, + 1E2668L, + 1E2669L, + 1E2670L, + 1E2671L, + 1E2672L, + 1E2673L, + 1E2674L, + 1E2675L, + 1E2676L, + 1E2677L, + 1E2678L, + 1E2679L, + 1E2680L, + 1E2681L, + 1E2682L, + 1E2683L, + 1E2684L, + 1E2685L, + 1E2686L, + 1E2687L, + 1E2688L, + 1E2689L, + 1E2690L, + 1E2691L, + 1E2692L, + 1E2693L, + 1E2694L, + 1E2695L, + 1E2696L, + 1E2697L, + 1E2698L, + 1E2699L, + 1E2700L, + 1E2701L, + 1E2702L, + 1E2703L, + 1E2704L, + 1E2705L, + 1E2706L, + 1E2707L, + 1E2708L, + 1E2709L, + 1E2710L, + 1E2711L, + 1E2712L, + 1E2713L, + 1E2714L, + 1E2715L, + 1E2716L, + 1E2717L, + 1E2718L, + 1E2719L, + 1E2720L, + 1E2721L, + 1E2722L, + 1E2723L, + 1E2724L, + 1E2725L, + 1E2726L, + 1E2727L, + 1E2728L, + 1E2729L, + 1E2730L, + 1E2731L, + 1E2732L, + 1E2733L, + 1E2734L, + 1E2735L, + 1E2736L, + 1E2737L, + 1E2738L, + 1E2739L, + 1E2740L, + 1E2741L, + 1E2742L, + 1E2743L, + 1E2744L, + 1E2745L, + 1E2746L, + 1E2747L, + 1E2748L, + 1E2749L, + 1E2750L, + 1E2751L, + 1E2752L, + 1E2753L, + 1E2754L, + 1E2755L, + 1E2756L, + 1E2757L, + 1E2758L, + 1E2759L, + 1E2760L, + 1E2761L, + 1E2762L, + 1E2763L, + 1E2764L, + 1E2765L, + 1E2766L, + 1E2767L, + 1E2768L, + 1E2769L, + 1E2770L, + 1E2771L, + 1E2772L, + 1E2773L, + 1E2774L, + 1E2775L, + 1E2776L, + 1E2777L, + 1E2778L, + 1E2779L, + 1E2780L, + 1E2781L, + 1E2782L, + 1E2783L, + 1E2784L, + 1E2785L, + 1E2786L, + 1E2787L, + 1E2788L, + 1E2789L, + 1E2790L, + 1E2791L, + 1E2792L, + 1E2793L, + 1E2794L, + 1E2795L, + 1E2796L, + 1E2797L, + 1E2798L, + 1E2799L, + 1E2800L, + 1E2801L, + 1E2802L, + 1E2803L, + 1E2804L, + 1E2805L, + 1E2806L, + 1E2807L, + 1E2808L, + 1E2809L, + 1E2810L, + 1E2811L, + 1E2812L, + 1E2813L, + 1E2814L, + 1E2815L, + 1E2816L, + 1E2817L, + 1E2818L, + 1E2819L, + 1E2820L, + 1E2821L, + 1E2822L, + 1E2823L, + 1E2824L, + 1E2825L, + 1E2826L, + 1E2827L, + 1E2828L, + 1E2829L, + 1E2830L, + 1E2831L, + 1E2832L, + 1E2833L, + 1E2834L, + 1E2835L, + 1E2836L, + 1E2837L, + 1E2838L, + 1E2839L, + 1E2840L, + 1E2841L, + 1E2842L, + 1E2843L, + 1E2844L, + 1E2845L, + 1E2846L, + 1E2847L, + 1E2848L, + 1E2849L, + 1E2850L, + 1E2851L, + 1E2852L, + 1E2853L, + 1E2854L, + 1E2855L, + 1E2856L, + 1E2857L, + 1E2858L, + 1E2859L, + 1E2860L, + 1E2861L, + 1E2862L, + 1E2863L, + 1E2864L, + 1E2865L, + 1E2866L, + 1E2867L, + 1E2868L, + 1E2869L, + 1E2870L, + 1E2871L, + 1E2872L, + 1E2873L, + 1E2874L, + 1E2875L, + 1E2876L, + 1E2877L, + 1E2878L, + 1E2879L, + 1E2880L, + 1E2881L, + 1E2882L, + 1E2883L, + 1E2884L, + 1E2885L, + 1E2886L, + 1E2887L, + 1E2888L, + 1E2889L, + 1E2890L, + 1E2891L, + 1E2892L, + 1E2893L, + 1E2894L, + 1E2895L, + 1E2896L, + 1E2897L, + 1E2898L, + 1E2899L, + 1E2900L, + 1E2901L, + 1E2902L, + 1E2903L, + 1E2904L, + 1E2905L, + 1E2906L, + 1E2907L, + 1E2908L, + 1E2909L, + 1E2910L, + 1E2911L, + 1E2912L, + 1E2913L, + 1E2914L, + 1E2915L, + 1E2916L, + 1E2917L, + 1E2918L, + 1E2919L, + 1E2920L, + 1E2921L, + 1E2922L, + 1E2923L, + 1E2924L, + 1E2925L, + 1E2926L, + 1E2927L, + 1E2928L, + 1E2929L, + 1E2930L, + 1E2931L, + 1E2932L, + 1E2933L, + 1E2934L, + 1E2935L, + 1E2936L, + 1E2937L, + 1E2938L, + 1E2939L, + 1E2940L, + 1E2941L, + 1E2942L, + 1E2943L, + 1E2944L, + 1E2945L, + 1E2946L, + 1E2947L, + 1E2948L, + 1E2949L, + 1E2950L, + 1E2951L, + 1E2952L, + 1E2953L, + 1E2954L, + 1E2955L, + 1E2956L, + 1E2957L, + 1E2958L, + 1E2959L, + 1E2960L, + 1E2961L, + 1E2962L, + 1E2963L, + 1E2964L, + 1E2965L, + 1E2966L, + 1E2967L, + 1E2968L, + 1E2969L, + 1E2970L, + 1E2971L, + 1E2972L, + 1E2973L, + 1E2974L, + 1E2975L, + 1E2976L, + 1E2977L, + 1E2978L, + 1E2979L, + 1E2980L, + 1E2981L, + 1E2982L, + 1E2983L, + 1E2984L, + 1E2985L, + 1E2986L, + 1E2987L, + 1E2988L, + 1E2989L, + 1E2990L, + 1E2991L, + 1E2992L, + 1E2993L, + 1E2994L, + 1E2995L, + 1E2996L, + 1E2997L, + 1E2998L, + 1E2999L, + 1E3000L, + 1E3001L, + 1E3002L, + 1E3003L, + 1E3004L, + 1E3005L, + 1E3006L, + 1E3007L, + 1E3008L, + 1E3009L, + 1E3010L, + 1E3011L, + 1E3012L, + 1E3013L, + 1E3014L, + 1E3015L, + 1E3016L, + 1E3017L, + 1E3018L, + 1E3019L, + 1E3020L, + 1E3021L, + 1E3022L, + 1E3023L, + 1E3024L, + 1E3025L, + 1E3026L, + 1E3027L, + 1E3028L, + 1E3029L, + 1E3030L, + 1E3031L, + 1E3032L, + 1E3033L, + 1E3034L, + 1E3035L, + 1E3036L, + 1E3037L, + 1E3038L, + 1E3039L, + 1E3040L, + 1E3041L, + 1E3042L, + 1E3043L, + 1E3044L, + 1E3045L, + 1E3046L, + 1E3047L, + 1E3048L, + 1E3049L, + 1E3050L, + 1E3051L, + 1E3052L, + 1E3053L, + 1E3054L, + 1E3055L, + 1E3056L, + 1E3057L, + 1E3058L, + 1E3059L, + 1E3060L, + 1E3061L, + 1E3062L, + 1E3063L, + 1E3064L, + 1E3065L, + 1E3066L, + 1E3067L, + 1E3068L, + 1E3069L, + 1E3070L, + 1E3071L, + 1E3072L, + 1E3073L, + 1E3074L, + 1E3075L, + 1E3076L, + 1E3077L, + 1E3078L, + 1E3079L, + 1E3080L, + 1E3081L, + 1E3082L, + 1E3083L, + 1E3084L, + 1E3085L, + 1E3086L, + 1E3087L, + 1E3088L, + 1E3089L, + 1E3090L, + 1E3091L, + 1E3092L, + 1E3093L, + 1E3094L, + 1E3095L, + 1E3096L, + 1E3097L, + 1E3098L, + 1E3099L, + 1E3100L, + 1E3101L, + 1E3102L, + 1E3103L, + 1E3104L, + 1E3105L, + 1E3106L, + 1E3107L, + 1E3108L, + 1E3109L, + 1E3110L, + 1E3111L, + 1E3112L, + 1E3113L, + 1E3114L, + 1E3115L, + 1E3116L, + 1E3117L, + 1E3118L, + 1E3119L, + 1E3120L, + 1E3121L, + 1E3122L, + 1E3123L, + 1E3124L, + 1E3125L, + 1E3126L, + 1E3127L, + 1E3128L, + 1E3129L, + 1E3130L, + 1E3131L, + 1E3132L, + 1E3133L, + 1E3134L, + 1E3135L, + 1E3136L, + 1E3137L, + 1E3138L, + 1E3139L, + 1E3140L, + 1E3141L, + 1E3142L, + 1E3143L, + 1E3144L, + 1E3145L, + 1E3146L, + 1E3147L, + 1E3148L, + 1E3149L, + 1E3150L, + 1E3151L, + 1E3152L, + 1E3153L, + 1E3154L, + 1E3155L, + 1E3156L, + 1E3157L, + 1E3158L, + 1E3159L, + 1E3160L, + 1E3161L, + 1E3162L, + 1E3163L, + 1E3164L, + 1E3165L, + 1E3166L, + 1E3167L, + 1E3168L, + 1E3169L, + 1E3170L, + 1E3171L, + 1E3172L, + 1E3173L, + 1E3174L, + 1E3175L, + 1E3176L, + 1E3177L, + 1E3178L, + 1E3179L, + 1E3180L, + 1E3181L, + 1E3182L, + 1E3183L, + 1E3184L, + 1E3185L, + 1E3186L, + 1E3187L, + 1E3188L, + 1E3189L, + 1E3190L, + 1E3191L, + 1E3192L, + 1E3193L, + 1E3194L, + 1E3195L, + 1E3196L, + 1E3197L, + 1E3198L, + 1E3199L, + 1E3200L, + 1E3201L, + 1E3202L, + 1E3203L, + 1E3204L, + 1E3205L, + 1E3206L, + 1E3207L, + 1E3208L, + 1E3209L, + 1E3210L, + 1E3211L, + 1E3212L, + 1E3213L, + 1E3214L, + 1E3215L, + 1E3216L, + 1E3217L, + 1E3218L, + 1E3219L, + 1E3220L, + 1E3221L, + 1E3222L, + 1E3223L, + 1E3224L, + 1E3225L, + 1E3226L, + 1E3227L, + 1E3228L, + 1E3229L, + 1E3230L, + 1E3231L, + 1E3232L, + 1E3233L, + 1E3234L, + 1E3235L, + 1E3236L, + 1E3237L, + 1E3238L, + 1E3239L, + 1E3240L, + 1E3241L, + 1E3242L, + 1E3243L, + 1E3244L, + 1E3245L, + 1E3246L, + 1E3247L, + 1E3248L, + 1E3249L, + 1E3250L, + 1E3251L, + 1E3252L, + 1E3253L, + 1E3254L, + 1E3255L, + 1E3256L, + 1E3257L, + 1E3258L, + 1E3259L, + 1E3260L, + 1E3261L, + 1E3262L, + 1E3263L, + 1E3264L, + 1E3265L, + 1E3266L, + 1E3267L, + 1E3268L, + 1E3269L, + 1E3270L, + 1E3271L, + 1E3272L, + 1E3273L, + 1E3274L, + 1E3275L, + 1E3276L, + 1E3277L, + 1E3278L, + 1E3279L, + 1E3280L, + 1E3281L, + 1E3282L, + 1E3283L, + 1E3284L, + 1E3285L, + 1E3286L, + 1E3287L, + 1E3288L, + 1E3289L, + 1E3290L, + 1E3291L, + 1E3292L, + 1E3293L, + 1E3294L, + 1E3295L, + 1E3296L, + 1E3297L, + 1E3298L, + 1E3299L, + 1E3300L, + 1E3301L, + 1E3302L, + 1E3303L, + 1E3304L, + 1E3305L, + 1E3306L, + 1E3307L, + 1E3308L, + 1E3309L, + 1E3310L, + 1E3311L, + 1E3312L, + 1E3313L, + 1E3314L, + 1E3315L, + 1E3316L, + 1E3317L, + 1E3318L, + 1E3319L, + 1E3320L, + 1E3321L, + 1E3322L, + 1E3323L, + 1E3324L, + 1E3325L, + 1E3326L, + 1E3327L, + 1E3328L, + 1E3329L, + 1E3330L, + 1E3331L, + 1E3332L, + 1E3333L, + 1E3334L, + 1E3335L, + 1E3336L, + 1E3337L, + 1E3338L, + 1E3339L, + 1E3340L, + 1E3341L, + 1E3342L, + 1E3343L, + 1E3344L, + 1E3345L, + 1E3346L, + 1E3347L, + 1E3348L, + 1E3349L, + 1E3350L, + 1E3351L, + 1E3352L, + 1E3353L, + 1E3354L, + 1E3355L, + 1E3356L, + 1E3357L, + 1E3358L, + 1E3359L, + 1E3360L, + 1E3361L, + 1E3362L, + 1E3363L, + 1E3364L, + 1E3365L, + 1E3366L, + 1E3367L, + 1E3368L, + 1E3369L, + 1E3370L, + 1E3371L, + 1E3372L, + 1E3373L, + 1E3374L, + 1E3375L, + 1E3376L, + 1E3377L, + 1E3378L, + 1E3379L, + 1E3380L, + 1E3381L, + 1E3382L, + 1E3383L, + 1E3384L, + 1E3385L, + 1E3386L, + 1E3387L, + 1E3388L, + 1E3389L, + 1E3390L, + 1E3391L, + 1E3392L, + 1E3393L, + 1E3394L, + 1E3395L, + 1E3396L, + 1E3397L, + 1E3398L, + 1E3399L, + 1E3400L, + 1E3401L, + 1E3402L, + 1E3403L, + 1E3404L, + 1E3405L, + 1E3406L, + 1E3407L, + 1E3408L, + 1E3409L, + 1E3410L, + 1E3411L, + 1E3412L, + 1E3413L, + 1E3414L, + 1E3415L, + 1E3416L, + 1E3417L, + 1E3418L, + 1E3419L, + 1E3420L, + 1E3421L, + 1E3422L, + 1E3423L, + 1E3424L, + 1E3425L, + 1E3426L, + 1E3427L, + 1E3428L, + 1E3429L, + 1E3430L, + 1E3431L, + 1E3432L, + 1E3433L, + 1E3434L, + 1E3435L, + 1E3436L, + 1E3437L, + 1E3438L, + 1E3439L, + 1E3440L, + 1E3441L, + 1E3442L, + 1E3443L, + 1E3444L, + 1E3445L, + 1E3446L, + 1E3447L, + 1E3448L, + 1E3449L, + 1E3450L, + 1E3451L, + 1E3452L, + 1E3453L, + 1E3454L, + 1E3455L, + 1E3456L, + 1E3457L, + 1E3458L, + 1E3459L, + 1E3460L, + 1E3461L, + 1E3462L, + 1E3463L, + 1E3464L, + 1E3465L, + 1E3466L, + 1E3467L, + 1E3468L, + 1E3469L, + 1E3470L, + 1E3471L, + 1E3472L, + 1E3473L, + 1E3474L, + 1E3475L, + 1E3476L, + 1E3477L, + 1E3478L, + 1E3479L, + 1E3480L, + 1E3481L, + 1E3482L, + 1E3483L, + 1E3484L, + 1E3485L, + 1E3486L, + 1E3487L, + 1E3488L, + 1E3489L, + 1E3490L, + 1E3491L, + 1E3492L, + 1E3493L, + 1E3494L, + 1E3495L, + 1E3496L, + 1E3497L, + 1E3498L, + 1E3499L, + 1E3500L, + 1E3501L, + 1E3502L, + 1E3503L, + 1E3504L, + 1E3505L, + 1E3506L, + 1E3507L, + 1E3508L, + 1E3509L, + 1E3510L, + 1E3511L, + 1E3512L, + 1E3513L, + 1E3514L, + 1E3515L, + 1E3516L, + 1E3517L, + 1E3518L, + 1E3519L, + 1E3520L, + 1E3521L, + 1E3522L, + 1E3523L, + 1E3524L, + 1E3525L, + 1E3526L, + 1E3527L, + 1E3528L, + 1E3529L, + 1E3530L, + 1E3531L, + 1E3532L, + 1E3533L, + 1E3534L, + 1E3535L, + 1E3536L, + 1E3537L, + 1E3538L, + 1E3539L, + 1E3540L, + 1E3541L, + 1E3542L, + 1E3543L, + 1E3544L, + 1E3545L, + 1E3546L, + 1E3547L, + 1E3548L, + 1E3549L, + 1E3550L, + 1E3551L, + 1E3552L, + 1E3553L, + 1E3554L, + 1E3555L, + 1E3556L, + 1E3557L, + 1E3558L, + 1E3559L, + 1E3560L, + 1E3561L, + 1E3562L, + 1E3563L, + 1E3564L, + 1E3565L, + 1E3566L, + 1E3567L, + 1E3568L, + 1E3569L, + 1E3570L, + 1E3571L, + 1E3572L, + 1E3573L, + 1E3574L, + 1E3575L, + 1E3576L, + 1E3577L, + 1E3578L, + 1E3579L, + 1E3580L, + 1E3581L, + 1E3582L, + 1E3583L, + 1E3584L, + 1E3585L, + 1E3586L, + 1E3587L, + 1E3588L, + 1E3589L, + 1E3590L, + 1E3591L, + 1E3592L, + 1E3593L, + 1E3594L, + 1E3595L, + 1E3596L, + 1E3597L, + 1E3598L, + 1E3599L, + 1E3600L, + 1E3601L, + 1E3602L, + 1E3603L, + 1E3604L, + 1E3605L, + 1E3606L, + 1E3607L, + 1E3608L, + 1E3609L, + 1E3610L, + 1E3611L, + 1E3612L, + 1E3613L, + 1E3614L, + 1E3615L, + 1E3616L, + 1E3617L, + 1E3618L, + 1E3619L, + 1E3620L, + 1E3621L, + 1E3622L, + 1E3623L, + 1E3624L, + 1E3625L, + 1E3626L, + 1E3627L, + 1E3628L, + 1E3629L, + 1E3630L, + 1E3631L, + 1E3632L, + 1E3633L, + 1E3634L, + 1E3635L, + 1E3636L, + 1E3637L, + 1E3638L, + 1E3639L, + 1E3640L, + 1E3641L, + 1E3642L, + 1E3643L, + 1E3644L, + 1E3645L, + 1E3646L, + 1E3647L, + 1E3648L, + 1E3649L, + 1E3650L, + 1E3651L, + 1E3652L, + 1E3653L, + 1E3654L, + 1E3655L, + 1E3656L, + 1E3657L, + 1E3658L, + 1E3659L, + 1E3660L, + 1E3661L, + 1E3662L, + 1E3663L, + 1E3664L, + 1E3665L, + 1E3666L, + 1E3667L, + 1E3668L, + 1E3669L, + 1E3670L, + 1E3671L, + 1E3672L, + 1E3673L, + 1E3674L, + 1E3675L, + 1E3676L, + 1E3677L, + 1E3678L, + 1E3679L, + 1E3680L, + 1E3681L, + 1E3682L, + 1E3683L, + 1E3684L, + 1E3685L, + 1E3686L, + 1E3687L, + 1E3688L, + 1E3689L, + 1E3690L, + 1E3691L, + 1E3692L, + 1E3693L, + 1E3694L, + 1E3695L, + 1E3696L, + 1E3697L, + 1E3698L, + 1E3699L, + 1E3700L, + 1E3701L, + 1E3702L, + 1E3703L, + 1E3704L, + 1E3705L, + 1E3706L, + 1E3707L, + 1E3708L, + 1E3709L, + 1E3710L, + 1E3711L, + 1E3712L, + 1E3713L, + 1E3714L, + 1E3715L, + 1E3716L, + 1E3717L, + 1E3718L, + 1E3719L, + 1E3720L, + 1E3721L, + 1E3722L, + 1E3723L, + 1E3724L, + 1E3725L, + 1E3726L, + 1E3727L, + 1E3728L, + 1E3729L, + 1E3730L, + 1E3731L, + 1E3732L, + 1E3733L, + 1E3734L, + 1E3735L, + 1E3736L, + 1E3737L, + 1E3738L, + 1E3739L, + 1E3740L, + 1E3741L, + 1E3742L, + 1E3743L, + 1E3744L, + 1E3745L, + 1E3746L, + 1E3747L, + 1E3748L, + 1E3749L, + 1E3750L, + 1E3751L, + 1E3752L, + 1E3753L, + 1E3754L, + 1E3755L, + 1E3756L, + 1E3757L, + 1E3758L, + 1E3759L, + 1E3760L, + 1E3761L, + 1E3762L, + 1E3763L, + 1E3764L, + 1E3765L, + 1E3766L, + 1E3767L, + 1E3768L, + 1E3769L, + 1E3770L, + 1E3771L, + 1E3772L, + 1E3773L, + 1E3774L, + 1E3775L, + 1E3776L, + 1E3777L, + 1E3778L, + 1E3779L, + 1E3780L, + 1E3781L, + 1E3782L, + 1E3783L, + 1E3784L, + 1E3785L, + 1E3786L, + 1E3787L, + 1E3788L, + 1E3789L, + 1E3790L, + 1E3791L, + 1E3792L, + 1E3793L, + 1E3794L, + 1E3795L, + 1E3796L, + 1E3797L, + 1E3798L, + 1E3799L, + 1E3800L, + 1E3801L, + 1E3802L, + 1E3803L, + 1E3804L, + 1E3805L, + 1E3806L, + 1E3807L, + 1E3808L, + 1E3809L, + 1E3810L, + 1E3811L, + 1E3812L, + 1E3813L, + 1E3814L, + 1E3815L, + 1E3816L, + 1E3817L, + 1E3818L, + 1E3819L, + 1E3820L, + 1E3821L, + 1E3822L, + 1E3823L, + 1E3824L, + 1E3825L, + 1E3826L, + 1E3827L, + 1E3828L, + 1E3829L, + 1E3830L, + 1E3831L, + 1E3832L, + 1E3833L, + 1E3834L, + 1E3835L, + 1E3836L, + 1E3837L, + 1E3838L, + 1E3839L, + 1E3840L, + 1E3841L, + 1E3842L, + 1E3843L, + 1E3844L, + 1E3845L, + 1E3846L, + 1E3847L, + 1E3848L, + 1E3849L, + 1E3850L, + 1E3851L, + 1E3852L, + 1E3853L, + 1E3854L, + 1E3855L, + 1E3856L, + 1E3857L, + 1E3858L, + 1E3859L, + 1E3860L, + 1E3861L, + 1E3862L, + 1E3863L, + 1E3864L, + 1E3865L, + 1E3866L, + 1E3867L, + 1E3868L, + 1E3869L, + 1E3870L, + 1E3871L, + 1E3872L, + 1E3873L, + 1E3874L, + 1E3875L, + 1E3876L, + 1E3877L, + 1E3878L, + 1E3879L, + 1E3880L, + 1E3881L, + 1E3882L, + 1E3883L, + 1E3884L, + 1E3885L, + 1E3886L, + 1E3887L, + 1E3888L, + 1E3889L, + 1E3890L, + 1E3891L, + 1E3892L, + 1E3893L, + 1E3894L, + 1E3895L, + 1E3896L, + 1E3897L, + 1E3898L, + 1E3899L, + 1E3900L, + 1E3901L, + 1E3902L, + 1E3903L, + 1E3904L, + 1E3905L, + 1E3906L, + 1E3907L, + 1E3908L, + 1E3909L, + 1E3910L, + 1E3911L, + 1E3912L, + 1E3913L, + 1E3914L, + 1E3915L, + 1E3916L, + 1E3917L, + 1E3918L, + 1E3919L, + 1E3920L, + 1E3921L, + 1E3922L, + 1E3923L, + 1E3924L, + 1E3925L, + 1E3926L, + 1E3927L, + 1E3928L, + 1E3929L, + 1E3930L, + 1E3931L, + 1E3932L, + 1E3933L, + 1E3934L, + 1E3935L, + 1E3936L, + 1E3937L, + 1E3938L, + 1E3939L, + 1E3940L, + 1E3941L, + 1E3942L, + 1E3943L, + 1E3944L, + 1E3945L, + 1E3946L, + 1E3947L, + 1E3948L, + 1E3949L, + 1E3950L, + 1E3951L, + 1E3952L, + 1E3953L, + 1E3954L, + 1E3955L, + 1E3956L, + 1E3957L, + 1E3958L, + 1E3959L, + 1E3960L, + 1E3961L, + 1E3962L, + 1E3963L, + 1E3964L, + 1E3965L, + 1E3966L, + 1E3967L, + 1E3968L, + 1E3969L, + 1E3970L, + 1E3971L, + 1E3972L, + 1E3973L, + 1E3974L, + 1E3975L, + 1E3976L, + 1E3977L, + 1E3978L, + 1E3979L, + 1E3980L, + 1E3981L, + 1E3982L, + 1E3983L, + 1E3984L, + 1E3985L, + 1E3986L, + 1E3987L, + 1E3988L, + 1E3989L, + 1E3990L, + 1E3991L, + 1E3992L, + 1E3993L, + 1E3994L, + 1E3995L, + 1E3996L, + 1E3997L, + 1E3998L, + 1E3999L, + 1E4000L, + 1E4001L, + 1E4002L, + 1E4003L, + 1E4004L, + 1E4005L, + 1E4006L, + 1E4007L, + 1E4008L, + 1E4009L, + 1E4010L, + 1E4011L, + 1E4012L, + 1E4013L, + 1E4014L, + 1E4015L, + 1E4016L, + 1E4017L, + 1E4018L, + 1E4019L, + 1E4020L, + 1E4021L, + 1E4022L, + 1E4023L, + 1E4024L, + 1E4025L, + 1E4026L, + 1E4027L, + 1E4028L, + 1E4029L, + 1E4030L, + 1E4031L, + 1E4032L, + 1E4033L, + 1E4034L, + 1E4035L, + 1E4036L, + 1E4037L, + 1E4038L, + 1E4039L, + 1E4040L, + 1E4041L, + 1E4042L, + 1E4043L, + 1E4044L, + 1E4045L, + 1E4046L, + 1E4047L, + 1E4048L, + 1E4049L, + 1E4050L, + 1E4051L, + 1E4052L, + 1E4053L, + 1E4054L, + 1E4055L, + 1E4056L, + 1E4057L, + 1E4058L, + 1E4059L, + 1E4060L, + 1E4061L, + 1E4062L, + 1E4063L, + 1E4064L, + 1E4065L, + 1E4066L, + 1E4067L, + 1E4068L, + 1E4069L, + 1E4070L, + 1E4071L, + 1E4072L, + 1E4073L, + 1E4074L, + 1E4075L, + 1E4076L, + 1E4077L, + 1E4078L, + 1E4079L, + 1E4080L, + 1E4081L, + 1E4082L, + 1E4083L, + 1E4084L, + 1E4085L, + 1E4086L, + 1E4087L, + 1E4088L, + 1E4089L, + 1E4090L, + 1E4091L, + 1E4092L, + 1E4093L, + 1E4094L, + 1E4095L, + 1E4096L, + 1E4097L, + 1E4098L, + 1E4099L, + 1E4100L, + 1E4101L, + 1E4102L, + 1E4103L, + 1E4104L, + 1E4105L, + 1E4106L, + 1E4107L, + 1E4108L, + 1E4109L, + 1E4110L, + 1E4111L, + 1E4112L, + 1E4113L, + 1E4114L, + 1E4115L, + 1E4116L, + 1E4117L, + 1E4118L, + 1E4119L, + 1E4120L, + 1E4121L, + 1E4122L, + 1E4123L, + 1E4124L, + 1E4125L, + 1E4126L, + 1E4127L, + 1E4128L, + 1E4129L, + 1E4130L, + 1E4131L, + 1E4132L, + 1E4133L, + 1E4134L, + 1E4135L, + 1E4136L, + 1E4137L, + 1E4138L, + 1E4139L, + 1E4140L, + 1E4141L, + 1E4142L, + 1E4143L, + 1E4144L, + 1E4145L, + 1E4146L, + 1E4147L, + 1E4148L, + 1E4149L, + 1E4150L, + 1E4151L, + 1E4152L, + 1E4153L, + 1E4154L, + 1E4155L, + 1E4156L, + 1E4157L, + 1E4158L, + 1E4159L, + 1E4160L, + 1E4161L, + 1E4162L, + 1E4163L, + 1E4164L, + 1E4165L, + 1E4166L, + 1E4167L, + 1E4168L, + 1E4169L, + 1E4170L, + 1E4171L, + 1E4172L, + 1E4173L, + 1E4174L, + 1E4175L, + 1E4176L, + 1E4177L, + 1E4178L, + 1E4179L, + 1E4180L, + 1E4181L, + 1E4182L, + 1E4183L, + 1E4184L, + 1E4185L, + 1E4186L, + 1E4187L, + 1E4188L, + 1E4189L, + 1E4190L, + 1E4191L, + 1E4192L, + 1E4193L, + 1E4194L, + 1E4195L, + 1E4196L, + 1E4197L, + 1E4198L, + 1E4199L, + 1E4200L, + 1E4201L, + 1E4202L, + 1E4203L, + 1E4204L, + 1E4205L, + 1E4206L, + 1E4207L, + 1E4208L, + 1E4209L, + 1E4210L, + 1E4211L, + 1E4212L, + 1E4213L, + 1E4214L, + 1E4215L, + 1E4216L, + 1E4217L, + 1E4218L, + 1E4219L, + 1E4220L, + 1E4221L, + 1E4222L, + 1E4223L, + 1E4224L, + 1E4225L, + 1E4226L, + 1E4227L, + 1E4228L, + 1E4229L, + 1E4230L, + 1E4231L, + 1E4232L, + 1E4233L, + 1E4234L, + 1E4235L, + 1E4236L, + 1E4237L, + 1E4238L, + 1E4239L, + 1E4240L, + 1E4241L, + 1E4242L, + 1E4243L, + 1E4244L, + 1E4245L, + 1E4246L, + 1E4247L, + 1E4248L, + 1E4249L, + 1E4250L, + 1E4251L, + 1E4252L, + 1E4253L, + 1E4254L, + 1E4255L, + 1E4256L, + 1E4257L, + 1E4258L, + 1E4259L, + 1E4260L, + 1E4261L, + 1E4262L, + 1E4263L, + 1E4264L, + 1E4265L, + 1E4266L, + 1E4267L, + 1E4268L, + 1E4269L, + 1E4270L, + 1E4271L, + 1E4272L, + 1E4273L, + 1E4274L, + 1E4275L, + 1E4276L, + 1E4277L, + 1E4278L, + 1E4279L, + 1E4280L, + 1E4281L, + 1E4282L, + 1E4283L, + 1E4284L, + 1E4285L, + 1E4286L, + 1E4287L, + 1E4288L, + 1E4289L, + 1E4290L, + 1E4291L, + 1E4292L, + 1E4293L, + 1E4294L, + 1E4295L, + 1E4296L, + 1E4297L, + 1E4298L, + 1E4299L, + 1E4300L, + 1E4301L, + 1E4302L, + 1E4303L, + 1E4304L, + 1E4305L, + 1E4306L, + 1E4307L, + 1E4308L, + 1E4309L, + 1E4310L, + 1E4311L, + 1E4312L, + 1E4313L, + 1E4314L, + 1E4315L, + 1E4316L, + 1E4317L, + 1E4318L, + 1E4319L, + 1E4320L, + 1E4321L, + 1E4322L, + 1E4323L, + 1E4324L, + 1E4325L, + 1E4326L, + 1E4327L, + 1E4328L, + 1E4329L, + 1E4330L, + 1E4331L, + 1E4332L, + 1E4333L, + 1E4334L, + 1E4335L, + 1E4336L, + 1E4337L, + 1E4338L, + 1E4339L, + 1E4340L, + 1E4341L, + 1E4342L, + 1E4343L, + 1E4344L, + 1E4345L, + 1E4346L, + 1E4347L, + 1E4348L, + 1E4349L, + 1E4350L, + 1E4351L, + 1E4352L, + 1E4353L, + 1E4354L, + 1E4355L, + 1E4356L, + 1E4357L, + 1E4358L, + 1E4359L, + 1E4360L, + 1E4361L, + 1E4362L, + 1E4363L, + 1E4364L, + 1E4365L, + 1E4366L, + 1E4367L, + 1E4368L, + 1E4369L, + 1E4370L, + 1E4371L, + 1E4372L, + 1E4373L, + 1E4374L, + 1E4375L, + 1E4376L, + 1E4377L, + 1E4378L, + 1E4379L, + 1E4380L, + 1E4381L, + 1E4382L, + 1E4383L, + 1E4384L, + 1E4385L, + 1E4386L, + 1E4387L, + 1E4388L, + 1E4389L, + 1E4390L, + 1E4391L, + 1E4392L, + 1E4393L, + 1E4394L, + 1E4395L, + 1E4396L, + 1E4397L, + 1E4398L, + 1E4399L, + 1E4400L, + 1E4401L, + 1E4402L, + 1E4403L, + 1E4404L, + 1E4405L, + 1E4406L, + 1E4407L, + 1E4408L, + 1E4409L, + 1E4410L, + 1E4411L, + 1E4412L, + 1E4413L, + 1E4414L, + 1E4415L, + 1E4416L, + 1E4417L, + 1E4418L, + 1E4419L, + 1E4420L, + 1E4421L, + 1E4422L, + 1E4423L, + 1E4424L, + 1E4425L, + 1E4426L, + 1E4427L, + 1E4428L, + 1E4429L, + 1E4430L, + 1E4431L, + 1E4432L, + 1E4433L, + 1E4434L, + 1E4435L, + 1E4436L, + 1E4437L, + 1E4438L, + 1E4439L, + 1E4440L, + 1E4441L, + 1E4442L, + 1E4443L, + 1E4444L, + 1E4445L, + 1E4446L, + 1E4447L, + 1E4448L, + 1E4449L, + 1E4450L, + 1E4451L, + 1E4452L, + 1E4453L, + 1E4454L, + 1E4455L, + 1E4456L, + 1E4457L, + 1E4458L, + 1E4459L, + 1E4460L, + 1E4461L, + 1E4462L, + 1E4463L, + 1E4464L, + 1E4465L, + 1E4466L, + 1E4467L, + 1E4468L, + 1E4469L, + 1E4470L, + 1E4471L, + 1E4472L, + 1E4473L, + 1E4474L, + 1E4475L, + 1E4476L, + 1E4477L, + 1E4478L, + 1E4479L, + 1E4480L, + 1E4481L, + 1E4482L, + 1E4483L, + 1E4484L, + 1E4485L, + 1E4486L, + 1E4487L, + 1E4488L, + 1E4489L, + 1E4490L, + 1E4491L, + 1E4492L, + 1E4493L, + 1E4494L, + 1E4495L, + 1E4496L, + 1E4497L, + 1E4498L, + 1E4499L, + 1E4500L, + 1E4501L, + 1E4502L, + 1E4503L, + 1E4504L, + 1E4505L, + 1E4506L, + 1E4507L, + 1E4508L, + 1E4509L, + 1E4510L, + 1E4511L, + 1E4512L, + 1E4513L, + 1E4514L, + 1E4515L, + 1E4516L, + 1E4517L, + 1E4518L, + 1E4519L, + 1E4520L, + 1E4521L, + 1E4522L, + 1E4523L, + 1E4524L, + 1E4525L, + 1E4526L, + 1E4527L, + 1E4528L, + 1E4529L, + 1E4530L, + 1E4531L, + 1E4532L, + 1E4533L, + 1E4534L, + 1E4535L, + 1E4536L, + 1E4537L, + 1E4538L, + 1E4539L, + 1E4540L, + 1E4541L, + 1E4542L, + 1E4543L, + 1E4544L, + 1E4545L, + 1E4546L, + 1E4547L, + 1E4548L, + 1E4549L, + 1E4550L, + 1E4551L, + 1E4552L, + 1E4553L, + 1E4554L, + 1E4555L, + 1E4556L, + 1E4557L, + 1E4558L, + 1E4559L, + 1E4560L, + 1E4561L, + 1E4562L, + 1E4563L, + 1E4564L, + 1E4565L, + 1E4566L, + 1E4567L, + 1E4568L, + 1E4569L, + 1E4570L, + 1E4571L, + 1E4572L, + 1E4573L, + 1E4574L, + 1E4575L, + 1E4576L, + 1E4577L, + 1E4578L, + 1E4579L, + 1E4580L, + 1E4581L, + 1E4582L, + 1E4583L, + 1E4584L, + 1E4585L, + 1E4586L, + 1E4587L, + 1E4588L, + 1E4589L, + 1E4590L, + 1E4591L, + 1E4592L, + 1E4593L, + 1E4594L, + 1E4595L, + 1E4596L, + 1E4597L, + 1E4598L, + 1E4599L, + 1E4600L, + 1E4601L, + 1E4602L, + 1E4603L, + 1E4604L, + 1E4605L, + 1E4606L, + 1E4607L, + 1E4608L, + 1E4609L, + 1E4610L, + 1E4611L, + 1E4612L, + 1E4613L, + 1E4614L, + 1E4615L, + 1E4616L, + 1E4617L, + 1E4618L, + 1E4619L, + 1E4620L, + 1E4621L, + 1E4622L, + 1E4623L, + 1E4624L, + 1E4625L, + 1E4626L, + 1E4627L, + 1E4628L, + 1E4629L, + 1E4630L, + 1E4631L, + 1E4632L, + 1E4633L, + 1E4634L, + 1E4635L, + 1E4636L, + 1E4637L, + 1E4638L, + 1E4639L, + 1E4640L, + 1E4641L, + 1E4642L, + 1E4643L, + 1E4644L, + 1E4645L, + 1E4646L, + 1E4647L, + 1E4648L, + 1E4649L, + 1E4650L, + 1E4651L, + 1E4652L, + 1E4653L, + 1E4654L, + 1E4655L, + 1E4656L, + 1E4657L, + 1E4658L, + 1E4659L, + 1E4660L, + 1E4661L, + 1E4662L, + 1E4663L, + 1E4664L, + 1E4665L, + 1E4666L, + 1E4667L, + 1E4668L, + 1E4669L, + 1E4670L, + 1E4671L, + 1E4672L, + 1E4673L, + 1E4674L, + 1E4675L, + 1E4676L, + 1E4677L, + 1E4678L, + 1E4679L, + 1E4680L, + 1E4681L, + 1E4682L, + 1E4683L, + 1E4684L, + 1E4685L, + 1E4686L, + 1E4687L, + 1E4688L, + 1E4689L, + 1E4690L, + 1E4691L, + 1E4692L, + 1E4693L, + 1E4694L, + 1E4695L, + 1E4696L, + 1E4697L, + 1E4698L, + 1E4699L, + 1E4700L, + 1E4701L, + 1E4702L, + 1E4703L, + 1E4704L, + 1E4705L, + 1E4706L, + 1E4707L, + 1E4708L, + 1E4709L, + 1E4710L, + 1E4711L, + 1E4712L, + 1E4713L, + 1E4714L, + 1E4715L, + 1E4716L, + 1E4717L, + 1E4718L, + 1E4719L, + 1E4720L, + 1E4721L, + 1E4722L, + 1E4723L, + 1E4724L, + 1E4725L, + 1E4726L, + 1E4727L, + 1E4728L, + 1E4729L, + 1E4730L, + 1E4731L, + 1E4732L, + 1E4733L, + 1E4734L, + 1E4735L, + 1E4736L, + 1E4737L, + 1E4738L, + 1E4739L, + 1E4740L, + 1E4741L, + 1E4742L, + 1E4743L, + 1E4744L, + 1E4745L, + 1E4746L, + 1E4747L, + 1E4748L, + 1E4749L, + 1E4750L, + 1E4751L, + 1E4752L, + 1E4753L, + 1E4754L, + 1E4755L, + 1E4756L, + 1E4757L, + 1E4758L, + 1E4759L, + 1E4760L, + 1E4761L, + 1E4762L, + 1E4763L, + 1E4764L, + 1E4765L, + 1E4766L, + 1E4767L, + 1E4768L, + 1E4769L, + 1E4770L, + 1E4771L, + 1E4772L, + 1E4773L, + 1E4774L, + 1E4775L, + 1E4776L, + 1E4777L, + 1E4778L, + 1E4779L, + 1E4780L, + 1E4781L, + 1E4782L, + 1E4783L, + 1E4784L, + 1E4785L, + 1E4786L, + 1E4787L, + 1E4788L, + 1E4789L, + 1E4790L, + 1E4791L, + 1E4792L, + 1E4793L, + 1E4794L, + 1E4795L, + 1E4796L, + 1E4797L, + 1E4798L, + 1E4799L, + 1E4800L, + 1E4801L, + 1E4802L, + 1E4803L, + 1E4804L, + 1E4805L, + 1E4806L, + 1E4807L, + 1E4808L, + 1E4809L, + 1E4810L, + 1E4811L, + 1E4812L, + 1E4813L, + 1E4814L, + 1E4815L, + 1E4816L, + 1E4817L, + 1E4818L, + 1E4819L, + 1E4820L, + 1E4821L, + 1E4822L, + 1E4823L, + 1E4824L, + 1E4825L, + 1E4826L, + 1E4827L, + 1E4828L, + 1E4829L, + 1E4830L, + 1E4831L, + 1E4832L, + 1E4833L, + 1E4834L, + 1E4835L, + 1E4836L, + 1E4837L, + 1E4838L, + 1E4839L, + 1E4840L, + 1E4841L, + 1E4842L, + 1E4843L, + 1E4844L, + 1E4845L, + 1E4846L, + 1E4847L, + 1E4848L, + 1E4849L, + 1E4850L, + 1E4851L, + 1E4852L, + 1E4853L, + 1E4854L, + 1E4855L, + 1E4856L, + 1E4857L, + 1E4858L, + 1E4859L, + 1E4860L, + 1E4861L, + 1E4862L, + 1E4863L, + 1E4864L, + 1E4865L, + 1E4866L, + 1E4867L, + 1E4868L, + 1E4869L, + 1E4870L, + 1E4871L, + 1E4872L, + 1E4873L, + 1E4874L, + 1E4875L, + 1E4876L, + 1E4877L, + 1E4878L, + 1E4879L, + 1E4880L, + 1E4881L, + 1E4882L, + 1E4883L, + 1E4884L, + 1E4885L, + 1E4886L, + 1E4887L, + 1E4888L, + 1E4889L, + 1E4890L, + 1E4891L, + 1E4892L, + 1E4893L, + 1E4894L, + 1E4895L, + 1E4896L, + 1E4897L, + 1E4898L, + 1E4899L, + 1E4900L, + 1E4901L, + 1E4902L, + 1E4903L, + 1E4904L, + 1E4905L, + 1E4906L, + 1E4907L, + 1E4908L, + 1E4909L, + 1E4910L, + 1E4911L, + 1E4912L, + 1E4913L, + 1E4914L, + 1E4915L, + 1E4916L, + 1E4917L, + 1E4918L, + 1E4919L, + 1E4920L, + 1E4921L, + 1E4922L, + 1E4923L, + 1E4924L, + 1E4925L, + 1E4926L, + 1E4927L, + 1E4928L, + 1E4929L, + 1E4930L, + 1E4931L, + 1E4932L, +}; + +Sftab_t _Sftable = +{ + { 1E1L, 1E2L, 1E4L, 1E8L, 1E16L, 1E32L }, + { 1E-1L, 1E-2L, 1E-4L, 1E-8L, 1E-16L, 1E-32L }, + { '0','0', '0','1', '0','2', '0','3', '0','4', + '0','5', '0','6', '0','7', '0','8', '0','9', + '1','0', '1','1', '1','2', '1','3', '1','4', + '1','5', '1','6', '1','7', '1','8', '1','9', + '2','0', '2','1', '2','2', '2','3', '2','4', + '2','5', '2','6', '2','7', '2','8', '2','9', + '3','0', '3','1', '3','2', '3','3', '3','4', + '3','5', '3','6', '3','7', '3','8', '3','9', + '4','0', '4','1', '4','2', '4','3', '4','4', + '4','5', '4','6', '4','7', '4','8', '4','9', + '5','0', '5','1', '5','2', '5','3', '5','4', + '5','5', '5','6', '5','7', '5','8', '5','9', + '6','0', '6','1', '6','2', '6','3', '6','4', + '6','5', '6','6', '6','7', '6','8', '6','9', + '7','0', '7','1', '7','2', '7','3', '7','4', + '7','5', '7','6', '7','7', '7','8', '7','9', + '8','0', '8','1', '8','2', '8','3', '8','4', + '8','5', '8','6', '8','7', '8','8', '8','9', + '9','0', '9','1', '9','2', '9','3', '9','4', + '9','5', '9','6', '9','7', '9','8', '9','9', + }, + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_", + sfcvinit, 0, + sffmtpos, + sffmtint, + (float*)&sf_flt_pow10[0], + (double*)&sf_dbl_pow10[0], + (_ast_fltmax_t*)&sf_ldbl_pow10[0], +}; +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/sfio b/usr/src/cmd/ast/libast/sparc/FEATURE/sfio new file mode 100644 index 0000000000..da0e42b2fa --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/sfio @@ -0,0 +1,15 @@ +/* : : 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 ok */ +#define _hdr_float 1 /* #include ok */ +#define _hdr_floatingpoint 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _hdr_values 1 /* #include ok */ +#define _sys_filio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include 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/cmd/ast/libast/sparc/FEATURE/sig b/usr/src/cmd/ast/libast/sparc/FEATURE/sig new file mode 100644 index 0000000000..03020573f3 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/sig @@ -0,0 +1,138 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 +#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/cmd/ast/libast/sparc/FEATURE/siglist b/usr/src/cmd/ast/libast/sparc/FEATURE/siglist new file mode 100644 index 0000000000..7ac817cdd9 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/siglist @@ -0,0 +1,131 @@ +/* : : 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 ok */ +#define _hdr_string 1 /* #include ok */ +#define _hdr_signal 1 /* #include ok */ +#define _lib_strsignal 1 /* strsignal() in default lib(s) */ +#if defined(SIGHUP) && !defined(HAD_SIGHUP) +0,"HUP",SIGHUP, +#endif +#if defined(SIGINT) && !defined(HAD_SIGINT) +0,"INT",SIGINT, +#endif +#if defined(SIGQUIT) && !defined(HAD_SIGQUIT) +0,"QUIT",SIGQUIT, +#endif +#if defined(SIGILL) && !defined(HAD_SIGILL) +0,"ILL",SIGILL, +#endif +#if defined(SIGTRAP) && !defined(HAD_SIGTRAP) +0,"TRAP",SIGTRAP, +#endif +#if defined(SIGIOT) && !defined(HAD_SIGIOT) +0,"IOT",SIGIOT, +#endif +#if defined(SIGEMT) && !defined(HAD_SIGEMT) +0,"EMT",SIGEMT, +#endif +#if defined(SIGFPE) && !defined(HAD_SIGFPE) +0,"FPE",SIGFPE, +#endif +#if defined(SIGKILL) && !defined(HAD_SIGKILL) +0,"KILL",SIGKILL, +#endif +#if defined(SIGBUS) && !defined(HAD_SIGBUS) +0,"BUS",SIGBUS, +#endif +#if defined(SIGSEGV) && !defined(HAD_SIGSEGV) +0,"SEGV",SIGSEGV, +#endif +#if defined(SIGSYS) && !defined(HAD_SIGSYS) +0,"SYS",SIGSYS, +#endif +#if defined(SIGPIPE) && !defined(HAD_SIGPIPE) +0,"PIPE",SIGPIPE, +#endif +#if defined(SIGALRM) && !defined(HAD_SIGALRM) +0,"ALRM",SIGALRM, +#endif +#if defined(SIGTERM) && !defined(HAD_SIGTERM) +0,"TERM",SIGTERM, +#endif +#if defined(SIGUSR1) && !defined(HAD_SIGUSR1) +0,"USR1",SIGUSR1, +#endif +#if defined(SIGUSR2) && !defined(HAD_SIGUSR2) +0,"USR2",SIGUSR2, +#endif +#if defined(SIGCHLD) && !defined(HAD_SIGCHLD) +0,"CHLD",SIGCHLD, +#endif +#if defined(SIGPWR) && !defined(HAD_SIGPWR) +0,"PWR",SIGPWR, +#endif +#if defined(SIGWINCH) && !defined(HAD_SIGWINCH) +0,"WINCH",SIGWINCH, +#endif +#if defined(SIGURG) && !defined(HAD_SIGURG) +0,"URG",SIGURG, +#endif +#if defined(SIGPOLL) && !defined(HAD_SIGPOLL) +0,"POLL",SIGPOLL, +#endif +#if defined(SIGSTOP) && !defined(HAD_SIGSTOP) +0,"STOP",SIGSTOP, +#endif +#if defined(SIGTSTP) && !defined(HAD_SIGTSTP) +0,"TSTP",SIGTSTP, +#endif +#if defined(SIGCONT) && !defined(HAD_SIGCONT) +0,"CONT",SIGCONT, +#endif +#if defined(SIGTTIN) && !defined(HAD_SIGTTIN) +0,"TTIN",SIGTTIN, +#endif +#if defined(SIGTTOU) && !defined(HAD_SIGTTOU) +0,"TTOU",SIGTTOU, +#endif +#if defined(SIGVTALRM) && !defined(HAD_SIGVTALRM) +0,"VTALRM",SIGVTALRM, +#endif +#if defined(SIGPROF) && !defined(HAD_SIGPROF) +0,"PROF",SIGPROF, +#endif +#if defined(SIGXCPU) && !defined(HAD_SIGXCPU) +0,"XCPU",SIGXCPU, +#endif +#if defined(SIGXFSZ) && !defined(HAD_SIGXFSZ) +0,"XFSZ",SIGXFSZ, +#endif +#if defined(SIGWAITING) && !defined(HAD_SIGWAITING) +0,"WAITING",SIGWAITING, +#endif +#if defined(SIGLWP) && !defined(HAD_SIGLWP) +0,"LWP",SIGLWP, +#endif +#if defined(SIGFREEZE) && !defined(HAD_SIGFREEZE) +0,"FREEZE",SIGFREEZE, +#endif +#if defined(SIGTHAW) && !defined(HAD_SIGTHAW) +0,"THAW",SIGTHAW, +#endif +#if defined(SIGCANCEL) && !defined(HAD_SIGCANCEL) +0,"CANCEL",SIGCANCEL, +#endif +#if defined(SIGLOST) && !defined(HAD_SIGLOST) +0,"LOST",SIGLOST, +#endif +#if defined(SIGXRES) && !defined(HAD_SIGXRES) +0,"XRES",SIGXRES, +#endif +#if defined(SIGJVM1) && !defined(HAD_SIGJVM1) +0,"JVM1",SIGJVM1, +#endif +#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/cmd/ast/libast/sparc/FEATURE/signal b/usr/src/cmd/ast/libast/sparc/FEATURE/signal new file mode 100644 index 0000000000..43b48f1dda --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/signal @@ -0,0 +1,225 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_signal_ast 1 +#define _sys_types 1 /* #include ok */ + +#define SIG_MAX 73 + +static const char* const sig_name[] = +{ + "0", + "HUP", + "INT", + "QUIT", + "ILL", + "TRAP", + "IOT", + "EMT", + "FPE", + "KILL", + "BUS", + "SEGV", + "SYS", + "PIPE", + "ALRM", + "TERM", + "USR1", + "USR2", + "CHLD", + "PWR", + "WINCH", + "URG", + "IO", + "STOP", + "TSTP", + "CONT", + "TTIN", + "TTOU", + "VTALRM", + "PROF", + "XCPU", + "XFSZ", + "WAITING", + "LWP", + "FREEZE", + "THAW", + "CANCEL", + "LOST", + "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", + "RTMAX", + 0 +}; + +static const char* const sig_text[] = +{ + "Signal 0", + "Hangup", + "Interrupt", + "Quit", + "Illegal instruction", + "Trace trap", + "IOT trap", + "EMT trap", + "Floating exception", + "Killed", + "Bus error", + "Memory fault", + "Bad system call", + "Broken pipe", + "Alarm call", + "Terminated", + "User signal 1", + "User signal 2", + "Child status change", + "Power fail", + "Window change", + "Urgent IO", + "IO possible", + "Stopped (signal)", + "Stopped", + "Stopped process continued", + "Stopped (tty input)", + "Stopped (tty output)", + "Virtual timer alarm", + "Profile timer alarm", + "CPU time limit", + "File size limit", + "All threads blocked", + "Thread event", + "CPR freeze", + "CPR thaw", + "Thread Cancellation", + "Resources lost", + "Resource Control Exceeded", + "Reserved for JVM 1", + "Reserved for JVM 2", + "Information Request", + "Realtime priority 0 (lo)", + "Realtime priority 1", + "Realtime priority 2", + "Realtime priority 3", + "Realtime priority 4", + "Realtime priority 5", + "Realtime priority 6", + "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 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 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/cmd/ast/libast/sparc/FEATURE/stdio b/usr/src/cmd/ast/libast/sparc/FEATURE/stdio new file mode 100644 index 0000000000..0694a40264 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/stdio @@ -0,0 +1,587 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 + +#include + +#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/cmd/ast/libast/sparc/FEATURE/sys b/usr/src/cmd/ast/libast/sparc/FEATURE/sys new file mode 100644 index 0000000000..c02852888c --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/sys @@ -0,0 +1,159 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 +#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 +#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 !_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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include 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 ok */ +#define _hdr_wchar 1 /* #include 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 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__ 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)); +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 +#else +#include +#endif +#endif + +#endif 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 ok */ +#define _lib_sysgetcwd 1 /* syscall(SYS_getcwd,buf,len) implemented */ +#include + +#define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b) + +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/time b/usr/src/cmd/ast/libast/sparc/FEATURE/time new file mode 100644 index 0000000000..fba3ba062b --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/time @@ -0,0 +1,83 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */ +#define _lib_usleep 1 /* usleep() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _typ_clock_t 1 /* clock_t is a type */ +#define _typ_time_t 1 /* time_t is a type */ +#include + +#include + +#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK) +#define CLOCKS_PER_SEC CLK_TCK +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/tmlib b/usr/src/cmd/ast/libast/sparc/FEATURE/tmlib new file mode 100644 index 0000000000..6162b62ea8 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/tmlib @@ -0,0 +1,71 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_tmlib_ast 1 +#define _sys_types 1 /* #include ok */ +#define _tzset_environ 1 /* tzset() bypasses user getenv() */ +#define tmlocaltime(p) _tm_localtime(p) + +extern __MANGLE__ struct tm* _tm_localtime __PROTO__((const time_t*)); + +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/tmx b/usr/src/cmd/ast/libast/sparc/FEATURE/tmx new file mode 100644 index 0000000000..6ad4804a4b --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/tmx @@ -0,0 +1,130 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 +#include + +#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/cmd/ast/libast/sparc/FEATURE/tty b/usr/src/cmd/ast/libast/sparc/FEATURE/tty new file mode 100644 index 0000000000..1d39c122ed --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/tty @@ -0,0 +1,134 @@ +/* : : 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 ok */ +#define _hdr_termios 1 /* #include ok */ +#define _hdr_termio 1 /* #include ok */ +#define _hdr_sgtty 1 /* #include ok */ +#define _sys_termios 1 /* #include ok */ +#define _sys_termio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include 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 +#else +# if defined(_sys_termios) && defined(_lib_tcgetattr) +# include +# 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 +# else +# ifdef _sys_termio +# include +# 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 +# endif /* _sys_bsdtty */ +# else +# ifdef _hdr_sgtty +# include +# ifndef LPENDIN +# ifdef _sys_nttyio +# include +# 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 +# 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/cmd/ast/libast/sparc/FEATURE/tv b/usr/src/cmd/ast/libast/sparc/FEATURE/tv new file mode 100644 index 0000000000..0caab4a20a --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/tv @@ -0,0 +1,111 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 + +#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/cmd/ast/libast/sparc/FEATURE/tvlib b/usr/src/cmd/ast/libast/sparc/FEATURE/tvlib new file mode 100644 index 0000000000..3121038298 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/tvlib @@ -0,0 +1,19 @@ +/* : : 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 ok */ +#define _hdr_time 1 /* #include ok */ +#define _lib_clock_settime 1 /* clock_settime() in default lib(s) */ +#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */ +#define _lib_settimeofday 1 /* settimeofday() in default lib(s) */ +#define _lib_stime 1 /* stime() in default lib(s) */ +#define _lib_utimes 1 /* utimes() in default lib(s) */ +#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */ +#define _lib_usleep 1 /* usleep() in default lib(s) */ +#define _sys_stat 1 /* #include ok */ +#define _lib_utimensat 1 /* complete utimensat implementation */ +#define _sys_time 1 /* #include ok */ +#define _lib_clock_gettime 1 /* execute{\ passed */ +#define tmgettimeofday(p) gettimeofday(p,(struct timezone*)0) +#define tmsettimeofday(p) settimeofday(p,(struct timezone*)0) +#endif 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 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/cmd/ast/libast/sparc/FEATURE/vfork b/usr/src/cmd/ast/libast/sparc/FEATURE/vfork new file mode 100644 index 0000000000..b555d25c80 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/vfork @@ -0,0 +1,68 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +extern __MANGLE__ pid_t vfork(void) __attribute__((__returns_twice__)); +#pragma unknown_control_flow(vfork) +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/vmalloc b/usr/src/cmd/ast/libast/sparc/FEATURE/vmalloc new file mode 100644 index 0000000000..0be84333de --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/vmalloc @@ -0,0 +1,36 @@ +/* : : 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 ok */ +#define _lib_atexit 1 /* atexit() in default lib(s) */ +#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */ +#define _lib_memalign 1 /* memalign() in default lib(s) */ +#define _lib_strdup 1 /* strdup() in default lib(s) */ +#define _lib_valloc 1 /* valloc() in default lib(s) */ +#define _hdr_alloca 1 /* #include ok */ +#define _hdr_malloc 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _mem_arena_mallinfo 1 /* arena is a member of struct mallinfo */ +#define _sys_stat 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _typ_ssize_t 1 /* ssize_t is a type */ +#define _mem_sbrk 1 /* brk()/sbrk() work as expected */ +#define _lib_alloca 1 /* alloca exists */ +#define _stk_down 1 /* stack grows downward */ +#include "FEATURE/mmap" +#if _BLD_INSTRUMENT || cray || _UWIN && _BLD_ast +#undef _map_malloc +#define _std_malloc 1 /* defer to standard malloc */ +#endif +#if _mmap_anon +#define _mem_mmap_anon 1 +#endif +#if _mmap_devzero +#define _mem_mmap_zero 1 +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/wait b/usr/src/cmd/ast/libast/sparc/FEATURE/wait new file mode 100644 index 0000000000..36ae8feef1 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/wait @@ -0,0 +1,11 @@ +/* : : 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 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 ok */ +#define _ok_wif 1 /* posix wait macros ok */ +#endif diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/wchar b/usr/src/cmd/ast/libast/sparc/FEATURE/wchar new file mode 100644 index 0000000000..2616f8f168 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/FEATURE/wchar @@ -0,0 +1,198 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 _sys_types 1 /* #include ok */ +#ifndef _AST_WCHAR_H +#define _AST_WCHAR_H 1 + +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _hdr_wchar 1 /* #include 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 ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _typ_mbstate_t 1 /* mbstate_t is a type */ +#define _nxt_wchar <../include/wchar.h> /* include path for the native */ +#define _nxt_wchar_str "../include/wchar.h" /* include string for the native */ +#ifndef _SFSTDIO_H +#include +#include +#endif + +#define _hdr_unistd 1 /* #include ok */ +#include /* includes */ + +#if _hdr_wchar && defined(_nxt_wchar) +#include <../include/wchar.h> /* the native wchar.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__ + +#else + +/* on some systems 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 ok */ +#define _nxt_wctype <../include/wctype.h> /* include path for the native */ +#define _nxt_wctype_str "../include/wctype.h" /* include string for the native */ +#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/cmd/ast/libast/sparc/Makefile b/usr/src/cmd/ast/libast/sparc/Makefile new file mode 100644 index 0000000000..62a462a206 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/Makefile @@ -0,0 +1,42 @@ +# +# 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. +# + +# Platform-specific config +# Note that "HOSTTYPE" matches the value used by AT&T upstream. +ASTPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"' + +# platform-specific sources +OBJECTS= conftab.o lctab.o + +include ../Makefile.com + +# Use big PIC since libast is too big for pic on 64bit +# (and on 32bit it is close to the barrier) +sparc_C_PICFLAGS = $(C_BIGPICFLAGS) + +install: all $(ROOTLIBS) $(ROOTLINKS) 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 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/cmd/ast/libast/sparc/conftab.c b/usr/src/cmd/ast/libast/sparc/conftab.c new file mode 100644 index 0000000000..3fda0c607d --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/conftab.c @@ -0,0 +1,393 @@ +#include "FEATURE/standards" +#include "FEATURE/common" +#include +#include +#include +#if !defined(SYS_NMLEN) +#define SYS_NMLEN 9 +#endif +#include +#include "FEATURE/param" +#include "conftab.h" + +/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */ + +/* + * prefix strings -- the first few are indexed by Conf_t.standard + */ + +const Prefix_t prefix[] = +{ + "C", 1, CONF_C, -1, + "POSIX", 5, CONF_POSIX, -1, + "SVID", 4, CONF_SVID, -1, + "XOPEN", 5, CONF_XOPEN, -1, + "SUN", 3, CONF_SUN, -1, + "XBS5", 4, CONF_XBS5, -1, + "SCO", 3, CONF_SCO, -1, + "AST", 3, CONF_AST, -1, + "AES", 3, CONF_AES, -1, + "XPG", 3, CONF_XPG, -1, + "GNU", 3, CONF_GNU, -1, + "TRUSTEDBSD", 10, CONF_TRUSTEDBSD, -1, + "XX", 2, CONF_POSIX, CONF_nop, + "CS", 2, CONF_POSIX, CONF_confstr, + "PC", 2, CONF_POSIX, CONF_pathconf, + "SC", 2, CONF_POSIX, CONF_sysconf, + "SI", 2, CONF_SVID, CONF_sysinfo, +}; + +const int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]); + +/* + * conf strings sorted in ascending order + */ + +const Conf_t conf[] = +{ +{ "ABI_AIO_XFER_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ABI_ASYNCHRONOUS_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ABI_ASYNC_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ADVISORY_INFO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_ADVISORY_INFO }, +{ "AIO_LISTIO_MAX", { 0ULL, 0 }, { _POSIX_AIO_LISTIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_LISTIO_MAX }, +{ "AIO_MAX", { 0ULL, 0 }, { _POSIX_AIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_MAX }, +{ "AIO_PRIO_DELTA_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_PRIO_DELTA_MAX }, +{ "ALLOC_SIZE_MIN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_ALLOC_SIZE_MIN }, +{ "ARCHITECTURE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_ARCHITECTURE }, +{ "ARG_MAX", { 0ULL, 0 }, { _POSIX_ARG_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_ARG_MAX }, +{ "ASYNCHRONOUS_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_ASYNCHRONOUS_IO }, +{ "ASYNC_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_ASYNC_IO }, +{ "ATEXIT_MAX", { 0ULL, 0 }, { 32ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_XOPEN, 1, CONF_sysconf, _SC_ATEXIT_MAX }, +{ "AUDIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "AVAIL_PROCESSORS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "AVPHYS_PAGES", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SUN, 1, CONF_sysconf, _SC_AVPHYS_PAGES }, +{ "BARRIERS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_BARRIERS }, +{ "BC_BASE_MAX", { 0ULL, 0 }, { _POSIX2_BC_BASE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_BASE_MAX }, +{ "BC_DIM_MAX", { 0ULL, 0 }, { _POSIX2_BC_DIM_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_DIM_MAX }, +{ "BC_SCALE_MAX", { 0ULL, 0 }, { _POSIX2_BC_SCALE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_SCALE_MAX }, +{ "BC_STRING_MAX", { 0ULL, 0 }, { _POSIX2_BC_STRING_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_STRING_MAX }, +{ "BUSTYPES", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "CHARCLASS_NAME_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "CHAR_BIT", { 8ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_MAX", { 127ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_MIN", { -127LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_TERM", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_CHAR_TERM }, +{ "CHILD_MAX", { 0ULL, 0 }, { _POSIX_CHILD_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_CHILD_MAX }, +{ "CHOWN_RESTRICTED", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_CHOWN_RESTRICTED }, +{ "CKPT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "CLK_TCK", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_POSIX, 1, CONF_sysconf, _SC_CLK_TCK }, +{ "CLOCKRES_MIN", { 0ULL, 0 }, { _POSIX_CLOCKRES_MIN, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "CLOCKS_PER_SEC", { 1000000ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_LIMIT|CONF_LIMIT_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CLOCK_SELECTION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_CLOCK_SELECTION }, +{ "COLL_WEIGHTS_MAX", { 0ULL, 0 }, { _POSIX2_COLL_WEIGHTS_MAX, 0 }, CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_COLL_WEIGHTS_MAX }, +{ "CPUTIME", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_CPUTIME }, +{ "CPU_KEYBITS1", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CPU_VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CRYPT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_CRYPT }, +{ "C_BIND", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_BIND }, +{ "C_DEV", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_DEV }, +{ "C_VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_VERSION }, +{ "DATAKEYS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "DELAYTIMER_MAX", { 0ULL, 0 }, { _POSIX_DELAYTIMER_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_DELAYTIMER_MAX }, +{ "ENH_I18N", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_ENH_I18N }, +{ "EQUIV_CLASS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "EXEC_INTERPRETER_LENGTH", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "EXPR_NEST_MAX", { 0ULL, 0 }, { _POSIX2_EXPR_NEST_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_EXPR_NEST_MAX }, +{ "FCHR_MAX", { 0ULL, 0 }, { LONG_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "FILESIZEBITS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_FILESIZEBITS }, +{ "FILE_LOCKING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "FORT_DEV", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_FORT_DEV }, +{ "FORT_RUN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_FORT_RUN }, +{ "FSYNC", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_FSYNC }, +{ "GETGR_R_SIZE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_sysconf, _SC_GETGR_R_SIZE_MAX }, +{ "GETPW_R_SIZE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_sysconf, _SC_GETPW_R_SIZE_MAX }, +{ "HOSTID", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "HOSTNAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_HOSTNAME }, +{ "HOST_NAME_MAX", { 0ULL, 0 }, { _POSIX_HOST_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_HOST_NAME_MAX }, +{ "HW_PROVIDER", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_HW_PROVIDER }, +{ "HW_SERIAL", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ILP32_OFF32", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "ILP32_OFF32_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "ILP32_OFFBIG_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "INITTAB_NAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "INT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "INT_MIN", { -2147483647LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "IOV_MAX", { 0ULL, 0 }, { _XOPEN_IOV_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_XOPEN, 1, CONF_sysconf, _SC_IOV_MAX }, +{ "IO_TYPE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "IPV6", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_IPV6 }, +{ "IP_SECOPTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "JOB_CONTROL", { 0ULL, 0 }, { 1ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_JOB_CONTROL }, +{ "KERNEL_CLIST", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_CLIST_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DISK", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DISK_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DMABUF", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DMABUF_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FILE", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FILE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FLCKREC", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FLCKREC_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_INODE", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_INODE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_MOUNT", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_MOUNT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PINODE", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PINODE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PROC", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PROC_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_REGION", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_REGION_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_S5INODE", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_S5INODE_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_STAMP", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "KERN_POINTERS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "KERN_SIM", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "LEGACY", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "LFS64_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_CFLAGS }, +{ "LFS64_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LDFLAGS }, +{ "LFS64_LIBS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LIBS }, +{ "LFS64_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LINTFLAGS }, +{ "LFS_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_CFLAGS }, +{ "LFS_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LDFLAGS }, +{ "LFS_LIBS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LIBS }, +{ "LFS_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LINTFLAGS }, +{ "LINE_MAX", { 0ULL, 0 }, { _POSIX2_LINE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_LINE_MAX }, +{ "LINK_MAX", { 0ULL, 0 }, { _POSIX_LINK_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_LINK_MAX }, +{ "LLONG_MAX", { 9223372036854775807ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LLONG_MIN", { -9223372036854775807LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LOCALEDEF", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_LOCALEDEF }, +{ "LOGIN_NAME_MAX", { 0ULL, 0 }, { _POSIX_LOGIN_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_LOGIN_NAME_MAX }, +{ "LOGNAME_MAX", { 0ULL, 0 }, { 8ULL, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, _SC_LOGNAME_MAX }, +{ "LONG_BIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "LONG_MAX", { 2147483647ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LONG_MIN", { -2147483647LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LP64_OFF64", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "LP64_OFF64_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "LPBIG_OFFBIG_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "MACHINE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_MACHINE }, +{ "MAPPED_FILES", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MAPPED_FILES }, +{ "MAX_CANON", { 0ULL, 0 }, { _POSIX_MAX_CANON, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_MAX_CANON }, +{ "MAX_INPUT", { 0ULL, 0 }, { _POSIX_MAX_INPUT, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_MAX_INPUT }, +{ "MB_LEN_MAX", { 5ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "MCAS_OFFSET", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MEMLOCK", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMLOCK }, +{ "MEMLOCK_RANGE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMLOCK_RANGE }, +{ "MEMORY_PROTECTION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMORY_PROTECTION }, +{ "MESSAGE_PASSING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MESSAGE_PASSING }, +{ "MMAP_FIXED_ALIGNMENT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MONOTONIC_CLOCK", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MONOTONIC_CLOCK }, +{ "MQ_OPEN_MAX", { 0ULL, 0 }, { _POSIX_MQ_OPEN_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_MQ_OPEN_MAX }, +{ "MQ_PRIO_MAX", { 0ULL, 0 }, { _POSIX_MQ_PRIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_MQ_PRIO_MAX }, +{ "MSEM_LOCKID", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MULTI_PROCESS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "NACLS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "NAME_MAX", { 0ULL, 0 }, { _POSIX_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_NAME_MAX }, +{ "NGROUPS_MAX", { 0ULL, 0 }, { _POSIX_NGROUPS_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_NGROUPS_MAX }, +{ "NL_ARGMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_LANGMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NL_MSGMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_NMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_SETMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_SPECMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NL_TEXTMAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NO_TRUNC", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_NO_TRUNC }, +{ "NPROCESSORS_CONF", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_CONF }, +{ "NPROCESSORS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_MAX }, +{ "NPROCESSORS_ONLN", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_ONLN }, +{ "NPROC_CONF", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NPROC_ONLN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NSS_BUFLEN_GROUP", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NSS_BUFLEN_PASSWD", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NUM_PROCESSORS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NZERO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "OPEN_MAX", { 0ULL, 0 }, { _POSIX_OPEN_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_OPEN_MAX }, +{ "OPEN_MAX_CEIL", { OPEN_MAX, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_AST, 1, CONF_nop, -1 }, +{ "OSREL_MAJ", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OSREL_MIN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OSREL_PATCH", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OS_BASE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "OS_PROVIDER", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "OS_VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE, CONF_AES, 1, CONF_sysconf, -1 }, +{ "PAGESIZE", { 0ULL, 0 }, { 4096ULL, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_PAGESIZE }, +{ "PAGE_SIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_MINMAX|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, _SC_PAGE_SIZE }, +{ "PASS_MAX", { 0ULL, 0 }, { 8ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, _SC_PASS_MAX }, +{ "PATH", { 0, 0 }, { 0, "/bin:/usr/bin" }, CONF_DEFER_CALL|CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_confstr, _CS_PATH }, +{ "PATH_MAX", { 0ULL, 0 }, { _POSIX_PATH_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_PATH_MAX }, +{ "PBS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS }, +{ "PBS_ACCOUNTING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_ACCOUNTING }, +{ "PBS_CHECKPOINT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_CHECKPOINT }, +{ "PBS_LOCATE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_LOCATE }, +{ "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 }, { 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 }, +{ "PII_INTERNET_STREAM", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_CLTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_COTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_M", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_SOCKET", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_XTI", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PIPE_BUF", { 0ULL, 0 }, { _POSIX_PIPE_BUF, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_PIPE_BUF }, +{ "POLL", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PRIORITIZED_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_PRIORITIZED_IO }, +{ "PRIORITY_SCHEDULING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_PRIORITY_SCHEDULING }, +{ "PRIO_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_PRIO_IO }, +{ "PROC_RSRC_MGR", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_DESTRUCTOR_ITERATIONS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_KEYS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_STACK_MIN", { 4096ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_LIMIT|CONF_LIMIT_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_THREADS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTRDIFF_MAX", { 2147483647ULL, 0 }, { 65535ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "PTRDIFF_MIN", { -2147483647LL-1LL, 0 }, { -65535LL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "RAW_SOCKETS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_RAW_SOCKETS }, +{ "READER_WRITER_LOCKS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_READER_WRITER_LOCKS }, +{ "REALTIME", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "REALTIME_SIGNALS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_REALTIME_SIGNALS }, +{ "REALTIME_THREADS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "REC_INCR_XFER_SIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_INCR_XFER_SIZE }, +{ "REC_MAX_XFER_SIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_MAX_XFER_SIZE }, +{ "REC_MIN_XFER_SIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_MIN_XFER_SIZE }, +{ "REC_XFER_ALIGN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_XFER_ALIGN }, +{ "REENTRANT_FUNCTIONS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "REGEXP", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_REGEXP }, +{ "REGEX_VERSION", { 0ULL, 0 }, { 20030916ULL, 0 }, CONF_FEATURE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "RELEASE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_AST, 1, CONF_nop, -1 }, +{ "RESOURCE_LIMITS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "RE_DUP_MAX", { 0ULL, 0 }, { _POSIX2_RE_DUP_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_RE_DUP_MAX }, +{ "RTSIG_MAX", { 0ULL, 0 }, { _POSIX_RTSIG_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_RTSIG_MAX }, +{ "SAVED_IDS", { 0ULL, 0 }, { 1ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SAVED_IDS }, +{ "SCHAR_MAX", { 127ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SCHAR_MIN", { -127LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SECURITY_CLASS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SELECT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "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 }, +{ "SHM", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_SHM }, +{ "SHRT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "SHRT_MIN", { -32767LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIGQUEUE_MAX", { 0ULL, 0 }, { _POSIX_SIGQUEUE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SIGQUEUE_MAX }, +{ "SIGRT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_SIGRT_MAX }, +{ "SIGRT_MIN", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_SIGRT_MIN }, +{ "SIG_ATOMIC_MAX", { 2147483647ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIG_ATOMIC_MIN", { -2147483647LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIZE_MAX", { UINT_MAX, 0 }, { 65535ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SLVM_MAXNODES", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SOCK_MAXBUF", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SOFTPOWER", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SPAWN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPAWN }, +{ "SPIN_LOCKS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPIN_LOCKS }, +{ "SPORADIC_SERVER", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPORADIC_SERVER }, +{ "SRPC_DOMAIN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SSIZE_MAX", { INT_MAX, 0 }, { _POSIX_SSIZE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SS_REPL_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SS_REPL_MAX }, +{ "STD_BLK", { 0ULL, 0 }, { 1024ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "STREAMS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_STREAMS }, +{ "STREAM_MAX", { 0ULL, 0 }, { _POSIX_STREAM_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_STREAM_MAX }, +{ "SW_DEV", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_SW_DEV }, +{ "SYMLINKS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_pathconf, _PC_2_SYMLINKS }, +{ "SYMLINK_MAX", { 0ULL, 0 }, { _POSIX_SYMLINK_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_SYMLINK_MAX }, +{ "SYMLOOP_MAX", { 0ULL, 0 }, { _POSIX_SYMLOOP_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SYMLOOP_MAX }, +{ "SYNCHRONIZED_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SYNCHRONIZED_IO }, +{ "SYNC_IO", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_SYNC_IO }, +{ "SYSNAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_SYSNAME }, +{ "SYSPID_MAX", { 0ULL, 0 }, { 2ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "THREADS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREADS }, +{ "THREADS_PRIO_CEILING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "THREADS_PRIO_INHERIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "THREAD_ATTR_STACKADDR", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_ATTR_STACKADDR }, +{ "THREAD_ATTR_STACKSIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_ATTR_STACKSIZE }, +{ "THREAD_CPUTIME", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_CPUTIME }, +{ "THREAD_DESTRUCTOR_ITERATIONS", { 0ULL, 0 }, { _POSIX_THREAD_DESTRUCTOR_ITERATIONS, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_DESTRUCTOR_ITERATIONS }, +{ "THREAD_KEYS_MAX", { 0ULL, 0 }, { _POSIX_THREAD_KEYS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_KEYS_MAX }, +{ "THREAD_PRIORITY_SCHEDULING", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIORITY_SCHEDULING }, +{ "THREAD_PRIO_INHERIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIO_INHERIT }, +{ "THREAD_PRIO_PROTECT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIO_PROTECT }, +{ "THREAD_PROCESS_SHARED", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PROCESS_SHARED }, +{ "THREAD_SAFE_FUNCTIONS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_SAFE_FUNCTIONS }, +{ "THREAD_SPORADIC_SERVER", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_SPORADIC_SERVER }, +{ "THREAD_STACK_MIN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_STACK_MIN }, +{ "THREAD_THREADS_MAX", { 0ULL, 0 }, { _POSIX_THREAD_THREADS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_THREADS_MAX }, +{ "TIMEOUTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TIMEOUTS }, +{ "TIMERS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TIMERS }, +{ "TIMER_MAX", { 0ULL, 0 }, { _POSIX_TIMER_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TIMER_MAX }, +{ "TMP", { 0, 0 }, { 0, "/tmp" }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_AST, 1, CONF_confstr, -1 }, +{ "TMP_MAX", { 17576ULL, 0 }, { 10000ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_sysconf, -1 }, +{ "TRACE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE }, +{ "TRACE_EVENT_FILTER", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_EVENT_FILTER }, +{ "TRACE_EVENT_NAME_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_EVENT_NAME_MAX }, +{ "TRACE_INHERIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_INHERIT }, +{ "TRACE_LOG", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_LOG }, +{ "TRACE_NAME_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_NAME_MAX }, +{ "TRACE_SYS_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_SYS_MAX }, +{ "TRACE_USER_EVENT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_USER_EVENT_MAX }, +{ "TTY_NAME_MAX", { 0ULL, 0 }, { _POSIX_TTY_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TTY_NAME_MAX }, +{ "TYPED_MEMORY_OBJECTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TYPED_MEMORY_OBJECTS }, +{ "TZNAME_MAX", { 0ULL, 0 }, { _POSIX_TZNAME_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TZNAME_MAX }, +{ "T_IOV_MAX", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_C, 1, CONF_sysconf, _SC_T_IOV_MAX }, +{ "UCHAR_MAX", { 255ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "UCHAR_MIN", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "UID_MAX", { 0ULL, 0 }, { 60002ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "UINT_MAX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "UIO_MAXIOV", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ULLONG_MAX", { 18446744073709551615ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "ULONG_MAX", { 4294967295ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "UNIX", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_UNIX }, +{ "UPE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_UPE }, +{ "USER_LIMIT", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "USHRT_MAX", { 65535ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "V6_ILP32_OFF32", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_ILP32_OFF32 }, +{ "V6_ILP32_OFFBIG", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_ILP32_OFFBIG }, +{ "V6_LP64_OFF64", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_LP64_OFF64 }, +{ "V6_LPBIG_OFFBIG", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_LPBIG_OFFBIG }, +{ "VDISABLE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_VDISABLE }, +{ "VERSION", { 0, 0 }, { 0, 0 }, CONF_PREFIXED|CONF_STANDARD|CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "VERSION", { 0ULL, 0 }, { 200112ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION", { 0ULL, 0 }, { 200112ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, -1 }, +{ "VERSION", { 0ULL, 0 }, { 600ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_VERSION }, +{ "VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XPG, 3, CONF_sysconf, -1 }, +{ "VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XPG, 4, CONF_sysconf, -1 }, +{ "VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_MINMAX|CONF_PREFIXED|CONF_STANDARD, CONF_AST, 1, CONF_nop, -1 }, +{ "VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIXED|CONF_STANDARD, CONF_GNU, 1, CONF_nop, -1 }, +{ "VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_PREFIXED|CONF_STANDARD, CONF_TRUSTEDBSD, 1, CONF_nop, -1 }, +{ "VERSION_88", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_88", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "VERSION_90", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_90", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "VERSION_93", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_93", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "WCHAR_MAX", { 2147483647ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WCHAR_MIN", { -2147483647LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WINT_MAX", { 2147483647ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WINT_MIN", { -2147483647LL-1LL, 0 }, { 0ULL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WORD_BIT", { 0ULL, 0 }, { 0ULL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XCU_VERSION", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_XCU_VERSION }, +{ "XPG2", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XPG3", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XPG4", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +}; + +const int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]); diff --git a/usr/src/cmd/ast/libast/sparc/conftab.h b/usr/src/cmd/ast/libast/sparc/conftab.h new file mode 100644 index 0000000000..a15714e8cb --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/conftab.h @@ -0,0 +1,94 @@ +#ifndef _CONFTAB_H +#define _CONFTAB_H + +#if !defined(SYS_NMLEN) +#define SYS_NMLEN 9 +#endif +#include + +/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */ + +#if !defined(const) && !defined(__STDC__) && !defined(__cplusplus) && !defined(c_plusplus) +#define const +#endif + +#define conf _ast_conf_data +#define conf_elements _ast_conf_ndata + +#define prefix _ast_conf_prefix +#define prefix_elements _ast_conf_nprefix + +#define CONF_nop 0 +#define CONF_confstr 1 +#define CONF_pathconf 2 +#define CONF_sysconf 3 +#define CONF_sysinfo 4 + +#define CONF_C 0 +#define CONF_POSIX 1 +#define CONF_SVID 2 +#define CONF_XOPEN 3 +#define CONF_SUN 4 +#define CONF_XBS5 5 +#define CONF_SCO 6 +#define CONF_AST 7 +#define CONF_AES 8 +#define CONF_XPG 9 +#define CONF_GNU 10 +#define CONF_TRUSTEDBSD 11 +#define CONF_call 12 + +#define _pth_getconf "/usr/bin/getconf" +#define _pth_getconf_a "-a" + +#define CONF_DEFER_CALL 0x0001 +#define CONF_DEFER_MM 0x0002 +#define CONF_FEATURE 0x0004 +#define CONF_LIMIT 0x0008 +#define CONF_LIMIT_DEF 0x0010 +#define CONF_MINMAX 0x0020 +#define CONF_MINMAX_DEF 0x0040 +#define CONF_NOSECTION 0x0080 +#define CONF_NOUNDERSCORE 0x0100 +#define CONF_PREFIX_ONLY 0x0200 +#define CONF_PREFIXED 0x0400 +#define CONF_STANDARD 0x0800 +#define CONF_STRING 0x1000 +#define CONF_UNDERSCORE 0x2000 +#define CONF_USER 0x4000 + +struct Conf_s; typedef struct Conf_s Conf_t; + +typedef struct Value_s +{ + intmax_t number; + const char* string; +} Value_t; + +struct Conf_s +{ + const char name[32]; + Value_t limit; + Value_t minmax; + unsigned int flags; + short standard; + short section; + short call; + short op; +}; + +typedef struct Prefix_s +{ + const char name[16]; + short length; + short standard; + short call; +} Prefix_t; + +extern const Conf_t conf[]; +extern const int conf_elements; + +extern const Prefix_t prefix[]; +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 + +#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/cmd/ast/libast/sparc/lctab.c b/usr/src/cmd/ast/libast/sparc/lctab.c new file mode 100644 index 0000000000..2afc20e2b5 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparc/lctab.c @@ -0,0 +1,2635 @@ +/* : : generated by cmd/ast/tools/lcgen : : */ + +#include "lclib.h" +#include "lclang.h" + + +const Lc_attribute_t attribute_es[] = +{ +{"traditional",LC_default, +#ifdef SUBLANG_SPANISH_TRADITIONAL +SUBLANG_SPANISH_TRADITIONAL, +#else +0, +#endif + +}, +{"modern",0, +#ifdef SUBLANG_SPANISH_MODERN +SUBLANG_SPANISH_MODERN, +#else +0, +#endif + +}, +}; + +const Lc_charset_t lc_charsets[] = +{ +{"iso8859-1","latin1|west-europe","1252",}, +{"iso8859-2","latin2|east-europe","1250",}, +{"iso8859-3","latin3|south-europe","1257",}, +{"iso8859-4","latin4|north-europe",0}, +{"iso8859-5","cyrillic","1251",}, +{"iso8859-6","arabic","1256",}, +{"iso8859-7","greek","1253",}, +{"iso8859-8","hebrew","1255",}, +{"iso8859-9","latin5|turkish","1254",}, +{"iso8859-10","latin6|nordic",0}, +{"iso8859-13","latin7",0}, +{"iso8859-14","latin8|celtic",0}, +{"iso8859-15","latin0",0}, +{"iso2022","japanese|korean",0}, +{"iso4873","japanese-ascii|korean-ascii",0}, +{"koi8-r","russian",0}, +{"utf8","plan9",0}, + 0 +}; + +const Lc_language_t lc_languages[] = +{ +{"C","C","POSIX",&lc_charsets[0],LC_default,0,0,0,}, +{"debug","debug",0,&lc_charsets[0],LC_debug,0,0,0,}, +{"aa","afar",0,&lc_charsets[0],0, +#ifdef LANG_AFAR +LANG_AFAR, +#else +0, +#endif +0,0, +}, +{"ab","abkhazian",0,&lc_charsets[0],0, +#ifdef LANG_ABKHAZIAN +LANG_ABKHAZIAN, +#else +0, +#endif +0,0, +}, +{"af","afrikaans","afr",&lc_charsets[0],0, +#ifdef LANG_AFRIKAANS +LANG_AFRIKAANS, +#else +0, +#endif +0,0, +}, +{"am","amharic",0,&lc_charsets[0],0, +#ifdef LANG_AMHARIC +LANG_AMHARIC, +#else +0, +#endif +0,0, +}, +{"ar","arabic","ara",&lc_charsets[5],0, +#ifdef LANG_ARABIC +LANG_ARABIC, +#else +0, +#endif +0,0, +}, +{"as","assamese",0,&lc_charsets[0],0, +#ifdef LANG_ASSAMESE +LANG_ASSAMESE, +#else +0, +#endif +0,0, +}, +{"ay","aymara",0,&lc_charsets[0],0, +#ifdef LANG_AYMARA +LANG_AYMARA, +#else +0, +#endif +0,0, +}, +{"az","azerbaijani",0,&lc_charsets[0],0, +#ifdef LANG_AZERBAIJANI +LANG_AZERBAIJANI, +#else +0, +#endif +0,0, +}, +{"ba","bashkir",0,&lc_charsets[0],0, +#ifdef LANG_BASHKIR +LANG_BASHKIR, +#else +0, +#endif +0,0, +}, +{"be","belarusian","bel",&lc_charsets[0],0, +#ifdef LANG_BELARUSIAN +LANG_BELARUSIAN, +#else +0, +#endif +0,0, +}, +{"bg","bulgarian","bul",&lc_charsets[4],0, +#ifdef LANG_BULGARIAN +LANG_BULGARIAN, +#else +0, +#endif +0,0, +}, +{"bh","bihari",0,&lc_charsets[0],0, +#ifdef LANG_BIHARI +LANG_BIHARI, +#else +0, +#endif +0,0, +}, +{"bi","bislama",0,&lc_charsets[0],0, +#ifdef LANG_BISLAMA +LANG_BISLAMA, +#else +0, +#endif +0,0, +}, +{"bn","bengali-bangla",0,&lc_charsets[0],0, +#ifdef LANG_BENGALI_BANGLA +LANG_BENGALI_BANGLA, +#else +0, +#endif +0,0, +}, +{"bo","tibetan",0,&lc_charsets[0],0, +#ifdef LANG_TIBETAN +LANG_TIBETAN, +#else +0, +#endif +0,0, +}, +{"br","breton",0,&lc_charsets[0],0, +#ifdef LANG_BRETON +LANG_BRETON, +#else +0, +#endif +0,0, +}, +{"ca","catalan","cat",&lc_charsets[0],0, +#ifdef LANG_CATALAN +LANG_CATALAN, +#else +0, +#endif +0,0, +}, +{"co","corsican",0,&lc_charsets[0],0, +#ifdef LANG_CORSICAN +LANG_CORSICAN, +#else +0, +#endif +0,0, +}, +{"cs","czech","ces|cze",&lc_charsets[1],0, +#ifdef LANG_CZECH +LANG_CZECH, +#else +0, +#endif +0,0, +}, +{"cy","welsh",0,&lc_charsets[0],0, +#ifdef LANG_WELSH +LANG_WELSH, +#else +0, +#endif +0,0, +}, +{"da","danish","dan",&lc_charsets[0],0, +#ifdef LANG_DANISH +LANG_DANISH, +#else +0, +#endif +0,0, +}, +{"de","german","deu|ger",&lc_charsets[0],0, +#ifdef LANG_GERMAN +LANG_GERMAN, +#else +0, +#endif +0,0, +}, +{"dz","bhutani",0,&lc_charsets[0],0, +#ifdef LANG_BHUTANI +LANG_BHUTANI, +#else +0, +#endif +0,0, +}, +{"el","greek","ell|gre",&lc_charsets[6],0, +#ifdef LANG_GREEK +LANG_GREEK, +#else +0, +#endif +0,0, +}, +{"en","english","eng",&lc_charsets[0],0, +#ifdef LANG_ENGLISH +LANG_ENGLISH, +#else +0, +#endif +0,0, +}, +{"eo","esperanto",0,&lc_charsets[0],0, +#ifdef LANG_ESPERANTO +LANG_ESPERANTO, +#else +0, +#endif +0,0, +}, +{"es","spanish","spa",&lc_charsets[0],0, +#ifdef LANG_SPANISH +LANG_SPANISH, +#else +0, +#endif +&attribute_es[0],&attribute_es[1], +}, +{"et","estonian","est",&lc_charsets[2],0, +#ifdef LANG_ESTONIAN +LANG_ESTONIAN, +#else +0, +#endif +0,0, +}, +{"eu","basque","eus|baq",&lc_charsets[0],0, +#ifdef LANG_BASQUE +LANG_BASQUE, +#else +0, +#endif +0,0, +}, +{"fa","persian",0,&lc_charsets[0],0, +#ifdef LANG_PERSIAN +LANG_PERSIAN, +#else +0, +#endif +0,0, +}, +{"fi","finnish","fin",&lc_charsets[0],0, +#ifdef LANG_FINNISH +LANG_FINNISH, +#else +0, +#endif +0,0, +}, +{"fj","fiji",0,&lc_charsets[0],0, +#ifdef LANG_FIJI +LANG_FIJI, +#else +0, +#endif +0,0, +}, +{"fo","faeroese",0,&lc_charsets[0],0, +#ifdef LANG_FAEROESE +LANG_FAEROESE, +#else +0, +#endif +0,0, +}, +{"fr","french","fra|fre",&lc_charsets[0],0, +#ifdef LANG_FRENCH +LANG_FRENCH, +#else +0, +#endif +0,0, +}, +{"fy","frisian",0,&lc_charsets[0],0, +#ifdef LANG_FRISIAN +LANG_FRISIAN, +#else +0, +#endif +0,0, +}, +{"ga","irish",0,&lc_charsets[11],0, +#ifdef LANG_IRISH +LANG_IRISH, +#else +0, +#endif +0,0, +}, +{"gd","scots-gaelic",0,&lc_charsets[11],0, +#ifdef LANG_SCOTS_GAELIC +LANG_SCOTS_GAELIC, +#else +0, +#endif +0,0, +}, +{"gl","galician",0,&lc_charsets[0],0, +#ifdef LANG_GALICIAN +LANG_GALICIAN, +#else +0, +#endif +0,0, +}, +{"gn","guarani",0,&lc_charsets[0],0, +#ifdef LANG_GUARANI +LANG_GUARANI, +#else +0, +#endif +0,0, +}, +{"gu","gujarati",0,&lc_charsets[0],0, +#ifdef LANG_GUJARATI +LANG_GUJARATI, +#else +0, +#endif +0,0, +}, +{"ha","hausa",0,&lc_charsets[0],0, +#ifdef LANG_HAUSA +LANG_HAUSA, +#else +0, +#endif +0,0, +}, +{"he","hebrew","heb",&lc_charsets[7],0, +#ifdef LANG_HEBREW +LANG_HEBREW, +#else +0, +#endif +0,0, +}, +{"hi","hindi",0,&lc_charsets[0],0, +#ifdef LANG_HINDI +LANG_HINDI, +#else +0, +#endif +0,0, +}, +{"hr","croatian","hrv|scr",&lc_charsets[1],0, +#ifdef LANG_CROATIAN +LANG_CROATIAN, +#else +0, +#endif +0,0, +}, +{"hu","hungarian","hun",&lc_charsets[1],0, +#ifdef LANG_HUNGARIAN +LANG_HUNGARIAN, +#else +0, +#endif +0,0, +}, +{"hy","armenian",0,&lc_charsets[0],0, +#ifdef LANG_ARMENIAN +LANG_ARMENIAN, +#else +0, +#endif +0,0, +}, +{"ia","interlingua",0,&lc_charsets[0],0, +#ifdef LANG_INTERLINGUA +LANG_INTERLINGUA, +#else +0, +#endif +0,0, +}, +{"id","indonesian","ind",&lc_charsets[0],0, +#ifdef LANG_INDONESIAN +LANG_INDONESIAN, +#else +0, +#endif +0,0, +}, +{"ie","interlingue",0,&lc_charsets[0],0, +#ifdef LANG_INTERLINGUE +LANG_INTERLINGUE, +#else +0, +#endif +0,0, +}, +{"ik","inupiak",0,&lc_charsets[0],0, +#ifdef LANG_INUPIAK +LANG_INUPIAK, +#else +0, +#endif +0,0, +}, +{"in","indonesian",0,&lc_charsets[0],0, +#ifdef LANG_INDONESIAN +LANG_INDONESIAN, +#else +0, +#endif +0,0, +}, +{"is","icelandic","isl|ice",&lc_charsets[0],0, +#ifdef LANG_ICELANDIC +LANG_ICELANDIC, +#else +0, +#endif +0,0, +}, +{"it","italian","ita",&lc_charsets[0],0, +#ifdef LANG_ITALIAN +LANG_ITALIAN, +#else +0, +#endif +0,0, +}, +{"iw","hebrew",0,&lc_charsets[0],0, +#ifdef LANG_HEBREW +LANG_HEBREW, +#else +0, +#endif +0,0, +}, +{"ja","japanese","jpn",&lc_charsets[0],0, +#ifdef LANG_JAPANESE +LANG_JAPANESE, +#else +0, +#endif +0,0, +}, +{"ji","yiddish",0,&lc_charsets[0],0, +#ifdef LANG_YIDDISH +LANG_YIDDISH, +#else +0, +#endif +0,0, +}, +{"jw","javanese",0,&lc_charsets[0],0, +#ifdef LANG_JAVANESE +LANG_JAVANESE, +#else +0, +#endif +0,0, +}, +{"ka","georgian",0,&lc_charsets[0],0, +#ifdef LANG_GEORGIAN +LANG_GEORGIAN, +#else +0, +#endif +0,0, +}, +{"kk","kazakh","kaz",&lc_charsets[0],0, +#ifdef LANG_KAZAKH +LANG_KAZAKH, +#else +0, +#endif +0,0, +}, +{"kl","greenlandic",0,&lc_charsets[0],0, +#ifdef LANG_GREENLANDIC +LANG_GREENLANDIC, +#else +0, +#endif +0,0, +}, +{"km","cambodian",0,&lc_charsets[0],0, +#ifdef LANG_CAMBODIAN +LANG_CAMBODIAN, +#else +0, +#endif +0,0, +}, +{"kn","kannada",0,&lc_charsets[0],0, +#ifdef LANG_KANNADA +LANG_KANNADA, +#else +0, +#endif +0,0, +}, +{"ko","korean","kor",&lc_charsets[0],0, +#ifdef LANG_KOREAN +LANG_KOREAN, +#else +0, +#endif +0,0, +}, +{"ks","kashmiri",0,&lc_charsets[0],0, +#ifdef LANG_KASHMIRI +LANG_KASHMIRI, +#else +0, +#endif +0,0, +}, +{"ku","kurdish",0,&lc_charsets[0],0, +#ifdef LANG_KURDISH +LANG_KURDISH, +#else +0, +#endif +0,0, +}, +{"ky","kirghiz",0,&lc_charsets[0],0, +#ifdef LANG_KIRGHIZ +LANG_KIRGHIZ, +#else +0, +#endif +0,0, +}, +{"la","latin",0,&lc_charsets[0],0, +#ifdef LANG_LATIN +LANG_LATIN, +#else +0, +#endif +0,0, +}, +{"ln","lingala",0,&lc_charsets[0],0, +#ifdef LANG_LINGALA +LANG_LINGALA, +#else +0, +#endif +0,0, +}, +{"lo","laothian",0,&lc_charsets[0],0, +#ifdef LANG_LAOTHIAN +LANG_LAOTHIAN, +#else +0, +#endif +0,0, +}, +{"lt","lithuanian","lit",&lc_charsets[10],0, +#ifdef LANG_LITHUANIAN +LANG_LITHUANIAN, +#else +0, +#endif +0,0, +}, +{"lv","latvian","lav",&lc_charsets[10],0, +#ifdef LANG_LATVIAN +LANG_LATVIAN, +#else +0, +#endif +0,0, +}, +{"mg","malagasy",0,&lc_charsets[0],0, +#ifdef LANG_MALAGASY +LANG_MALAGASY, +#else +0, +#endif +0,0, +}, +{"mi","maori",0,&lc_charsets[0],0, +#ifdef LANG_MAORI +LANG_MAORI, +#else +0, +#endif +0,0, +}, +{"mk","macedonian","mkd|mac",&lc_charsets[0],0, +#ifdef LANG_MACEDONIAN +LANG_MACEDONIAN, +#else +0, +#endif +0,0, +}, +{"ml","malayalam","mal",&lc_charsets[0],0, +#ifdef LANG_MALAYALAM +LANG_MALAYALAM, +#else +0, +#endif +0,0, +}, +{"mn","mongolian",0,&lc_charsets[0],0, +#ifdef LANG_MONGOLIAN +LANG_MONGOLIAN, +#else +0, +#endif +0,0, +}, +{"mo","moldavian",0,&lc_charsets[0],0, +#ifdef LANG_MOLDAVIAN +LANG_MOLDAVIAN, +#else +0, +#endif +0,0, +}, +{"mr","marathi",0,&lc_charsets[0],0, +#ifdef LANG_MARATHI +LANG_MARATHI, +#else +0, +#endif +0,0, +}, +{"ms","malay","msa|may",&lc_charsets[0],0, +#ifdef LANG_MALAY +LANG_MALAY, +#else +0, +#endif +0,0, +}, +{"mt","maltese",0,&lc_charsets[0],0, +#ifdef LANG_MALTESE +LANG_MALTESE, +#else +0, +#endif +0,0, +}, +{"my","burmese",0,&lc_charsets[0],0, +#ifdef LANG_BURMESE +LANG_BURMESE, +#else +0, +#endif +0,0, +}, +{"na","nauru",0,&lc_charsets[0],0, +#ifdef LANG_NAURU +LANG_NAURU, +#else +0, +#endif +0,0, +}, +{"nb","norwegian-bokmal","nob",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN_BOKMAL +LANG_NORWEGIAN_BOKMAL, +#else +0, +#endif +0,0, +}, +{"ne","nepali",0,&lc_charsets[0],0, +#ifdef LANG_NEPALI +LANG_NEPALI, +#else +0, +#endif +0,0, +}, +{"nl","dutch","nld|dut",&lc_charsets[0],0, +#ifdef LANG_DUTCH +LANG_DUTCH, +#else +0, +#endif +0,0, +}, +{"nn","norwegian-nynorsk","nno|non",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN_NYNORSK +LANG_NORWEGIAN_NYNORSK, +#else +0, +#endif +0,0, +}, +{"no","norwegian","nor",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN +LANG_NORWEGIAN, +#else +0, +#endif +0,0, +}, +{"oc","occitan",0,&lc_charsets[0],0, +#ifdef LANG_OCCITAN +LANG_OCCITAN, +#else +0, +#endif +0,0, +}, +{"om","oromo",0,&lc_charsets[0],0, +#ifdef LANG_OROMO +LANG_OROMO, +#else +0, +#endif +0,0, +}, +{"or","oriya",0,&lc_charsets[0],0, +#ifdef LANG_ORIYA +LANG_ORIYA, +#else +0, +#endif +0,0, +}, +{"pa","punjabi",0,&lc_charsets[0],0, +#ifdef LANG_PUNJABI +LANG_PUNJABI, +#else +0, +#endif +0,0, +}, +{"pl","polish","pol",&lc_charsets[1],0, +#ifdef LANG_POLISH +LANG_POLISH, +#else +0, +#endif +0,0, +}, +{"ps","pushto",0,&lc_charsets[0],0, +#ifdef LANG_PUSHTO +LANG_PUSHTO, +#else +0, +#endif +0,0, +}, +{"pt","portuguese","por",&lc_charsets[0],0, +#ifdef LANG_PORTUGUESE +LANG_PORTUGUESE, +#else +0, +#endif +0,0, +}, +{"qu","quechua",0,&lc_charsets[0],0, +#ifdef LANG_QUECHUA +LANG_QUECHUA, +#else +0, +#endif +0,0, +}, +{"rm","rhaeto-romance",0,&lc_charsets[0],0, +#ifdef LANG_RHAETO_ROMANCE +LANG_RHAETO_ROMANCE, +#else +0, +#endif +0,0, +}, +{"rn","kirundi",0,&lc_charsets[0],0, +#ifdef LANG_KIRUNDI +LANG_KIRUNDI, +#else +0, +#endif +0,0, +}, +{"ro","romanian","ron|rum",&lc_charsets[1],0, +#ifdef LANG_ROMANIAN +LANG_ROMANIAN, +#else +0, +#endif +0,0, +}, +{"ru","russian","rus",&lc_charsets[4],0, +#ifdef LANG_RUSSIAN +LANG_RUSSIAN, +#else +0, +#endif +0,0, +}, +{"rw","kinyarwanda",0,&lc_charsets[0],0, +#ifdef LANG_KINYARWANDA +LANG_KINYARWANDA, +#else +0, +#endif +0,0, +}, +{"sa","sanskrit",0,&lc_charsets[0],0, +#ifdef LANG_SANSKRIT +LANG_SANSKRIT, +#else +0, +#endif +0,0, +}, +{"sd","sindhi",0,&lc_charsets[0],0, +#ifdef LANG_SINDHI +LANG_SINDHI, +#else +0, +#endif +0,0, +}, +{"sg","sangro",0,&lc_charsets[0],0, +#ifdef LANG_SANGRO +LANG_SANGRO, +#else +0, +#endif +0,0, +}, +{"sh","serbo-croatian",0,&lc_charsets[0],0, +#ifdef LANG_SERBO_CROATIAN +LANG_SERBO_CROATIAN, +#else +0, +#endif +0,0, +}, +{"si","singhalese",0,&lc_charsets[0],0, +#ifdef LANG_SINGHALESE +LANG_SINGHALESE, +#else +0, +#endif +0,0, +}, +{"sk","slovak","slk|slo",&lc_charsets[1],0, +#ifdef LANG_SLOVAK +LANG_SLOVAK, +#else +0, +#endif +0,0, +}, +{"sl","slovenian","slv",&lc_charsets[1],0, +#ifdef LANG_SLOVENIAN +LANG_SLOVENIAN, +#else +0, +#endif +0,0, +}, +{"sm","samoan",0,&lc_charsets[0],0, +#ifdef LANG_SAMOAN +LANG_SAMOAN, +#else +0, +#endif +0,0, +}, +{"sn","shona",0,&lc_charsets[0],0, +#ifdef LANG_SHONA +LANG_SHONA, +#else +0, +#endif +0,0, +}, +{"so","somali",0,&lc_charsets[0],0, +#ifdef LANG_SOMALI +LANG_SOMALI, +#else +0, +#endif +0,0, +}, +{"sq","albanian","sqi|alb",&lc_charsets[0],0, +#ifdef LANG_ALBANIAN +LANG_ALBANIAN, +#else +0, +#endif +0,0, +}, +{"sr","serbian","srp",&lc_charsets[1],0, +#ifdef LANG_SERBIAN +LANG_SERBIAN, +#else +0, +#endif +0,0, +}, +{"ss","siswati",0,&lc_charsets[0],0, +#ifdef LANG_SISWATI +LANG_SISWATI, +#else +0, +#endif +0,0, +}, +{"st","sesotho",0,&lc_charsets[0],0, +#ifdef LANG_SESOTHO +LANG_SESOTHO, +#else +0, +#endif +0,0, +}, +{"su","sudanese",0,&lc_charsets[0],0, +#ifdef LANG_SUDANESE +LANG_SUDANESE, +#else +0, +#endif +0,0, +}, +{"sv","swedish","swe",&lc_charsets[0],0, +#ifdef LANG_SWEDISH +LANG_SWEDISH, +#else +0, +#endif +0,0, +}, +{"sw","swahili","swa",&lc_charsets[0],0, +#ifdef LANG_SWAHILI +LANG_SWAHILI, +#else +0, +#endif +0,0, +}, +{"ta","tamil",0,&lc_charsets[0],0, +#ifdef LANG_TAMIL +LANG_TAMIL, +#else +0, +#endif +0,0, +}, +{"te","telugu",0,&lc_charsets[0],0, +#ifdef LANG_TELUGU +LANG_TELUGU, +#else +0, +#endif +0,0, +}, +{"tg","tajik",0,&lc_charsets[0],0, +#ifdef LANG_TAJIK +LANG_TAJIK, +#else +0, +#endif +0,0, +}, +{"th","thai","tha",&lc_charsets[0],0, +#ifdef LANG_THAI +LANG_THAI, +#else +0, +#endif +0,0, +}, +{"ti","tigrinya",0,&lc_charsets[0],0, +#ifdef LANG_TIGRINYA +LANG_TIGRINYA, +#else +0, +#endif +0,0, +}, +{"tk","turkmen",0,&lc_charsets[0],0, +#ifdef LANG_TURKMEN +LANG_TURKMEN, +#else +0, +#endif +0,0, +}, +{"tl","tagalog",0,&lc_charsets[0],0, +#ifdef LANG_TAGALOG +LANG_TAGALOG, +#else +0, +#endif +0,0, +}, +{"tn","setswana",0,&lc_charsets[0],0, +#ifdef LANG_SETSWANA +LANG_SETSWANA, +#else +0, +#endif +0,0, +}, +{"to","tonga",0,&lc_charsets[0],0, +#ifdef LANG_TONGA +LANG_TONGA, +#else +0, +#endif +0,0, +}, +{"tr","turkish","tur",&lc_charsets[8],0, +#ifdef LANG_TURKISH +LANG_TURKISH, +#else +0, +#endif +0,0, +}, +{"ts","tsonga",0,&lc_charsets[0],0, +#ifdef LANG_TSONGA +LANG_TSONGA, +#else +0, +#endif +0,0, +}, +{"tt","tatar","tat",&lc_charsets[0],0, +#ifdef LANG_TATAR +LANG_TATAR, +#else +0, +#endif +0,0, +}, +{"tw","chinese-traditional","cht",&lc_charsets[0],0, +#ifdef LANG_CHINESE_TRADITIONAL +LANG_CHINESE_TRADITIONAL, +#else +0, +#endif +0,0, +}, +{"uk","ukrainian","ukr",&lc_charsets[4],0, +#ifdef LANG_UKRAINIAN +LANG_UKRAINIAN, +#else +0, +#endif +0,0, +}, +{"ur","urdu",0,&lc_charsets[0],0, +#ifdef LANG_URDU +LANG_URDU, +#else +0, +#endif +0,0, +}, +{"uz","uzbek","uzb",&lc_charsets[0],0, +#ifdef LANG_UZBEK +LANG_UZBEK, +#else +0, +#endif +0,0, +}, +{"vi","vietnamese",0,&lc_charsets[0],0, +#ifdef LANG_VIETNAMESE +LANG_VIETNAMESE, +#else +0, +#endif +0,0, +}, +{"vo","volapuk",0,&lc_charsets[0],0, +#ifdef LANG_VOLAPUK +LANG_VOLAPUK, +#else +0, +#endif +0,0, +}, +{"wo","wolof",0,&lc_charsets[0],0, +#ifdef LANG_WOLOF +LANG_WOLOF, +#else +0, +#endif +0,0, +}, +{"xh","xhosa",0,&lc_charsets[0],0, +#ifdef LANG_XHOSA +LANG_XHOSA, +#else +0, +#endif +0,0, +}, +{"yo","yoruba",0,&lc_charsets[0],0, +#ifdef LANG_YORUBA +LANG_YORUBA, +#else +0, +#endif +0,0, +}, +{"zh","chinese-simplified","zho|chi|chs",&lc_charsets[0],0, +#ifdef LANG_CHINESE_SIMPLIFIED +LANG_CHINESE_SIMPLIFIED, +#else +0, +#endif +0,0, +}, +{"zu","zulu",0,&lc_charsets[0],0, +#ifdef LANG_ZULU +LANG_ZULU, +#else +0, +#endif +0,0, +}, + 0 +}; + +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, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"an","netherlands-antilles",0, +#ifdef CTRY_NETHERLANDS_ANTILLES +CTRY_NETHERLANDS_ANTILLES, +#else +0, +#endif +&lc_languages[86],0,0,0, +#ifdef SUBLANG_DUTCH_NETHERLANDS_ANTILLES +SUBLANG_DUTCH_NETHERLANDS_ANTILLES, +#else +0, +#endif +0,0,0, +}, +{"ar","argentina",0, +#ifdef CTRY_ARGENTINA +CTRY_ARGENTINA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_ARGENTINA +SUBLANG_SPANISH_ARGENTINA, +#else +0, +#endif +0,0,0, +}, +{"at","austria",0, +#ifdef CTRY_AUSTRIA +CTRY_AUSTRIA, +#else +0, +#endif +&lc_languages[23],0,0,0, +#ifdef SUBLANG_GERMAN_AUSTRIA +SUBLANG_GERMAN_AUSTRIA, +#else +0, +#endif +0,0,0, +}, +{"au","australia",0, +#ifdef CTRY_AUSTRALIA +CTRY_AUSTRALIA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_AUSTRALIA +SUBLANG_ENGLISH_AUSTRALIA, +#else +0, +#endif +0,0,0, +}, +{"az","azerbaijan",0, +#ifdef CTRY_AZERBAIJAN +CTRY_AZERBAIJAN, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"be","belgium",0, +#ifdef CTRY_BELGIUM +CTRY_BELGIUM, +#else +0, +#endif +&lc_languages[86],&lc_languages[35],&lc_languages[23],0, +#ifdef SUBLANG_DUTCH_BELGIUM +SUBLANG_DUTCH_BELGIUM, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_BELGIUM +SUBLANG_FRENCH_BELGIUM, +#else +0, +#endif + +#ifdef SUBLANG_GERMAN_BELGIUM +SUBLANG_GERMAN_BELGIUM, +#else +0, +#endif +0, +}, +{"bg","bulgaria",0, +#ifdef CTRY_BULGARIA +CTRY_BULGARIA, +#else +0, +#endif +&lc_languages[12],0,0,0, +#ifdef SUBLANG_BULGARIAN_BULGARIA +SUBLANG_BULGARIAN_BULGARIA, +#else +0, +#endif +0,0,0, +}, +{"bn","brunei-darussalam",0, +#ifdef CTRY_BRUNEI_DARUSSALAM +CTRY_BRUNEI_DARUSSALAM, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_BRUNEI_DARUSSALAM +SUBLANG_ARABIC_BRUNEI_DARUSSALAM, +#else +0, +#endif +0,0,0, +}, +{"bo","bolivia",0, +#ifdef CTRY_BOLIVIA +CTRY_BOLIVIA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_BOLIVIA +SUBLANG_SPANISH_BOLIVIA, +#else +0, +#endif +0,0,0, +}, +{"br","brazil",0, +#ifdef CTRY_BRAZIL +CTRY_BRAZIL, +#else +0, +#endif +&lc_languages[95],0,0,0, +#ifdef SUBLANG_PORTUGUESE_BRAZIL +SUBLANG_PORTUGUESE_BRAZIL, +#else +0, +#endif +0,0,0, +}, +{"bw","botswana",0, +#ifdef CTRY_BOTSWANA +CTRY_BOTSWANA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_BOTSWANA +SUBLANG_ENGLISH_BOTSWANA, +#else +0, +#endif +0,0,0, +}, +{"by","belarus",0, +#ifdef CTRY_BELARUS +CTRY_BELARUS, +#else +0, +#endif +&lc_languages[100],0,0,0, +#ifdef SUBLANG_RUSSIAN_BELARUS +SUBLANG_RUSSIAN_BELARUS, +#else +0, +#endif +0,0,0, +}, +{"bz","belize",0, +#ifdef CTRY_BELIZE +CTRY_BELIZE, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_BELIZE +SUBLANG_ENGLISH_BELIZE, +#else +0, +#endif +0,0,0, +}, +{"ca","canada",0, +#ifdef CTRY_CANADA +CTRY_CANADA, +#else +0, +#endif +&lc_languages[26],&lc_languages[35],0,0, +#ifdef SUBLANG_ENGLISH_CANADA +SUBLANG_ENGLISH_CANADA, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_CANADA +SUBLANG_FRENCH_CANADA, +#else +0, +#endif +0,0, +}, +{"ch","switzerland",0, +#ifdef CTRY_SWITZERLAND +CTRY_SWITZERLAND, +#else +0, +#endif +&lc_languages[35],&lc_languages[23],&lc_languages[54],0, +#ifdef SUBLANG_FRENCH_SWITZERLAND +SUBLANG_FRENCH_SWITZERLAND, +#else +0, +#endif + +#ifdef SUBLANG_GERMAN_SWITZERLAND +SUBLANG_GERMAN_SWITZERLAND, +#else +0, +#endif + +#ifdef SUBLANG_ITALIAN_SWITZERLAND +SUBLANG_ITALIAN_SWITZERLAND, +#else +0, +#endif +0, +}, +{"cl","chile",0, +#ifdef CTRY_CHILE +CTRY_CHILE, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_CHILE +SUBLANG_SPANISH_CHILE, +#else +0, +#endif +0,0,0, +}, +{"cn","china",LC_primary, +#ifdef CTRY_CHINA +CTRY_CHINA, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_CHINA +SUBLANG_CHINESE_SIMPLIFIED_CHINA, +#else +0, +#endif +0,0,0, +}, +{"co","colombia",0, +#ifdef CTRY_COLOMBIA +CTRY_COLOMBIA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_COLOMBIA +SUBLANG_SPANISH_COLOMBIA, +#else +0, +#endif +0,0,0, +}, +{"cr","costa-rica",0, +#ifdef CTRY_COSTA_RICA +CTRY_COSTA_RICA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_COSTA_RICA +SUBLANG_SPANISH_COSTA_RICA, +#else +0, +#endif +0,0,0, +}, +{"cz","czech-republic",0, +#ifdef CTRY_CZECH_REPUBLIC +CTRY_CZECH_REPUBLIC, +#else +0, +#endif +&lc_languages[20],0,0,0, +#ifdef SUBLANG_CZECH_CZECH_REPUBLIC +SUBLANG_CZECH_CZECH_REPUBLIC, +#else +0, +#endif +0,0,0, +}, +{"de","germany",0, +#ifdef CTRY_GERMANY +CTRY_GERMANY, +#else +0, +#endif +&lc_languages[23],0,0,0, +#ifdef SUBLANG_GERMAN_GERMANY +SUBLANG_GERMAN_GERMANY, +#else +0, +#endif +0,0,0, +}, +{"dk","denmark",0, +#ifdef CTRY_DENMARK +CTRY_DENMARK, +#else +0, +#endif +&lc_languages[22],&lc_languages[26],0,0, +#ifdef SUBLANG_DANISH_DENMARK +SUBLANG_DANISH_DENMARK, +#else +0, +#endif + +#ifdef SUBLANG_ENGLISH_DENMARK +SUBLANG_ENGLISH_DENMARK, +#else +0, +#endif +0,0, +}, +{"do","dominican-republic",0, +#ifdef CTRY_DOMINICAN_REPUBLIC +CTRY_DOMINICAN_REPUBLIC, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_DOMINICAN_REPUBLIC +SUBLANG_SPANISH_DOMINICAN_REPUBLIC, +#else +0, +#endif +0,0,0, +}, +{"dz","algeria",0, +#ifdef CTRY_ALGERIA +CTRY_ALGERIA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"ec","ecuador",0, +#ifdef CTRY_ECUADOR +CTRY_ECUADOR, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_ECUADOR +SUBLANG_SPANISH_ECUADOR, +#else +0, +#endif +0,0,0, +}, +{"ee","estonia",0, +#ifdef CTRY_ESTONIA +CTRY_ESTONIA, +#else +0, +#endif +&lc_languages[29],0,0,0, +#ifdef SUBLANG_ESTONIAN_ESTONIA +SUBLANG_ESTONIAN_ESTONIA, +#else +0, +#endif +0,0,0, +}, +{"eg","egypt",0, +#ifdef CTRY_EGYPT +CTRY_EGYPT, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_EGYPT +SUBLANG_ARABIC_EGYPT, +#else +0, +#endif +0,0,0, +}, +{"es","spain",0, +#ifdef CTRY_SPAIN +CTRY_SPAIN, +#else +0, +#endif +&lc_languages[28],&lc_languages[18],&lc_languages[30],&lc_languages[39], +#ifdef SUBLANG_SPANISH_SPAIN +SUBLANG_SPANISH_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_CATALAN_SPAIN +SUBLANG_CATALAN_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_BASQUE_SPAIN +SUBLANG_BASQUE_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_GALICIAN_SPAIN +SUBLANG_GALICIAN_SPAIN, +#else +0, +#endif + +}, +{"fi","finland",0, +#ifdef CTRY_FINLAND +CTRY_FINLAND, +#else +0, +#endif +&lc_languages[117],0,0,0, +#ifdef SUBLANG_SWEDISH_FINLAND +SUBLANG_SWEDISH_FINLAND, +#else +0, +#endif +0,0,0, +}, +{"fo","faroe-islands",0, +#ifdef CTRY_FAROE_ISLANDS +CTRY_FAROE_ISLANDS, +#else +0, +#endif +&lc_languages[34],0,0,0, +#ifdef SUBLANG_FAEROESE_FAROE_ISLANDS +SUBLANG_FAEROESE_FAROE_ISLANDS, +#else +0, +#endif +0,0,0, +}, +{"fr","france",0, +#ifdef CTRY_FRANCE +CTRY_FRANCE, +#else +0, +#endif +&lc_languages[35],0,0,0, +#ifdef SUBLANG_FRENCH_FRANCE +SUBLANG_FRENCH_FRANCE, +#else +0, +#endif +0,0,0, +}, +{"gb","united-kingdom|great-britain|england",LC_primary, +#ifdef CTRY_UNITED_KINGDOM +CTRY_UNITED_KINGDOM, +#else +#ifdef CTRY_GREAT_BRITAIN +CTRY_GREAT_BRITAIN, +#else +#ifdef CTRY_ENGLAND +CTRY_ENGLAND, +#else +0, +#endif +#endif +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_KINGDOM +SUBLANG_ENGLISH_UNITED_KINGDOM, +#else +#ifdef SUBLANG_ENGLISH_GREAT_BRITAIN +SUBLANG_ENGLISH_GREAT_BRITAIN, +#else +#ifdef SUBLANG_ENGLISH_ENGLAND +SUBLANG_ENGLISH_ENGLAND, +#else +0, +#endif +#endif +#endif +0,0,0, +}, +{"gl","greenland",0, +#ifdef CTRY_GREENLAND +CTRY_GREENLAND, +#else +0, +#endif +&lc_languages[61],0,0,0, +#ifdef SUBLANG_GREENLANDIC_GREENLAND +SUBLANG_GREENLANDIC_GREENLAND, +#else +0, +#endif +0,0,0, +}, +{"gr","greece",0, +#ifdef CTRY_GREECE +CTRY_GREECE, +#else +0, +#endif +&lc_languages[25],0,0,0, +#ifdef SUBLANG_GREEK_GREECE +SUBLANG_GREEK_GREECE, +#else +0, +#endif +0,0,0, +}, +{"gt","guatemala",0, +#ifdef CTRY_GUATEMALA +CTRY_GUATEMALA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_GUATEMALA +SUBLANG_SPANISH_GUATEMALA, +#else +0, +#endif +0,0,0, +}, +{"hk","hong-kong",0, +#ifdef CTRY_HONG_KONG +CTRY_HONG_KONG, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_HONG_KONG +SUBLANG_CHINESE_SIMPLIFIED_HONG_KONG, +#else +0, +#endif +0,0,0, +}, +{"hn","honduras",0, +#ifdef CTRY_HONDURAS +CTRY_HONDURAS, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_HONDURAS +SUBLANG_SPANISH_HONDURAS, +#else +0, +#endif +0,0,0, +}, +{"hr","croatia",0, +#ifdef CTRY_CROATIA +CTRY_CROATIA, +#else +0, +#endif +&lc_languages[45],0,0,0, +#ifdef SUBLANG_CROATIAN_CROATIA +SUBLANG_CROATIAN_CROATIA, +#else +0, +#endif +0,0,0, +}, +{"hu","hungary",0, +#ifdef CTRY_HUNGARY +CTRY_HUNGARY, +#else +0, +#endif +&lc_languages[46],0,0,0, +#ifdef SUBLANG_HUNGARIAN_HUNGARY +SUBLANG_HUNGARIAN_HUNGARY, +#else +0, +#endif +0,0,0, +}, +{"id","indonesia",0, +#ifdef CTRY_INDONESIA +CTRY_INDONESIA, +#else +0, +#endif +&lc_languages[49],0,0,0, +#ifdef SUBLANG_INDONESIAN_INDONESIA +SUBLANG_INDONESIAN_INDONESIA, +#else +0, +#endif +0,0,0, +}, +{"ie","ireland",0, +#ifdef CTRY_IRELAND +CTRY_IRELAND, +#else +0, +#endif +&lc_languages[26],&lc_languages[37],0,0, +#ifdef SUBLANG_ENGLISH_IRELAND +SUBLANG_ENGLISH_IRELAND, +#else +0, +#endif + +#ifdef SUBLANG_IRISH_IRELAND +SUBLANG_IRISH_IRELAND, +#else +0, +#endif +0,0, +}, +{"il","israel",0, +#ifdef CTRY_ISRAEL +CTRY_ISRAEL, +#else +0, +#endif +&lc_languages[43],0,0,0, +#ifdef SUBLANG_HEBREW_ISRAEL +SUBLANG_HEBREW_ISRAEL, +#else +0, +#endif +0,0,0, +}, +{"iq","iraq",0, +#ifdef CTRY_IRAQ +CTRY_IRAQ, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_IRAQ +SUBLANG_ARABIC_IRAQ, +#else +0, +#endif +0,0,0, +}, +{"is","iceland",0, +#ifdef CTRY_ICELAND +CTRY_ICELAND, +#else +0, +#endif +&lc_languages[53],0,0,0, +#ifdef SUBLANG_ICELANDIC_ICELAND +SUBLANG_ICELANDIC_ICELAND, +#else +0, +#endif +0,0,0, +}, +{"it","italy",0, +#ifdef CTRY_ITALY +CTRY_ITALY, +#else +0, +#endif +&lc_languages[54],0,0,0, +#ifdef SUBLANG_ITALIAN_ITALY +SUBLANG_ITALIAN_ITALY, +#else +0, +#endif +0,0,0, +}, +{"jm","jamaica",0, +#ifdef CTRY_JAMAICA +CTRY_JAMAICA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_JAMAICA +SUBLANG_ENGLISH_JAMAICA, +#else +0, +#endif +0,0,0, +}, +{"jo","jordan",0, +#ifdef CTRY_JORDAN +CTRY_JORDAN, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_JORDAN +SUBLANG_ARABIC_JORDAN, +#else +0, +#endif +0,0,0, +}, +{"jp","japan",0, +#ifdef CTRY_JAPAN +CTRY_JAPAN, +#else +0, +#endif +&lc_languages[56],0,0,0, +#ifdef SUBLANG_JAPANESE_JAPAN +SUBLANG_JAPANESE_JAPAN, +#else +0, +#endif +0,0,0, +}, +{"ke","kenya",0, +#ifdef CTRY_KENYA +CTRY_KENYA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"kr","south-korea",0, +#ifdef CTRY_SOUTH_KOREA +CTRY_SOUTH_KOREA, +#else +0, +#endif +&lc_languages[64],0,0,0, +#ifdef SUBLANG_KOREAN_SOUTH_KOREA +SUBLANG_KOREAN_SOUTH_KOREA, +#else +0, +#endif +0,0,0, +}, +{"kw","kuwait",0, +#ifdef CTRY_KUWAIT +CTRY_KUWAIT, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_KUWAIT +SUBLANG_ARABIC_KUWAIT, +#else +0, +#endif +0,0,0, +}, +{"lb","lebanon",0, +#ifdef CTRY_LEBANON +CTRY_LEBANON, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_LEBANON +SUBLANG_ARABIC_LEBANON, +#else +0, +#endif +0,0,0, +}, +{"li","liechtenstein",0, +#ifdef CTRY_LIECHTENSTEIN +CTRY_LIECHTENSTEIN, +#else +0, +#endif +&lc_languages[23],&lc_languages[35],0,0, +#ifdef SUBLANG_GERMAN_LIECHTENSTEIN +SUBLANG_GERMAN_LIECHTENSTEIN, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_LIECHTENSTEIN +SUBLANG_FRENCH_LIECHTENSTEIN, +#else +0, +#endif +0,0, +}, +{"lt","lithuania",0, +#ifdef CTRY_LITHUANIA +CTRY_LITHUANIA, +#else +0, +#endif +&lc_languages[71],0,0,0, +#ifdef SUBLANG_LITHUANIAN_LITHUANIA +SUBLANG_LITHUANIAN_LITHUANIA, +#else +0, +#endif +0,0,0, +}, +{"lu","luxembourg",0, +#ifdef CTRY_LUXEMBOURG +CTRY_LUXEMBOURG, +#else +0, +#endif +&lc_languages[23],&lc_languages[35],0,0, +#ifdef SUBLANG_GERMAN_LUXEMBOURG +SUBLANG_GERMAN_LUXEMBOURG, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_LUXEMBOURG +SUBLANG_FRENCH_LUXEMBOURG, +#else +0, +#endif +0,0, +}, +{"lv","latvia",0, +#ifdef CTRY_LATVIA +CTRY_LATVIA, +#else +0, +#endif +&lc_languages[72],0,0,0, +#ifdef SUBLANG_LATVIAN_LATVIA +SUBLANG_LATVIAN_LATVIA, +#else +0, +#endif +0,0,0, +}, +{"ly","libya",0, +#ifdef CTRY_LIBYA +CTRY_LIBYA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_LIBYA +SUBLANG_ARABIC_LIBYA, +#else +0, +#endif +0,0,0, +}, +{"ma","morocco",0, +#ifdef CTRY_MOROCCO +CTRY_MOROCCO, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_MOROCCO +SUBLANG_ARABIC_MOROCCO, +#else +0, +#endif +0,0,0, +}, +{"mk","macedonia",0, +#ifdef CTRY_MACEDONIA +CTRY_MACEDONIA, +#else +0, +#endif +&lc_languages[75],0,0,0, +#ifdef SUBLANG_MACEDONIAN_MACEDONIA +SUBLANG_MACEDONIAN_MACEDONIA, +#else +0, +#endif +0,0,0, +}, +{"mo","macau",0, +#ifdef CTRY_MACAU +CTRY_MACAU, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_MACAU +SUBLANG_CHINESE_SIMPLIFIED_MACAU, +#else +0, +#endif +0,0,0, +}, +{"mx","mexico",0, +#ifdef CTRY_MEXICO +CTRY_MEXICO, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_MEXICO +SUBLANG_SPANISH_MEXICO, +#else +0, +#endif +0,0,0, +}, +{"my","malaysia",0, +#ifdef CTRY_MALAYSIA +CTRY_MALAYSIA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"ni","nicaragua",0, +#ifdef CTRY_NICARAGUA +CTRY_NICARAGUA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_NICARAGUA +SUBLANG_SPANISH_NICARAGUA, +#else +0, +#endif +0,0,0, +}, +{"nl","netherlands",0, +#ifdef CTRY_NETHERLANDS +CTRY_NETHERLANDS, +#else +0, +#endif +&lc_languages[86],0,0,0, +#ifdef SUBLANG_DUTCH_NETHERLANDS +SUBLANG_DUTCH_NETHERLANDS, +#else +0, +#endif +0,0,0, +}, +{"no","norway",0, +#ifdef CTRY_NORWAY +CTRY_NORWAY, +#else +0, +#endif +&lc_languages[84],&lc_languages[88],&lc_languages[87],0, +#ifdef SUBLANG_NORWEGIAN_BOKMAL_NORWAY +SUBLANG_NORWEGIAN_BOKMAL_NORWAY, +#else +0, +#endif + +#ifdef SUBLANG_NORWEGIAN_NORWAY +SUBLANG_NORWEGIAN_NORWAY, +#else +0, +#endif + +#ifdef SUBLANG_NORWEGIAN_NYNORSK_NORWAY +SUBLANG_NORWEGIAN_NYNORSK_NORWAY, +#else +0, +#endif +0, +}, +{"nz","new-zealand",0, +#ifdef CTRY_NEW_ZEALAND +CTRY_NEW_ZEALAND, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_NEW_ZEALAND +SUBLANG_ENGLISH_NEW_ZEALAND, +#else +0, +#endif +0,0,0, +}, +{"om","oman",0, +#ifdef CTRY_OMAN +CTRY_OMAN, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_OMAN +SUBLANG_ARABIC_OMAN, +#else +0, +#endif +0,0,0, +}, +{"pa","panama",0, +#ifdef CTRY_PANAMA +CTRY_PANAMA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PANAMA +SUBLANG_SPANISH_PANAMA, +#else +0, +#endif +0,0,0, +}, +{"pe","peru",0, +#ifdef CTRY_PERU +CTRY_PERU, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PERU +SUBLANG_SPANISH_PERU, +#else +0, +#endif +0,0,0, +}, +{"pl","poland",0, +#ifdef CTRY_POLAND +CTRY_POLAND, +#else +0, +#endif +&lc_languages[93],0,0,0, +#ifdef SUBLANG_POLISH_POLAND +SUBLANG_POLISH_POLAND, +#else +0, +#endif +0,0,0, +}, +{"pr","puerto-rico",0, +#ifdef CTRY_PUERTO_RICO +CTRY_PUERTO_RICO, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PUERTO_RICO +SUBLANG_SPANISH_PUERTO_RICO, +#else +0, +#endif +0,0,0, +}, +{"pt","portugal",0, +#ifdef CTRY_PORTUGAL +CTRY_PORTUGAL, +#else +0, +#endif +&lc_languages[95],0,0,0, +#ifdef SUBLANG_PORTUGUESE_PORTUGAL +SUBLANG_PORTUGUESE_PORTUGAL, +#else +0, +#endif +0,0,0, +}, +{"py","paraguay",0, +#ifdef CTRY_PARAGUAY +CTRY_PARAGUAY, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PARAGUAY +SUBLANG_SPANISH_PARAGUAY, +#else +0, +#endif +0,0,0, +}, +{"ro","romania",0, +#ifdef CTRY_ROMANIA +CTRY_ROMANIA, +#else +0, +#endif +&lc_languages[99],0,0,0, +#ifdef SUBLANG_ROMANIAN_ROMANIA +SUBLANG_ROMANIAN_ROMANIA, +#else +0, +#endif +0,0,0, +}, +{"ru","russia",0, +#ifdef CTRY_RUSSIA +CTRY_RUSSIA, +#else +0, +#endif +&lc_languages[100],0,0,0, +#ifdef SUBLANG_RUSSIAN_RUSSIA +SUBLANG_RUSSIAN_RUSSIA, +#else +0, +#endif +0,0,0, +}, +{"sa","saudi-arabia",0, +#ifdef CTRY_SAUDI_ARABIA +CTRY_SAUDI_ARABIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_SAUDI_ARABIA +SUBLANG_ARABIC_SAUDI_ARABIA, +#else +0, +#endif +0,0,0, +}, +{"se","sweden",LC_primary, +#ifdef CTRY_SWEDEN +CTRY_SWEDEN, +#else +0, +#endif +&lc_languages[117],0,0,0, +#ifdef SUBLANG_SWEDISH_SWEDEN +SUBLANG_SWEDISH_SWEDEN, +#else +0, +#endif +0,0,0, +}, +{"sg","singapore",0, +#ifdef CTRY_SINGAPORE +CTRY_SINGAPORE, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_SINGAPORE +SUBLANG_CHINESE_SIMPLIFIED_SINGAPORE, +#else +0, +#endif +0,0,0, +}, +{"si","slovenia",0, +#ifdef CTRY_SLOVENIA +CTRY_SLOVENIA, +#else +0, +#endif +&lc_languages[108],0,0,0, +#ifdef SUBLANG_SLOVENIAN_SLOVENIA +SUBLANG_SLOVENIAN_SLOVENIA, +#else +0, +#endif +0,0,0, +}, +{"sk","slovakia",0, +#ifdef CTRY_SLOVAKIA +CTRY_SLOVAKIA, +#else +0, +#endif +&lc_languages[107],0,0,0, +#ifdef SUBLANG_SLOVAK_SLOVAKIA +SUBLANG_SLOVAK_SLOVAKIA, +#else +0, +#endif +0,0,0, +}, +{"sp","serbia",0, +#ifdef CTRY_SERBIA +CTRY_SERBIA, +#else +0, +#endif +&lc_languages[113],0,0,0, +#ifdef SUBLANG_SERBIAN_SERBIA +SUBLANG_SERBIAN_SERBIA, +#else +0, +#endif +0,0,0, +}, +{"sv","el-salvador",0, +#ifdef CTRY_EL_SALVADOR +CTRY_EL_SALVADOR, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_EL_SALVADOR +SUBLANG_SPANISH_EL_SALVADOR, +#else +0, +#endif +0,0,0, +}, +{"sy","syria",0, +#ifdef CTRY_SYRIA +CTRY_SYRIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_SYRIA +SUBLANG_ARABIC_SYRIA, +#else +0, +#endif +0,0,0, +}, +{"th","thailand",0, +#ifdef CTRY_THAILAND +CTRY_THAILAND, +#else +0, +#endif +&lc_languages[122],0,0,0, +#ifdef SUBLANG_THAI_THAILAND +SUBLANG_THAI_THAILAND, +#else +0, +#endif +0,0,0, +}, +{"tn","tunisia",0, +#ifdef CTRY_TUNISIA +CTRY_TUNISIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_TUNISIA +SUBLANG_ARABIC_TUNISIA, +#else +0, +#endif +0,0,0, +}, +{"tr","turkey",0, +#ifdef CTRY_TURKEY +CTRY_TURKEY, +#else +0, +#endif +&lc_languages[128],0,0,0, +#ifdef SUBLANG_TURKISH_TURKEY +SUBLANG_TURKISH_TURKEY, +#else +0, +#endif +0,0,0, +}, +{"tt","trinidad&tobago",0, +#ifdef CTRY_TRINIDAD_TOBAGO +CTRY_TRINIDAD_TOBAGO, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_TRINIDAD_TOBAGO +SUBLANG_ENGLISH_TRINIDAD_TOBAGO, +#else +0, +#endif +0,0,0, +}, +{"tw","taiwan",0, +#ifdef CTRY_TAIWAN +CTRY_TAIWAN, +#else +0, +#endif +&lc_languages[131],0,0,0, +#ifdef SUBLANG_CHINESE_TRADITIONAL_TAIWAN +SUBLANG_CHINESE_TRADITIONAL_TAIWAN, +#else +0, +#endif +0,0,0, +}, +{"ua","ukraine",0, +#ifdef CTRY_UKRAINE +CTRY_UKRAINE, +#else +0, +#endif +&lc_languages[132],&lc_languages[100],0,0, +#ifdef SUBLANG_UKRAINIAN_UKRAINE +SUBLANG_UKRAINIAN_UKRAINE, +#else +0, +#endif + +#ifdef SUBLANG_RUSSIAN_UKRAINE +SUBLANG_RUSSIAN_UKRAINE, +#else +0, +#endif +0,0, +}, +{"uk","united-kingdom",LC_primary, +#ifdef CTRY_UNITED_KINGDOM +CTRY_UNITED_KINGDOM, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_KINGDOM +SUBLANG_ENGLISH_UNITED_KINGDOM, +#else +0, +#endif +0,0,0, +}, +{"us","united-states|usa",0, +#ifdef CTRY_UNITED_STATES +CTRY_UNITED_STATES, +#else +#ifdef CTRY_USA +CTRY_USA, +#else +0, +#endif +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_STATES +SUBLANG_ENGLISH_UNITED_STATES, +#else +#ifdef SUBLANG_ENGLISH_USA +SUBLANG_ENGLISH_USA, +#else +0, +#endif +#endif +0,0,0, +}, +{"uy","uruguay",0, +#ifdef CTRY_URUGUAY +CTRY_URUGUAY, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_URUGUAY +SUBLANG_SPANISH_URUGUAY, +#else +0, +#endif +0,0,0, +}, +{"ve","venezuela",0, +#ifdef CTRY_VENEZUELA +CTRY_VENEZUELA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_VENEZUELA +SUBLANG_SPANISH_VENEZUELA, +#else +0, +#endif +0,0,0, +}, +{"yu","yugoslavia",0, +#ifdef CTRY_YUGOSLAVIA +CTRY_YUGOSLAVIA, +#else +0, +#endif +&lc_languages[113],0,0,0, +#ifdef SUBLANG_SERBIAN_YUGOSLAVIA +SUBLANG_SERBIAN_YUGOSLAVIA, +#else +0, +#endif +0,0,0, +}, +{"za","south-africa",0, +#ifdef CTRY_SOUTH_AFRICA +CTRY_SOUTH_AFRICA, +#else +0, +#endif +&lc_languages[4],0,0,0, +#ifdef SUBLANG_AFRIKAANS_SOUTH_AFRICA +SUBLANG_AFRIKAANS_SOUTH_AFRICA, +#else +0, +#endif +0,0,0, +}, +{"zw","zimbabwe",0, +#ifdef CTRY_ZIMBABWE +CTRY_ZIMBABWE, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_ZIMBABWE +SUBLANG_ENGLISH_ZIMBABWE, +#else +0, +#endif +0,0,0, +}, + 0 +}; + +const Lc_map_t lc_maps[] = +{ +{"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/cmd/ast/libast/sparcv9/FEATURE/align b/usr/src/cmd/ast/libast/sparcv9/FEATURE/align new file mode 100644 index 0000000000..228de042de --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/align @@ -0,0 +1,32 @@ +/* : : 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 ok */ + +#define ALIGN_CHUNK 8192 +#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)) + +#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/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 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 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 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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/ccode b/usr/src/cmd/ast/libast/sparcv9/FEATURE/ccode new file mode 100644 index 0000000000..30603c443a --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/ccode @@ -0,0 +1,29 @@ +/* : : 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 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/cmd/ast/libast/sparcv9/FEATURE/common b/usr/src/cmd/ast/libast/sparcv9/FEATURE/common new file mode 100644 index 0000000000..286e7ac5b7 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/common @@ -0,0 +1,212 @@ +/* : : 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 ok */ +#define _hdr_pthread 1 /* #include ok */ +#define _hdr_stdarg 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdint 1 /* #include ok */ +#define _hdr_inttypes 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include 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 _hdr_stdio 1 /* #include ok */ +#define _typ___va_list 1 /* __va_list is a type */ +#define _sys_stat 1 /* #include ok */ +#define _sys_socket 1 /* #include 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__, if defined, 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_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 +#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 */ +#define _typ_uintptr_t 1 /* uintptr_t is a type */ + +#ifndef va_listref +#ifndef va_start +#if __STD_C +#include +#else +#include +#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 +# endif +# if _sys_types +# include +# endif +# if _hdr_stdint +# include +# else +# if _hdr_inttypes +# include +# 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 +# define _def_map_ast 1 +# if !_def_map_ast +# include +# endif +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/dirent b/usr/src/cmd/ast/libast/sparcv9/FEATURE/dirent new file mode 100644 index 0000000000..5e7e6cc7fc --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/dirent @@ -0,0 +1,82 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _nxt_dirent <../include/dirent.h> /* include path for the native */ +#define _nxt_dirent_str "../include/dirent.h" /* include string for the native */ +/* + * for systems with ok + */ + +#ifndef _DIRENT_H + +#include <../include/dirent.h> /* the native */ + +#ifndef _DIRENT_H +#define _DIRENT_H +#endif + +#endif +#endif 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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/errno b/usr/src/cmd/ast/libast/sparcv9/FEATURE/errno new file mode 100644 index 0000000000..1107a008c7 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/errno @@ -0,0 +1,7 @@ +/* : : 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 ok */ +#define _dat_sys_nerr 1 /* sys_nerr in default libs */ +#define _dat_sys_errlist 1 /* sys_errlist in default libs */ +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/fcntl b/usr/src/cmd/ast/libast/sparcv9/FEATURE/fcntl new file mode 100644 index 0000000000..9c2328f31b --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/fcntl @@ -0,0 +1,116 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ + + +#if _typ_off64_t +#undef off_t +#ifdef __STDC__ +#define off_t off_t +#endif +#endif + +#include + +#if _typ_off64_t +#undef off_t +#ifdef __STDC__ +#define off_t off_t +#endif +#endif + +#include +#include + +#define F_dupfd_cloexec F_DUPFD_CLOEXEC +#define O_BINARY 0 +#define O_cloexec O_CLOEXEC +#define O_TEMPORARY 0 +#define O_TEXT 0 + +#include +#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/cmd/ast/libast/sparcv9/FEATURE/float b/usr/src/cmd/ast/libast/sparcv9/FEATURE/float new file mode 100644 index 0000000000..121f02e32d --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/float @@ -0,0 +1,218 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_float 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _hdr_values 1 /* #include ok */ +#define _LIB_m 1 /* -lm is a library */ +#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_isnanl 1 /* isnanl() 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 +#include +#include +#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/cmd/ast/libast/sparcv9/FEATURE/fs b/usr/src/cmd/ast/libast/sparcv9/FEATURE/fs new file mode 100644 index 0000000000..e013cccbf6 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/fs @@ -0,0 +1,143 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _sys_stat 1 /* #include 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 +#include +#define FS_default "ufs" +#if defined(__STDPP__directive) && defined(__STDPP__initial) +__STDPP__directive pragma pp:noinitial +#endif +#define _hdr_stdio 1 /* #include ok */ +#define _sys_mntent 1 /* #include ok */ +#define _sys_mnttab 1 /* #include ok */ +#define _sys_param 1 /* #include ok */ +#define _sys_ucred 1 /* #include ok */ +#define _sys_mount 1 /* #include ok */ +#define _sys_statfs 1 /* #include ok */ +#define _sys_statvfs 1 /* #include ok */ +#define _sys_vfs 1 /* #include 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 _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 +#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/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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/iconv b/usr/src/cmd/ast/libast/sparcv9/FEATURE/iconv new file mode 100644 index 0000000000..f81d5fc8fa --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/iconv @@ -0,0 +1,150 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_iconv 1 /* #include 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 */ +#define _nxt_iconv_str "../include/iconv.h" /* include string for the native */ +#include +#include +#include <../include/iconv.h> /* the native iconv.h */ + +#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 +#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 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__ +#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, 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, Iconv_disc_t*)); +extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, Iconv_disc_t*)); +#endif +#endif + +#undef __MANGLE__ +#define __MANGLE__ __LINKAGE__ + +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/lib b/usr/src/cmd/ast/libast/sparcv9/FEATURE/lib new file mode 100644 index 0000000000..cab2bfea82 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/lib @@ -0,0 +1,166 @@ +/* : : 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 ok */ +#define _hdr_dirent 1 /* #include ok */ +#define _hdr_fmtmsg 1 /* #include ok */ +#define _hdr_fnmatch 1 /* #include ok */ +#define _hdr_libgen 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +#define _hdr_locale 1 /* #include ok */ +#define _hdr_nl_types 1 /* #include ok */ +#define _hdr_spawn 1 /* #include ok */ +#define _hdr_syslog 1 /* #include ok */ +#define _hdr_utime 1 /* #include ok */ +#define _hdr_wchar 1 /* and isw*() really work */ +#define _hdr_wchar 1 /* #include ok */ +#define _hdr_wctype 1 /* #include 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) */ +#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 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 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 _mem_dd_fd_DIR 1 /* dd_fd is a member of DIR */ +#define _sys_filio 1 /* #include ok */ +#define _sys_jioctl 1 /* #include ok */ +#define _sys_localedef 1 /* #include ok */ +#define _sys_resource 1 /* #include ok */ +#define _sys_socket 1 /* #include ok */ +#define _sys_stream 1 /* #include ok */ +#define _sys_systeminfo 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include 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 ok */ +#define _lib_select 1 /* select() has standard 5 arg interface */ +#define _sys_select 1 /* select() requires */ +#define _pipe_rw 1 /* full duplex pipes */ +#define _hdr_unistd 1 /* #include 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 _stream_peek 1 /* ioctl(I_PEEK) works on pipe() */ +#define _socket_peek 1 /* recv(MSG_PEEK) works on socketpair() */ +#define _hdr_string 1 /* #include ok */ +#define _lib_memcmp 1 /* standard memcmp interface that works */ +#define _hdr_fcntl 1 /* #include ok */ +#define _sys_stat 1 /* #include ok */ +#define _sys_mman 1 /* #include 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/cmd/ast/libast/sparcv9/FEATURE/libpath b/usr/src/cmd/ast/libast/sparcv9/FEATURE/libpath new file mode 100644 index 0000000000..d272a4015d --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/libpath @@ -0,0 +1,6 @@ +/* : : 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 ok */ +#define CONF_LIBPATH "lib/64:LD_LIBRARY_PATH_64:sol.*64*,lib/32:LD_LIBRARY_PATH_32,lib:LD_LIBRARY_PATH" +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/limits b/usr/src/cmd/ast/libast/sparcv9/FEATURE/limits new file mode 100644 index 0000000000..efe390eee9 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/limits @@ -0,0 +1,107 @@ +/* : : 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 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/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 ok */ +#define _locale_utf8_str "UTF-8" +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/map b/usr/src/cmd/ast/libast/sparcv9/FEATURE/map new file mode 100644 index 0000000000..30c7f4e2b5 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/map @@ -0,0 +1,466 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ + + +/* + * prototypes provided for standard interfaces hijacked + * by ast and mapped to _ast_* but already prototyped + * unmapped in native headers included by + */ + +#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)); + +#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/cmd/ast/libast/sparcv9/FEATURE/mmap b/usr/src/cmd/ast/libast/sparcv9/FEATURE/mmap new file mode 100644 index 0000000000..12d991f9a6 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/mmap @@ -0,0 +1,26 @@ +/* : : 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 ok */ +#define _sys_mman 1 /* #include 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 */ + +/* 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/cmd/ast/libast/sparcv9/FEATURE/mode b/usr/src/cmd/ast/libast/sparcv9/FEATURE/mode new file mode 100644 index 0000000000..f2ec3091fa --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/mode @@ -0,0 +1,14 @@ +/* : : 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 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/cmd/ast/libast/sparcv9/FEATURE/ndbm b/usr/src/cmd/ast/libast/sparcv9/FEATURE/ndbm new file mode 100644 index 0000000000..0e55ff820d --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/ndbm @@ -0,0 +1,9 @@ +/* : : 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 ok */ +#define _hdr_ndbm 1 /* #include ok */ +#include +#define _use_ndbm 1 + +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/nl_types b/usr/src/cmd/ast/libast/sparcv9/FEATURE/nl_types new file mode 100644 index 0000000000..d8c540626e --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/nl_types @@ -0,0 +1,102 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 ok */ +#define _hdr_langinfo 1 /* #include ok */ +#define _nxt_nl_types <../include/nl_types.h> /* include path for the native */ +#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native */ +#include +#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/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 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 ok */ +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/param b/usr/src/cmd/ast/libast/sparcv9/FEATURE/param new file mode 100644 index 0000000000..8c200b4462 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/param @@ -0,0 +1,9 @@ +/* : : 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 ok */ +#include +#ifndef S_IFDIR +#include +#endif +#endif 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 ok */ +/* preroot not enabled */ +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/prog b/usr/src/cmd/ast/libast/sparcv9/FEATURE/prog new file mode 100644 index 0000000000..592037efb7 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/prog @@ -0,0 +1,7 @@ +/* : : 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 ok */ +#define _lib_getexecname 1 /* getexecname() in default lib(s) */ +#define _PROC_PROG "/proc/self/path/a.out" +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/sfinit b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sfinit new file mode 100644 index 0000000000..756d559262 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sfinit @@ -0,0 +1,5332 @@ +/* : : 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 ok */ + +static const float sf_flt_pow10[] = +{ + 1E0F, + 1E1F, + 1E2F, + 1E3F, + 1E4F, + 1E5F, + 1E6F, + 1E7F, + 1E8F, + 1E9F, + 1E10F, + 1E11F, + 1E12F, + 1E13F, + 1E14F, + 1E15F, + 1E16F, + 1E17F, + 1E18F, + 1E19F, + 1E20F, + 1E21F, + 1E22F, + 1E23F, + 1E24F, + 1E25F, + 1E26F, + 1E27F, + 1E28F, + 1E29F, + 1E30F, + 1E31F, + 1E32F, + 1E33F, + 1E34F, + 1E35F, + 1E36F, + 1E37F, + 1E38F, +}; + +static const double sf_dbl_pow10[] = +{ + 1E0, + 1E1, + 1E2, + 1E3, + 1E4, + 1E5, + 1E6, + 1E7, + 1E8, + 1E9, + 1E10, + 1E11, + 1E12, + 1E13, + 1E14, + 1E15, + 1E16, + 1E17, + 1E18, + 1E19, + 1E20, + 1E21, + 1E22, + 1E23, + 1E24, + 1E25, + 1E26, + 1E27, + 1E28, + 1E29, + 1E30, + 1E31, + 1E32, + 1E33, + 1E34, + 1E35, + 1E36, + 1E37, + 1E38, + 1E39, + 1E40, + 1E41, + 1E42, + 1E43, + 1E44, + 1E45, + 1E46, + 1E47, + 1E48, + 1E49, + 1E50, + 1E51, + 1E52, + 1E53, + 1E54, + 1E55, + 1E56, + 1E57, + 1E58, + 1E59, + 1E60, + 1E61, + 1E62, + 1E63, + 1E64, + 1E65, + 1E66, + 1E67, + 1E68, + 1E69, + 1E70, + 1E71, + 1E72, + 1E73, + 1E74, + 1E75, + 1E76, + 1E77, + 1E78, + 1E79, + 1E80, + 1E81, + 1E82, + 1E83, + 1E84, + 1E85, + 1E86, + 1E87, + 1E88, + 1E89, + 1E90, + 1E91, + 1E92, + 1E93, + 1E94, + 1E95, + 1E96, + 1E97, + 1E98, + 1E99, + 1E100, + 1E101, + 1E102, + 1E103, + 1E104, + 1E105, + 1E106, + 1E107, + 1E108, + 1E109, + 1E110, + 1E111, + 1E112, + 1E113, + 1E114, + 1E115, + 1E116, + 1E117, + 1E118, + 1E119, + 1E120, + 1E121, + 1E122, + 1E123, + 1E124, + 1E125, + 1E126, + 1E127, + 1E128, + 1E129, + 1E130, + 1E131, + 1E132, + 1E133, + 1E134, + 1E135, + 1E136, + 1E137, + 1E138, + 1E139, + 1E140, + 1E141, + 1E142, + 1E143, + 1E144, + 1E145, + 1E146, + 1E147, + 1E148, + 1E149, + 1E150, + 1E151, + 1E152, + 1E153, + 1E154, + 1E155, + 1E156, + 1E157, + 1E158, + 1E159, + 1E160, + 1E161, + 1E162, + 1E163, + 1E164, + 1E165, + 1E166, + 1E167, + 1E168, + 1E169, + 1E170, + 1E171, + 1E172, + 1E173, + 1E174, + 1E175, + 1E176, + 1E177, + 1E178, + 1E179, + 1E180, + 1E181, + 1E182, + 1E183, + 1E184, + 1E185, + 1E186, + 1E187, + 1E188, + 1E189, + 1E190, + 1E191, + 1E192, + 1E193, + 1E194, + 1E195, + 1E196, + 1E197, + 1E198, + 1E199, + 1E200, + 1E201, + 1E202, + 1E203, + 1E204, + 1E205, + 1E206, + 1E207, + 1E208, + 1E209, + 1E210, + 1E211, + 1E212, + 1E213, + 1E214, + 1E215, + 1E216, + 1E217, + 1E218, + 1E219, + 1E220, + 1E221, + 1E222, + 1E223, + 1E224, + 1E225, + 1E226, + 1E227, + 1E228, + 1E229, + 1E230, + 1E231, + 1E232, + 1E233, + 1E234, + 1E235, + 1E236, + 1E237, + 1E238, + 1E239, + 1E240, + 1E241, + 1E242, + 1E243, + 1E244, + 1E245, + 1E246, + 1E247, + 1E248, + 1E249, + 1E250, + 1E251, + 1E252, + 1E253, + 1E254, + 1E255, + 1E256, + 1E257, + 1E258, + 1E259, + 1E260, + 1E261, + 1E262, + 1E263, + 1E264, + 1E265, + 1E266, + 1E267, + 1E268, + 1E269, + 1E270, + 1E271, + 1E272, + 1E273, + 1E274, + 1E275, + 1E276, + 1E277, + 1E278, + 1E279, + 1E280, + 1E281, + 1E282, + 1E283, + 1E284, + 1E285, + 1E286, + 1E287, + 1E288, + 1E289, + 1E290, + 1E291, + 1E292, + 1E293, + 1E294, + 1E295, + 1E296, + 1E297, + 1E298, + 1E299, + 1E300, + 1E301, + 1E302, + 1E303, + 1E304, + 1E305, + 1E306, + 1E307, + 1E308, +}; + +static const _ast_fltmax_t sf_ldbl_pow10[] = +{ + 1E0L, + 1E1L, + 1E2L, + 1E3L, + 1E4L, + 1E5L, + 1E6L, + 1E7L, + 1E8L, + 1E9L, + 1E10L, + 1E11L, + 1E12L, + 1E13L, + 1E14L, + 1E15L, + 1E16L, + 1E17L, + 1E18L, + 1E19L, + 1E20L, + 1E21L, + 1E22L, + 1E23L, + 1E24L, + 1E25L, + 1E26L, + 1E27L, + 1E28L, + 1E29L, + 1E30L, + 1E31L, + 1E32L, + 1E33L, + 1E34L, + 1E35L, + 1E36L, + 1E37L, + 1E38L, + 1E39L, + 1E40L, + 1E41L, + 1E42L, + 1E43L, + 1E44L, + 1E45L, + 1E46L, + 1E47L, + 1E48L, + 1E49L, + 1E50L, + 1E51L, + 1E52L, + 1E53L, + 1E54L, + 1E55L, + 1E56L, + 1E57L, + 1E58L, + 1E59L, + 1E60L, + 1E61L, + 1E62L, + 1E63L, + 1E64L, + 1E65L, + 1E66L, + 1E67L, + 1E68L, + 1E69L, + 1E70L, + 1E71L, + 1E72L, + 1E73L, + 1E74L, + 1E75L, + 1E76L, + 1E77L, + 1E78L, + 1E79L, + 1E80L, + 1E81L, + 1E82L, + 1E83L, + 1E84L, + 1E85L, + 1E86L, + 1E87L, + 1E88L, + 1E89L, + 1E90L, + 1E91L, + 1E92L, + 1E93L, + 1E94L, + 1E95L, + 1E96L, + 1E97L, + 1E98L, + 1E99L, + 1E100L, + 1E101L, + 1E102L, + 1E103L, + 1E104L, + 1E105L, + 1E106L, + 1E107L, + 1E108L, + 1E109L, + 1E110L, + 1E111L, + 1E112L, + 1E113L, + 1E114L, + 1E115L, + 1E116L, + 1E117L, + 1E118L, + 1E119L, + 1E120L, + 1E121L, + 1E122L, + 1E123L, + 1E124L, + 1E125L, + 1E126L, + 1E127L, + 1E128L, + 1E129L, + 1E130L, + 1E131L, + 1E132L, + 1E133L, + 1E134L, + 1E135L, + 1E136L, + 1E137L, + 1E138L, + 1E139L, + 1E140L, + 1E141L, + 1E142L, + 1E143L, + 1E144L, + 1E145L, + 1E146L, + 1E147L, + 1E148L, + 1E149L, + 1E150L, + 1E151L, + 1E152L, + 1E153L, + 1E154L, + 1E155L, + 1E156L, + 1E157L, + 1E158L, + 1E159L, + 1E160L, + 1E161L, + 1E162L, + 1E163L, + 1E164L, + 1E165L, + 1E166L, + 1E167L, + 1E168L, + 1E169L, + 1E170L, + 1E171L, + 1E172L, + 1E173L, + 1E174L, + 1E175L, + 1E176L, + 1E177L, + 1E178L, + 1E179L, + 1E180L, + 1E181L, + 1E182L, + 1E183L, + 1E184L, + 1E185L, + 1E186L, + 1E187L, + 1E188L, + 1E189L, + 1E190L, + 1E191L, + 1E192L, + 1E193L, + 1E194L, + 1E195L, + 1E196L, + 1E197L, + 1E198L, + 1E199L, + 1E200L, + 1E201L, + 1E202L, + 1E203L, + 1E204L, + 1E205L, + 1E206L, + 1E207L, + 1E208L, + 1E209L, + 1E210L, + 1E211L, + 1E212L, + 1E213L, + 1E214L, + 1E215L, + 1E216L, + 1E217L, + 1E218L, + 1E219L, + 1E220L, + 1E221L, + 1E222L, + 1E223L, + 1E224L, + 1E225L, + 1E226L, + 1E227L, + 1E228L, + 1E229L, + 1E230L, + 1E231L, + 1E232L, + 1E233L, + 1E234L, + 1E235L, + 1E236L, + 1E237L, + 1E238L, + 1E239L, + 1E240L, + 1E241L, + 1E242L, + 1E243L, + 1E244L, + 1E245L, + 1E246L, + 1E247L, + 1E248L, + 1E249L, + 1E250L, + 1E251L, + 1E252L, + 1E253L, + 1E254L, + 1E255L, + 1E256L, + 1E257L, + 1E258L, + 1E259L, + 1E260L, + 1E261L, + 1E262L, + 1E263L, + 1E264L, + 1E265L, + 1E266L, + 1E267L, + 1E268L, + 1E269L, + 1E270L, + 1E271L, + 1E272L, + 1E273L, + 1E274L, + 1E275L, + 1E276L, + 1E277L, + 1E278L, + 1E279L, + 1E280L, + 1E281L, + 1E282L, + 1E283L, + 1E284L, + 1E285L, + 1E286L, + 1E287L, + 1E288L, + 1E289L, + 1E290L, + 1E291L, + 1E292L, + 1E293L, + 1E294L, + 1E295L, + 1E296L, + 1E297L, + 1E298L, + 1E299L, + 1E300L, + 1E301L, + 1E302L, + 1E303L, + 1E304L, + 1E305L, + 1E306L, + 1E307L, + 1E308L, + 1E309L, + 1E310L, + 1E311L, + 1E312L, + 1E313L, + 1E314L, + 1E315L, + 1E316L, + 1E317L, + 1E318L, + 1E319L, + 1E320L, + 1E321L, + 1E322L, + 1E323L, + 1E324L, + 1E325L, + 1E326L, + 1E327L, + 1E328L, + 1E329L, + 1E330L, + 1E331L, + 1E332L, + 1E333L, + 1E334L, + 1E335L, + 1E336L, + 1E337L, + 1E338L, + 1E339L, + 1E340L, + 1E341L, + 1E342L, + 1E343L, + 1E344L, + 1E345L, + 1E346L, + 1E347L, + 1E348L, + 1E349L, + 1E350L, + 1E351L, + 1E352L, + 1E353L, + 1E354L, + 1E355L, + 1E356L, + 1E357L, + 1E358L, + 1E359L, + 1E360L, + 1E361L, + 1E362L, + 1E363L, + 1E364L, + 1E365L, + 1E366L, + 1E367L, + 1E368L, + 1E369L, + 1E370L, + 1E371L, + 1E372L, + 1E373L, + 1E374L, + 1E375L, + 1E376L, + 1E377L, + 1E378L, + 1E379L, + 1E380L, + 1E381L, + 1E382L, + 1E383L, + 1E384L, + 1E385L, + 1E386L, + 1E387L, + 1E388L, + 1E389L, + 1E390L, + 1E391L, + 1E392L, + 1E393L, + 1E394L, + 1E395L, + 1E396L, + 1E397L, + 1E398L, + 1E399L, + 1E400L, + 1E401L, + 1E402L, + 1E403L, + 1E404L, + 1E405L, + 1E406L, + 1E407L, + 1E408L, + 1E409L, + 1E410L, + 1E411L, + 1E412L, + 1E413L, + 1E414L, + 1E415L, + 1E416L, + 1E417L, + 1E418L, + 1E419L, + 1E420L, + 1E421L, + 1E422L, + 1E423L, + 1E424L, + 1E425L, + 1E426L, + 1E427L, + 1E428L, + 1E429L, + 1E430L, + 1E431L, + 1E432L, + 1E433L, + 1E434L, + 1E435L, + 1E436L, + 1E437L, + 1E438L, + 1E439L, + 1E440L, + 1E441L, + 1E442L, + 1E443L, + 1E444L, + 1E445L, + 1E446L, + 1E447L, + 1E448L, + 1E449L, + 1E450L, + 1E451L, + 1E452L, + 1E453L, + 1E454L, + 1E455L, + 1E456L, + 1E457L, + 1E458L, + 1E459L, + 1E460L, + 1E461L, + 1E462L, + 1E463L, + 1E464L, + 1E465L, + 1E466L, + 1E467L, + 1E468L, + 1E469L, + 1E470L, + 1E471L, + 1E472L, + 1E473L, + 1E474L, + 1E475L, + 1E476L, + 1E477L, + 1E478L, + 1E479L, + 1E480L, + 1E481L, + 1E482L, + 1E483L, + 1E484L, + 1E485L, + 1E486L, + 1E487L, + 1E488L, + 1E489L, + 1E490L, + 1E491L, + 1E492L, + 1E493L, + 1E494L, + 1E495L, + 1E496L, + 1E497L, + 1E498L, + 1E499L, + 1E500L, + 1E501L, + 1E502L, + 1E503L, + 1E504L, + 1E505L, + 1E506L, + 1E507L, + 1E508L, + 1E509L, + 1E510L, + 1E511L, + 1E512L, + 1E513L, + 1E514L, + 1E515L, + 1E516L, + 1E517L, + 1E518L, + 1E519L, + 1E520L, + 1E521L, + 1E522L, + 1E523L, + 1E524L, + 1E525L, + 1E526L, + 1E527L, + 1E528L, + 1E529L, + 1E530L, + 1E531L, + 1E532L, + 1E533L, + 1E534L, + 1E535L, + 1E536L, + 1E537L, + 1E538L, + 1E539L, + 1E540L, + 1E541L, + 1E542L, + 1E543L, + 1E544L, + 1E545L, + 1E546L, + 1E547L, + 1E548L, + 1E549L, + 1E550L, + 1E551L, + 1E552L, + 1E553L, + 1E554L, + 1E555L, + 1E556L, + 1E557L, + 1E558L, + 1E559L, + 1E560L, + 1E561L, + 1E562L, + 1E563L, + 1E564L, + 1E565L, + 1E566L, + 1E567L, + 1E568L, + 1E569L, + 1E570L, + 1E571L, + 1E572L, + 1E573L, + 1E574L, + 1E575L, + 1E576L, + 1E577L, + 1E578L, + 1E579L, + 1E580L, + 1E581L, + 1E582L, + 1E583L, + 1E584L, + 1E585L, + 1E586L, + 1E587L, + 1E588L, + 1E589L, + 1E590L, + 1E591L, + 1E592L, + 1E593L, + 1E594L, + 1E595L, + 1E596L, + 1E597L, + 1E598L, + 1E599L, + 1E600L, + 1E601L, + 1E602L, + 1E603L, + 1E604L, + 1E605L, + 1E606L, + 1E607L, + 1E608L, + 1E609L, + 1E610L, + 1E611L, + 1E612L, + 1E613L, + 1E614L, + 1E615L, + 1E616L, + 1E617L, + 1E618L, + 1E619L, + 1E620L, + 1E621L, + 1E622L, + 1E623L, + 1E624L, + 1E625L, + 1E626L, + 1E627L, + 1E628L, + 1E629L, + 1E630L, + 1E631L, + 1E632L, + 1E633L, + 1E634L, + 1E635L, + 1E636L, + 1E637L, + 1E638L, + 1E639L, + 1E640L, + 1E641L, + 1E642L, + 1E643L, + 1E644L, + 1E645L, + 1E646L, + 1E647L, + 1E648L, + 1E649L, + 1E650L, + 1E651L, + 1E652L, + 1E653L, + 1E654L, + 1E655L, + 1E656L, + 1E657L, + 1E658L, + 1E659L, + 1E660L, + 1E661L, + 1E662L, + 1E663L, + 1E664L, + 1E665L, + 1E666L, + 1E667L, + 1E668L, + 1E669L, + 1E670L, + 1E671L, + 1E672L, + 1E673L, + 1E674L, + 1E675L, + 1E676L, + 1E677L, + 1E678L, + 1E679L, + 1E680L, + 1E681L, + 1E682L, + 1E683L, + 1E684L, + 1E685L, + 1E686L, + 1E687L, + 1E688L, + 1E689L, + 1E690L, + 1E691L, + 1E692L, + 1E693L, + 1E694L, + 1E695L, + 1E696L, + 1E697L, + 1E698L, + 1E699L, + 1E700L, + 1E701L, + 1E702L, + 1E703L, + 1E704L, + 1E705L, + 1E706L, + 1E707L, + 1E708L, + 1E709L, + 1E710L, + 1E711L, + 1E712L, + 1E713L, + 1E714L, + 1E715L, + 1E716L, + 1E717L, + 1E718L, + 1E719L, + 1E720L, + 1E721L, + 1E722L, + 1E723L, + 1E724L, + 1E725L, + 1E726L, + 1E727L, + 1E728L, + 1E729L, + 1E730L, + 1E731L, + 1E732L, + 1E733L, + 1E734L, + 1E735L, + 1E736L, + 1E737L, + 1E738L, + 1E739L, + 1E740L, + 1E741L, + 1E742L, + 1E743L, + 1E744L, + 1E745L, + 1E746L, + 1E747L, + 1E748L, + 1E749L, + 1E750L, + 1E751L, + 1E752L, + 1E753L, + 1E754L, + 1E755L, + 1E756L, + 1E757L, + 1E758L, + 1E759L, + 1E760L, + 1E761L, + 1E762L, + 1E763L, + 1E764L, + 1E765L, + 1E766L, + 1E767L, + 1E768L, + 1E769L, + 1E770L, + 1E771L, + 1E772L, + 1E773L, + 1E774L, + 1E775L, + 1E776L, + 1E777L, + 1E778L, + 1E779L, + 1E780L, + 1E781L, + 1E782L, + 1E783L, + 1E784L, + 1E785L, + 1E786L, + 1E787L, + 1E788L, + 1E789L, + 1E790L, + 1E791L, + 1E792L, + 1E793L, + 1E794L, + 1E795L, + 1E796L, + 1E797L, + 1E798L, + 1E799L, + 1E800L, + 1E801L, + 1E802L, + 1E803L, + 1E804L, + 1E805L, + 1E806L, + 1E807L, + 1E808L, + 1E809L, + 1E810L, + 1E811L, + 1E812L, + 1E813L, + 1E814L, + 1E815L, + 1E816L, + 1E817L, + 1E818L, + 1E819L, + 1E820L, + 1E821L, + 1E822L, + 1E823L, + 1E824L, + 1E825L, + 1E826L, + 1E827L, + 1E828L, + 1E829L, + 1E830L, + 1E831L, + 1E832L, + 1E833L, + 1E834L, + 1E835L, + 1E836L, + 1E837L, + 1E838L, + 1E839L, + 1E840L, + 1E841L, + 1E842L, + 1E843L, + 1E844L, + 1E845L, + 1E846L, + 1E847L, + 1E848L, + 1E849L, + 1E850L, + 1E851L, + 1E852L, + 1E853L, + 1E854L, + 1E855L, + 1E856L, + 1E857L, + 1E858L, + 1E859L, + 1E860L, + 1E861L, + 1E862L, + 1E863L, + 1E864L, + 1E865L, + 1E866L, + 1E867L, + 1E868L, + 1E869L, + 1E870L, + 1E871L, + 1E872L, + 1E873L, + 1E874L, + 1E875L, + 1E876L, + 1E877L, + 1E878L, + 1E879L, + 1E880L, + 1E881L, + 1E882L, + 1E883L, + 1E884L, + 1E885L, + 1E886L, + 1E887L, + 1E888L, + 1E889L, + 1E890L, + 1E891L, + 1E892L, + 1E893L, + 1E894L, + 1E895L, + 1E896L, + 1E897L, + 1E898L, + 1E899L, + 1E900L, + 1E901L, + 1E902L, + 1E903L, + 1E904L, + 1E905L, + 1E906L, + 1E907L, + 1E908L, + 1E909L, + 1E910L, + 1E911L, + 1E912L, + 1E913L, + 1E914L, + 1E915L, + 1E916L, + 1E917L, + 1E918L, + 1E919L, + 1E920L, + 1E921L, + 1E922L, + 1E923L, + 1E924L, + 1E925L, + 1E926L, + 1E927L, + 1E928L, + 1E929L, + 1E930L, + 1E931L, + 1E932L, + 1E933L, + 1E934L, + 1E935L, + 1E936L, + 1E937L, + 1E938L, + 1E939L, + 1E940L, + 1E941L, + 1E942L, + 1E943L, + 1E944L, + 1E945L, + 1E946L, + 1E947L, + 1E948L, + 1E949L, + 1E950L, + 1E951L, + 1E952L, + 1E953L, + 1E954L, + 1E955L, + 1E956L, + 1E957L, + 1E958L, + 1E959L, + 1E960L, + 1E961L, + 1E962L, + 1E963L, + 1E964L, + 1E965L, + 1E966L, + 1E967L, + 1E968L, + 1E969L, + 1E970L, + 1E971L, + 1E972L, + 1E973L, + 1E974L, + 1E975L, + 1E976L, + 1E977L, + 1E978L, + 1E979L, + 1E980L, + 1E981L, + 1E982L, + 1E983L, + 1E984L, + 1E985L, + 1E986L, + 1E987L, + 1E988L, + 1E989L, + 1E990L, + 1E991L, + 1E992L, + 1E993L, + 1E994L, + 1E995L, + 1E996L, + 1E997L, + 1E998L, + 1E999L, + 1E1000L, + 1E1001L, + 1E1002L, + 1E1003L, + 1E1004L, + 1E1005L, + 1E1006L, + 1E1007L, + 1E1008L, + 1E1009L, + 1E1010L, + 1E1011L, + 1E1012L, + 1E1013L, + 1E1014L, + 1E1015L, + 1E1016L, + 1E1017L, + 1E1018L, + 1E1019L, + 1E1020L, + 1E1021L, + 1E1022L, + 1E1023L, + 1E1024L, + 1E1025L, + 1E1026L, + 1E1027L, + 1E1028L, + 1E1029L, + 1E1030L, + 1E1031L, + 1E1032L, + 1E1033L, + 1E1034L, + 1E1035L, + 1E1036L, + 1E1037L, + 1E1038L, + 1E1039L, + 1E1040L, + 1E1041L, + 1E1042L, + 1E1043L, + 1E1044L, + 1E1045L, + 1E1046L, + 1E1047L, + 1E1048L, + 1E1049L, + 1E1050L, + 1E1051L, + 1E1052L, + 1E1053L, + 1E1054L, + 1E1055L, + 1E1056L, + 1E1057L, + 1E1058L, + 1E1059L, + 1E1060L, + 1E1061L, + 1E1062L, + 1E1063L, + 1E1064L, + 1E1065L, + 1E1066L, + 1E1067L, + 1E1068L, + 1E1069L, + 1E1070L, + 1E1071L, + 1E1072L, + 1E1073L, + 1E1074L, + 1E1075L, + 1E1076L, + 1E1077L, + 1E1078L, + 1E1079L, + 1E1080L, + 1E1081L, + 1E1082L, + 1E1083L, + 1E1084L, + 1E1085L, + 1E1086L, + 1E1087L, + 1E1088L, + 1E1089L, + 1E1090L, + 1E1091L, + 1E1092L, + 1E1093L, + 1E1094L, + 1E1095L, + 1E1096L, + 1E1097L, + 1E1098L, + 1E1099L, + 1E1100L, + 1E1101L, + 1E1102L, + 1E1103L, + 1E1104L, + 1E1105L, + 1E1106L, + 1E1107L, + 1E1108L, + 1E1109L, + 1E1110L, + 1E1111L, + 1E1112L, + 1E1113L, + 1E1114L, + 1E1115L, + 1E1116L, + 1E1117L, + 1E1118L, + 1E1119L, + 1E1120L, + 1E1121L, + 1E1122L, + 1E1123L, + 1E1124L, + 1E1125L, + 1E1126L, + 1E1127L, + 1E1128L, + 1E1129L, + 1E1130L, + 1E1131L, + 1E1132L, + 1E1133L, + 1E1134L, + 1E1135L, + 1E1136L, + 1E1137L, + 1E1138L, + 1E1139L, + 1E1140L, + 1E1141L, + 1E1142L, + 1E1143L, + 1E1144L, + 1E1145L, + 1E1146L, + 1E1147L, + 1E1148L, + 1E1149L, + 1E1150L, + 1E1151L, + 1E1152L, + 1E1153L, + 1E1154L, + 1E1155L, + 1E1156L, + 1E1157L, + 1E1158L, + 1E1159L, + 1E1160L, + 1E1161L, + 1E1162L, + 1E1163L, + 1E1164L, + 1E1165L, + 1E1166L, + 1E1167L, + 1E1168L, + 1E1169L, + 1E1170L, + 1E1171L, + 1E1172L, + 1E1173L, + 1E1174L, + 1E1175L, + 1E1176L, + 1E1177L, + 1E1178L, + 1E1179L, + 1E1180L, + 1E1181L, + 1E1182L, + 1E1183L, + 1E1184L, + 1E1185L, + 1E1186L, + 1E1187L, + 1E1188L, + 1E1189L, + 1E1190L, + 1E1191L, + 1E1192L, + 1E1193L, + 1E1194L, + 1E1195L, + 1E1196L, + 1E1197L, + 1E1198L, + 1E1199L, + 1E1200L, + 1E1201L, + 1E1202L, + 1E1203L, + 1E1204L, + 1E1205L, + 1E1206L, + 1E1207L, + 1E1208L, + 1E1209L, + 1E1210L, + 1E1211L, + 1E1212L, + 1E1213L, + 1E1214L, + 1E1215L, + 1E1216L, + 1E1217L, + 1E1218L, + 1E1219L, + 1E1220L, + 1E1221L, + 1E1222L, + 1E1223L, + 1E1224L, + 1E1225L, + 1E1226L, + 1E1227L, + 1E1228L, + 1E1229L, + 1E1230L, + 1E1231L, + 1E1232L, + 1E1233L, + 1E1234L, + 1E1235L, + 1E1236L, + 1E1237L, + 1E1238L, + 1E1239L, + 1E1240L, + 1E1241L, + 1E1242L, + 1E1243L, + 1E1244L, + 1E1245L, + 1E1246L, + 1E1247L, + 1E1248L, + 1E1249L, + 1E1250L, + 1E1251L, + 1E1252L, + 1E1253L, + 1E1254L, + 1E1255L, + 1E1256L, + 1E1257L, + 1E1258L, + 1E1259L, + 1E1260L, + 1E1261L, + 1E1262L, + 1E1263L, + 1E1264L, + 1E1265L, + 1E1266L, + 1E1267L, + 1E1268L, + 1E1269L, + 1E1270L, + 1E1271L, + 1E1272L, + 1E1273L, + 1E1274L, + 1E1275L, + 1E1276L, + 1E1277L, + 1E1278L, + 1E1279L, + 1E1280L, + 1E1281L, + 1E1282L, + 1E1283L, + 1E1284L, + 1E1285L, + 1E1286L, + 1E1287L, + 1E1288L, + 1E1289L, + 1E1290L, + 1E1291L, + 1E1292L, + 1E1293L, + 1E1294L, + 1E1295L, + 1E1296L, + 1E1297L, + 1E1298L, + 1E1299L, + 1E1300L, + 1E1301L, + 1E1302L, + 1E1303L, + 1E1304L, + 1E1305L, + 1E1306L, + 1E1307L, + 1E1308L, + 1E1309L, + 1E1310L, + 1E1311L, + 1E1312L, + 1E1313L, + 1E1314L, + 1E1315L, + 1E1316L, + 1E1317L, + 1E1318L, + 1E1319L, + 1E1320L, + 1E1321L, + 1E1322L, + 1E1323L, + 1E1324L, + 1E1325L, + 1E1326L, + 1E1327L, + 1E1328L, + 1E1329L, + 1E1330L, + 1E1331L, + 1E1332L, + 1E1333L, + 1E1334L, + 1E1335L, + 1E1336L, + 1E1337L, + 1E1338L, + 1E1339L, + 1E1340L, + 1E1341L, + 1E1342L, + 1E1343L, + 1E1344L, + 1E1345L, + 1E1346L, + 1E1347L, + 1E1348L, + 1E1349L, + 1E1350L, + 1E1351L, + 1E1352L, + 1E1353L, + 1E1354L, + 1E1355L, + 1E1356L, + 1E1357L, + 1E1358L, + 1E1359L, + 1E1360L, + 1E1361L, + 1E1362L, + 1E1363L, + 1E1364L, + 1E1365L, + 1E1366L, + 1E1367L, + 1E1368L, + 1E1369L, + 1E1370L, + 1E1371L, + 1E1372L, + 1E1373L, + 1E1374L, + 1E1375L, + 1E1376L, + 1E1377L, + 1E1378L, + 1E1379L, + 1E1380L, + 1E1381L, + 1E1382L, + 1E1383L, + 1E1384L, + 1E1385L, + 1E1386L, + 1E1387L, + 1E1388L, + 1E1389L, + 1E1390L, + 1E1391L, + 1E1392L, + 1E1393L, + 1E1394L, + 1E1395L, + 1E1396L, + 1E1397L, + 1E1398L, + 1E1399L, + 1E1400L, + 1E1401L, + 1E1402L, + 1E1403L, + 1E1404L, + 1E1405L, + 1E1406L, + 1E1407L, + 1E1408L, + 1E1409L, + 1E1410L, + 1E1411L, + 1E1412L, + 1E1413L, + 1E1414L, + 1E1415L, + 1E1416L, + 1E1417L, + 1E1418L, + 1E1419L, + 1E1420L, + 1E1421L, + 1E1422L, + 1E1423L, + 1E1424L, + 1E1425L, + 1E1426L, + 1E1427L, + 1E1428L, + 1E1429L, + 1E1430L, + 1E1431L, + 1E1432L, + 1E1433L, + 1E1434L, + 1E1435L, + 1E1436L, + 1E1437L, + 1E1438L, + 1E1439L, + 1E1440L, + 1E1441L, + 1E1442L, + 1E1443L, + 1E1444L, + 1E1445L, + 1E1446L, + 1E1447L, + 1E1448L, + 1E1449L, + 1E1450L, + 1E1451L, + 1E1452L, + 1E1453L, + 1E1454L, + 1E1455L, + 1E1456L, + 1E1457L, + 1E1458L, + 1E1459L, + 1E1460L, + 1E1461L, + 1E1462L, + 1E1463L, + 1E1464L, + 1E1465L, + 1E1466L, + 1E1467L, + 1E1468L, + 1E1469L, + 1E1470L, + 1E1471L, + 1E1472L, + 1E1473L, + 1E1474L, + 1E1475L, + 1E1476L, + 1E1477L, + 1E1478L, + 1E1479L, + 1E1480L, + 1E1481L, + 1E1482L, + 1E1483L, + 1E1484L, + 1E1485L, + 1E1486L, + 1E1487L, + 1E1488L, + 1E1489L, + 1E1490L, + 1E1491L, + 1E1492L, + 1E1493L, + 1E1494L, + 1E1495L, + 1E1496L, + 1E1497L, + 1E1498L, + 1E1499L, + 1E1500L, + 1E1501L, + 1E1502L, + 1E1503L, + 1E1504L, + 1E1505L, + 1E1506L, + 1E1507L, + 1E1508L, + 1E1509L, + 1E1510L, + 1E1511L, + 1E1512L, + 1E1513L, + 1E1514L, + 1E1515L, + 1E1516L, + 1E1517L, + 1E1518L, + 1E1519L, + 1E1520L, + 1E1521L, + 1E1522L, + 1E1523L, + 1E1524L, + 1E1525L, + 1E1526L, + 1E1527L, + 1E1528L, + 1E1529L, + 1E1530L, + 1E1531L, + 1E1532L, + 1E1533L, + 1E1534L, + 1E1535L, + 1E1536L, + 1E1537L, + 1E1538L, + 1E1539L, + 1E1540L, + 1E1541L, + 1E1542L, + 1E1543L, + 1E1544L, + 1E1545L, + 1E1546L, + 1E1547L, + 1E1548L, + 1E1549L, + 1E1550L, + 1E1551L, + 1E1552L, + 1E1553L, + 1E1554L, + 1E1555L, + 1E1556L, + 1E1557L, + 1E1558L, + 1E1559L, + 1E1560L, + 1E1561L, + 1E1562L, + 1E1563L, + 1E1564L, + 1E1565L, + 1E1566L, + 1E1567L, + 1E1568L, + 1E1569L, + 1E1570L, + 1E1571L, + 1E1572L, + 1E1573L, + 1E1574L, + 1E1575L, + 1E1576L, + 1E1577L, + 1E1578L, + 1E1579L, + 1E1580L, + 1E1581L, + 1E1582L, + 1E1583L, + 1E1584L, + 1E1585L, + 1E1586L, + 1E1587L, + 1E1588L, + 1E1589L, + 1E1590L, + 1E1591L, + 1E1592L, + 1E1593L, + 1E1594L, + 1E1595L, + 1E1596L, + 1E1597L, + 1E1598L, + 1E1599L, + 1E1600L, + 1E1601L, + 1E1602L, + 1E1603L, + 1E1604L, + 1E1605L, + 1E1606L, + 1E1607L, + 1E1608L, + 1E1609L, + 1E1610L, + 1E1611L, + 1E1612L, + 1E1613L, + 1E1614L, + 1E1615L, + 1E1616L, + 1E1617L, + 1E1618L, + 1E1619L, + 1E1620L, + 1E1621L, + 1E1622L, + 1E1623L, + 1E1624L, + 1E1625L, + 1E1626L, + 1E1627L, + 1E1628L, + 1E1629L, + 1E1630L, + 1E1631L, + 1E1632L, + 1E1633L, + 1E1634L, + 1E1635L, + 1E1636L, + 1E1637L, + 1E1638L, + 1E1639L, + 1E1640L, + 1E1641L, + 1E1642L, + 1E1643L, + 1E1644L, + 1E1645L, + 1E1646L, + 1E1647L, + 1E1648L, + 1E1649L, + 1E1650L, + 1E1651L, + 1E1652L, + 1E1653L, + 1E1654L, + 1E1655L, + 1E1656L, + 1E1657L, + 1E1658L, + 1E1659L, + 1E1660L, + 1E1661L, + 1E1662L, + 1E1663L, + 1E1664L, + 1E1665L, + 1E1666L, + 1E1667L, + 1E1668L, + 1E1669L, + 1E1670L, + 1E1671L, + 1E1672L, + 1E1673L, + 1E1674L, + 1E1675L, + 1E1676L, + 1E1677L, + 1E1678L, + 1E1679L, + 1E1680L, + 1E1681L, + 1E1682L, + 1E1683L, + 1E1684L, + 1E1685L, + 1E1686L, + 1E1687L, + 1E1688L, + 1E1689L, + 1E1690L, + 1E1691L, + 1E1692L, + 1E1693L, + 1E1694L, + 1E1695L, + 1E1696L, + 1E1697L, + 1E1698L, + 1E1699L, + 1E1700L, + 1E1701L, + 1E1702L, + 1E1703L, + 1E1704L, + 1E1705L, + 1E1706L, + 1E1707L, + 1E1708L, + 1E1709L, + 1E1710L, + 1E1711L, + 1E1712L, + 1E1713L, + 1E1714L, + 1E1715L, + 1E1716L, + 1E1717L, + 1E1718L, + 1E1719L, + 1E1720L, + 1E1721L, + 1E1722L, + 1E1723L, + 1E1724L, + 1E1725L, + 1E1726L, + 1E1727L, + 1E1728L, + 1E1729L, + 1E1730L, + 1E1731L, + 1E1732L, + 1E1733L, + 1E1734L, + 1E1735L, + 1E1736L, + 1E1737L, + 1E1738L, + 1E1739L, + 1E1740L, + 1E1741L, + 1E1742L, + 1E1743L, + 1E1744L, + 1E1745L, + 1E1746L, + 1E1747L, + 1E1748L, + 1E1749L, + 1E1750L, + 1E1751L, + 1E1752L, + 1E1753L, + 1E1754L, + 1E1755L, + 1E1756L, + 1E1757L, + 1E1758L, + 1E1759L, + 1E1760L, + 1E1761L, + 1E1762L, + 1E1763L, + 1E1764L, + 1E1765L, + 1E1766L, + 1E1767L, + 1E1768L, + 1E1769L, + 1E1770L, + 1E1771L, + 1E1772L, + 1E1773L, + 1E1774L, + 1E1775L, + 1E1776L, + 1E1777L, + 1E1778L, + 1E1779L, + 1E1780L, + 1E1781L, + 1E1782L, + 1E1783L, + 1E1784L, + 1E1785L, + 1E1786L, + 1E1787L, + 1E1788L, + 1E1789L, + 1E1790L, + 1E1791L, + 1E1792L, + 1E1793L, + 1E1794L, + 1E1795L, + 1E1796L, + 1E1797L, + 1E1798L, + 1E1799L, + 1E1800L, + 1E1801L, + 1E1802L, + 1E1803L, + 1E1804L, + 1E1805L, + 1E1806L, + 1E1807L, + 1E1808L, + 1E1809L, + 1E1810L, + 1E1811L, + 1E1812L, + 1E1813L, + 1E1814L, + 1E1815L, + 1E1816L, + 1E1817L, + 1E1818L, + 1E1819L, + 1E1820L, + 1E1821L, + 1E1822L, + 1E1823L, + 1E1824L, + 1E1825L, + 1E1826L, + 1E1827L, + 1E1828L, + 1E1829L, + 1E1830L, + 1E1831L, + 1E1832L, + 1E1833L, + 1E1834L, + 1E1835L, + 1E1836L, + 1E1837L, + 1E1838L, + 1E1839L, + 1E1840L, + 1E1841L, + 1E1842L, + 1E1843L, + 1E1844L, + 1E1845L, + 1E1846L, + 1E1847L, + 1E1848L, + 1E1849L, + 1E1850L, + 1E1851L, + 1E1852L, + 1E1853L, + 1E1854L, + 1E1855L, + 1E1856L, + 1E1857L, + 1E1858L, + 1E1859L, + 1E1860L, + 1E1861L, + 1E1862L, + 1E1863L, + 1E1864L, + 1E1865L, + 1E1866L, + 1E1867L, + 1E1868L, + 1E1869L, + 1E1870L, + 1E1871L, + 1E1872L, + 1E1873L, + 1E1874L, + 1E1875L, + 1E1876L, + 1E1877L, + 1E1878L, + 1E1879L, + 1E1880L, + 1E1881L, + 1E1882L, + 1E1883L, + 1E1884L, + 1E1885L, + 1E1886L, + 1E1887L, + 1E1888L, + 1E1889L, + 1E1890L, + 1E1891L, + 1E1892L, + 1E1893L, + 1E1894L, + 1E1895L, + 1E1896L, + 1E1897L, + 1E1898L, + 1E1899L, + 1E1900L, + 1E1901L, + 1E1902L, + 1E1903L, + 1E1904L, + 1E1905L, + 1E1906L, + 1E1907L, + 1E1908L, + 1E1909L, + 1E1910L, + 1E1911L, + 1E1912L, + 1E1913L, + 1E1914L, + 1E1915L, + 1E1916L, + 1E1917L, + 1E1918L, + 1E1919L, + 1E1920L, + 1E1921L, + 1E1922L, + 1E1923L, + 1E1924L, + 1E1925L, + 1E1926L, + 1E1927L, + 1E1928L, + 1E1929L, + 1E1930L, + 1E1931L, + 1E1932L, + 1E1933L, + 1E1934L, + 1E1935L, + 1E1936L, + 1E1937L, + 1E1938L, + 1E1939L, + 1E1940L, + 1E1941L, + 1E1942L, + 1E1943L, + 1E1944L, + 1E1945L, + 1E1946L, + 1E1947L, + 1E1948L, + 1E1949L, + 1E1950L, + 1E1951L, + 1E1952L, + 1E1953L, + 1E1954L, + 1E1955L, + 1E1956L, + 1E1957L, + 1E1958L, + 1E1959L, + 1E1960L, + 1E1961L, + 1E1962L, + 1E1963L, + 1E1964L, + 1E1965L, + 1E1966L, + 1E1967L, + 1E1968L, + 1E1969L, + 1E1970L, + 1E1971L, + 1E1972L, + 1E1973L, + 1E1974L, + 1E1975L, + 1E1976L, + 1E1977L, + 1E1978L, + 1E1979L, + 1E1980L, + 1E1981L, + 1E1982L, + 1E1983L, + 1E1984L, + 1E1985L, + 1E1986L, + 1E1987L, + 1E1988L, + 1E1989L, + 1E1990L, + 1E1991L, + 1E1992L, + 1E1993L, + 1E1994L, + 1E1995L, + 1E1996L, + 1E1997L, + 1E1998L, + 1E1999L, + 1E2000L, + 1E2001L, + 1E2002L, + 1E2003L, + 1E2004L, + 1E2005L, + 1E2006L, + 1E2007L, + 1E2008L, + 1E2009L, + 1E2010L, + 1E2011L, + 1E2012L, + 1E2013L, + 1E2014L, + 1E2015L, + 1E2016L, + 1E2017L, + 1E2018L, + 1E2019L, + 1E2020L, + 1E2021L, + 1E2022L, + 1E2023L, + 1E2024L, + 1E2025L, + 1E2026L, + 1E2027L, + 1E2028L, + 1E2029L, + 1E2030L, + 1E2031L, + 1E2032L, + 1E2033L, + 1E2034L, + 1E2035L, + 1E2036L, + 1E2037L, + 1E2038L, + 1E2039L, + 1E2040L, + 1E2041L, + 1E2042L, + 1E2043L, + 1E2044L, + 1E2045L, + 1E2046L, + 1E2047L, + 1E2048L, + 1E2049L, + 1E2050L, + 1E2051L, + 1E2052L, + 1E2053L, + 1E2054L, + 1E2055L, + 1E2056L, + 1E2057L, + 1E2058L, + 1E2059L, + 1E2060L, + 1E2061L, + 1E2062L, + 1E2063L, + 1E2064L, + 1E2065L, + 1E2066L, + 1E2067L, + 1E2068L, + 1E2069L, + 1E2070L, + 1E2071L, + 1E2072L, + 1E2073L, + 1E2074L, + 1E2075L, + 1E2076L, + 1E2077L, + 1E2078L, + 1E2079L, + 1E2080L, + 1E2081L, + 1E2082L, + 1E2083L, + 1E2084L, + 1E2085L, + 1E2086L, + 1E2087L, + 1E2088L, + 1E2089L, + 1E2090L, + 1E2091L, + 1E2092L, + 1E2093L, + 1E2094L, + 1E2095L, + 1E2096L, + 1E2097L, + 1E2098L, + 1E2099L, + 1E2100L, + 1E2101L, + 1E2102L, + 1E2103L, + 1E2104L, + 1E2105L, + 1E2106L, + 1E2107L, + 1E2108L, + 1E2109L, + 1E2110L, + 1E2111L, + 1E2112L, + 1E2113L, + 1E2114L, + 1E2115L, + 1E2116L, + 1E2117L, + 1E2118L, + 1E2119L, + 1E2120L, + 1E2121L, + 1E2122L, + 1E2123L, + 1E2124L, + 1E2125L, + 1E2126L, + 1E2127L, + 1E2128L, + 1E2129L, + 1E2130L, + 1E2131L, + 1E2132L, + 1E2133L, + 1E2134L, + 1E2135L, + 1E2136L, + 1E2137L, + 1E2138L, + 1E2139L, + 1E2140L, + 1E2141L, + 1E2142L, + 1E2143L, + 1E2144L, + 1E2145L, + 1E2146L, + 1E2147L, + 1E2148L, + 1E2149L, + 1E2150L, + 1E2151L, + 1E2152L, + 1E2153L, + 1E2154L, + 1E2155L, + 1E2156L, + 1E2157L, + 1E2158L, + 1E2159L, + 1E2160L, + 1E2161L, + 1E2162L, + 1E2163L, + 1E2164L, + 1E2165L, + 1E2166L, + 1E2167L, + 1E2168L, + 1E2169L, + 1E2170L, + 1E2171L, + 1E2172L, + 1E2173L, + 1E2174L, + 1E2175L, + 1E2176L, + 1E2177L, + 1E2178L, + 1E2179L, + 1E2180L, + 1E2181L, + 1E2182L, + 1E2183L, + 1E2184L, + 1E2185L, + 1E2186L, + 1E2187L, + 1E2188L, + 1E2189L, + 1E2190L, + 1E2191L, + 1E2192L, + 1E2193L, + 1E2194L, + 1E2195L, + 1E2196L, + 1E2197L, + 1E2198L, + 1E2199L, + 1E2200L, + 1E2201L, + 1E2202L, + 1E2203L, + 1E2204L, + 1E2205L, + 1E2206L, + 1E2207L, + 1E2208L, + 1E2209L, + 1E2210L, + 1E2211L, + 1E2212L, + 1E2213L, + 1E2214L, + 1E2215L, + 1E2216L, + 1E2217L, + 1E2218L, + 1E2219L, + 1E2220L, + 1E2221L, + 1E2222L, + 1E2223L, + 1E2224L, + 1E2225L, + 1E2226L, + 1E2227L, + 1E2228L, + 1E2229L, + 1E2230L, + 1E2231L, + 1E2232L, + 1E2233L, + 1E2234L, + 1E2235L, + 1E2236L, + 1E2237L, + 1E2238L, + 1E2239L, + 1E2240L, + 1E2241L, + 1E2242L, + 1E2243L, + 1E2244L, + 1E2245L, + 1E2246L, + 1E2247L, + 1E2248L, + 1E2249L, + 1E2250L, + 1E2251L, + 1E2252L, + 1E2253L, + 1E2254L, + 1E2255L, + 1E2256L, + 1E2257L, + 1E2258L, + 1E2259L, + 1E2260L, + 1E2261L, + 1E2262L, + 1E2263L, + 1E2264L, + 1E2265L, + 1E2266L, + 1E2267L, + 1E2268L, + 1E2269L, + 1E2270L, + 1E2271L, + 1E2272L, + 1E2273L, + 1E2274L, + 1E2275L, + 1E2276L, + 1E2277L, + 1E2278L, + 1E2279L, + 1E2280L, + 1E2281L, + 1E2282L, + 1E2283L, + 1E2284L, + 1E2285L, + 1E2286L, + 1E2287L, + 1E2288L, + 1E2289L, + 1E2290L, + 1E2291L, + 1E2292L, + 1E2293L, + 1E2294L, + 1E2295L, + 1E2296L, + 1E2297L, + 1E2298L, + 1E2299L, + 1E2300L, + 1E2301L, + 1E2302L, + 1E2303L, + 1E2304L, + 1E2305L, + 1E2306L, + 1E2307L, + 1E2308L, + 1E2309L, + 1E2310L, + 1E2311L, + 1E2312L, + 1E2313L, + 1E2314L, + 1E2315L, + 1E2316L, + 1E2317L, + 1E2318L, + 1E2319L, + 1E2320L, + 1E2321L, + 1E2322L, + 1E2323L, + 1E2324L, + 1E2325L, + 1E2326L, + 1E2327L, + 1E2328L, + 1E2329L, + 1E2330L, + 1E2331L, + 1E2332L, + 1E2333L, + 1E2334L, + 1E2335L, + 1E2336L, + 1E2337L, + 1E2338L, + 1E2339L, + 1E2340L, + 1E2341L, + 1E2342L, + 1E2343L, + 1E2344L, + 1E2345L, + 1E2346L, + 1E2347L, + 1E2348L, + 1E2349L, + 1E2350L, + 1E2351L, + 1E2352L, + 1E2353L, + 1E2354L, + 1E2355L, + 1E2356L, + 1E2357L, + 1E2358L, + 1E2359L, + 1E2360L, + 1E2361L, + 1E2362L, + 1E2363L, + 1E2364L, + 1E2365L, + 1E2366L, + 1E2367L, + 1E2368L, + 1E2369L, + 1E2370L, + 1E2371L, + 1E2372L, + 1E2373L, + 1E2374L, + 1E2375L, + 1E2376L, + 1E2377L, + 1E2378L, + 1E2379L, + 1E2380L, + 1E2381L, + 1E2382L, + 1E2383L, + 1E2384L, + 1E2385L, + 1E2386L, + 1E2387L, + 1E2388L, + 1E2389L, + 1E2390L, + 1E2391L, + 1E2392L, + 1E2393L, + 1E2394L, + 1E2395L, + 1E2396L, + 1E2397L, + 1E2398L, + 1E2399L, + 1E2400L, + 1E2401L, + 1E2402L, + 1E2403L, + 1E2404L, + 1E2405L, + 1E2406L, + 1E2407L, + 1E2408L, + 1E2409L, + 1E2410L, + 1E2411L, + 1E2412L, + 1E2413L, + 1E2414L, + 1E2415L, + 1E2416L, + 1E2417L, + 1E2418L, + 1E2419L, + 1E2420L, + 1E2421L, + 1E2422L, + 1E2423L, + 1E2424L, + 1E2425L, + 1E2426L, + 1E2427L, + 1E2428L, + 1E2429L, + 1E2430L, + 1E2431L, + 1E2432L, + 1E2433L, + 1E2434L, + 1E2435L, + 1E2436L, + 1E2437L, + 1E2438L, + 1E2439L, + 1E2440L, + 1E2441L, + 1E2442L, + 1E2443L, + 1E2444L, + 1E2445L, + 1E2446L, + 1E2447L, + 1E2448L, + 1E2449L, + 1E2450L, + 1E2451L, + 1E2452L, + 1E2453L, + 1E2454L, + 1E2455L, + 1E2456L, + 1E2457L, + 1E2458L, + 1E2459L, + 1E2460L, + 1E2461L, + 1E2462L, + 1E2463L, + 1E2464L, + 1E2465L, + 1E2466L, + 1E2467L, + 1E2468L, + 1E2469L, + 1E2470L, + 1E2471L, + 1E2472L, + 1E2473L, + 1E2474L, + 1E2475L, + 1E2476L, + 1E2477L, + 1E2478L, + 1E2479L, + 1E2480L, + 1E2481L, + 1E2482L, + 1E2483L, + 1E2484L, + 1E2485L, + 1E2486L, + 1E2487L, + 1E2488L, + 1E2489L, + 1E2490L, + 1E2491L, + 1E2492L, + 1E2493L, + 1E2494L, + 1E2495L, + 1E2496L, + 1E2497L, + 1E2498L, + 1E2499L, + 1E2500L, + 1E2501L, + 1E2502L, + 1E2503L, + 1E2504L, + 1E2505L, + 1E2506L, + 1E2507L, + 1E2508L, + 1E2509L, + 1E2510L, + 1E2511L, + 1E2512L, + 1E2513L, + 1E2514L, + 1E2515L, + 1E2516L, + 1E2517L, + 1E2518L, + 1E2519L, + 1E2520L, + 1E2521L, + 1E2522L, + 1E2523L, + 1E2524L, + 1E2525L, + 1E2526L, + 1E2527L, + 1E2528L, + 1E2529L, + 1E2530L, + 1E2531L, + 1E2532L, + 1E2533L, + 1E2534L, + 1E2535L, + 1E2536L, + 1E2537L, + 1E2538L, + 1E2539L, + 1E2540L, + 1E2541L, + 1E2542L, + 1E2543L, + 1E2544L, + 1E2545L, + 1E2546L, + 1E2547L, + 1E2548L, + 1E2549L, + 1E2550L, + 1E2551L, + 1E2552L, + 1E2553L, + 1E2554L, + 1E2555L, + 1E2556L, + 1E2557L, + 1E2558L, + 1E2559L, + 1E2560L, + 1E2561L, + 1E2562L, + 1E2563L, + 1E2564L, + 1E2565L, + 1E2566L, + 1E2567L, + 1E2568L, + 1E2569L, + 1E2570L, + 1E2571L, + 1E2572L, + 1E2573L, + 1E2574L, + 1E2575L, + 1E2576L, + 1E2577L, + 1E2578L, + 1E2579L, + 1E2580L, + 1E2581L, + 1E2582L, + 1E2583L, + 1E2584L, + 1E2585L, + 1E2586L, + 1E2587L, + 1E2588L, + 1E2589L, + 1E2590L, + 1E2591L, + 1E2592L, + 1E2593L, + 1E2594L, + 1E2595L, + 1E2596L, + 1E2597L, + 1E2598L, + 1E2599L, + 1E2600L, + 1E2601L, + 1E2602L, + 1E2603L, + 1E2604L, + 1E2605L, + 1E2606L, + 1E2607L, + 1E2608L, + 1E2609L, + 1E2610L, + 1E2611L, + 1E2612L, + 1E2613L, + 1E2614L, + 1E2615L, + 1E2616L, + 1E2617L, + 1E2618L, + 1E2619L, + 1E2620L, + 1E2621L, + 1E2622L, + 1E2623L, + 1E2624L, + 1E2625L, + 1E2626L, + 1E2627L, + 1E2628L, + 1E2629L, + 1E2630L, + 1E2631L, + 1E2632L, + 1E2633L, + 1E2634L, + 1E2635L, + 1E2636L, + 1E2637L, + 1E2638L, + 1E2639L, + 1E2640L, + 1E2641L, + 1E2642L, + 1E2643L, + 1E2644L, + 1E2645L, + 1E2646L, + 1E2647L, + 1E2648L, + 1E2649L, + 1E2650L, + 1E2651L, + 1E2652L, + 1E2653L, + 1E2654L, + 1E2655L, + 1E2656L, + 1E2657L, + 1E2658L, + 1E2659L, + 1E2660L, + 1E2661L, + 1E2662L, + 1E2663L, + 1E2664L, + 1E2665L, + 1E2666L, + 1E2667L, + 1E2668L, + 1E2669L, + 1E2670L, + 1E2671L, + 1E2672L, + 1E2673L, + 1E2674L, + 1E2675L, + 1E2676L, + 1E2677L, + 1E2678L, + 1E2679L, + 1E2680L, + 1E2681L, + 1E2682L, + 1E2683L, + 1E2684L, + 1E2685L, + 1E2686L, + 1E2687L, + 1E2688L, + 1E2689L, + 1E2690L, + 1E2691L, + 1E2692L, + 1E2693L, + 1E2694L, + 1E2695L, + 1E2696L, + 1E2697L, + 1E2698L, + 1E2699L, + 1E2700L, + 1E2701L, + 1E2702L, + 1E2703L, + 1E2704L, + 1E2705L, + 1E2706L, + 1E2707L, + 1E2708L, + 1E2709L, + 1E2710L, + 1E2711L, + 1E2712L, + 1E2713L, + 1E2714L, + 1E2715L, + 1E2716L, + 1E2717L, + 1E2718L, + 1E2719L, + 1E2720L, + 1E2721L, + 1E2722L, + 1E2723L, + 1E2724L, + 1E2725L, + 1E2726L, + 1E2727L, + 1E2728L, + 1E2729L, + 1E2730L, + 1E2731L, + 1E2732L, + 1E2733L, + 1E2734L, + 1E2735L, + 1E2736L, + 1E2737L, + 1E2738L, + 1E2739L, + 1E2740L, + 1E2741L, + 1E2742L, + 1E2743L, + 1E2744L, + 1E2745L, + 1E2746L, + 1E2747L, + 1E2748L, + 1E2749L, + 1E2750L, + 1E2751L, + 1E2752L, + 1E2753L, + 1E2754L, + 1E2755L, + 1E2756L, + 1E2757L, + 1E2758L, + 1E2759L, + 1E2760L, + 1E2761L, + 1E2762L, + 1E2763L, + 1E2764L, + 1E2765L, + 1E2766L, + 1E2767L, + 1E2768L, + 1E2769L, + 1E2770L, + 1E2771L, + 1E2772L, + 1E2773L, + 1E2774L, + 1E2775L, + 1E2776L, + 1E2777L, + 1E2778L, + 1E2779L, + 1E2780L, + 1E2781L, + 1E2782L, + 1E2783L, + 1E2784L, + 1E2785L, + 1E2786L, + 1E2787L, + 1E2788L, + 1E2789L, + 1E2790L, + 1E2791L, + 1E2792L, + 1E2793L, + 1E2794L, + 1E2795L, + 1E2796L, + 1E2797L, + 1E2798L, + 1E2799L, + 1E2800L, + 1E2801L, + 1E2802L, + 1E2803L, + 1E2804L, + 1E2805L, + 1E2806L, + 1E2807L, + 1E2808L, + 1E2809L, + 1E2810L, + 1E2811L, + 1E2812L, + 1E2813L, + 1E2814L, + 1E2815L, + 1E2816L, + 1E2817L, + 1E2818L, + 1E2819L, + 1E2820L, + 1E2821L, + 1E2822L, + 1E2823L, + 1E2824L, + 1E2825L, + 1E2826L, + 1E2827L, + 1E2828L, + 1E2829L, + 1E2830L, + 1E2831L, + 1E2832L, + 1E2833L, + 1E2834L, + 1E2835L, + 1E2836L, + 1E2837L, + 1E2838L, + 1E2839L, + 1E2840L, + 1E2841L, + 1E2842L, + 1E2843L, + 1E2844L, + 1E2845L, + 1E2846L, + 1E2847L, + 1E2848L, + 1E2849L, + 1E2850L, + 1E2851L, + 1E2852L, + 1E2853L, + 1E2854L, + 1E2855L, + 1E2856L, + 1E2857L, + 1E2858L, + 1E2859L, + 1E2860L, + 1E2861L, + 1E2862L, + 1E2863L, + 1E2864L, + 1E2865L, + 1E2866L, + 1E2867L, + 1E2868L, + 1E2869L, + 1E2870L, + 1E2871L, + 1E2872L, + 1E2873L, + 1E2874L, + 1E2875L, + 1E2876L, + 1E2877L, + 1E2878L, + 1E2879L, + 1E2880L, + 1E2881L, + 1E2882L, + 1E2883L, + 1E2884L, + 1E2885L, + 1E2886L, + 1E2887L, + 1E2888L, + 1E2889L, + 1E2890L, + 1E2891L, + 1E2892L, + 1E2893L, + 1E2894L, + 1E2895L, + 1E2896L, + 1E2897L, + 1E2898L, + 1E2899L, + 1E2900L, + 1E2901L, + 1E2902L, + 1E2903L, + 1E2904L, + 1E2905L, + 1E2906L, + 1E2907L, + 1E2908L, + 1E2909L, + 1E2910L, + 1E2911L, + 1E2912L, + 1E2913L, + 1E2914L, + 1E2915L, + 1E2916L, + 1E2917L, + 1E2918L, + 1E2919L, + 1E2920L, + 1E2921L, + 1E2922L, + 1E2923L, + 1E2924L, + 1E2925L, + 1E2926L, + 1E2927L, + 1E2928L, + 1E2929L, + 1E2930L, + 1E2931L, + 1E2932L, + 1E2933L, + 1E2934L, + 1E2935L, + 1E2936L, + 1E2937L, + 1E2938L, + 1E2939L, + 1E2940L, + 1E2941L, + 1E2942L, + 1E2943L, + 1E2944L, + 1E2945L, + 1E2946L, + 1E2947L, + 1E2948L, + 1E2949L, + 1E2950L, + 1E2951L, + 1E2952L, + 1E2953L, + 1E2954L, + 1E2955L, + 1E2956L, + 1E2957L, + 1E2958L, + 1E2959L, + 1E2960L, + 1E2961L, + 1E2962L, + 1E2963L, + 1E2964L, + 1E2965L, + 1E2966L, + 1E2967L, + 1E2968L, + 1E2969L, + 1E2970L, + 1E2971L, + 1E2972L, + 1E2973L, + 1E2974L, + 1E2975L, + 1E2976L, + 1E2977L, + 1E2978L, + 1E2979L, + 1E2980L, + 1E2981L, + 1E2982L, + 1E2983L, + 1E2984L, + 1E2985L, + 1E2986L, + 1E2987L, + 1E2988L, + 1E2989L, + 1E2990L, + 1E2991L, + 1E2992L, + 1E2993L, + 1E2994L, + 1E2995L, + 1E2996L, + 1E2997L, + 1E2998L, + 1E2999L, + 1E3000L, + 1E3001L, + 1E3002L, + 1E3003L, + 1E3004L, + 1E3005L, + 1E3006L, + 1E3007L, + 1E3008L, + 1E3009L, + 1E3010L, + 1E3011L, + 1E3012L, + 1E3013L, + 1E3014L, + 1E3015L, + 1E3016L, + 1E3017L, + 1E3018L, + 1E3019L, + 1E3020L, + 1E3021L, + 1E3022L, + 1E3023L, + 1E3024L, + 1E3025L, + 1E3026L, + 1E3027L, + 1E3028L, + 1E3029L, + 1E3030L, + 1E3031L, + 1E3032L, + 1E3033L, + 1E3034L, + 1E3035L, + 1E3036L, + 1E3037L, + 1E3038L, + 1E3039L, + 1E3040L, + 1E3041L, + 1E3042L, + 1E3043L, + 1E3044L, + 1E3045L, + 1E3046L, + 1E3047L, + 1E3048L, + 1E3049L, + 1E3050L, + 1E3051L, + 1E3052L, + 1E3053L, + 1E3054L, + 1E3055L, + 1E3056L, + 1E3057L, + 1E3058L, + 1E3059L, + 1E3060L, + 1E3061L, + 1E3062L, + 1E3063L, + 1E3064L, + 1E3065L, + 1E3066L, + 1E3067L, + 1E3068L, + 1E3069L, + 1E3070L, + 1E3071L, + 1E3072L, + 1E3073L, + 1E3074L, + 1E3075L, + 1E3076L, + 1E3077L, + 1E3078L, + 1E3079L, + 1E3080L, + 1E3081L, + 1E3082L, + 1E3083L, + 1E3084L, + 1E3085L, + 1E3086L, + 1E3087L, + 1E3088L, + 1E3089L, + 1E3090L, + 1E3091L, + 1E3092L, + 1E3093L, + 1E3094L, + 1E3095L, + 1E3096L, + 1E3097L, + 1E3098L, + 1E3099L, + 1E3100L, + 1E3101L, + 1E3102L, + 1E3103L, + 1E3104L, + 1E3105L, + 1E3106L, + 1E3107L, + 1E3108L, + 1E3109L, + 1E3110L, + 1E3111L, + 1E3112L, + 1E3113L, + 1E3114L, + 1E3115L, + 1E3116L, + 1E3117L, + 1E3118L, + 1E3119L, + 1E3120L, + 1E3121L, + 1E3122L, + 1E3123L, + 1E3124L, + 1E3125L, + 1E3126L, + 1E3127L, + 1E3128L, + 1E3129L, + 1E3130L, + 1E3131L, + 1E3132L, + 1E3133L, + 1E3134L, + 1E3135L, + 1E3136L, + 1E3137L, + 1E3138L, + 1E3139L, + 1E3140L, + 1E3141L, + 1E3142L, + 1E3143L, + 1E3144L, + 1E3145L, + 1E3146L, + 1E3147L, + 1E3148L, + 1E3149L, + 1E3150L, + 1E3151L, + 1E3152L, + 1E3153L, + 1E3154L, + 1E3155L, + 1E3156L, + 1E3157L, + 1E3158L, + 1E3159L, + 1E3160L, + 1E3161L, + 1E3162L, + 1E3163L, + 1E3164L, + 1E3165L, + 1E3166L, + 1E3167L, + 1E3168L, + 1E3169L, + 1E3170L, + 1E3171L, + 1E3172L, + 1E3173L, + 1E3174L, + 1E3175L, + 1E3176L, + 1E3177L, + 1E3178L, + 1E3179L, + 1E3180L, + 1E3181L, + 1E3182L, + 1E3183L, + 1E3184L, + 1E3185L, + 1E3186L, + 1E3187L, + 1E3188L, + 1E3189L, + 1E3190L, + 1E3191L, + 1E3192L, + 1E3193L, + 1E3194L, + 1E3195L, + 1E3196L, + 1E3197L, + 1E3198L, + 1E3199L, + 1E3200L, + 1E3201L, + 1E3202L, + 1E3203L, + 1E3204L, + 1E3205L, + 1E3206L, + 1E3207L, + 1E3208L, + 1E3209L, + 1E3210L, + 1E3211L, + 1E3212L, + 1E3213L, + 1E3214L, + 1E3215L, + 1E3216L, + 1E3217L, + 1E3218L, + 1E3219L, + 1E3220L, + 1E3221L, + 1E3222L, + 1E3223L, + 1E3224L, + 1E3225L, + 1E3226L, + 1E3227L, + 1E3228L, + 1E3229L, + 1E3230L, + 1E3231L, + 1E3232L, + 1E3233L, + 1E3234L, + 1E3235L, + 1E3236L, + 1E3237L, + 1E3238L, + 1E3239L, + 1E3240L, + 1E3241L, + 1E3242L, + 1E3243L, + 1E3244L, + 1E3245L, + 1E3246L, + 1E3247L, + 1E3248L, + 1E3249L, + 1E3250L, + 1E3251L, + 1E3252L, + 1E3253L, + 1E3254L, + 1E3255L, + 1E3256L, + 1E3257L, + 1E3258L, + 1E3259L, + 1E3260L, + 1E3261L, + 1E3262L, + 1E3263L, + 1E3264L, + 1E3265L, + 1E3266L, + 1E3267L, + 1E3268L, + 1E3269L, + 1E3270L, + 1E3271L, + 1E3272L, + 1E3273L, + 1E3274L, + 1E3275L, + 1E3276L, + 1E3277L, + 1E3278L, + 1E3279L, + 1E3280L, + 1E3281L, + 1E3282L, + 1E3283L, + 1E3284L, + 1E3285L, + 1E3286L, + 1E3287L, + 1E3288L, + 1E3289L, + 1E3290L, + 1E3291L, + 1E3292L, + 1E3293L, + 1E3294L, + 1E3295L, + 1E3296L, + 1E3297L, + 1E3298L, + 1E3299L, + 1E3300L, + 1E3301L, + 1E3302L, + 1E3303L, + 1E3304L, + 1E3305L, + 1E3306L, + 1E3307L, + 1E3308L, + 1E3309L, + 1E3310L, + 1E3311L, + 1E3312L, + 1E3313L, + 1E3314L, + 1E3315L, + 1E3316L, + 1E3317L, + 1E3318L, + 1E3319L, + 1E3320L, + 1E3321L, + 1E3322L, + 1E3323L, + 1E3324L, + 1E3325L, + 1E3326L, + 1E3327L, + 1E3328L, + 1E3329L, + 1E3330L, + 1E3331L, + 1E3332L, + 1E3333L, + 1E3334L, + 1E3335L, + 1E3336L, + 1E3337L, + 1E3338L, + 1E3339L, + 1E3340L, + 1E3341L, + 1E3342L, + 1E3343L, + 1E3344L, + 1E3345L, + 1E3346L, + 1E3347L, + 1E3348L, + 1E3349L, + 1E3350L, + 1E3351L, + 1E3352L, + 1E3353L, + 1E3354L, + 1E3355L, + 1E3356L, + 1E3357L, + 1E3358L, + 1E3359L, + 1E3360L, + 1E3361L, + 1E3362L, + 1E3363L, + 1E3364L, + 1E3365L, + 1E3366L, + 1E3367L, + 1E3368L, + 1E3369L, + 1E3370L, + 1E3371L, + 1E3372L, + 1E3373L, + 1E3374L, + 1E3375L, + 1E3376L, + 1E3377L, + 1E3378L, + 1E3379L, + 1E3380L, + 1E3381L, + 1E3382L, + 1E3383L, + 1E3384L, + 1E3385L, + 1E3386L, + 1E3387L, + 1E3388L, + 1E3389L, + 1E3390L, + 1E3391L, + 1E3392L, + 1E3393L, + 1E3394L, + 1E3395L, + 1E3396L, + 1E3397L, + 1E3398L, + 1E3399L, + 1E3400L, + 1E3401L, + 1E3402L, + 1E3403L, + 1E3404L, + 1E3405L, + 1E3406L, + 1E3407L, + 1E3408L, + 1E3409L, + 1E3410L, + 1E3411L, + 1E3412L, + 1E3413L, + 1E3414L, + 1E3415L, + 1E3416L, + 1E3417L, + 1E3418L, + 1E3419L, + 1E3420L, + 1E3421L, + 1E3422L, + 1E3423L, + 1E3424L, + 1E3425L, + 1E3426L, + 1E3427L, + 1E3428L, + 1E3429L, + 1E3430L, + 1E3431L, + 1E3432L, + 1E3433L, + 1E3434L, + 1E3435L, + 1E3436L, + 1E3437L, + 1E3438L, + 1E3439L, + 1E3440L, + 1E3441L, + 1E3442L, + 1E3443L, + 1E3444L, + 1E3445L, + 1E3446L, + 1E3447L, + 1E3448L, + 1E3449L, + 1E3450L, + 1E3451L, + 1E3452L, + 1E3453L, + 1E3454L, + 1E3455L, + 1E3456L, + 1E3457L, + 1E3458L, + 1E3459L, + 1E3460L, + 1E3461L, + 1E3462L, + 1E3463L, + 1E3464L, + 1E3465L, + 1E3466L, + 1E3467L, + 1E3468L, + 1E3469L, + 1E3470L, + 1E3471L, + 1E3472L, + 1E3473L, + 1E3474L, + 1E3475L, + 1E3476L, + 1E3477L, + 1E3478L, + 1E3479L, + 1E3480L, + 1E3481L, + 1E3482L, + 1E3483L, + 1E3484L, + 1E3485L, + 1E3486L, + 1E3487L, + 1E3488L, + 1E3489L, + 1E3490L, + 1E3491L, + 1E3492L, + 1E3493L, + 1E3494L, + 1E3495L, + 1E3496L, + 1E3497L, + 1E3498L, + 1E3499L, + 1E3500L, + 1E3501L, + 1E3502L, + 1E3503L, + 1E3504L, + 1E3505L, + 1E3506L, + 1E3507L, + 1E3508L, + 1E3509L, + 1E3510L, + 1E3511L, + 1E3512L, + 1E3513L, + 1E3514L, + 1E3515L, + 1E3516L, + 1E3517L, + 1E3518L, + 1E3519L, + 1E3520L, + 1E3521L, + 1E3522L, + 1E3523L, + 1E3524L, + 1E3525L, + 1E3526L, + 1E3527L, + 1E3528L, + 1E3529L, + 1E3530L, + 1E3531L, + 1E3532L, + 1E3533L, + 1E3534L, + 1E3535L, + 1E3536L, + 1E3537L, + 1E3538L, + 1E3539L, + 1E3540L, + 1E3541L, + 1E3542L, + 1E3543L, + 1E3544L, + 1E3545L, + 1E3546L, + 1E3547L, + 1E3548L, + 1E3549L, + 1E3550L, + 1E3551L, + 1E3552L, + 1E3553L, + 1E3554L, + 1E3555L, + 1E3556L, + 1E3557L, + 1E3558L, + 1E3559L, + 1E3560L, + 1E3561L, + 1E3562L, + 1E3563L, + 1E3564L, + 1E3565L, + 1E3566L, + 1E3567L, + 1E3568L, + 1E3569L, + 1E3570L, + 1E3571L, + 1E3572L, + 1E3573L, + 1E3574L, + 1E3575L, + 1E3576L, + 1E3577L, + 1E3578L, + 1E3579L, + 1E3580L, + 1E3581L, + 1E3582L, + 1E3583L, + 1E3584L, + 1E3585L, + 1E3586L, + 1E3587L, + 1E3588L, + 1E3589L, + 1E3590L, + 1E3591L, + 1E3592L, + 1E3593L, + 1E3594L, + 1E3595L, + 1E3596L, + 1E3597L, + 1E3598L, + 1E3599L, + 1E3600L, + 1E3601L, + 1E3602L, + 1E3603L, + 1E3604L, + 1E3605L, + 1E3606L, + 1E3607L, + 1E3608L, + 1E3609L, + 1E3610L, + 1E3611L, + 1E3612L, + 1E3613L, + 1E3614L, + 1E3615L, + 1E3616L, + 1E3617L, + 1E3618L, + 1E3619L, + 1E3620L, + 1E3621L, + 1E3622L, + 1E3623L, + 1E3624L, + 1E3625L, + 1E3626L, + 1E3627L, + 1E3628L, + 1E3629L, + 1E3630L, + 1E3631L, + 1E3632L, + 1E3633L, + 1E3634L, + 1E3635L, + 1E3636L, + 1E3637L, + 1E3638L, + 1E3639L, + 1E3640L, + 1E3641L, + 1E3642L, + 1E3643L, + 1E3644L, + 1E3645L, + 1E3646L, + 1E3647L, + 1E3648L, + 1E3649L, + 1E3650L, + 1E3651L, + 1E3652L, + 1E3653L, + 1E3654L, + 1E3655L, + 1E3656L, + 1E3657L, + 1E3658L, + 1E3659L, + 1E3660L, + 1E3661L, + 1E3662L, + 1E3663L, + 1E3664L, + 1E3665L, + 1E3666L, + 1E3667L, + 1E3668L, + 1E3669L, + 1E3670L, + 1E3671L, + 1E3672L, + 1E3673L, + 1E3674L, + 1E3675L, + 1E3676L, + 1E3677L, + 1E3678L, + 1E3679L, + 1E3680L, + 1E3681L, + 1E3682L, + 1E3683L, + 1E3684L, + 1E3685L, + 1E3686L, + 1E3687L, + 1E3688L, + 1E3689L, + 1E3690L, + 1E3691L, + 1E3692L, + 1E3693L, + 1E3694L, + 1E3695L, + 1E3696L, + 1E3697L, + 1E3698L, + 1E3699L, + 1E3700L, + 1E3701L, + 1E3702L, + 1E3703L, + 1E3704L, + 1E3705L, + 1E3706L, + 1E3707L, + 1E3708L, + 1E3709L, + 1E3710L, + 1E3711L, + 1E3712L, + 1E3713L, + 1E3714L, + 1E3715L, + 1E3716L, + 1E3717L, + 1E3718L, + 1E3719L, + 1E3720L, + 1E3721L, + 1E3722L, + 1E3723L, + 1E3724L, + 1E3725L, + 1E3726L, + 1E3727L, + 1E3728L, + 1E3729L, + 1E3730L, + 1E3731L, + 1E3732L, + 1E3733L, + 1E3734L, + 1E3735L, + 1E3736L, + 1E3737L, + 1E3738L, + 1E3739L, + 1E3740L, + 1E3741L, + 1E3742L, + 1E3743L, + 1E3744L, + 1E3745L, + 1E3746L, + 1E3747L, + 1E3748L, + 1E3749L, + 1E3750L, + 1E3751L, + 1E3752L, + 1E3753L, + 1E3754L, + 1E3755L, + 1E3756L, + 1E3757L, + 1E3758L, + 1E3759L, + 1E3760L, + 1E3761L, + 1E3762L, + 1E3763L, + 1E3764L, + 1E3765L, + 1E3766L, + 1E3767L, + 1E3768L, + 1E3769L, + 1E3770L, + 1E3771L, + 1E3772L, + 1E3773L, + 1E3774L, + 1E3775L, + 1E3776L, + 1E3777L, + 1E3778L, + 1E3779L, + 1E3780L, + 1E3781L, + 1E3782L, + 1E3783L, + 1E3784L, + 1E3785L, + 1E3786L, + 1E3787L, + 1E3788L, + 1E3789L, + 1E3790L, + 1E3791L, + 1E3792L, + 1E3793L, + 1E3794L, + 1E3795L, + 1E3796L, + 1E3797L, + 1E3798L, + 1E3799L, + 1E3800L, + 1E3801L, + 1E3802L, + 1E3803L, + 1E3804L, + 1E3805L, + 1E3806L, + 1E3807L, + 1E3808L, + 1E3809L, + 1E3810L, + 1E3811L, + 1E3812L, + 1E3813L, + 1E3814L, + 1E3815L, + 1E3816L, + 1E3817L, + 1E3818L, + 1E3819L, + 1E3820L, + 1E3821L, + 1E3822L, + 1E3823L, + 1E3824L, + 1E3825L, + 1E3826L, + 1E3827L, + 1E3828L, + 1E3829L, + 1E3830L, + 1E3831L, + 1E3832L, + 1E3833L, + 1E3834L, + 1E3835L, + 1E3836L, + 1E3837L, + 1E3838L, + 1E3839L, + 1E3840L, + 1E3841L, + 1E3842L, + 1E3843L, + 1E3844L, + 1E3845L, + 1E3846L, + 1E3847L, + 1E3848L, + 1E3849L, + 1E3850L, + 1E3851L, + 1E3852L, + 1E3853L, + 1E3854L, + 1E3855L, + 1E3856L, + 1E3857L, + 1E3858L, + 1E3859L, + 1E3860L, + 1E3861L, + 1E3862L, + 1E3863L, + 1E3864L, + 1E3865L, + 1E3866L, + 1E3867L, + 1E3868L, + 1E3869L, + 1E3870L, + 1E3871L, + 1E3872L, + 1E3873L, + 1E3874L, + 1E3875L, + 1E3876L, + 1E3877L, + 1E3878L, + 1E3879L, + 1E3880L, + 1E3881L, + 1E3882L, + 1E3883L, + 1E3884L, + 1E3885L, + 1E3886L, + 1E3887L, + 1E3888L, + 1E3889L, + 1E3890L, + 1E3891L, + 1E3892L, + 1E3893L, + 1E3894L, + 1E3895L, + 1E3896L, + 1E3897L, + 1E3898L, + 1E3899L, + 1E3900L, + 1E3901L, + 1E3902L, + 1E3903L, + 1E3904L, + 1E3905L, + 1E3906L, + 1E3907L, + 1E3908L, + 1E3909L, + 1E3910L, + 1E3911L, + 1E3912L, + 1E3913L, + 1E3914L, + 1E3915L, + 1E3916L, + 1E3917L, + 1E3918L, + 1E3919L, + 1E3920L, + 1E3921L, + 1E3922L, + 1E3923L, + 1E3924L, + 1E3925L, + 1E3926L, + 1E3927L, + 1E3928L, + 1E3929L, + 1E3930L, + 1E3931L, + 1E3932L, + 1E3933L, + 1E3934L, + 1E3935L, + 1E3936L, + 1E3937L, + 1E3938L, + 1E3939L, + 1E3940L, + 1E3941L, + 1E3942L, + 1E3943L, + 1E3944L, + 1E3945L, + 1E3946L, + 1E3947L, + 1E3948L, + 1E3949L, + 1E3950L, + 1E3951L, + 1E3952L, + 1E3953L, + 1E3954L, + 1E3955L, + 1E3956L, + 1E3957L, + 1E3958L, + 1E3959L, + 1E3960L, + 1E3961L, + 1E3962L, + 1E3963L, + 1E3964L, + 1E3965L, + 1E3966L, + 1E3967L, + 1E3968L, + 1E3969L, + 1E3970L, + 1E3971L, + 1E3972L, + 1E3973L, + 1E3974L, + 1E3975L, + 1E3976L, + 1E3977L, + 1E3978L, + 1E3979L, + 1E3980L, + 1E3981L, + 1E3982L, + 1E3983L, + 1E3984L, + 1E3985L, + 1E3986L, + 1E3987L, + 1E3988L, + 1E3989L, + 1E3990L, + 1E3991L, + 1E3992L, + 1E3993L, + 1E3994L, + 1E3995L, + 1E3996L, + 1E3997L, + 1E3998L, + 1E3999L, + 1E4000L, + 1E4001L, + 1E4002L, + 1E4003L, + 1E4004L, + 1E4005L, + 1E4006L, + 1E4007L, + 1E4008L, + 1E4009L, + 1E4010L, + 1E4011L, + 1E4012L, + 1E4013L, + 1E4014L, + 1E4015L, + 1E4016L, + 1E4017L, + 1E4018L, + 1E4019L, + 1E4020L, + 1E4021L, + 1E4022L, + 1E4023L, + 1E4024L, + 1E4025L, + 1E4026L, + 1E4027L, + 1E4028L, + 1E4029L, + 1E4030L, + 1E4031L, + 1E4032L, + 1E4033L, + 1E4034L, + 1E4035L, + 1E4036L, + 1E4037L, + 1E4038L, + 1E4039L, + 1E4040L, + 1E4041L, + 1E4042L, + 1E4043L, + 1E4044L, + 1E4045L, + 1E4046L, + 1E4047L, + 1E4048L, + 1E4049L, + 1E4050L, + 1E4051L, + 1E4052L, + 1E4053L, + 1E4054L, + 1E4055L, + 1E4056L, + 1E4057L, + 1E4058L, + 1E4059L, + 1E4060L, + 1E4061L, + 1E4062L, + 1E4063L, + 1E4064L, + 1E4065L, + 1E4066L, + 1E4067L, + 1E4068L, + 1E4069L, + 1E4070L, + 1E4071L, + 1E4072L, + 1E4073L, + 1E4074L, + 1E4075L, + 1E4076L, + 1E4077L, + 1E4078L, + 1E4079L, + 1E4080L, + 1E4081L, + 1E4082L, + 1E4083L, + 1E4084L, + 1E4085L, + 1E4086L, + 1E4087L, + 1E4088L, + 1E4089L, + 1E4090L, + 1E4091L, + 1E4092L, + 1E4093L, + 1E4094L, + 1E4095L, + 1E4096L, + 1E4097L, + 1E4098L, + 1E4099L, + 1E4100L, + 1E4101L, + 1E4102L, + 1E4103L, + 1E4104L, + 1E4105L, + 1E4106L, + 1E4107L, + 1E4108L, + 1E4109L, + 1E4110L, + 1E4111L, + 1E4112L, + 1E4113L, + 1E4114L, + 1E4115L, + 1E4116L, + 1E4117L, + 1E4118L, + 1E4119L, + 1E4120L, + 1E4121L, + 1E4122L, + 1E4123L, + 1E4124L, + 1E4125L, + 1E4126L, + 1E4127L, + 1E4128L, + 1E4129L, + 1E4130L, + 1E4131L, + 1E4132L, + 1E4133L, + 1E4134L, + 1E4135L, + 1E4136L, + 1E4137L, + 1E4138L, + 1E4139L, + 1E4140L, + 1E4141L, + 1E4142L, + 1E4143L, + 1E4144L, + 1E4145L, + 1E4146L, + 1E4147L, + 1E4148L, + 1E4149L, + 1E4150L, + 1E4151L, + 1E4152L, + 1E4153L, + 1E4154L, + 1E4155L, + 1E4156L, + 1E4157L, + 1E4158L, + 1E4159L, + 1E4160L, + 1E4161L, + 1E4162L, + 1E4163L, + 1E4164L, + 1E4165L, + 1E4166L, + 1E4167L, + 1E4168L, + 1E4169L, + 1E4170L, + 1E4171L, + 1E4172L, + 1E4173L, + 1E4174L, + 1E4175L, + 1E4176L, + 1E4177L, + 1E4178L, + 1E4179L, + 1E4180L, + 1E4181L, + 1E4182L, + 1E4183L, + 1E4184L, + 1E4185L, + 1E4186L, + 1E4187L, + 1E4188L, + 1E4189L, + 1E4190L, + 1E4191L, + 1E4192L, + 1E4193L, + 1E4194L, + 1E4195L, + 1E4196L, + 1E4197L, + 1E4198L, + 1E4199L, + 1E4200L, + 1E4201L, + 1E4202L, + 1E4203L, + 1E4204L, + 1E4205L, + 1E4206L, + 1E4207L, + 1E4208L, + 1E4209L, + 1E4210L, + 1E4211L, + 1E4212L, + 1E4213L, + 1E4214L, + 1E4215L, + 1E4216L, + 1E4217L, + 1E4218L, + 1E4219L, + 1E4220L, + 1E4221L, + 1E4222L, + 1E4223L, + 1E4224L, + 1E4225L, + 1E4226L, + 1E4227L, + 1E4228L, + 1E4229L, + 1E4230L, + 1E4231L, + 1E4232L, + 1E4233L, + 1E4234L, + 1E4235L, + 1E4236L, + 1E4237L, + 1E4238L, + 1E4239L, + 1E4240L, + 1E4241L, + 1E4242L, + 1E4243L, + 1E4244L, + 1E4245L, + 1E4246L, + 1E4247L, + 1E4248L, + 1E4249L, + 1E4250L, + 1E4251L, + 1E4252L, + 1E4253L, + 1E4254L, + 1E4255L, + 1E4256L, + 1E4257L, + 1E4258L, + 1E4259L, + 1E4260L, + 1E4261L, + 1E4262L, + 1E4263L, + 1E4264L, + 1E4265L, + 1E4266L, + 1E4267L, + 1E4268L, + 1E4269L, + 1E4270L, + 1E4271L, + 1E4272L, + 1E4273L, + 1E4274L, + 1E4275L, + 1E4276L, + 1E4277L, + 1E4278L, + 1E4279L, + 1E4280L, + 1E4281L, + 1E4282L, + 1E4283L, + 1E4284L, + 1E4285L, + 1E4286L, + 1E4287L, + 1E4288L, + 1E4289L, + 1E4290L, + 1E4291L, + 1E4292L, + 1E4293L, + 1E4294L, + 1E4295L, + 1E4296L, + 1E4297L, + 1E4298L, + 1E4299L, + 1E4300L, + 1E4301L, + 1E4302L, + 1E4303L, + 1E4304L, + 1E4305L, + 1E4306L, + 1E4307L, + 1E4308L, + 1E4309L, + 1E4310L, + 1E4311L, + 1E4312L, + 1E4313L, + 1E4314L, + 1E4315L, + 1E4316L, + 1E4317L, + 1E4318L, + 1E4319L, + 1E4320L, + 1E4321L, + 1E4322L, + 1E4323L, + 1E4324L, + 1E4325L, + 1E4326L, + 1E4327L, + 1E4328L, + 1E4329L, + 1E4330L, + 1E4331L, + 1E4332L, + 1E4333L, + 1E4334L, + 1E4335L, + 1E4336L, + 1E4337L, + 1E4338L, + 1E4339L, + 1E4340L, + 1E4341L, + 1E4342L, + 1E4343L, + 1E4344L, + 1E4345L, + 1E4346L, + 1E4347L, + 1E4348L, + 1E4349L, + 1E4350L, + 1E4351L, + 1E4352L, + 1E4353L, + 1E4354L, + 1E4355L, + 1E4356L, + 1E4357L, + 1E4358L, + 1E4359L, + 1E4360L, + 1E4361L, + 1E4362L, + 1E4363L, + 1E4364L, + 1E4365L, + 1E4366L, + 1E4367L, + 1E4368L, + 1E4369L, + 1E4370L, + 1E4371L, + 1E4372L, + 1E4373L, + 1E4374L, + 1E4375L, + 1E4376L, + 1E4377L, + 1E4378L, + 1E4379L, + 1E4380L, + 1E4381L, + 1E4382L, + 1E4383L, + 1E4384L, + 1E4385L, + 1E4386L, + 1E4387L, + 1E4388L, + 1E4389L, + 1E4390L, + 1E4391L, + 1E4392L, + 1E4393L, + 1E4394L, + 1E4395L, + 1E4396L, + 1E4397L, + 1E4398L, + 1E4399L, + 1E4400L, + 1E4401L, + 1E4402L, + 1E4403L, + 1E4404L, + 1E4405L, + 1E4406L, + 1E4407L, + 1E4408L, + 1E4409L, + 1E4410L, + 1E4411L, + 1E4412L, + 1E4413L, + 1E4414L, + 1E4415L, + 1E4416L, + 1E4417L, + 1E4418L, + 1E4419L, + 1E4420L, + 1E4421L, + 1E4422L, + 1E4423L, + 1E4424L, + 1E4425L, + 1E4426L, + 1E4427L, + 1E4428L, + 1E4429L, + 1E4430L, + 1E4431L, + 1E4432L, + 1E4433L, + 1E4434L, + 1E4435L, + 1E4436L, + 1E4437L, + 1E4438L, + 1E4439L, + 1E4440L, + 1E4441L, + 1E4442L, + 1E4443L, + 1E4444L, + 1E4445L, + 1E4446L, + 1E4447L, + 1E4448L, + 1E4449L, + 1E4450L, + 1E4451L, + 1E4452L, + 1E4453L, + 1E4454L, + 1E4455L, + 1E4456L, + 1E4457L, + 1E4458L, + 1E4459L, + 1E4460L, + 1E4461L, + 1E4462L, + 1E4463L, + 1E4464L, + 1E4465L, + 1E4466L, + 1E4467L, + 1E4468L, + 1E4469L, + 1E4470L, + 1E4471L, + 1E4472L, + 1E4473L, + 1E4474L, + 1E4475L, + 1E4476L, + 1E4477L, + 1E4478L, + 1E4479L, + 1E4480L, + 1E4481L, + 1E4482L, + 1E4483L, + 1E4484L, + 1E4485L, + 1E4486L, + 1E4487L, + 1E4488L, + 1E4489L, + 1E4490L, + 1E4491L, + 1E4492L, + 1E4493L, + 1E4494L, + 1E4495L, + 1E4496L, + 1E4497L, + 1E4498L, + 1E4499L, + 1E4500L, + 1E4501L, + 1E4502L, + 1E4503L, + 1E4504L, + 1E4505L, + 1E4506L, + 1E4507L, + 1E4508L, + 1E4509L, + 1E4510L, + 1E4511L, + 1E4512L, + 1E4513L, + 1E4514L, + 1E4515L, + 1E4516L, + 1E4517L, + 1E4518L, + 1E4519L, + 1E4520L, + 1E4521L, + 1E4522L, + 1E4523L, + 1E4524L, + 1E4525L, + 1E4526L, + 1E4527L, + 1E4528L, + 1E4529L, + 1E4530L, + 1E4531L, + 1E4532L, + 1E4533L, + 1E4534L, + 1E4535L, + 1E4536L, + 1E4537L, + 1E4538L, + 1E4539L, + 1E4540L, + 1E4541L, + 1E4542L, + 1E4543L, + 1E4544L, + 1E4545L, + 1E4546L, + 1E4547L, + 1E4548L, + 1E4549L, + 1E4550L, + 1E4551L, + 1E4552L, + 1E4553L, + 1E4554L, + 1E4555L, + 1E4556L, + 1E4557L, + 1E4558L, + 1E4559L, + 1E4560L, + 1E4561L, + 1E4562L, + 1E4563L, + 1E4564L, + 1E4565L, + 1E4566L, + 1E4567L, + 1E4568L, + 1E4569L, + 1E4570L, + 1E4571L, + 1E4572L, + 1E4573L, + 1E4574L, + 1E4575L, + 1E4576L, + 1E4577L, + 1E4578L, + 1E4579L, + 1E4580L, + 1E4581L, + 1E4582L, + 1E4583L, + 1E4584L, + 1E4585L, + 1E4586L, + 1E4587L, + 1E4588L, + 1E4589L, + 1E4590L, + 1E4591L, + 1E4592L, + 1E4593L, + 1E4594L, + 1E4595L, + 1E4596L, + 1E4597L, + 1E4598L, + 1E4599L, + 1E4600L, + 1E4601L, + 1E4602L, + 1E4603L, + 1E4604L, + 1E4605L, + 1E4606L, + 1E4607L, + 1E4608L, + 1E4609L, + 1E4610L, + 1E4611L, + 1E4612L, + 1E4613L, + 1E4614L, + 1E4615L, + 1E4616L, + 1E4617L, + 1E4618L, + 1E4619L, + 1E4620L, + 1E4621L, + 1E4622L, + 1E4623L, + 1E4624L, + 1E4625L, + 1E4626L, + 1E4627L, + 1E4628L, + 1E4629L, + 1E4630L, + 1E4631L, + 1E4632L, + 1E4633L, + 1E4634L, + 1E4635L, + 1E4636L, + 1E4637L, + 1E4638L, + 1E4639L, + 1E4640L, + 1E4641L, + 1E4642L, + 1E4643L, + 1E4644L, + 1E4645L, + 1E4646L, + 1E4647L, + 1E4648L, + 1E4649L, + 1E4650L, + 1E4651L, + 1E4652L, + 1E4653L, + 1E4654L, + 1E4655L, + 1E4656L, + 1E4657L, + 1E4658L, + 1E4659L, + 1E4660L, + 1E4661L, + 1E4662L, + 1E4663L, + 1E4664L, + 1E4665L, + 1E4666L, + 1E4667L, + 1E4668L, + 1E4669L, + 1E4670L, + 1E4671L, + 1E4672L, + 1E4673L, + 1E4674L, + 1E4675L, + 1E4676L, + 1E4677L, + 1E4678L, + 1E4679L, + 1E4680L, + 1E4681L, + 1E4682L, + 1E4683L, + 1E4684L, + 1E4685L, + 1E4686L, + 1E4687L, + 1E4688L, + 1E4689L, + 1E4690L, + 1E4691L, + 1E4692L, + 1E4693L, + 1E4694L, + 1E4695L, + 1E4696L, + 1E4697L, + 1E4698L, + 1E4699L, + 1E4700L, + 1E4701L, + 1E4702L, + 1E4703L, + 1E4704L, + 1E4705L, + 1E4706L, + 1E4707L, + 1E4708L, + 1E4709L, + 1E4710L, + 1E4711L, + 1E4712L, + 1E4713L, + 1E4714L, + 1E4715L, + 1E4716L, + 1E4717L, + 1E4718L, + 1E4719L, + 1E4720L, + 1E4721L, + 1E4722L, + 1E4723L, + 1E4724L, + 1E4725L, + 1E4726L, + 1E4727L, + 1E4728L, + 1E4729L, + 1E4730L, + 1E4731L, + 1E4732L, + 1E4733L, + 1E4734L, + 1E4735L, + 1E4736L, + 1E4737L, + 1E4738L, + 1E4739L, + 1E4740L, + 1E4741L, + 1E4742L, + 1E4743L, + 1E4744L, + 1E4745L, + 1E4746L, + 1E4747L, + 1E4748L, + 1E4749L, + 1E4750L, + 1E4751L, + 1E4752L, + 1E4753L, + 1E4754L, + 1E4755L, + 1E4756L, + 1E4757L, + 1E4758L, + 1E4759L, + 1E4760L, + 1E4761L, + 1E4762L, + 1E4763L, + 1E4764L, + 1E4765L, + 1E4766L, + 1E4767L, + 1E4768L, + 1E4769L, + 1E4770L, + 1E4771L, + 1E4772L, + 1E4773L, + 1E4774L, + 1E4775L, + 1E4776L, + 1E4777L, + 1E4778L, + 1E4779L, + 1E4780L, + 1E4781L, + 1E4782L, + 1E4783L, + 1E4784L, + 1E4785L, + 1E4786L, + 1E4787L, + 1E4788L, + 1E4789L, + 1E4790L, + 1E4791L, + 1E4792L, + 1E4793L, + 1E4794L, + 1E4795L, + 1E4796L, + 1E4797L, + 1E4798L, + 1E4799L, + 1E4800L, + 1E4801L, + 1E4802L, + 1E4803L, + 1E4804L, + 1E4805L, + 1E4806L, + 1E4807L, + 1E4808L, + 1E4809L, + 1E4810L, + 1E4811L, + 1E4812L, + 1E4813L, + 1E4814L, + 1E4815L, + 1E4816L, + 1E4817L, + 1E4818L, + 1E4819L, + 1E4820L, + 1E4821L, + 1E4822L, + 1E4823L, + 1E4824L, + 1E4825L, + 1E4826L, + 1E4827L, + 1E4828L, + 1E4829L, + 1E4830L, + 1E4831L, + 1E4832L, + 1E4833L, + 1E4834L, + 1E4835L, + 1E4836L, + 1E4837L, + 1E4838L, + 1E4839L, + 1E4840L, + 1E4841L, + 1E4842L, + 1E4843L, + 1E4844L, + 1E4845L, + 1E4846L, + 1E4847L, + 1E4848L, + 1E4849L, + 1E4850L, + 1E4851L, + 1E4852L, + 1E4853L, + 1E4854L, + 1E4855L, + 1E4856L, + 1E4857L, + 1E4858L, + 1E4859L, + 1E4860L, + 1E4861L, + 1E4862L, + 1E4863L, + 1E4864L, + 1E4865L, + 1E4866L, + 1E4867L, + 1E4868L, + 1E4869L, + 1E4870L, + 1E4871L, + 1E4872L, + 1E4873L, + 1E4874L, + 1E4875L, + 1E4876L, + 1E4877L, + 1E4878L, + 1E4879L, + 1E4880L, + 1E4881L, + 1E4882L, + 1E4883L, + 1E4884L, + 1E4885L, + 1E4886L, + 1E4887L, + 1E4888L, + 1E4889L, + 1E4890L, + 1E4891L, + 1E4892L, + 1E4893L, + 1E4894L, + 1E4895L, + 1E4896L, + 1E4897L, + 1E4898L, + 1E4899L, + 1E4900L, + 1E4901L, + 1E4902L, + 1E4903L, + 1E4904L, + 1E4905L, + 1E4906L, + 1E4907L, + 1E4908L, + 1E4909L, + 1E4910L, + 1E4911L, + 1E4912L, + 1E4913L, + 1E4914L, + 1E4915L, + 1E4916L, + 1E4917L, + 1E4918L, + 1E4919L, + 1E4920L, + 1E4921L, + 1E4922L, + 1E4923L, + 1E4924L, + 1E4925L, + 1E4926L, + 1E4927L, + 1E4928L, + 1E4929L, + 1E4930L, + 1E4931L, + 1E4932L, +}; + +Sftab_t _Sftable = +{ + { 1E1L, 1E2L, 1E4L, 1E8L, 1E16L, 1E32L }, + { 1E-1L, 1E-2L, 1E-4L, 1E-8L, 1E-16L, 1E-32L }, + { '0','0', '0','1', '0','2', '0','3', '0','4', + '0','5', '0','6', '0','7', '0','8', '0','9', + '1','0', '1','1', '1','2', '1','3', '1','4', + '1','5', '1','6', '1','7', '1','8', '1','9', + '2','0', '2','1', '2','2', '2','3', '2','4', + '2','5', '2','6', '2','7', '2','8', '2','9', + '3','0', '3','1', '3','2', '3','3', '3','4', + '3','5', '3','6', '3','7', '3','8', '3','9', + '4','0', '4','1', '4','2', '4','3', '4','4', + '4','5', '4','6', '4','7', '4','8', '4','9', + '5','0', '5','1', '5','2', '5','3', '5','4', + '5','5', '5','6', '5','7', '5','8', '5','9', + '6','0', '6','1', '6','2', '6','3', '6','4', + '6','5', '6','6', '6','7', '6','8', '6','9', + '7','0', '7','1', '7','2', '7','3', '7','4', + '7','5', '7','6', '7','7', '7','8', '7','9', + '8','0', '8','1', '8','2', '8','3', '8','4', + '8','5', '8','6', '8','7', '8','8', '8','9', + '9','0', '9','1', '9','2', '9','3', '9','4', + '9','5', '9','6', '9','7', '9','8', '9','9', + }, + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_", + sfcvinit, 0, + sffmtpos, + sffmtint, + (float*)&sf_flt_pow10[0], + (double*)&sf_dbl_pow10[0], + (_ast_fltmax_t*)&sf_ldbl_pow10[0], +}; +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/sfio b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sfio new file mode 100644 index 0000000000..7cad3472b6 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sfio @@ -0,0 +1,17 @@ +/* : : 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 ok */ +#define _hdr_float 1 /* #include ok */ +#define _hdr_floatingpoint 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _hdr_values 1 /* #include ok */ +#define _sys_filio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include 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 */ +#define _xopen_stdio 1 /* Stdio fseek/fflush are X/Open-compliant */ +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/sig b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sig new file mode 100644 index 0000000000..03020573f3 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sig @@ -0,0 +1,138 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 +#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/cmd/ast/libast/sparcv9/FEATURE/siglist b/usr/src/cmd/ast/libast/sparcv9/FEATURE/siglist new file mode 100644 index 0000000000..7ac817cdd9 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/siglist @@ -0,0 +1,131 @@ +/* : : 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 ok */ +#define _hdr_string 1 /* #include ok */ +#define _hdr_signal 1 /* #include ok */ +#define _lib_strsignal 1 /* strsignal() in default lib(s) */ +#if defined(SIGHUP) && !defined(HAD_SIGHUP) +0,"HUP",SIGHUP, +#endif +#if defined(SIGINT) && !defined(HAD_SIGINT) +0,"INT",SIGINT, +#endif +#if defined(SIGQUIT) && !defined(HAD_SIGQUIT) +0,"QUIT",SIGQUIT, +#endif +#if defined(SIGILL) && !defined(HAD_SIGILL) +0,"ILL",SIGILL, +#endif +#if defined(SIGTRAP) && !defined(HAD_SIGTRAP) +0,"TRAP",SIGTRAP, +#endif +#if defined(SIGIOT) && !defined(HAD_SIGIOT) +0,"IOT",SIGIOT, +#endif +#if defined(SIGEMT) && !defined(HAD_SIGEMT) +0,"EMT",SIGEMT, +#endif +#if defined(SIGFPE) && !defined(HAD_SIGFPE) +0,"FPE",SIGFPE, +#endif +#if defined(SIGKILL) && !defined(HAD_SIGKILL) +0,"KILL",SIGKILL, +#endif +#if defined(SIGBUS) && !defined(HAD_SIGBUS) +0,"BUS",SIGBUS, +#endif +#if defined(SIGSEGV) && !defined(HAD_SIGSEGV) +0,"SEGV",SIGSEGV, +#endif +#if defined(SIGSYS) && !defined(HAD_SIGSYS) +0,"SYS",SIGSYS, +#endif +#if defined(SIGPIPE) && !defined(HAD_SIGPIPE) +0,"PIPE",SIGPIPE, +#endif +#if defined(SIGALRM) && !defined(HAD_SIGALRM) +0,"ALRM",SIGALRM, +#endif +#if defined(SIGTERM) && !defined(HAD_SIGTERM) +0,"TERM",SIGTERM, +#endif +#if defined(SIGUSR1) && !defined(HAD_SIGUSR1) +0,"USR1",SIGUSR1, +#endif +#if defined(SIGUSR2) && !defined(HAD_SIGUSR2) +0,"USR2",SIGUSR2, +#endif +#if defined(SIGCHLD) && !defined(HAD_SIGCHLD) +0,"CHLD",SIGCHLD, +#endif +#if defined(SIGPWR) && !defined(HAD_SIGPWR) +0,"PWR",SIGPWR, +#endif +#if defined(SIGWINCH) && !defined(HAD_SIGWINCH) +0,"WINCH",SIGWINCH, +#endif +#if defined(SIGURG) && !defined(HAD_SIGURG) +0,"URG",SIGURG, +#endif +#if defined(SIGPOLL) && !defined(HAD_SIGPOLL) +0,"POLL",SIGPOLL, +#endif +#if defined(SIGSTOP) && !defined(HAD_SIGSTOP) +0,"STOP",SIGSTOP, +#endif +#if defined(SIGTSTP) && !defined(HAD_SIGTSTP) +0,"TSTP",SIGTSTP, +#endif +#if defined(SIGCONT) && !defined(HAD_SIGCONT) +0,"CONT",SIGCONT, +#endif +#if defined(SIGTTIN) && !defined(HAD_SIGTTIN) +0,"TTIN",SIGTTIN, +#endif +#if defined(SIGTTOU) && !defined(HAD_SIGTTOU) +0,"TTOU",SIGTTOU, +#endif +#if defined(SIGVTALRM) && !defined(HAD_SIGVTALRM) +0,"VTALRM",SIGVTALRM, +#endif +#if defined(SIGPROF) && !defined(HAD_SIGPROF) +0,"PROF",SIGPROF, +#endif +#if defined(SIGXCPU) && !defined(HAD_SIGXCPU) +0,"XCPU",SIGXCPU, +#endif +#if defined(SIGXFSZ) && !defined(HAD_SIGXFSZ) +0,"XFSZ",SIGXFSZ, +#endif +#if defined(SIGWAITING) && !defined(HAD_SIGWAITING) +0,"WAITING",SIGWAITING, +#endif +#if defined(SIGLWP) && !defined(HAD_SIGLWP) +0,"LWP",SIGLWP, +#endif +#if defined(SIGFREEZE) && !defined(HAD_SIGFREEZE) +0,"FREEZE",SIGFREEZE, +#endif +#if defined(SIGTHAW) && !defined(HAD_SIGTHAW) +0,"THAW",SIGTHAW, +#endif +#if defined(SIGCANCEL) && !defined(HAD_SIGCANCEL) +0,"CANCEL",SIGCANCEL, +#endif +#if defined(SIGLOST) && !defined(HAD_SIGLOST) +0,"LOST",SIGLOST, +#endif +#if defined(SIGXRES) && !defined(HAD_SIGXRES) +0,"XRES",SIGXRES, +#endif +#if defined(SIGJVM1) && !defined(HAD_SIGJVM1) +0,"JVM1",SIGJVM1, +#endif +#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/cmd/ast/libast/sparcv9/FEATURE/signal b/usr/src/cmd/ast/libast/sparcv9/FEATURE/signal new file mode 100644 index 0000000000..43b48f1dda --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/signal @@ -0,0 +1,225 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_signal_ast 1 +#define _sys_types 1 /* #include ok */ + +#define SIG_MAX 73 + +static const char* const sig_name[] = +{ + "0", + "HUP", + "INT", + "QUIT", + "ILL", + "TRAP", + "IOT", + "EMT", + "FPE", + "KILL", + "BUS", + "SEGV", + "SYS", + "PIPE", + "ALRM", + "TERM", + "USR1", + "USR2", + "CHLD", + "PWR", + "WINCH", + "URG", + "IO", + "STOP", + "TSTP", + "CONT", + "TTIN", + "TTOU", + "VTALRM", + "PROF", + "XCPU", + "XFSZ", + "WAITING", + "LWP", + "FREEZE", + "THAW", + "CANCEL", + "LOST", + "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", + "RTMAX", + 0 +}; + +static const char* const sig_text[] = +{ + "Signal 0", + "Hangup", + "Interrupt", + "Quit", + "Illegal instruction", + "Trace trap", + "IOT trap", + "EMT trap", + "Floating exception", + "Killed", + "Bus error", + "Memory fault", + "Bad system call", + "Broken pipe", + "Alarm call", + "Terminated", + "User signal 1", + "User signal 2", + "Child status change", + "Power fail", + "Window change", + "Urgent IO", + "IO possible", + "Stopped (signal)", + "Stopped", + "Stopped process continued", + "Stopped (tty input)", + "Stopped (tty output)", + "Virtual timer alarm", + "Profile timer alarm", + "CPU time limit", + "File size limit", + "All threads blocked", + "Thread event", + "CPR freeze", + "CPR thaw", + "Thread Cancellation", + "Resources lost", + "Resource Control Exceeded", + "Reserved for JVM 1", + "Reserved for JVM 2", + "Information Request", + "Realtime priority 0 (lo)", + "Realtime priority 1", + "Realtime priority 2", + "Realtime priority 3", + "Realtime priority 4", + "Realtime priority 5", + "Realtime priority 6", + "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 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 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/cmd/ast/libast/sparcv9/FEATURE/stdio b/usr/src/cmd/ast/libast/sparcv9/FEATURE/stdio new file mode 100644 index 0000000000..0694a40264 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/stdio @@ -0,0 +1,587 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 + +#include + +#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/cmd/ast/libast/sparcv9/FEATURE/sys b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sys new file mode 100644 index 0000000000..c02852888c --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sys @@ -0,0 +1,159 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 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 +#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 +#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 !_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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include 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 ok */ +#define _hdr_wchar 1 /* #include 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 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__ 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)); +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 +#else +#include +#endif +#endif + +#endif 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 ok */ +#define _lib_sysgetcwd 1 /* syscall(SYS_getcwd,buf,len) implemented */ +#include + +#define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b) + +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/time b/usr/src/cmd/ast/libast/sparcv9/FEATURE/time new file mode 100644 index 0000000000..fba3ba062b --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/time @@ -0,0 +1,83 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */ +#define _lib_usleep 1 /* usleep() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _typ_clock_t 1 /* clock_t is a type */ +#define _typ_time_t 1 /* time_t is a type */ +#include + +#include + +#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK) +#define CLOCKS_PER_SEC CLK_TCK +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/tmlib b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tmlib new file mode 100644 index 0000000000..6162b62ea8 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tmlib @@ -0,0 +1,71 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_tmlib_ast 1 +#define _sys_types 1 /* #include ok */ +#define _tzset_environ 1 /* tzset() bypasses user getenv() */ +#define tmlocaltime(p) _tm_localtime(p) + +extern __MANGLE__ struct tm* _tm_localtime __PROTO__((const time_t*)); + +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/tmx b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tmx new file mode 100644 index 0000000000..6ad4804a4b --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tmx @@ -0,0 +1,130 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 +#include + +#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/cmd/ast/libast/sparcv9/FEATURE/tty b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tty new file mode 100644 index 0000000000..1d39c122ed --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tty @@ -0,0 +1,134 @@ +/* : : 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 ok */ +#define _hdr_termios 1 /* #include ok */ +#define _hdr_termio 1 /* #include ok */ +#define _hdr_sgtty 1 /* #include ok */ +#define _sys_termios 1 /* #include ok */ +#define _sys_termio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include 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 +#else +# if defined(_sys_termios) && defined(_lib_tcgetattr) +# include +# 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 +# else +# ifdef _sys_termio +# include +# 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 +# endif /* _sys_bsdtty */ +# else +# ifdef _hdr_sgtty +# include +# ifndef LPENDIN +# ifdef _sys_nttyio +# include +# 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 +# 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/cmd/ast/libast/sparcv9/FEATURE/tv b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tv new file mode 100644 index 0000000000..0caab4a20a --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tv @@ -0,0 +1,111 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 + +#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/cmd/ast/libast/sparcv9/FEATURE/tvlib b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tvlib new file mode 100644 index 0000000000..3121038298 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tvlib @@ -0,0 +1,19 @@ +/* : : 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 ok */ +#define _hdr_time 1 /* #include ok */ +#define _lib_clock_settime 1 /* clock_settime() in default lib(s) */ +#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */ +#define _lib_settimeofday 1 /* settimeofday() in default lib(s) */ +#define _lib_stime 1 /* stime() in default lib(s) */ +#define _lib_utimes 1 /* utimes() in default lib(s) */ +#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */ +#define _lib_usleep 1 /* usleep() in default lib(s) */ +#define _sys_stat 1 /* #include ok */ +#define _lib_utimensat 1 /* complete utimensat implementation */ +#define _sys_time 1 /* #include ok */ +#define _lib_clock_gettime 1 /* execute{\ passed */ +#define tmgettimeofday(p) gettimeofday(p,(struct timezone*)0) +#define tmsettimeofday(p) settimeofday(p,(struct timezone*)0) +#endif 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 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/cmd/ast/libast/sparcv9/FEATURE/vfork b/usr/src/cmd/ast/libast/sparcv9/FEATURE/vfork new file mode 100644 index 0000000000..b555d25c80 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/vfork @@ -0,0 +1,68 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +extern __MANGLE__ pid_t vfork(void) __attribute__((__returns_twice__)); +#pragma unknown_control_flow(vfork) +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/vmalloc b/usr/src/cmd/ast/libast/sparcv9/FEATURE/vmalloc new file mode 100644 index 0000000000..0be84333de --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/vmalloc @@ -0,0 +1,36 @@ +/* : : 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 ok */ +#define _lib_atexit 1 /* atexit() in default lib(s) */ +#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */ +#define _lib_memalign 1 /* memalign() in default lib(s) */ +#define _lib_strdup 1 /* strdup() in default lib(s) */ +#define _lib_valloc 1 /* valloc() in default lib(s) */ +#define _hdr_alloca 1 /* #include ok */ +#define _hdr_malloc 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _mem_arena_mallinfo 1 /* arena is a member of struct mallinfo */ +#define _sys_stat 1 /* #include ok */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _typ_ssize_t 1 /* ssize_t is a type */ +#define _mem_sbrk 1 /* brk()/sbrk() work as expected */ +#define _lib_alloca 1 /* alloca exists */ +#define _stk_down 1 /* stack grows downward */ +#include "FEATURE/mmap" +#if _BLD_INSTRUMENT || cray || _UWIN && _BLD_ast +#undef _map_malloc +#define _std_malloc 1 /* defer to standard malloc */ +#endif +#if _mmap_anon +#define _mem_mmap_anon 1 +#endif +#if _mmap_devzero +#define _mem_mmap_zero 1 +#endif + +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/wait b/usr/src/cmd/ast/libast/sparcv9/FEATURE/wait new file mode 100644 index 0000000000..36ae8feef1 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/wait @@ -0,0 +1,11 @@ +/* : : 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 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 ok */ +#define _ok_wif 1 /* posix wait macros ok */ +#endif diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/wchar b/usr/src/cmd/ast/libast/sparcv9/FEATURE/wchar new file mode 100644 index 0000000000..2616f8f168 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/wchar @@ -0,0 +1,198 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 _sys_types 1 /* #include ok */ +#ifndef _AST_WCHAR_H +#define _AST_WCHAR_H 1 + +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _hdr_wchar 1 /* #include 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 ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _typ_mbstate_t 1 /* mbstate_t is a type */ +#define _nxt_wchar <../include/wchar.h> /* include path for the native */ +#define _nxt_wchar_str "../include/wchar.h" /* include string for the native */ +#ifndef _SFSTDIO_H +#include +#include +#endif + +#define _hdr_unistd 1 /* #include ok */ +#include /* includes */ + +#if _hdr_wchar && defined(_nxt_wchar) +#include <../include/wchar.h> /* the native wchar.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__ + +#else + +/* on some systems 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 ok */ +#define _nxt_wctype <../include/wctype.h> /* include path for the native */ +#define _nxt_wctype_str "../include/wctype.h" /* include string for the native */ +#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/cmd/ast/libast/sparcv9/Makefile b/usr/src/cmd/ast/libast/sparcv9/Makefile new file mode 100644 index 0000000000..21826f567e --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/Makefile @@ -0,0 +1,43 @@ +# +# 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. +# + +# Platform-specific config +# Note that "HOSTTYPE" matches the value used by AT&T upstream. +ASTPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"' + +# platform-specific sources +OBJECTS= conftab.o lctab.o + +include ../Makefile.com +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) +sparcv9_C_PICFLAGS = $(C_BIGPICFLAGS) + +install: all $(ROOTLIBS64) $(ROOTLINKS64) 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 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/cmd/ast/libast/sparcv9/conftab.c b/usr/src/cmd/ast/libast/sparcv9/conftab.c new file mode 100644 index 0000000000..f1a50aeb07 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/conftab.c @@ -0,0 +1,393 @@ +#include "FEATURE/standards" +#include "FEATURE/common" +#include +#include +#include +#if !defined(SYS_NMLEN) +#define SYS_NMLEN 9 +#endif +#include +#include "FEATURE/param" +#include "conftab.h" + +/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */ + +/* + * prefix strings -- the first few are indexed by Conf_t.standard + */ + +const Prefix_t prefix[] = +{ + "C", 1, CONF_C, -1, + "POSIX", 5, CONF_POSIX, -1, + "SVID", 4, CONF_SVID, -1, + "XOPEN", 5, CONF_XOPEN, -1, + "SUN", 3, CONF_SUN, -1, + "XBS5", 4, CONF_XBS5, -1, + "SCO", 3, CONF_SCO, -1, + "AST", 3, CONF_AST, -1, + "AES", 3, CONF_AES, -1, + "XPG", 3, CONF_XPG, -1, + "GNU", 3, CONF_GNU, -1, + "TRUSTEDBSD", 10, CONF_TRUSTEDBSD, -1, + "XX", 2, CONF_POSIX, CONF_nop, + "CS", 2, CONF_POSIX, CONF_confstr, + "PC", 2, CONF_POSIX, CONF_pathconf, + "SC", 2, CONF_POSIX, CONF_sysconf, + "SI", 2, CONF_SVID, CONF_sysinfo, +}; + +const int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]); + +/* + * conf strings sorted in ascending order + */ + +const Conf_t conf[] = +{ +{ "ABI_AIO_XFER_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ABI_ASYNCHRONOUS_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ABI_ASYNC_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ADVISORY_INFO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_ADVISORY_INFO }, +{ "AIO_LISTIO_MAX", { 0UL, 0 }, { _POSIX_AIO_LISTIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_LISTIO_MAX }, +{ "AIO_MAX", { 0UL, 0 }, { _POSIX_AIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_MAX }, +{ "AIO_PRIO_DELTA_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, _SC_AIO_PRIO_DELTA_MAX }, +{ "ALLOC_SIZE_MIN", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_ALLOC_SIZE_MIN }, +{ "ARCHITECTURE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_ARCHITECTURE }, +{ "ARG_MAX", { 0UL, 0 }, { _POSIX_ARG_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_ARG_MAX }, +{ "ASYNCHRONOUS_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_ASYNCHRONOUS_IO }, +{ "ASYNC_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_ASYNC_IO }, +{ "ATEXIT_MAX", { 0UL, 0 }, { 32UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_XOPEN, 1, CONF_sysconf, _SC_ATEXIT_MAX }, +{ "AUDIT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "AVAIL_PROCESSORS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "AVPHYS_PAGES", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SUN, 1, CONF_sysconf, _SC_AVPHYS_PAGES }, +{ "BARRIERS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_BARRIERS }, +{ "BC_BASE_MAX", { 0UL, 0 }, { _POSIX2_BC_BASE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_BASE_MAX }, +{ "BC_DIM_MAX", { 0UL, 0 }, { _POSIX2_BC_DIM_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_DIM_MAX }, +{ "BC_SCALE_MAX", { 0UL, 0 }, { _POSIX2_BC_SCALE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_SCALE_MAX }, +{ "BC_STRING_MAX", { 0UL, 0 }, { _POSIX2_BC_STRING_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_BC_STRING_MAX }, +{ "BUSTYPES", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "CHARCLASS_NAME_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "CHAR_BIT", { 8UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_MAX", { 127UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_MIN", { -127L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "CHAR_TERM", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_CHAR_TERM }, +{ "CHILD_MAX", { 0UL, 0 }, { _POSIX_CHILD_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_CHILD_MAX }, +{ "CHOWN_RESTRICTED", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_CHOWN_RESTRICTED }, +{ "CKPT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "CLK_TCK", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_POSIX, 1, CONF_sysconf, _SC_CLK_TCK }, +{ "CLOCKRES_MIN", { 0UL, 0 }, { _POSIX_CLOCKRES_MIN, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "CLOCKS_PER_SEC", { 1000000UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_LIMIT|CONF_LIMIT_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CLOCK_SELECTION", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_CLOCK_SELECTION }, +{ "COLL_WEIGHTS_MAX", { 0UL, 0 }, { _POSIX2_COLL_WEIGHTS_MAX, 0 }, CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_COLL_WEIGHTS_MAX }, +{ "CPUTIME", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_CPUTIME }, +{ "CPU_KEYBITS1", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CPU_VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "CRYPT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_CRYPT }, +{ "C_BIND", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_BIND }, +{ "C_DEV", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_DEV }, +{ "C_VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, _SC_2_C_VERSION }, +{ "DATAKEYS_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "DELAYTIMER_MAX", { 0UL, 0 }, { _POSIX_DELAYTIMER_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_DELAYTIMER_MAX }, +{ "ENH_I18N", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_ENH_I18N }, +{ "EQUIV_CLASS_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "EXEC_INTERPRETER_LENGTH", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "EXPR_NEST_MAX", { 0UL, 0 }, { _POSIX2_EXPR_NEST_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_EXPR_NEST_MAX }, +{ "FCHR_MAX", { 0UL, 0 }, { LONG_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "FILESIZEBITS", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_FILESIZEBITS }, +{ "FILE_LOCKING", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "FORT_DEV", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_FORT_DEV }, +{ "FORT_RUN", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_FORT_RUN }, +{ "FSYNC", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_FSYNC }, +{ "GETGR_R_SIZE_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_sysconf, _SC_GETGR_R_SIZE_MAX }, +{ "GETPW_R_SIZE_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_sysconf, _SC_GETPW_R_SIZE_MAX }, +{ "HOSTID", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "HOSTNAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_HOSTNAME }, +{ "HOST_NAME_MAX", { 0UL, 0 }, { _POSIX_HOST_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_HOST_NAME_MAX }, +{ "HW_PROVIDER", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_HW_PROVIDER }, +{ "HW_SERIAL", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ILP32_OFF32", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "ILP32_OFF32_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFF32_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "ILP32_OFFBIG_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "ILP32_OFFBIG_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "INITTAB_NAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "INT_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "INT_MIN", { -2147483647L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "IOV_MAX", { 0UL, 0 }, { _XOPEN_IOV_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_XOPEN, 1, CONF_sysconf, _SC_IOV_MAX }, +{ "IO_TYPE", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "IPV6", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_IPV6 }, +{ "IP_SECOPTS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "JOB_CONTROL", { 0UL, 0 }, { 1UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_JOB_CONTROL }, +{ "KERNEL_CLIST", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_CLIST_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DISK", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DISK_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DMABUF", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_DMABUF_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FILE", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FILE_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FLCKREC", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_FLCKREC_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_INODE", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_INODE_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_MOUNT", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_MOUNT_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PINODE", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PINODE_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PROC", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_PROC_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_REGION", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_REGION_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_S5INODE", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_S5INODE_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SCO, 1, CONF_sysconf, -1 }, +{ "KERNEL_STAMP", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "KERN_POINTERS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "KERN_SIM", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "LEGACY", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "LFS64_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_CFLAGS }, +{ "LFS64_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LDFLAGS }, +{ "LFS64_LIBS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LIBS }, +{ "LFS64_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS64_LINTFLAGS }, +{ "LFS_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_CFLAGS }, +{ "LFS_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LDFLAGS }, +{ "LFS_LIBS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LIBS }, +{ "LFS_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING, CONF_POSIX, 1, CONF_confstr, _CS_LFS_LINTFLAGS }, +{ "LINE_MAX", { 0UL, 0 }, { _POSIX2_LINE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_LINE_MAX }, +{ "LINK_MAX", { 0UL, 0 }, { _POSIX_LINK_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_LINK_MAX }, +{ "LLONG_MAX", { 9223372036854775807UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LLONG_MIN", { -9223372036854775807L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LOCALEDEF", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_LOCALEDEF }, +{ "LOGIN_NAME_MAX", { 0UL, 0 }, { _POSIX_LOGIN_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_LOGIN_NAME_MAX }, +{ "LOGNAME_MAX", { 0UL, 0 }, { 8UL, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, _SC_LOGNAME_MAX }, +{ "LONG_BIT", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "LONG_MAX", { 2147483647UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LONG_MIN", { -2147483647L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "LP64_OFF64", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "LP64_OFF64_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LP64_OFF64_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XBS5, 1, CONF_sysconf, -1 }, +{ "LPBIG_OFFBIG_CFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LDFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LIBS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "LPBIG_OFFBIG_LINTFLAGS", { 0, 0 }, { 0, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_STRING, CONF_XBS5, 1, CONF_confstr, -1 }, +{ "MACHINE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_MACHINE }, +{ "MAPPED_FILES", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MAPPED_FILES }, +{ "MAX_CANON", { 0UL, 0 }, { _POSIX_MAX_CANON, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_MAX_CANON }, +{ "MAX_INPUT", { 0UL, 0 }, { _POSIX_MAX_INPUT, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_MAX_INPUT }, +{ "MB_LEN_MAX", { 5UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "MCAS_OFFSET", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MEMLOCK", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMLOCK }, +{ "MEMLOCK_RANGE", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMLOCK_RANGE }, +{ "MEMORY_PROTECTION", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MEMORY_PROTECTION }, +{ "MESSAGE_PASSING", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MESSAGE_PASSING }, +{ "MMAP_FIXED_ALIGNMENT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MONOTONIC_CLOCK", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_MONOTONIC_CLOCK }, +{ "MQ_OPEN_MAX", { 0UL, 0 }, { _POSIX_MQ_OPEN_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_MQ_OPEN_MAX }, +{ "MQ_PRIO_MAX", { 0UL, 0 }, { _POSIX_MQ_PRIO_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_MQ_PRIO_MAX }, +{ "MSEM_LOCKID", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "MULTI_PROCESS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "NACLS_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "NAME_MAX", { 0UL, 0 }, { _POSIX_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_NAME_MAX }, +{ "NGROUPS_MAX", { 0UL, 0 }, { _POSIX_NGROUPS_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_NGROUPS_MAX }, +{ "NL_ARGMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_LANGMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NL_MSGMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_NMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_SETMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NL_SPECMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NL_TEXTMAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "NO_TRUNC", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_NO_TRUNC }, +{ "NPROCESSORS_CONF", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_CONF }, +{ "NPROCESSORS_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_MAX }, +{ "NPROCESSORS_ONLN", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_NPROCESSORS_ONLN }, +{ "NPROC_CONF", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NPROC_ONLN", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NSS_BUFLEN_GROUP", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NSS_BUFLEN_PASSWD", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NUM_PROCESSORS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "NZERO", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "OPEN_MAX", { 0UL, 0 }, { _POSIX_OPEN_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_OPEN_MAX }, +{ "OPEN_MAX_CEIL", { OPEN_MAX, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_AST, 1, CONF_nop, -1 }, +{ "OSREL_MAJ", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OSREL_MIN", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OSREL_PATCH", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "OS_BASE", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "OS_PROVIDER", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "OS_VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE, CONF_AES, 1, CONF_sysconf, -1 }, +{ "PAGESIZE", { 0UL, 0 }, { 4096UL, 0 }, CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_PAGESIZE }, +{ "PAGE_SIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_MINMAX|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, _SC_PAGE_SIZE }, +{ "PASS_MAX", { 0UL, 0 }, { 8UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, _SC_PASS_MAX }, +{ "PATH", { 0, 0 }, { 0, "/bin:/usr/bin" }, CONF_DEFER_CALL|CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_confstr, _CS_PATH }, +{ "PATH_MAX", { 0UL, 0 }, { _POSIX_PATH_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_PATH_MAX }, +{ "PBS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS }, +{ "PBS_ACCOUNTING", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_ACCOUNTING }, +{ "PBS_CHECKPOINT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_CHECKPOINT }, +{ "PBS_LOCATE", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_LOCATE }, +{ "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 }, { 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 }, +{ "PII_INTERNET_STREAM", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_CLTS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_COTS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_OSI_M", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_SOCKET", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PII_XTI", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PIPE_BUF", { 0UL, 0 }, { _POSIX_PIPE_BUF, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_PIPE_BUF }, +{ "POLL", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "PRIORITIZED_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_PRIORITIZED_IO }, +{ "PRIORITY_SCHEDULING", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_PRIORITY_SCHEDULING }, +{ "PRIO_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_PRIO_IO }, +{ "PROC_RSRC_MGR", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_DESTRUCTOR_ITERATIONS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_KEYS_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_STACK_MIN", { 4096UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_LIMIT|CONF_LIMIT_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTHREAD_THREADS_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "PTRDIFF_MAX", { 9223372036854775807UL, 0 }, { 65535UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "PTRDIFF_MIN", { -9223372036854775807L-1L, 0 }, { -65535L, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "RAW_SOCKETS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_RAW_SOCKETS }, +{ "READER_WRITER_LOCKS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_READER_WRITER_LOCKS }, +{ "REALTIME", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "REALTIME_SIGNALS", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_REALTIME_SIGNALS }, +{ "REALTIME_THREADS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, -1 }, +{ "REC_INCR_XFER_SIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_INCR_XFER_SIZE }, +{ "REC_MAX_XFER_SIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_MAX_XFER_SIZE }, +{ "REC_MIN_XFER_SIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_MIN_XFER_SIZE }, +{ "REC_XFER_ALIGN", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_REC_XFER_ALIGN }, +{ "REENTRANT_FUNCTIONS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "REGEXP", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_REGEXP }, +{ "REGEX_VERSION", { 0UL, 0 }, { 20030916UL, 0 }, CONF_FEATURE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "RELEASE", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_AST, 1, CONF_nop, -1 }, +{ "RESOURCE_LIMITS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "RE_DUP_MAX", { 0UL, 0 }, { _POSIX2_RE_DUP_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_NOSECTION|CONF_MINMAX_DEF, CONF_POSIX, 2, CONF_sysconf, _SC_RE_DUP_MAX }, +{ "RTSIG_MAX", { 0UL, 0 }, { _POSIX_RTSIG_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_RTSIG_MAX }, +{ "SAVED_IDS", { 0UL, 0 }, { 1UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SAVED_IDS }, +{ "SCHAR_MAX", { 127UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SCHAR_MIN", { -127L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SECURITY_CLASS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SELECT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "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 }, +{ "SHM", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_SHM }, +{ "SHRT_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "SHRT_MIN", { -32767L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIGQUEUE_MAX", { 0UL, 0 }, { _POSIX_SIGQUEUE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SIGQUEUE_MAX }, +{ "SIGRT_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_SIGRT_MAX }, +{ "SIGRT_MIN", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SVID, 1, CONF_sysconf, _SC_SIGRT_MIN }, +{ "SIG_ATOMIC_MAX", { 2147483647UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIG_ATOMIC_MIN", { -2147483647L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SIZE_MAX", { UINT_MAX, 0 }, { 65535UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "SLVM_MAXNODES", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SOCK_MAXBUF", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SOFTPOWER", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SPAWN", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPAWN }, +{ "SPIN_LOCKS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPIN_LOCKS }, +{ "SPORADIC_SERVER", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SPORADIC_SERVER }, +{ "SRPC_DOMAIN", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SSIZE_MAX", { INT_MAX, 0 }, { _POSIX_SSIZE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_nop, -1 }, +{ "SS_REPL_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SS_REPL_MAX }, +{ "STD_BLK", { 0UL, 0 }, { 1024UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "STREAMS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_STREAMS }, +{ "STREAM_MAX", { 0UL, 0 }, { _POSIX_STREAM_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_STREAM_MAX }, +{ "SW_DEV", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_SW_DEV }, +{ "SYMLINKS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_pathconf, _PC_2_SYMLINKS }, +{ "SYMLINK_MAX", { 0UL, 0 }, { _POSIX_SYMLINK_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_pathconf, _PC_SYMLINK_MAX }, +{ "SYMLOOP_MAX", { 0UL, 0 }, { _POSIX_SYMLOOP_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SYMLOOP_MAX }, +{ "SYNCHRONIZED_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SYNCHRONIZED_IO }, +{ "SYNC_IO", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_SYNC_IO }, +{ "SYSNAME", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, SI_SYSNAME }, +{ "SYSPID_MAX", { 0UL, 0 }, { 2UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "THREADS", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREADS }, +{ "THREADS_PRIO_CEILING", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "THREADS_PRIO_INHERIT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "THREAD_ATTR_STACKADDR", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_ATTR_STACKADDR }, +{ "THREAD_ATTR_STACKSIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_ATTR_STACKSIZE }, +{ "THREAD_CPUTIME", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_CPUTIME }, +{ "THREAD_DESTRUCTOR_ITERATIONS", { 0UL, 0 }, { _POSIX_THREAD_DESTRUCTOR_ITERATIONS, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_DESTRUCTOR_ITERATIONS }, +{ "THREAD_KEYS_MAX", { 0UL, 0 }, { _POSIX_THREAD_KEYS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_KEYS_MAX }, +{ "THREAD_PRIORITY_SCHEDULING", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIORITY_SCHEDULING }, +{ "THREAD_PRIO_INHERIT", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIO_INHERIT }, +{ "THREAD_PRIO_PROTECT", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PRIO_PROTECT }, +{ "THREAD_PROCESS_SHARED", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_PROCESS_SHARED }, +{ "THREAD_SAFE_FUNCTIONS", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_SAFE_FUNCTIONS }, +{ "THREAD_SPORADIC_SERVER", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_SPORADIC_SERVER }, +{ "THREAD_STACK_MIN", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_STACK_MIN }, +{ "THREAD_THREADS_MAX", { 0UL, 0 }, { _POSIX_THREAD_THREADS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_PREFIX_ONLY|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_THREAD_THREADS_MAX }, +{ "TIMEOUTS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TIMEOUTS }, +{ "TIMERS", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TIMERS }, +{ "TIMER_MAX", { 0UL, 0 }, { _POSIX_TIMER_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TIMER_MAX }, +{ "TMP", { 0, 0 }, { 0, "/tmp" }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_AST, 1, CONF_confstr, -1 }, +{ "TMP_MAX", { 17576UL, 0 }, { 10000UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_LIMIT_DEF|CONF_MINMAX_DEF, CONF_C, 1, CONF_sysconf, -1 }, +{ "TRACE", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE }, +{ "TRACE_EVENT_FILTER", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_EVENT_FILTER }, +{ "TRACE_EVENT_NAME_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_EVENT_NAME_MAX }, +{ "TRACE_INHERIT", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_INHERIT }, +{ "TRACE_LOG", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_LOG }, +{ "TRACE_NAME_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_NAME_MAX }, +{ "TRACE_SYS_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_SYS_MAX }, +{ "TRACE_USER_EVENT_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TRACE_USER_EVENT_MAX }, +{ "TTY_NAME_MAX", { 0UL, 0 }, { _POSIX_TTY_NAME_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TTY_NAME_MAX }, +{ "TYPED_MEMORY_OBJECTS", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_TYPED_MEMORY_OBJECTS }, +{ "TZNAME_MAX", { 0UL, 0 }, { _POSIX_TZNAME_MAX, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_TZNAME_MAX }, +{ "T_IOV_MAX", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_C, 1, CONF_sysconf, _SC_T_IOV_MAX }, +{ "UCHAR_MAX", { 255UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "UCHAR_MIN", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "UID_MAX", { 0UL, 0 }, { 60002UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 }, +{ "UINT_MAX", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "UIO_MAXIOV", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_nop, -1 }, +{ "ULLONG_MAX", { 18446744073709551615UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "ULONG_MAX", { 4294967295UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "UNIX", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_UNIX }, +{ "UPE", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_UPE }, +{ "USER_LIMIT", { 0, 0 }, { 0, 0 }, CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "USHRT_MAX", { 65535UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "V6_ILP32_OFF32", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_ILP32_OFF32 }, +{ "V6_ILP32_OFFBIG", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_ILP32_OFFBIG }, +{ "V6_LP64_OFF64", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_LP64_OFF64 }, +{ "V6_LPBIG_OFFBIG", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_V6_LPBIG_OFFBIG }, +{ "VDISABLE", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_pathconf, _PC_VDISABLE }, +{ "VERSION", { 0, 0 }, { 0, 0 }, CONF_PREFIXED|CONF_STANDARD|CONF_STRING, CONF_SVID, 1, CONF_sysinfo, -1 }, +{ "VERSION", { 0UL, 0 }, { 200112UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION", { 0UL, 0 }, { 200112UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 2, CONF_sysconf, -1 }, +{ "VERSION", { 0UL, 0 }, { 600UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_VERSION }, +{ "VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XPG, 3, CONF_sysconf, -1 }, +{ "VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_MM|CONF_FEATURE|CONF_PREFIXED|CONF_STANDARD|CONF_UNDERSCORE, CONF_XPG, 4, CONF_sysconf, -1 }, +{ "VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_MINMAX|CONF_PREFIXED|CONF_STANDARD, CONF_AST, 1, CONF_nop, -1 }, +{ "VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIXED|CONF_STANDARD, CONF_GNU, 1, CONF_nop, -1 }, +{ "VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_PREFIXED|CONF_STANDARD, CONF_TRUSTEDBSD, 1, CONF_nop, -1 }, +{ "VERSION_88", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_88", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "VERSION_90", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_90", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "VERSION_93", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_LIMIT|CONF_STANDARD|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 }, +{ "VERSION_93", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_C, 1, CONF_nop, -1 }, +{ "WCHAR_MAX", { 2147483647UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WCHAR_MIN", { -2147483647L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WINT_MAX", { 2147483647UL, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WINT_MIN", { -2147483647L-1L, 0 }, { 0UL, 0 }, CONF_LIMIT|CONF_LIMIT_DEF, CONF_C, 1, CONF_nop, -1 }, +{ "WORD_BIT", { 0UL, 0 }, { 0UL, 0 }, CONF_LIMIT, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XCU_VERSION", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_STANDARD|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_sysconf, _SC_XOPEN_XCU_VERSION }, +{ "XPG2", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XPG3", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +{ "XPG4", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 }, +}; + +const int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]); diff --git a/usr/src/cmd/ast/libast/sparcv9/conftab.h b/usr/src/cmd/ast/libast/sparcv9/conftab.h new file mode 100644 index 0000000000..a15714e8cb --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/conftab.h @@ -0,0 +1,94 @@ +#ifndef _CONFTAB_H +#define _CONFTAB_H + +#if !defined(SYS_NMLEN) +#define SYS_NMLEN 9 +#endif +#include + +/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */ + +#if !defined(const) && !defined(__STDC__) && !defined(__cplusplus) && !defined(c_plusplus) +#define const +#endif + +#define conf _ast_conf_data +#define conf_elements _ast_conf_ndata + +#define prefix _ast_conf_prefix +#define prefix_elements _ast_conf_nprefix + +#define CONF_nop 0 +#define CONF_confstr 1 +#define CONF_pathconf 2 +#define CONF_sysconf 3 +#define CONF_sysinfo 4 + +#define CONF_C 0 +#define CONF_POSIX 1 +#define CONF_SVID 2 +#define CONF_XOPEN 3 +#define CONF_SUN 4 +#define CONF_XBS5 5 +#define CONF_SCO 6 +#define CONF_AST 7 +#define CONF_AES 8 +#define CONF_XPG 9 +#define CONF_GNU 10 +#define CONF_TRUSTEDBSD 11 +#define CONF_call 12 + +#define _pth_getconf "/usr/bin/getconf" +#define _pth_getconf_a "-a" + +#define CONF_DEFER_CALL 0x0001 +#define CONF_DEFER_MM 0x0002 +#define CONF_FEATURE 0x0004 +#define CONF_LIMIT 0x0008 +#define CONF_LIMIT_DEF 0x0010 +#define CONF_MINMAX 0x0020 +#define CONF_MINMAX_DEF 0x0040 +#define CONF_NOSECTION 0x0080 +#define CONF_NOUNDERSCORE 0x0100 +#define CONF_PREFIX_ONLY 0x0200 +#define CONF_PREFIXED 0x0400 +#define CONF_STANDARD 0x0800 +#define CONF_STRING 0x1000 +#define CONF_UNDERSCORE 0x2000 +#define CONF_USER 0x4000 + +struct Conf_s; typedef struct Conf_s Conf_t; + +typedef struct Value_s +{ + intmax_t number; + const char* string; +} Value_t; + +struct Conf_s +{ + const char name[32]; + Value_t limit; + Value_t minmax; + unsigned int flags; + short standard; + short section; + short call; + short op; +}; + +typedef struct Prefix_s +{ + const char name[16]; + short length; + short standard; + short call; +} Prefix_t; + +extern const Conf_t conf[]; +extern const int conf_elements; + +extern const Prefix_t prefix[]; +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 + +#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/cmd/ast/libast/sparcv9/lctab.c b/usr/src/cmd/ast/libast/sparcv9/lctab.c new file mode 100644 index 0000000000..2afc20e2b5 --- /dev/null +++ b/usr/src/cmd/ast/libast/sparcv9/lctab.c @@ -0,0 +1,2635 @@ +/* : : generated by cmd/ast/tools/lcgen : : */ + +#include "lclib.h" +#include "lclang.h" + + +const Lc_attribute_t attribute_es[] = +{ +{"traditional",LC_default, +#ifdef SUBLANG_SPANISH_TRADITIONAL +SUBLANG_SPANISH_TRADITIONAL, +#else +0, +#endif + +}, +{"modern",0, +#ifdef SUBLANG_SPANISH_MODERN +SUBLANG_SPANISH_MODERN, +#else +0, +#endif + +}, +}; + +const Lc_charset_t lc_charsets[] = +{ +{"iso8859-1","latin1|west-europe","1252",}, +{"iso8859-2","latin2|east-europe","1250",}, +{"iso8859-3","latin3|south-europe","1257",}, +{"iso8859-4","latin4|north-europe",0}, +{"iso8859-5","cyrillic","1251",}, +{"iso8859-6","arabic","1256",}, +{"iso8859-7","greek","1253",}, +{"iso8859-8","hebrew","1255",}, +{"iso8859-9","latin5|turkish","1254",}, +{"iso8859-10","latin6|nordic",0}, +{"iso8859-13","latin7",0}, +{"iso8859-14","latin8|celtic",0}, +{"iso8859-15","latin0",0}, +{"iso2022","japanese|korean",0}, +{"iso4873","japanese-ascii|korean-ascii",0}, +{"koi8-r","russian",0}, +{"utf8","plan9",0}, + 0 +}; + +const Lc_language_t lc_languages[] = +{ +{"C","C","POSIX",&lc_charsets[0],LC_default,0,0,0,}, +{"debug","debug",0,&lc_charsets[0],LC_debug,0,0,0,}, +{"aa","afar",0,&lc_charsets[0],0, +#ifdef LANG_AFAR +LANG_AFAR, +#else +0, +#endif +0,0, +}, +{"ab","abkhazian",0,&lc_charsets[0],0, +#ifdef LANG_ABKHAZIAN +LANG_ABKHAZIAN, +#else +0, +#endif +0,0, +}, +{"af","afrikaans","afr",&lc_charsets[0],0, +#ifdef LANG_AFRIKAANS +LANG_AFRIKAANS, +#else +0, +#endif +0,0, +}, +{"am","amharic",0,&lc_charsets[0],0, +#ifdef LANG_AMHARIC +LANG_AMHARIC, +#else +0, +#endif +0,0, +}, +{"ar","arabic","ara",&lc_charsets[5],0, +#ifdef LANG_ARABIC +LANG_ARABIC, +#else +0, +#endif +0,0, +}, +{"as","assamese",0,&lc_charsets[0],0, +#ifdef LANG_ASSAMESE +LANG_ASSAMESE, +#else +0, +#endif +0,0, +}, +{"ay","aymara",0,&lc_charsets[0],0, +#ifdef LANG_AYMARA +LANG_AYMARA, +#else +0, +#endif +0,0, +}, +{"az","azerbaijani",0,&lc_charsets[0],0, +#ifdef LANG_AZERBAIJANI +LANG_AZERBAIJANI, +#else +0, +#endif +0,0, +}, +{"ba","bashkir",0,&lc_charsets[0],0, +#ifdef LANG_BASHKIR +LANG_BASHKIR, +#else +0, +#endif +0,0, +}, +{"be","belarusian","bel",&lc_charsets[0],0, +#ifdef LANG_BELARUSIAN +LANG_BELARUSIAN, +#else +0, +#endif +0,0, +}, +{"bg","bulgarian","bul",&lc_charsets[4],0, +#ifdef LANG_BULGARIAN +LANG_BULGARIAN, +#else +0, +#endif +0,0, +}, +{"bh","bihari",0,&lc_charsets[0],0, +#ifdef LANG_BIHARI +LANG_BIHARI, +#else +0, +#endif +0,0, +}, +{"bi","bislama",0,&lc_charsets[0],0, +#ifdef LANG_BISLAMA +LANG_BISLAMA, +#else +0, +#endif +0,0, +}, +{"bn","bengali-bangla",0,&lc_charsets[0],0, +#ifdef LANG_BENGALI_BANGLA +LANG_BENGALI_BANGLA, +#else +0, +#endif +0,0, +}, +{"bo","tibetan",0,&lc_charsets[0],0, +#ifdef LANG_TIBETAN +LANG_TIBETAN, +#else +0, +#endif +0,0, +}, +{"br","breton",0,&lc_charsets[0],0, +#ifdef LANG_BRETON +LANG_BRETON, +#else +0, +#endif +0,0, +}, +{"ca","catalan","cat",&lc_charsets[0],0, +#ifdef LANG_CATALAN +LANG_CATALAN, +#else +0, +#endif +0,0, +}, +{"co","corsican",0,&lc_charsets[0],0, +#ifdef LANG_CORSICAN +LANG_CORSICAN, +#else +0, +#endif +0,0, +}, +{"cs","czech","ces|cze",&lc_charsets[1],0, +#ifdef LANG_CZECH +LANG_CZECH, +#else +0, +#endif +0,0, +}, +{"cy","welsh",0,&lc_charsets[0],0, +#ifdef LANG_WELSH +LANG_WELSH, +#else +0, +#endif +0,0, +}, +{"da","danish","dan",&lc_charsets[0],0, +#ifdef LANG_DANISH +LANG_DANISH, +#else +0, +#endif +0,0, +}, +{"de","german","deu|ger",&lc_charsets[0],0, +#ifdef LANG_GERMAN +LANG_GERMAN, +#else +0, +#endif +0,0, +}, +{"dz","bhutani",0,&lc_charsets[0],0, +#ifdef LANG_BHUTANI +LANG_BHUTANI, +#else +0, +#endif +0,0, +}, +{"el","greek","ell|gre",&lc_charsets[6],0, +#ifdef LANG_GREEK +LANG_GREEK, +#else +0, +#endif +0,0, +}, +{"en","english","eng",&lc_charsets[0],0, +#ifdef LANG_ENGLISH +LANG_ENGLISH, +#else +0, +#endif +0,0, +}, +{"eo","esperanto",0,&lc_charsets[0],0, +#ifdef LANG_ESPERANTO +LANG_ESPERANTO, +#else +0, +#endif +0,0, +}, +{"es","spanish","spa",&lc_charsets[0],0, +#ifdef LANG_SPANISH +LANG_SPANISH, +#else +0, +#endif +&attribute_es[0],&attribute_es[1], +}, +{"et","estonian","est",&lc_charsets[2],0, +#ifdef LANG_ESTONIAN +LANG_ESTONIAN, +#else +0, +#endif +0,0, +}, +{"eu","basque","eus|baq",&lc_charsets[0],0, +#ifdef LANG_BASQUE +LANG_BASQUE, +#else +0, +#endif +0,0, +}, +{"fa","persian",0,&lc_charsets[0],0, +#ifdef LANG_PERSIAN +LANG_PERSIAN, +#else +0, +#endif +0,0, +}, +{"fi","finnish","fin",&lc_charsets[0],0, +#ifdef LANG_FINNISH +LANG_FINNISH, +#else +0, +#endif +0,0, +}, +{"fj","fiji",0,&lc_charsets[0],0, +#ifdef LANG_FIJI +LANG_FIJI, +#else +0, +#endif +0,0, +}, +{"fo","faeroese",0,&lc_charsets[0],0, +#ifdef LANG_FAEROESE +LANG_FAEROESE, +#else +0, +#endif +0,0, +}, +{"fr","french","fra|fre",&lc_charsets[0],0, +#ifdef LANG_FRENCH +LANG_FRENCH, +#else +0, +#endif +0,0, +}, +{"fy","frisian",0,&lc_charsets[0],0, +#ifdef LANG_FRISIAN +LANG_FRISIAN, +#else +0, +#endif +0,0, +}, +{"ga","irish",0,&lc_charsets[11],0, +#ifdef LANG_IRISH +LANG_IRISH, +#else +0, +#endif +0,0, +}, +{"gd","scots-gaelic",0,&lc_charsets[11],0, +#ifdef LANG_SCOTS_GAELIC +LANG_SCOTS_GAELIC, +#else +0, +#endif +0,0, +}, +{"gl","galician",0,&lc_charsets[0],0, +#ifdef LANG_GALICIAN +LANG_GALICIAN, +#else +0, +#endif +0,0, +}, +{"gn","guarani",0,&lc_charsets[0],0, +#ifdef LANG_GUARANI +LANG_GUARANI, +#else +0, +#endif +0,0, +}, +{"gu","gujarati",0,&lc_charsets[0],0, +#ifdef LANG_GUJARATI +LANG_GUJARATI, +#else +0, +#endif +0,0, +}, +{"ha","hausa",0,&lc_charsets[0],0, +#ifdef LANG_HAUSA +LANG_HAUSA, +#else +0, +#endif +0,0, +}, +{"he","hebrew","heb",&lc_charsets[7],0, +#ifdef LANG_HEBREW +LANG_HEBREW, +#else +0, +#endif +0,0, +}, +{"hi","hindi",0,&lc_charsets[0],0, +#ifdef LANG_HINDI +LANG_HINDI, +#else +0, +#endif +0,0, +}, +{"hr","croatian","hrv|scr",&lc_charsets[1],0, +#ifdef LANG_CROATIAN +LANG_CROATIAN, +#else +0, +#endif +0,0, +}, +{"hu","hungarian","hun",&lc_charsets[1],0, +#ifdef LANG_HUNGARIAN +LANG_HUNGARIAN, +#else +0, +#endif +0,0, +}, +{"hy","armenian",0,&lc_charsets[0],0, +#ifdef LANG_ARMENIAN +LANG_ARMENIAN, +#else +0, +#endif +0,0, +}, +{"ia","interlingua",0,&lc_charsets[0],0, +#ifdef LANG_INTERLINGUA +LANG_INTERLINGUA, +#else +0, +#endif +0,0, +}, +{"id","indonesian","ind",&lc_charsets[0],0, +#ifdef LANG_INDONESIAN +LANG_INDONESIAN, +#else +0, +#endif +0,0, +}, +{"ie","interlingue",0,&lc_charsets[0],0, +#ifdef LANG_INTERLINGUE +LANG_INTERLINGUE, +#else +0, +#endif +0,0, +}, +{"ik","inupiak",0,&lc_charsets[0],0, +#ifdef LANG_INUPIAK +LANG_INUPIAK, +#else +0, +#endif +0,0, +}, +{"in","indonesian",0,&lc_charsets[0],0, +#ifdef LANG_INDONESIAN +LANG_INDONESIAN, +#else +0, +#endif +0,0, +}, +{"is","icelandic","isl|ice",&lc_charsets[0],0, +#ifdef LANG_ICELANDIC +LANG_ICELANDIC, +#else +0, +#endif +0,0, +}, +{"it","italian","ita",&lc_charsets[0],0, +#ifdef LANG_ITALIAN +LANG_ITALIAN, +#else +0, +#endif +0,0, +}, +{"iw","hebrew",0,&lc_charsets[0],0, +#ifdef LANG_HEBREW +LANG_HEBREW, +#else +0, +#endif +0,0, +}, +{"ja","japanese","jpn",&lc_charsets[0],0, +#ifdef LANG_JAPANESE +LANG_JAPANESE, +#else +0, +#endif +0,0, +}, +{"ji","yiddish",0,&lc_charsets[0],0, +#ifdef LANG_YIDDISH +LANG_YIDDISH, +#else +0, +#endif +0,0, +}, +{"jw","javanese",0,&lc_charsets[0],0, +#ifdef LANG_JAVANESE +LANG_JAVANESE, +#else +0, +#endif +0,0, +}, +{"ka","georgian",0,&lc_charsets[0],0, +#ifdef LANG_GEORGIAN +LANG_GEORGIAN, +#else +0, +#endif +0,0, +}, +{"kk","kazakh","kaz",&lc_charsets[0],0, +#ifdef LANG_KAZAKH +LANG_KAZAKH, +#else +0, +#endif +0,0, +}, +{"kl","greenlandic",0,&lc_charsets[0],0, +#ifdef LANG_GREENLANDIC +LANG_GREENLANDIC, +#else +0, +#endif +0,0, +}, +{"km","cambodian",0,&lc_charsets[0],0, +#ifdef LANG_CAMBODIAN +LANG_CAMBODIAN, +#else +0, +#endif +0,0, +}, +{"kn","kannada",0,&lc_charsets[0],0, +#ifdef LANG_KANNADA +LANG_KANNADA, +#else +0, +#endif +0,0, +}, +{"ko","korean","kor",&lc_charsets[0],0, +#ifdef LANG_KOREAN +LANG_KOREAN, +#else +0, +#endif +0,0, +}, +{"ks","kashmiri",0,&lc_charsets[0],0, +#ifdef LANG_KASHMIRI +LANG_KASHMIRI, +#else +0, +#endif +0,0, +}, +{"ku","kurdish",0,&lc_charsets[0],0, +#ifdef LANG_KURDISH +LANG_KURDISH, +#else +0, +#endif +0,0, +}, +{"ky","kirghiz",0,&lc_charsets[0],0, +#ifdef LANG_KIRGHIZ +LANG_KIRGHIZ, +#else +0, +#endif +0,0, +}, +{"la","latin",0,&lc_charsets[0],0, +#ifdef LANG_LATIN +LANG_LATIN, +#else +0, +#endif +0,0, +}, +{"ln","lingala",0,&lc_charsets[0],0, +#ifdef LANG_LINGALA +LANG_LINGALA, +#else +0, +#endif +0,0, +}, +{"lo","laothian",0,&lc_charsets[0],0, +#ifdef LANG_LAOTHIAN +LANG_LAOTHIAN, +#else +0, +#endif +0,0, +}, +{"lt","lithuanian","lit",&lc_charsets[10],0, +#ifdef LANG_LITHUANIAN +LANG_LITHUANIAN, +#else +0, +#endif +0,0, +}, +{"lv","latvian","lav",&lc_charsets[10],0, +#ifdef LANG_LATVIAN +LANG_LATVIAN, +#else +0, +#endif +0,0, +}, +{"mg","malagasy",0,&lc_charsets[0],0, +#ifdef LANG_MALAGASY +LANG_MALAGASY, +#else +0, +#endif +0,0, +}, +{"mi","maori",0,&lc_charsets[0],0, +#ifdef LANG_MAORI +LANG_MAORI, +#else +0, +#endif +0,0, +}, +{"mk","macedonian","mkd|mac",&lc_charsets[0],0, +#ifdef LANG_MACEDONIAN +LANG_MACEDONIAN, +#else +0, +#endif +0,0, +}, +{"ml","malayalam","mal",&lc_charsets[0],0, +#ifdef LANG_MALAYALAM +LANG_MALAYALAM, +#else +0, +#endif +0,0, +}, +{"mn","mongolian",0,&lc_charsets[0],0, +#ifdef LANG_MONGOLIAN +LANG_MONGOLIAN, +#else +0, +#endif +0,0, +}, +{"mo","moldavian",0,&lc_charsets[0],0, +#ifdef LANG_MOLDAVIAN +LANG_MOLDAVIAN, +#else +0, +#endif +0,0, +}, +{"mr","marathi",0,&lc_charsets[0],0, +#ifdef LANG_MARATHI +LANG_MARATHI, +#else +0, +#endif +0,0, +}, +{"ms","malay","msa|may",&lc_charsets[0],0, +#ifdef LANG_MALAY +LANG_MALAY, +#else +0, +#endif +0,0, +}, +{"mt","maltese",0,&lc_charsets[0],0, +#ifdef LANG_MALTESE +LANG_MALTESE, +#else +0, +#endif +0,0, +}, +{"my","burmese",0,&lc_charsets[0],0, +#ifdef LANG_BURMESE +LANG_BURMESE, +#else +0, +#endif +0,0, +}, +{"na","nauru",0,&lc_charsets[0],0, +#ifdef LANG_NAURU +LANG_NAURU, +#else +0, +#endif +0,0, +}, +{"nb","norwegian-bokmal","nob",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN_BOKMAL +LANG_NORWEGIAN_BOKMAL, +#else +0, +#endif +0,0, +}, +{"ne","nepali",0,&lc_charsets[0],0, +#ifdef LANG_NEPALI +LANG_NEPALI, +#else +0, +#endif +0,0, +}, +{"nl","dutch","nld|dut",&lc_charsets[0],0, +#ifdef LANG_DUTCH +LANG_DUTCH, +#else +0, +#endif +0,0, +}, +{"nn","norwegian-nynorsk","nno|non",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN_NYNORSK +LANG_NORWEGIAN_NYNORSK, +#else +0, +#endif +0,0, +}, +{"no","norwegian","nor",&lc_charsets[0],0, +#ifdef LANG_NORWEGIAN +LANG_NORWEGIAN, +#else +0, +#endif +0,0, +}, +{"oc","occitan",0,&lc_charsets[0],0, +#ifdef LANG_OCCITAN +LANG_OCCITAN, +#else +0, +#endif +0,0, +}, +{"om","oromo",0,&lc_charsets[0],0, +#ifdef LANG_OROMO +LANG_OROMO, +#else +0, +#endif +0,0, +}, +{"or","oriya",0,&lc_charsets[0],0, +#ifdef LANG_ORIYA +LANG_ORIYA, +#else +0, +#endif +0,0, +}, +{"pa","punjabi",0,&lc_charsets[0],0, +#ifdef LANG_PUNJABI +LANG_PUNJABI, +#else +0, +#endif +0,0, +}, +{"pl","polish","pol",&lc_charsets[1],0, +#ifdef LANG_POLISH +LANG_POLISH, +#else +0, +#endif +0,0, +}, +{"ps","pushto",0,&lc_charsets[0],0, +#ifdef LANG_PUSHTO +LANG_PUSHTO, +#else +0, +#endif +0,0, +}, +{"pt","portuguese","por",&lc_charsets[0],0, +#ifdef LANG_PORTUGUESE +LANG_PORTUGUESE, +#else +0, +#endif +0,0, +}, +{"qu","quechua",0,&lc_charsets[0],0, +#ifdef LANG_QUECHUA +LANG_QUECHUA, +#else +0, +#endif +0,0, +}, +{"rm","rhaeto-romance",0,&lc_charsets[0],0, +#ifdef LANG_RHAETO_ROMANCE +LANG_RHAETO_ROMANCE, +#else +0, +#endif +0,0, +}, +{"rn","kirundi",0,&lc_charsets[0],0, +#ifdef LANG_KIRUNDI +LANG_KIRUNDI, +#else +0, +#endif +0,0, +}, +{"ro","romanian","ron|rum",&lc_charsets[1],0, +#ifdef LANG_ROMANIAN +LANG_ROMANIAN, +#else +0, +#endif +0,0, +}, +{"ru","russian","rus",&lc_charsets[4],0, +#ifdef LANG_RUSSIAN +LANG_RUSSIAN, +#else +0, +#endif +0,0, +}, +{"rw","kinyarwanda",0,&lc_charsets[0],0, +#ifdef LANG_KINYARWANDA +LANG_KINYARWANDA, +#else +0, +#endif +0,0, +}, +{"sa","sanskrit",0,&lc_charsets[0],0, +#ifdef LANG_SANSKRIT +LANG_SANSKRIT, +#else +0, +#endif +0,0, +}, +{"sd","sindhi",0,&lc_charsets[0],0, +#ifdef LANG_SINDHI +LANG_SINDHI, +#else +0, +#endif +0,0, +}, +{"sg","sangro",0,&lc_charsets[0],0, +#ifdef LANG_SANGRO +LANG_SANGRO, +#else +0, +#endif +0,0, +}, +{"sh","serbo-croatian",0,&lc_charsets[0],0, +#ifdef LANG_SERBO_CROATIAN +LANG_SERBO_CROATIAN, +#else +0, +#endif +0,0, +}, +{"si","singhalese",0,&lc_charsets[0],0, +#ifdef LANG_SINGHALESE +LANG_SINGHALESE, +#else +0, +#endif +0,0, +}, +{"sk","slovak","slk|slo",&lc_charsets[1],0, +#ifdef LANG_SLOVAK +LANG_SLOVAK, +#else +0, +#endif +0,0, +}, +{"sl","slovenian","slv",&lc_charsets[1],0, +#ifdef LANG_SLOVENIAN +LANG_SLOVENIAN, +#else +0, +#endif +0,0, +}, +{"sm","samoan",0,&lc_charsets[0],0, +#ifdef LANG_SAMOAN +LANG_SAMOAN, +#else +0, +#endif +0,0, +}, +{"sn","shona",0,&lc_charsets[0],0, +#ifdef LANG_SHONA +LANG_SHONA, +#else +0, +#endif +0,0, +}, +{"so","somali",0,&lc_charsets[0],0, +#ifdef LANG_SOMALI +LANG_SOMALI, +#else +0, +#endif +0,0, +}, +{"sq","albanian","sqi|alb",&lc_charsets[0],0, +#ifdef LANG_ALBANIAN +LANG_ALBANIAN, +#else +0, +#endif +0,0, +}, +{"sr","serbian","srp",&lc_charsets[1],0, +#ifdef LANG_SERBIAN +LANG_SERBIAN, +#else +0, +#endif +0,0, +}, +{"ss","siswati",0,&lc_charsets[0],0, +#ifdef LANG_SISWATI +LANG_SISWATI, +#else +0, +#endif +0,0, +}, +{"st","sesotho",0,&lc_charsets[0],0, +#ifdef LANG_SESOTHO +LANG_SESOTHO, +#else +0, +#endif +0,0, +}, +{"su","sudanese",0,&lc_charsets[0],0, +#ifdef LANG_SUDANESE +LANG_SUDANESE, +#else +0, +#endif +0,0, +}, +{"sv","swedish","swe",&lc_charsets[0],0, +#ifdef LANG_SWEDISH +LANG_SWEDISH, +#else +0, +#endif +0,0, +}, +{"sw","swahili","swa",&lc_charsets[0],0, +#ifdef LANG_SWAHILI +LANG_SWAHILI, +#else +0, +#endif +0,0, +}, +{"ta","tamil",0,&lc_charsets[0],0, +#ifdef LANG_TAMIL +LANG_TAMIL, +#else +0, +#endif +0,0, +}, +{"te","telugu",0,&lc_charsets[0],0, +#ifdef LANG_TELUGU +LANG_TELUGU, +#else +0, +#endif +0,0, +}, +{"tg","tajik",0,&lc_charsets[0],0, +#ifdef LANG_TAJIK +LANG_TAJIK, +#else +0, +#endif +0,0, +}, +{"th","thai","tha",&lc_charsets[0],0, +#ifdef LANG_THAI +LANG_THAI, +#else +0, +#endif +0,0, +}, +{"ti","tigrinya",0,&lc_charsets[0],0, +#ifdef LANG_TIGRINYA +LANG_TIGRINYA, +#else +0, +#endif +0,0, +}, +{"tk","turkmen",0,&lc_charsets[0],0, +#ifdef LANG_TURKMEN +LANG_TURKMEN, +#else +0, +#endif +0,0, +}, +{"tl","tagalog",0,&lc_charsets[0],0, +#ifdef LANG_TAGALOG +LANG_TAGALOG, +#else +0, +#endif +0,0, +}, +{"tn","setswana",0,&lc_charsets[0],0, +#ifdef LANG_SETSWANA +LANG_SETSWANA, +#else +0, +#endif +0,0, +}, +{"to","tonga",0,&lc_charsets[0],0, +#ifdef LANG_TONGA +LANG_TONGA, +#else +0, +#endif +0,0, +}, +{"tr","turkish","tur",&lc_charsets[8],0, +#ifdef LANG_TURKISH +LANG_TURKISH, +#else +0, +#endif +0,0, +}, +{"ts","tsonga",0,&lc_charsets[0],0, +#ifdef LANG_TSONGA +LANG_TSONGA, +#else +0, +#endif +0,0, +}, +{"tt","tatar","tat",&lc_charsets[0],0, +#ifdef LANG_TATAR +LANG_TATAR, +#else +0, +#endif +0,0, +}, +{"tw","chinese-traditional","cht",&lc_charsets[0],0, +#ifdef LANG_CHINESE_TRADITIONAL +LANG_CHINESE_TRADITIONAL, +#else +0, +#endif +0,0, +}, +{"uk","ukrainian","ukr",&lc_charsets[4],0, +#ifdef LANG_UKRAINIAN +LANG_UKRAINIAN, +#else +0, +#endif +0,0, +}, +{"ur","urdu",0,&lc_charsets[0],0, +#ifdef LANG_URDU +LANG_URDU, +#else +0, +#endif +0,0, +}, +{"uz","uzbek","uzb",&lc_charsets[0],0, +#ifdef LANG_UZBEK +LANG_UZBEK, +#else +0, +#endif +0,0, +}, +{"vi","vietnamese",0,&lc_charsets[0],0, +#ifdef LANG_VIETNAMESE +LANG_VIETNAMESE, +#else +0, +#endif +0,0, +}, +{"vo","volapuk",0,&lc_charsets[0],0, +#ifdef LANG_VOLAPUK +LANG_VOLAPUK, +#else +0, +#endif +0,0, +}, +{"wo","wolof",0,&lc_charsets[0],0, +#ifdef LANG_WOLOF +LANG_WOLOF, +#else +0, +#endif +0,0, +}, +{"xh","xhosa",0,&lc_charsets[0],0, +#ifdef LANG_XHOSA +LANG_XHOSA, +#else +0, +#endif +0,0, +}, +{"yo","yoruba",0,&lc_charsets[0],0, +#ifdef LANG_YORUBA +LANG_YORUBA, +#else +0, +#endif +0,0, +}, +{"zh","chinese-simplified","zho|chi|chs",&lc_charsets[0],0, +#ifdef LANG_CHINESE_SIMPLIFIED +LANG_CHINESE_SIMPLIFIED, +#else +0, +#endif +0,0, +}, +{"zu","zulu",0,&lc_charsets[0],0, +#ifdef LANG_ZULU +LANG_ZULU, +#else +0, +#endif +0,0, +}, + 0 +}; + +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, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"an","netherlands-antilles",0, +#ifdef CTRY_NETHERLANDS_ANTILLES +CTRY_NETHERLANDS_ANTILLES, +#else +0, +#endif +&lc_languages[86],0,0,0, +#ifdef SUBLANG_DUTCH_NETHERLANDS_ANTILLES +SUBLANG_DUTCH_NETHERLANDS_ANTILLES, +#else +0, +#endif +0,0,0, +}, +{"ar","argentina",0, +#ifdef CTRY_ARGENTINA +CTRY_ARGENTINA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_ARGENTINA +SUBLANG_SPANISH_ARGENTINA, +#else +0, +#endif +0,0,0, +}, +{"at","austria",0, +#ifdef CTRY_AUSTRIA +CTRY_AUSTRIA, +#else +0, +#endif +&lc_languages[23],0,0,0, +#ifdef SUBLANG_GERMAN_AUSTRIA +SUBLANG_GERMAN_AUSTRIA, +#else +0, +#endif +0,0,0, +}, +{"au","australia",0, +#ifdef CTRY_AUSTRALIA +CTRY_AUSTRALIA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_AUSTRALIA +SUBLANG_ENGLISH_AUSTRALIA, +#else +0, +#endif +0,0,0, +}, +{"az","azerbaijan",0, +#ifdef CTRY_AZERBAIJAN +CTRY_AZERBAIJAN, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"be","belgium",0, +#ifdef CTRY_BELGIUM +CTRY_BELGIUM, +#else +0, +#endif +&lc_languages[86],&lc_languages[35],&lc_languages[23],0, +#ifdef SUBLANG_DUTCH_BELGIUM +SUBLANG_DUTCH_BELGIUM, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_BELGIUM +SUBLANG_FRENCH_BELGIUM, +#else +0, +#endif + +#ifdef SUBLANG_GERMAN_BELGIUM +SUBLANG_GERMAN_BELGIUM, +#else +0, +#endif +0, +}, +{"bg","bulgaria",0, +#ifdef CTRY_BULGARIA +CTRY_BULGARIA, +#else +0, +#endif +&lc_languages[12],0,0,0, +#ifdef SUBLANG_BULGARIAN_BULGARIA +SUBLANG_BULGARIAN_BULGARIA, +#else +0, +#endif +0,0,0, +}, +{"bn","brunei-darussalam",0, +#ifdef CTRY_BRUNEI_DARUSSALAM +CTRY_BRUNEI_DARUSSALAM, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_BRUNEI_DARUSSALAM +SUBLANG_ARABIC_BRUNEI_DARUSSALAM, +#else +0, +#endif +0,0,0, +}, +{"bo","bolivia",0, +#ifdef CTRY_BOLIVIA +CTRY_BOLIVIA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_BOLIVIA +SUBLANG_SPANISH_BOLIVIA, +#else +0, +#endif +0,0,0, +}, +{"br","brazil",0, +#ifdef CTRY_BRAZIL +CTRY_BRAZIL, +#else +0, +#endif +&lc_languages[95],0,0,0, +#ifdef SUBLANG_PORTUGUESE_BRAZIL +SUBLANG_PORTUGUESE_BRAZIL, +#else +0, +#endif +0,0,0, +}, +{"bw","botswana",0, +#ifdef CTRY_BOTSWANA +CTRY_BOTSWANA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_BOTSWANA +SUBLANG_ENGLISH_BOTSWANA, +#else +0, +#endif +0,0,0, +}, +{"by","belarus",0, +#ifdef CTRY_BELARUS +CTRY_BELARUS, +#else +0, +#endif +&lc_languages[100],0,0,0, +#ifdef SUBLANG_RUSSIAN_BELARUS +SUBLANG_RUSSIAN_BELARUS, +#else +0, +#endif +0,0,0, +}, +{"bz","belize",0, +#ifdef CTRY_BELIZE +CTRY_BELIZE, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_BELIZE +SUBLANG_ENGLISH_BELIZE, +#else +0, +#endif +0,0,0, +}, +{"ca","canada",0, +#ifdef CTRY_CANADA +CTRY_CANADA, +#else +0, +#endif +&lc_languages[26],&lc_languages[35],0,0, +#ifdef SUBLANG_ENGLISH_CANADA +SUBLANG_ENGLISH_CANADA, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_CANADA +SUBLANG_FRENCH_CANADA, +#else +0, +#endif +0,0, +}, +{"ch","switzerland",0, +#ifdef CTRY_SWITZERLAND +CTRY_SWITZERLAND, +#else +0, +#endif +&lc_languages[35],&lc_languages[23],&lc_languages[54],0, +#ifdef SUBLANG_FRENCH_SWITZERLAND +SUBLANG_FRENCH_SWITZERLAND, +#else +0, +#endif + +#ifdef SUBLANG_GERMAN_SWITZERLAND +SUBLANG_GERMAN_SWITZERLAND, +#else +0, +#endif + +#ifdef SUBLANG_ITALIAN_SWITZERLAND +SUBLANG_ITALIAN_SWITZERLAND, +#else +0, +#endif +0, +}, +{"cl","chile",0, +#ifdef CTRY_CHILE +CTRY_CHILE, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_CHILE +SUBLANG_SPANISH_CHILE, +#else +0, +#endif +0,0,0, +}, +{"cn","china",LC_primary, +#ifdef CTRY_CHINA +CTRY_CHINA, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_CHINA +SUBLANG_CHINESE_SIMPLIFIED_CHINA, +#else +0, +#endif +0,0,0, +}, +{"co","colombia",0, +#ifdef CTRY_COLOMBIA +CTRY_COLOMBIA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_COLOMBIA +SUBLANG_SPANISH_COLOMBIA, +#else +0, +#endif +0,0,0, +}, +{"cr","costa-rica",0, +#ifdef CTRY_COSTA_RICA +CTRY_COSTA_RICA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_COSTA_RICA +SUBLANG_SPANISH_COSTA_RICA, +#else +0, +#endif +0,0,0, +}, +{"cz","czech-republic",0, +#ifdef CTRY_CZECH_REPUBLIC +CTRY_CZECH_REPUBLIC, +#else +0, +#endif +&lc_languages[20],0,0,0, +#ifdef SUBLANG_CZECH_CZECH_REPUBLIC +SUBLANG_CZECH_CZECH_REPUBLIC, +#else +0, +#endif +0,0,0, +}, +{"de","germany",0, +#ifdef CTRY_GERMANY +CTRY_GERMANY, +#else +0, +#endif +&lc_languages[23],0,0,0, +#ifdef SUBLANG_GERMAN_GERMANY +SUBLANG_GERMAN_GERMANY, +#else +0, +#endif +0,0,0, +}, +{"dk","denmark",0, +#ifdef CTRY_DENMARK +CTRY_DENMARK, +#else +0, +#endif +&lc_languages[22],&lc_languages[26],0,0, +#ifdef SUBLANG_DANISH_DENMARK +SUBLANG_DANISH_DENMARK, +#else +0, +#endif + +#ifdef SUBLANG_ENGLISH_DENMARK +SUBLANG_ENGLISH_DENMARK, +#else +0, +#endif +0,0, +}, +{"do","dominican-republic",0, +#ifdef CTRY_DOMINICAN_REPUBLIC +CTRY_DOMINICAN_REPUBLIC, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_DOMINICAN_REPUBLIC +SUBLANG_SPANISH_DOMINICAN_REPUBLIC, +#else +0, +#endif +0,0,0, +}, +{"dz","algeria",0, +#ifdef CTRY_ALGERIA +CTRY_ALGERIA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"ec","ecuador",0, +#ifdef CTRY_ECUADOR +CTRY_ECUADOR, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_ECUADOR +SUBLANG_SPANISH_ECUADOR, +#else +0, +#endif +0,0,0, +}, +{"ee","estonia",0, +#ifdef CTRY_ESTONIA +CTRY_ESTONIA, +#else +0, +#endif +&lc_languages[29],0,0,0, +#ifdef SUBLANG_ESTONIAN_ESTONIA +SUBLANG_ESTONIAN_ESTONIA, +#else +0, +#endif +0,0,0, +}, +{"eg","egypt",0, +#ifdef CTRY_EGYPT +CTRY_EGYPT, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_EGYPT +SUBLANG_ARABIC_EGYPT, +#else +0, +#endif +0,0,0, +}, +{"es","spain",0, +#ifdef CTRY_SPAIN +CTRY_SPAIN, +#else +0, +#endif +&lc_languages[28],&lc_languages[18],&lc_languages[30],&lc_languages[39], +#ifdef SUBLANG_SPANISH_SPAIN +SUBLANG_SPANISH_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_CATALAN_SPAIN +SUBLANG_CATALAN_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_BASQUE_SPAIN +SUBLANG_BASQUE_SPAIN, +#else +0, +#endif + +#ifdef SUBLANG_GALICIAN_SPAIN +SUBLANG_GALICIAN_SPAIN, +#else +0, +#endif + +}, +{"fi","finland",0, +#ifdef CTRY_FINLAND +CTRY_FINLAND, +#else +0, +#endif +&lc_languages[117],0,0,0, +#ifdef SUBLANG_SWEDISH_FINLAND +SUBLANG_SWEDISH_FINLAND, +#else +0, +#endif +0,0,0, +}, +{"fo","faroe-islands",0, +#ifdef CTRY_FAROE_ISLANDS +CTRY_FAROE_ISLANDS, +#else +0, +#endif +&lc_languages[34],0,0,0, +#ifdef SUBLANG_FAEROESE_FAROE_ISLANDS +SUBLANG_FAEROESE_FAROE_ISLANDS, +#else +0, +#endif +0,0,0, +}, +{"fr","france",0, +#ifdef CTRY_FRANCE +CTRY_FRANCE, +#else +0, +#endif +&lc_languages[35],0,0,0, +#ifdef SUBLANG_FRENCH_FRANCE +SUBLANG_FRENCH_FRANCE, +#else +0, +#endif +0,0,0, +}, +{"gb","united-kingdom|great-britain|england",LC_primary, +#ifdef CTRY_UNITED_KINGDOM +CTRY_UNITED_KINGDOM, +#else +#ifdef CTRY_GREAT_BRITAIN +CTRY_GREAT_BRITAIN, +#else +#ifdef CTRY_ENGLAND +CTRY_ENGLAND, +#else +0, +#endif +#endif +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_KINGDOM +SUBLANG_ENGLISH_UNITED_KINGDOM, +#else +#ifdef SUBLANG_ENGLISH_GREAT_BRITAIN +SUBLANG_ENGLISH_GREAT_BRITAIN, +#else +#ifdef SUBLANG_ENGLISH_ENGLAND +SUBLANG_ENGLISH_ENGLAND, +#else +0, +#endif +#endif +#endif +0,0,0, +}, +{"gl","greenland",0, +#ifdef CTRY_GREENLAND +CTRY_GREENLAND, +#else +0, +#endif +&lc_languages[61],0,0,0, +#ifdef SUBLANG_GREENLANDIC_GREENLAND +SUBLANG_GREENLANDIC_GREENLAND, +#else +0, +#endif +0,0,0, +}, +{"gr","greece",0, +#ifdef CTRY_GREECE +CTRY_GREECE, +#else +0, +#endif +&lc_languages[25],0,0,0, +#ifdef SUBLANG_GREEK_GREECE +SUBLANG_GREEK_GREECE, +#else +0, +#endif +0,0,0, +}, +{"gt","guatemala",0, +#ifdef CTRY_GUATEMALA +CTRY_GUATEMALA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_GUATEMALA +SUBLANG_SPANISH_GUATEMALA, +#else +0, +#endif +0,0,0, +}, +{"hk","hong-kong",0, +#ifdef CTRY_HONG_KONG +CTRY_HONG_KONG, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_HONG_KONG +SUBLANG_CHINESE_SIMPLIFIED_HONG_KONG, +#else +0, +#endif +0,0,0, +}, +{"hn","honduras",0, +#ifdef CTRY_HONDURAS +CTRY_HONDURAS, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_HONDURAS +SUBLANG_SPANISH_HONDURAS, +#else +0, +#endif +0,0,0, +}, +{"hr","croatia",0, +#ifdef CTRY_CROATIA +CTRY_CROATIA, +#else +0, +#endif +&lc_languages[45],0,0,0, +#ifdef SUBLANG_CROATIAN_CROATIA +SUBLANG_CROATIAN_CROATIA, +#else +0, +#endif +0,0,0, +}, +{"hu","hungary",0, +#ifdef CTRY_HUNGARY +CTRY_HUNGARY, +#else +0, +#endif +&lc_languages[46],0,0,0, +#ifdef SUBLANG_HUNGARIAN_HUNGARY +SUBLANG_HUNGARIAN_HUNGARY, +#else +0, +#endif +0,0,0, +}, +{"id","indonesia",0, +#ifdef CTRY_INDONESIA +CTRY_INDONESIA, +#else +0, +#endif +&lc_languages[49],0,0,0, +#ifdef SUBLANG_INDONESIAN_INDONESIA +SUBLANG_INDONESIAN_INDONESIA, +#else +0, +#endif +0,0,0, +}, +{"ie","ireland",0, +#ifdef CTRY_IRELAND +CTRY_IRELAND, +#else +0, +#endif +&lc_languages[26],&lc_languages[37],0,0, +#ifdef SUBLANG_ENGLISH_IRELAND +SUBLANG_ENGLISH_IRELAND, +#else +0, +#endif + +#ifdef SUBLANG_IRISH_IRELAND +SUBLANG_IRISH_IRELAND, +#else +0, +#endif +0,0, +}, +{"il","israel",0, +#ifdef CTRY_ISRAEL +CTRY_ISRAEL, +#else +0, +#endif +&lc_languages[43],0,0,0, +#ifdef SUBLANG_HEBREW_ISRAEL +SUBLANG_HEBREW_ISRAEL, +#else +0, +#endif +0,0,0, +}, +{"iq","iraq",0, +#ifdef CTRY_IRAQ +CTRY_IRAQ, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_IRAQ +SUBLANG_ARABIC_IRAQ, +#else +0, +#endif +0,0,0, +}, +{"is","iceland",0, +#ifdef CTRY_ICELAND +CTRY_ICELAND, +#else +0, +#endif +&lc_languages[53],0,0,0, +#ifdef SUBLANG_ICELANDIC_ICELAND +SUBLANG_ICELANDIC_ICELAND, +#else +0, +#endif +0,0,0, +}, +{"it","italy",0, +#ifdef CTRY_ITALY +CTRY_ITALY, +#else +0, +#endif +&lc_languages[54],0,0,0, +#ifdef SUBLANG_ITALIAN_ITALY +SUBLANG_ITALIAN_ITALY, +#else +0, +#endif +0,0,0, +}, +{"jm","jamaica",0, +#ifdef CTRY_JAMAICA +CTRY_JAMAICA, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_JAMAICA +SUBLANG_ENGLISH_JAMAICA, +#else +0, +#endif +0,0,0, +}, +{"jo","jordan",0, +#ifdef CTRY_JORDAN +CTRY_JORDAN, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_JORDAN +SUBLANG_ARABIC_JORDAN, +#else +0, +#endif +0,0,0, +}, +{"jp","japan",0, +#ifdef CTRY_JAPAN +CTRY_JAPAN, +#else +0, +#endif +&lc_languages[56],0,0,0, +#ifdef SUBLANG_JAPANESE_JAPAN +SUBLANG_JAPANESE_JAPAN, +#else +0, +#endif +0,0,0, +}, +{"ke","kenya",0, +#ifdef CTRY_KENYA +CTRY_KENYA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"kr","south-korea",0, +#ifdef CTRY_SOUTH_KOREA +CTRY_SOUTH_KOREA, +#else +0, +#endif +&lc_languages[64],0,0,0, +#ifdef SUBLANG_KOREAN_SOUTH_KOREA +SUBLANG_KOREAN_SOUTH_KOREA, +#else +0, +#endif +0,0,0, +}, +{"kw","kuwait",0, +#ifdef CTRY_KUWAIT +CTRY_KUWAIT, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_KUWAIT +SUBLANG_ARABIC_KUWAIT, +#else +0, +#endif +0,0,0, +}, +{"lb","lebanon",0, +#ifdef CTRY_LEBANON +CTRY_LEBANON, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_LEBANON +SUBLANG_ARABIC_LEBANON, +#else +0, +#endif +0,0,0, +}, +{"li","liechtenstein",0, +#ifdef CTRY_LIECHTENSTEIN +CTRY_LIECHTENSTEIN, +#else +0, +#endif +&lc_languages[23],&lc_languages[35],0,0, +#ifdef SUBLANG_GERMAN_LIECHTENSTEIN +SUBLANG_GERMAN_LIECHTENSTEIN, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_LIECHTENSTEIN +SUBLANG_FRENCH_LIECHTENSTEIN, +#else +0, +#endif +0,0, +}, +{"lt","lithuania",0, +#ifdef CTRY_LITHUANIA +CTRY_LITHUANIA, +#else +0, +#endif +&lc_languages[71],0,0,0, +#ifdef SUBLANG_LITHUANIAN_LITHUANIA +SUBLANG_LITHUANIAN_LITHUANIA, +#else +0, +#endif +0,0,0, +}, +{"lu","luxembourg",0, +#ifdef CTRY_LUXEMBOURG +CTRY_LUXEMBOURG, +#else +0, +#endif +&lc_languages[23],&lc_languages[35],0,0, +#ifdef SUBLANG_GERMAN_LUXEMBOURG +SUBLANG_GERMAN_LUXEMBOURG, +#else +0, +#endif + +#ifdef SUBLANG_FRENCH_LUXEMBOURG +SUBLANG_FRENCH_LUXEMBOURG, +#else +0, +#endif +0,0, +}, +{"lv","latvia",0, +#ifdef CTRY_LATVIA +CTRY_LATVIA, +#else +0, +#endif +&lc_languages[72],0,0,0, +#ifdef SUBLANG_LATVIAN_LATVIA +SUBLANG_LATVIAN_LATVIA, +#else +0, +#endif +0,0,0, +}, +{"ly","libya",0, +#ifdef CTRY_LIBYA +CTRY_LIBYA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_LIBYA +SUBLANG_ARABIC_LIBYA, +#else +0, +#endif +0,0,0, +}, +{"ma","morocco",0, +#ifdef CTRY_MOROCCO +CTRY_MOROCCO, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_MOROCCO +SUBLANG_ARABIC_MOROCCO, +#else +0, +#endif +0,0,0, +}, +{"mk","macedonia",0, +#ifdef CTRY_MACEDONIA +CTRY_MACEDONIA, +#else +0, +#endif +&lc_languages[75],0,0,0, +#ifdef SUBLANG_MACEDONIAN_MACEDONIA +SUBLANG_MACEDONIAN_MACEDONIA, +#else +0, +#endif +0,0,0, +}, +{"mo","macau",0, +#ifdef CTRY_MACAU +CTRY_MACAU, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_MACAU +SUBLANG_CHINESE_SIMPLIFIED_MACAU, +#else +0, +#endif +0,0,0, +}, +{"mx","mexico",0, +#ifdef CTRY_MEXICO +CTRY_MEXICO, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_MEXICO +SUBLANG_SPANISH_MEXICO, +#else +0, +#endif +0,0,0, +}, +{"my","malaysia",0, +#ifdef CTRY_MALAYSIA +CTRY_MALAYSIA, +#else +0, +#endif +0,0,0,0,0,0,0,0, +}, +{"ni","nicaragua",0, +#ifdef CTRY_NICARAGUA +CTRY_NICARAGUA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_NICARAGUA +SUBLANG_SPANISH_NICARAGUA, +#else +0, +#endif +0,0,0, +}, +{"nl","netherlands",0, +#ifdef CTRY_NETHERLANDS +CTRY_NETHERLANDS, +#else +0, +#endif +&lc_languages[86],0,0,0, +#ifdef SUBLANG_DUTCH_NETHERLANDS +SUBLANG_DUTCH_NETHERLANDS, +#else +0, +#endif +0,0,0, +}, +{"no","norway",0, +#ifdef CTRY_NORWAY +CTRY_NORWAY, +#else +0, +#endif +&lc_languages[84],&lc_languages[88],&lc_languages[87],0, +#ifdef SUBLANG_NORWEGIAN_BOKMAL_NORWAY +SUBLANG_NORWEGIAN_BOKMAL_NORWAY, +#else +0, +#endif + +#ifdef SUBLANG_NORWEGIAN_NORWAY +SUBLANG_NORWEGIAN_NORWAY, +#else +0, +#endif + +#ifdef SUBLANG_NORWEGIAN_NYNORSK_NORWAY +SUBLANG_NORWEGIAN_NYNORSK_NORWAY, +#else +0, +#endif +0, +}, +{"nz","new-zealand",0, +#ifdef CTRY_NEW_ZEALAND +CTRY_NEW_ZEALAND, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_NEW_ZEALAND +SUBLANG_ENGLISH_NEW_ZEALAND, +#else +0, +#endif +0,0,0, +}, +{"om","oman",0, +#ifdef CTRY_OMAN +CTRY_OMAN, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_OMAN +SUBLANG_ARABIC_OMAN, +#else +0, +#endif +0,0,0, +}, +{"pa","panama",0, +#ifdef CTRY_PANAMA +CTRY_PANAMA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PANAMA +SUBLANG_SPANISH_PANAMA, +#else +0, +#endif +0,0,0, +}, +{"pe","peru",0, +#ifdef CTRY_PERU +CTRY_PERU, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PERU +SUBLANG_SPANISH_PERU, +#else +0, +#endif +0,0,0, +}, +{"pl","poland",0, +#ifdef CTRY_POLAND +CTRY_POLAND, +#else +0, +#endif +&lc_languages[93],0,0,0, +#ifdef SUBLANG_POLISH_POLAND +SUBLANG_POLISH_POLAND, +#else +0, +#endif +0,0,0, +}, +{"pr","puerto-rico",0, +#ifdef CTRY_PUERTO_RICO +CTRY_PUERTO_RICO, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PUERTO_RICO +SUBLANG_SPANISH_PUERTO_RICO, +#else +0, +#endif +0,0,0, +}, +{"pt","portugal",0, +#ifdef CTRY_PORTUGAL +CTRY_PORTUGAL, +#else +0, +#endif +&lc_languages[95],0,0,0, +#ifdef SUBLANG_PORTUGUESE_PORTUGAL +SUBLANG_PORTUGUESE_PORTUGAL, +#else +0, +#endif +0,0,0, +}, +{"py","paraguay",0, +#ifdef CTRY_PARAGUAY +CTRY_PARAGUAY, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_PARAGUAY +SUBLANG_SPANISH_PARAGUAY, +#else +0, +#endif +0,0,0, +}, +{"ro","romania",0, +#ifdef CTRY_ROMANIA +CTRY_ROMANIA, +#else +0, +#endif +&lc_languages[99],0,0,0, +#ifdef SUBLANG_ROMANIAN_ROMANIA +SUBLANG_ROMANIAN_ROMANIA, +#else +0, +#endif +0,0,0, +}, +{"ru","russia",0, +#ifdef CTRY_RUSSIA +CTRY_RUSSIA, +#else +0, +#endif +&lc_languages[100],0,0,0, +#ifdef SUBLANG_RUSSIAN_RUSSIA +SUBLANG_RUSSIAN_RUSSIA, +#else +0, +#endif +0,0,0, +}, +{"sa","saudi-arabia",0, +#ifdef CTRY_SAUDI_ARABIA +CTRY_SAUDI_ARABIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_SAUDI_ARABIA +SUBLANG_ARABIC_SAUDI_ARABIA, +#else +0, +#endif +0,0,0, +}, +{"se","sweden",LC_primary, +#ifdef CTRY_SWEDEN +CTRY_SWEDEN, +#else +0, +#endif +&lc_languages[117],0,0,0, +#ifdef SUBLANG_SWEDISH_SWEDEN +SUBLANG_SWEDISH_SWEDEN, +#else +0, +#endif +0,0,0, +}, +{"sg","singapore",0, +#ifdef CTRY_SINGAPORE +CTRY_SINGAPORE, +#else +0, +#endif +&lc_languages[140],0,0,0, +#ifdef SUBLANG_CHINESE_SIMPLIFIED_SINGAPORE +SUBLANG_CHINESE_SIMPLIFIED_SINGAPORE, +#else +0, +#endif +0,0,0, +}, +{"si","slovenia",0, +#ifdef CTRY_SLOVENIA +CTRY_SLOVENIA, +#else +0, +#endif +&lc_languages[108],0,0,0, +#ifdef SUBLANG_SLOVENIAN_SLOVENIA +SUBLANG_SLOVENIAN_SLOVENIA, +#else +0, +#endif +0,0,0, +}, +{"sk","slovakia",0, +#ifdef CTRY_SLOVAKIA +CTRY_SLOVAKIA, +#else +0, +#endif +&lc_languages[107],0,0,0, +#ifdef SUBLANG_SLOVAK_SLOVAKIA +SUBLANG_SLOVAK_SLOVAKIA, +#else +0, +#endif +0,0,0, +}, +{"sp","serbia",0, +#ifdef CTRY_SERBIA +CTRY_SERBIA, +#else +0, +#endif +&lc_languages[113],0,0,0, +#ifdef SUBLANG_SERBIAN_SERBIA +SUBLANG_SERBIAN_SERBIA, +#else +0, +#endif +0,0,0, +}, +{"sv","el-salvador",0, +#ifdef CTRY_EL_SALVADOR +CTRY_EL_SALVADOR, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_EL_SALVADOR +SUBLANG_SPANISH_EL_SALVADOR, +#else +0, +#endif +0,0,0, +}, +{"sy","syria",0, +#ifdef CTRY_SYRIA +CTRY_SYRIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_SYRIA +SUBLANG_ARABIC_SYRIA, +#else +0, +#endif +0,0,0, +}, +{"th","thailand",0, +#ifdef CTRY_THAILAND +CTRY_THAILAND, +#else +0, +#endif +&lc_languages[122],0,0,0, +#ifdef SUBLANG_THAI_THAILAND +SUBLANG_THAI_THAILAND, +#else +0, +#endif +0,0,0, +}, +{"tn","tunisia",0, +#ifdef CTRY_TUNISIA +CTRY_TUNISIA, +#else +0, +#endif +&lc_languages[6],0,0,0, +#ifdef SUBLANG_ARABIC_TUNISIA +SUBLANG_ARABIC_TUNISIA, +#else +0, +#endif +0,0,0, +}, +{"tr","turkey",0, +#ifdef CTRY_TURKEY +CTRY_TURKEY, +#else +0, +#endif +&lc_languages[128],0,0,0, +#ifdef SUBLANG_TURKISH_TURKEY +SUBLANG_TURKISH_TURKEY, +#else +0, +#endif +0,0,0, +}, +{"tt","trinidad&tobago",0, +#ifdef CTRY_TRINIDAD_TOBAGO +CTRY_TRINIDAD_TOBAGO, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_TRINIDAD_TOBAGO +SUBLANG_ENGLISH_TRINIDAD_TOBAGO, +#else +0, +#endif +0,0,0, +}, +{"tw","taiwan",0, +#ifdef CTRY_TAIWAN +CTRY_TAIWAN, +#else +0, +#endif +&lc_languages[131],0,0,0, +#ifdef SUBLANG_CHINESE_TRADITIONAL_TAIWAN +SUBLANG_CHINESE_TRADITIONAL_TAIWAN, +#else +0, +#endif +0,0,0, +}, +{"ua","ukraine",0, +#ifdef CTRY_UKRAINE +CTRY_UKRAINE, +#else +0, +#endif +&lc_languages[132],&lc_languages[100],0,0, +#ifdef SUBLANG_UKRAINIAN_UKRAINE +SUBLANG_UKRAINIAN_UKRAINE, +#else +0, +#endif + +#ifdef SUBLANG_RUSSIAN_UKRAINE +SUBLANG_RUSSIAN_UKRAINE, +#else +0, +#endif +0,0, +}, +{"uk","united-kingdom",LC_primary, +#ifdef CTRY_UNITED_KINGDOM +CTRY_UNITED_KINGDOM, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_KINGDOM +SUBLANG_ENGLISH_UNITED_KINGDOM, +#else +0, +#endif +0,0,0, +}, +{"us","united-states|usa",0, +#ifdef CTRY_UNITED_STATES +CTRY_UNITED_STATES, +#else +#ifdef CTRY_USA +CTRY_USA, +#else +0, +#endif +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_UNITED_STATES +SUBLANG_ENGLISH_UNITED_STATES, +#else +#ifdef SUBLANG_ENGLISH_USA +SUBLANG_ENGLISH_USA, +#else +0, +#endif +#endif +0,0,0, +}, +{"uy","uruguay",0, +#ifdef CTRY_URUGUAY +CTRY_URUGUAY, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_URUGUAY +SUBLANG_SPANISH_URUGUAY, +#else +0, +#endif +0,0,0, +}, +{"ve","venezuela",0, +#ifdef CTRY_VENEZUELA +CTRY_VENEZUELA, +#else +0, +#endif +&lc_languages[28],0,0,0, +#ifdef SUBLANG_SPANISH_VENEZUELA +SUBLANG_SPANISH_VENEZUELA, +#else +0, +#endif +0,0,0, +}, +{"yu","yugoslavia",0, +#ifdef CTRY_YUGOSLAVIA +CTRY_YUGOSLAVIA, +#else +0, +#endif +&lc_languages[113],0,0,0, +#ifdef SUBLANG_SERBIAN_YUGOSLAVIA +SUBLANG_SERBIAN_YUGOSLAVIA, +#else +0, +#endif +0,0,0, +}, +{"za","south-africa",0, +#ifdef CTRY_SOUTH_AFRICA +CTRY_SOUTH_AFRICA, +#else +0, +#endif +&lc_languages[4],0,0,0, +#ifdef SUBLANG_AFRIKAANS_SOUTH_AFRICA +SUBLANG_AFRIKAANS_SOUTH_AFRICA, +#else +0, +#endif +0,0,0, +}, +{"zw","zimbabwe",0, +#ifdef CTRY_ZIMBABWE +CTRY_ZIMBABWE, +#else +0, +#endif +&lc_languages[26],0,0,0, +#ifdef SUBLANG_ENGLISH_ZIMBABWE +SUBLANG_ENGLISH_ZIMBABWE, +#else +0, +#endif +0,0,0, +}, + 0 +}; + +const Lc_map_t lc_maps[] = +{ +{"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/cmd/ast/libcmd/Makefile b/usr/src/cmd/ast/libcmd/Makefile new file mode 100644 index 0000000000..49312d85b0 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/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/libcmd/Makefile.com b/usr/src/cmd/ast/libcmd/Makefile.com new file mode 100644 index 0000000000..1b75255ba0 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/Makefile.com @@ -0,0 +1,122 @@ +# +# 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) 2018, Joyent, Inc. +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. + +SHELL= /usr/bin/ksh93 + +LIBRARY= libcmd.a +VERS= .1 + +include ../Makefile.defs + +OBJECTS += $(LIBOBJS) + +include $(SRC)/lib/Makefile.lib +include ../../Makefile.ast + +MAPFILES= ../mapfile-vers + +LIBS= $(DYNLIB) + +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. +CPPFLAGS= \ + $(DTEXTDOM) $(DTS_ERRNO) \ + -I$(ASTSRC) \ + -Iast -I. \ + -I$(ROOT)/usr/include/ast \ + -I$(ROOT)/usr/include \ + -D_BLD_cmd \ + -D_PACKAGE_ast \ + -D_BLD_DLL \ + '-DERROR_CATALOG="libcmd"' \ + '-DUSAGE_LICENSE=\ + "[-author?Glenn Fowler ]"\ + "[-author?David Korn ]"\ + "[-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) + +CERRWARN += -_gcc=-Wno-unused-value +CERRWARN += -_gcc=-Wno-parentheses +CERRWARN += $(CNOWARN_UNINIT) +CERRWARN += -_gcc=-Wno-unused-variable +CERRWARN += -_gcc=-Wno-implicit-function-declaration + +# not linted +SMATCH=off + +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) $@ + +# This rule is derived from $(CONTRIB)/ast/src/lib/libcmd/Makefile +ast/cmdext.h: + $(MKDIR) -p $(@D) + echo '#include ' > $@.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) $@ + +CLOBBERFILES += ast/* + +install_h: $(HEADERSRC:%=ast/%) $(HEADERGEN:%=ast/%) + +.PARALLEL: $(HEADERSRC:%=ast/%) $(HEADERGEN:%=ast/%) + +_feature: FRC + $(MAKE) -f Makefile.iffe generate + +include ../../Makefile.astmsg + +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/cmd/ast/libcmd/amd64/FEATURE/ids b/usr/src/cmd/ast/libcmd/amd64/FEATURE/ids new file mode 100644 index 0000000000..075c0e54f3 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/amd64/FEATURE/ids @@ -0,0 +1,15 @@ +/* : : 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 ok */ +#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 ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _lib_getsid 1 /* getsid() in default lib(s) */ +#if !_lib_fsid && _mac_fsid +#define _lib_fsid 1 +#endif + +#endif diff --git a/usr/src/cmd/ast/libcmd/amd64/FEATURE/sockets b/usr/src/cmd/ast/libcmd/amd64/FEATURE/sockets new file mode 100644 index 0000000000..778d18ecba --- /dev/null +++ b/usr/src/cmd/ast/libcmd/amd64/FEATURE/sockets @@ -0,0 +1,11 @@ +/* : : 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 ok */ +#define _sys_socket 1 /* #include ok */ +#define _hdr_arpa_inet 1 /* #include ok */ +#define _hdr_netinet_in 1 /* #include ok */ +#define _lib_getsockname 1 /* getsockname() in default lib(s) */ +#define _lib_getsockopt 1 /* getsockopt() in default lib(s) */ +#define _lib_inet_ntoa 1 /* inet_ntoa() in default lib(s) */ +#endif 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 ok */ +#define _lib_lchown 1 /* lchown implemented */ +#endif diff --git a/usr/src/cmd/ast/libcmd/amd64/FEATURE/utsname b/usr/src/cmd/ast/libcmd/amd64/FEATURE/utsname new file mode 100644 index 0000000000..e5803b3478 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/amd64/FEATURE/utsname @@ -0,0 +1,15 @@ +/* : : 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 ok */ +#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) */ +#define _lib_sethostname 1 /* sethostname() in default lib(s) */ +#define _lib_syscall 1 /* syscall() in default lib(s) */ +#define _lib_uname 1 /* uname() in default lib(s) */ +#define _sys_utsname 1 /* #include ok */ +#define _sys_syscall 1 /* #include ok */ +#define _sys_systeminfo 1 /* #include ok */ +#define _UNAME_os_DEFAULT "illumos" /* default os name */ +#endif diff --git a/usr/src/cmd/ast/libcmd/amd64/Makefile b/usr/src/cmd/ast/libcmd/amd64/Makefile new file mode 100644 index 0000000000..40bbf5e319 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/amd64/Makefile @@ -0,0 +1,32 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (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 2004 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. +# + +include ../Makefile.com +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/cmd/ast/libcmd/i386/FEATURE/ids b/usr/src/cmd/ast/libcmd/i386/FEATURE/ids new file mode 100644 index 0000000000..075c0e54f3 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/i386/FEATURE/ids @@ -0,0 +1,15 @@ +/* : : 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 ok */ +#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 ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _lib_getsid 1 /* getsid() in default lib(s) */ +#if !_lib_fsid && _mac_fsid +#define _lib_fsid 1 +#endif + +#endif diff --git a/usr/src/cmd/ast/libcmd/i386/FEATURE/sockets b/usr/src/cmd/ast/libcmd/i386/FEATURE/sockets new file mode 100644 index 0000000000..778d18ecba --- /dev/null +++ b/usr/src/cmd/ast/libcmd/i386/FEATURE/sockets @@ -0,0 +1,11 @@ +/* : : 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 ok */ +#define _sys_socket 1 /* #include ok */ +#define _hdr_arpa_inet 1 /* #include ok */ +#define _hdr_netinet_in 1 /* #include ok */ +#define _lib_getsockname 1 /* getsockname() in default lib(s) */ +#define _lib_getsockopt 1 /* getsockopt() in default lib(s) */ +#define _lib_inet_ntoa 1 /* inet_ntoa() in default lib(s) */ +#endif 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 ok */ +#define _lib_lchown 1 /* lchown implemented */ +#endif diff --git a/usr/src/cmd/ast/libcmd/i386/FEATURE/utsname b/usr/src/cmd/ast/libcmd/i386/FEATURE/utsname new file mode 100644 index 0000000000..e5803b3478 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/i386/FEATURE/utsname @@ -0,0 +1,15 @@ +/* : : 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 ok */ +#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) */ +#define _lib_sethostname 1 /* sethostname() in default lib(s) */ +#define _lib_syscall 1 /* syscall() in default lib(s) */ +#define _lib_uname 1 /* uname() in default lib(s) */ +#define _sys_utsname 1 /* #include ok */ +#define _sys_syscall 1 /* #include ok */ +#define _sys_systeminfo 1 /* #include ok */ +#define _UNAME_os_DEFAULT "illumos" /* default os name */ +#endif diff --git a/usr/src/cmd/ast/libcmd/i386/Makefile b/usr/src/cmd/ast/libcmd/i386/Makefile new file mode 100644 index 0000000000..129e8f1cf0 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/i386/Makefile @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (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) 1997-2001 by Sun Microsystems, Inc. +# All rights reserved. +# +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. +# + +include ../Makefile.com + +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/cmd/ast/libcmd/mapfile-vers b/usr/src/cmd/ast/libcmd/mapfile-vers new file mode 100644 index 0000000000..6f932e7c05 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/mapfile-vers @@ -0,0 +1,105 @@ +# +# 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. +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object versioning must comply with the rules detailed in +# +# usr/src/lib/README.mapfiles +# +# You should not be making modifications here until you've read the most current +# copy of that file. If you need help, contact a gatekeeper for guidance. +# +# MAPFILE HEADER END +# + +$mapfile_version 2 + +# functions by AST/ksh93's version of libcmd +SYMBOL_VERSION SUNWprivate_1.1 { + global: + plugin_version; + _cmd_init; + + b_basename; + b_cat; + b_chgrp; + b_cksum; + b_chmod; + b_chown; + b_cmp; + b_comm; + b_cp; + b_cut; + b_date; + b_dirname; + b_expr; + b_fds; + b_fmt; + b_fold; + b_getconf; + b_head; + b_id; + b_join; + b_ln; + b_logname; + b_md5sum; + b_mkdir; + b_mkfifo; + b_mktemp; + b_mv; + b_paste; + b_pathchk; + b_pids; + b_rev; + b_rm; + b_rmdir; + b_stty; + b_sum; + b_sync; + b_tail; + b_tee; + b_tty; + b_uname; + b_uniq; + b_wc; + b_vmstate; + local: + *; +}; + +# functions exported by the old Solaris version of libcmd +# (the code has been moved to libc starting with Solaris 11/B51) +SYMBOL_VERSION SUNWprivate_1.1 { + global: + defcntl { TYPE = FUNCTION; FILTER = libc.so.1 }; + defopen { TYPE = FUNCTION; FILTER = libc.so.1 }; + defread { TYPE = FUNCTION; FILTER = libc.so.1 }; + local: + *; +}; diff --git a/usr/src/cmd/ast/libcmd/sparc/FEATURE/ids b/usr/src/cmd/ast/libcmd/sparc/FEATURE/ids new file mode 100644 index 0000000000..075c0e54f3 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/sparc/FEATURE/ids @@ -0,0 +1,15 @@ +/* : : 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 ok */ +#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 ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _lib_getsid 1 /* getsid() in default lib(s) */ +#if !_lib_fsid && _mac_fsid +#define _lib_fsid 1 +#endif + +#endif diff --git a/usr/src/cmd/ast/libcmd/sparc/FEATURE/sockets b/usr/src/cmd/ast/libcmd/sparc/FEATURE/sockets new file mode 100644 index 0000000000..778d18ecba --- /dev/null +++ b/usr/src/cmd/ast/libcmd/sparc/FEATURE/sockets @@ -0,0 +1,11 @@ +/* : : 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 ok */ +#define _sys_socket 1 /* #include ok */ +#define _hdr_arpa_inet 1 /* #include ok */ +#define _hdr_netinet_in 1 /* #include ok */ +#define _lib_getsockname 1 /* getsockname() in default lib(s) */ +#define _lib_getsockopt 1 /* getsockopt() in default lib(s) */ +#define _lib_inet_ntoa 1 /* inet_ntoa() in default lib(s) */ +#endif 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 ok */ +#define _lib_lchown 1 /* lchown implemented */ +#endif diff --git a/usr/src/cmd/ast/libcmd/sparc/FEATURE/utsname b/usr/src/cmd/ast/libcmd/sparc/FEATURE/utsname new file mode 100644 index 0000000000..e5803b3478 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/sparc/FEATURE/utsname @@ -0,0 +1,15 @@ +/* : : 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 ok */ +#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) */ +#define _lib_sethostname 1 /* sethostname() in default lib(s) */ +#define _lib_syscall 1 /* syscall() in default lib(s) */ +#define _lib_uname 1 /* uname() in default lib(s) */ +#define _sys_utsname 1 /* #include ok */ +#define _sys_syscall 1 /* #include ok */ +#define _sys_systeminfo 1 /* #include ok */ +#define _UNAME_os_DEFAULT "illumos" /* default os name */ +#endif diff --git a/usr/src/cmd/ast/libcmd/sparc/Makefile b/usr/src/cmd/ast/libcmd/sparc/Makefile new file mode 100644 index 0000000000..f73ec75909 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/sparc/Makefile @@ -0,0 +1,29 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (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) 1997-2001 by Sun Microsystems, Inc. +# All rights reserved. +# + +include ../Makefile.com + +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/cmd/ast/libcmd/sparcv9/FEATURE/ids b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/ids new file mode 100644 index 0000000000..075c0e54f3 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/ids @@ -0,0 +1,15 @@ +/* : : 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 ok */ +#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 ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _lib_getsid 1 /* getsid() in default lib(s) */ +#if !_lib_fsid && _mac_fsid +#define _lib_fsid 1 +#endif + +#endif diff --git a/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/sockets b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/sockets new file mode 100644 index 0000000000..778d18ecba --- /dev/null +++ b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/sockets @@ -0,0 +1,11 @@ +/* : : 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 ok */ +#define _sys_socket 1 /* #include ok */ +#define _hdr_arpa_inet 1 /* #include ok */ +#define _hdr_netinet_in 1 /* #include ok */ +#define _lib_getsockname 1 /* getsockname() in default lib(s) */ +#define _lib_getsockopt 1 /* getsockopt() in default lib(s) */ +#define _lib_inet_ntoa 1 /* inet_ntoa() in default lib(s) */ +#endif 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 ok */ +#define _lib_lchown 1 /* lchown implemented */ +#endif diff --git a/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/utsname b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/utsname new file mode 100644 index 0000000000..e5803b3478 --- /dev/null +++ b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/utsname @@ -0,0 +1,15 @@ +/* : : 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 ok */ +#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) */ +#define _lib_sethostname 1 /* sethostname() in default lib(s) */ +#define _lib_syscall 1 /* syscall() in default lib(s) */ +#define _lib_uname 1 /* uname() in default lib(s) */ +#define _sys_utsname 1 /* #include ok */ +#define _sys_syscall 1 /* #include ok */ +#define _sys_systeminfo 1 /* #include ok */ +#define _UNAME_os_DEFAULT "illumos" /* default os name */ +#endif diff --git a/usr/src/cmd/ast/libcmd/sparcv9/Makefile b/usr/src/cmd/ast/libcmd/sparcv9/Makefile new file mode 100644 index 0000000000..7d288bdcaa --- /dev/null +++ b/usr/src/cmd/ast/libcmd/sparcv9/Makefile @@ -0,0 +1,30 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (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 1997-2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +include ../Makefile.com +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/cmd/ast/libdll/Makefile b/usr/src/cmd/ast/libdll/Makefile new file mode 100644 index 0000000000..b9846d0ccc --- /dev/null +++ b/usr/src/cmd/ast/libdll/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/libdll/Makefile.com b/usr/src/cmd/ast/libdll/Makefile.com new file mode 100644 index 0000000000..b6164335cc --- /dev/null +++ b/usr/src/cmd/ast/libdll/Makefile.com @@ -0,0 +1,102 @@ +# +# 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 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# Copyright (c) 2018, Joyent, Inc. +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. + +SHELL= /usr/bin/ksh93 + +LIBRARY= libdll.a +VERS= .1 + +include ../Makefile.defs + +OBJECTS += $(LIBOBJS) + +include $(SRC)/lib/Makefile.lib +include ../../Makefile.ast + +MAPFILES= ../mapfile-vers + +LIBS= $(DYNLIB) + +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. +# Notes: +# - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile +CPPFLAGS= \ + $(DTEXTDOM) $(DTS_ERRNO) \ + $(DLLPLATFORMCPPFLAGS) \ + -Iast -I. \ + -I$(ROOT)/usr/include/ast \ + -I$(ROOT)/usr/include \ + '-DCONF_LIBSUFFIX=".so"' \ + '-DCONF_LIBPREFIX="lib"' \ + -D_PACKAGE_ast \ + -D_BLD_DLL \ + -D_BLD_dll + +CFLAGS += $(ASTCFLAGS) +CFLAGS64 += $(ASTCFLAGS64) + +CERRWARN += -_gcc=-Wno-parentheses +CERRWARN += $(CNOWARN_UNINIT) + +# needs work +SMOFF += all_func_returns,strcpy_overflow + +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 + +$(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 + +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/cmd/ast/libdll/amd64/FEATURE/dll b/usr/src/cmd/ast/libdll/amd64/FEATURE/dll new file mode 100644 index 0000000000..b8f61d315a --- /dev/null +++ b/usr/src/cmd/ast/libdll/amd64/FEATURE/dll @@ -0,0 +1,148 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_dlfcn 1 /* #include 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 + +#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 */ + 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 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; + 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_* 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*)); +extern __MANGLE__ int dllsclose __PROTO__((Dllscan_t*)); + +#undef __MANGLE__ +#define __MANGLE__ __LINKAGE__ + +#endif diff --git a/usr/src/cmd/ast/libdll/amd64/Makefile b/usr/src/cmd/ast/libdll/amd64/Makefile new file mode 100644 index 0000000000..dbcb8144a6 --- /dev/null +++ b/usr/src/cmd/ast/libdll/amd64/Makefile @@ -0,0 +1,36 @@ +# +# 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. +# + +# Platform-specific config +# Note that "HOSTTYPE" matches the value used by AT&T upstream. +DLLPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"' + +include ../Makefile.com +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/cmd/ast/libdll/i386/FEATURE/dll b/usr/src/cmd/ast/libdll/i386/FEATURE/dll new file mode 100644 index 0000000000..b8f61d315a --- /dev/null +++ b/usr/src/cmd/ast/libdll/i386/FEATURE/dll @@ -0,0 +1,148 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_dlfcn 1 /* #include 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 + +#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 */ + 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 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; + 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_* 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*)); +extern __MANGLE__ int dllsclose __PROTO__((Dllscan_t*)); + +#undef __MANGLE__ +#define __MANGLE__ __LINKAGE__ + +#endif diff --git a/usr/src/cmd/ast/libdll/i386/Makefile b/usr/src/cmd/ast/libdll/i386/Makefile new file mode 100644 index 0000000000..b9af5daf9d --- /dev/null +++ b/usr/src/cmd/ast/libdll/i386/Makefile @@ -0,0 +1,35 @@ +# +# 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. +# + +# Platform-specific config +# Note that "HOSTTYPE" matches the value used by AT&T upstream. +DLLPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"' + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) 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/cmd/ast/libdll/mapfile-vers b/usr/src/cmd/ast/libdll/mapfile-vers new file mode 100644 index 0000000000..a19755dc18 --- /dev/null +++ b/usr/src/cmd/ast/libdll/mapfile-vers @@ -0,0 +1,57 @@ +# +# 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. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object versioning must comply with the rules detailed in +# +# usr/src/lib/README.mapfiles +# +# You should not be making modifications here until you've read the most current +# copy of that file. If you need help, contact a gatekeeper for guidance. +# +# MAPFILE HEADER END +# + +$mapfile_version 2 + +SYMBOL_VERSION SUNWprivate_1.1 { + global: + dllerror; + dllfind; + dllinfo; + dlllook; + dllnext; + dllplug; + dllplugin; + dllsclose; + dllsopen; + dllsread; + local: + *; +}; diff --git a/usr/src/cmd/ast/libdll/sparc/FEATURE/dll b/usr/src/cmd/ast/libdll/sparc/FEATURE/dll new file mode 100644 index 0000000000..b8f61d315a --- /dev/null +++ b/usr/src/cmd/ast/libdll/sparc/FEATURE/dll @@ -0,0 +1,148 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_dlfcn 1 /* #include 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 + +#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 */ + 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 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; + 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_* 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*)); +extern __MANGLE__ int dllsclose __PROTO__((Dllscan_t*)); + +#undef __MANGLE__ +#define __MANGLE__ __LINKAGE__ + +#endif diff --git a/usr/src/cmd/ast/libdll/sparc/Makefile b/usr/src/cmd/ast/libdll/sparc/Makefile new file mode 100644 index 0000000000..42db5bf43a --- /dev/null +++ b/usr/src/cmd/ast/libdll/sparc/Makefile @@ -0,0 +1,35 @@ +# +# 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. +# + +# Platform-specific config +# Note that "HOSTTYPE" matches the value used by AT&T upstream. +DLLPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"' + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) 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/cmd/ast/libdll/sparcv9/FEATURE/dll b/usr/src/cmd/ast/libdll/sparcv9/FEATURE/dll new file mode 100644 index 0000000000..b8f61d315a --- /dev/null +++ b/usr/src/cmd/ast/libdll/sparcv9/FEATURE/dll @@ -0,0 +1,148 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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 ok */ +#define _hdr_dlfcn 1 /* #include 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 + +#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 */ + 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 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; + 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_* 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*)); +extern __MANGLE__ int dllsclose __PROTO__((Dllscan_t*)); + +#undef __MANGLE__ +#define __MANGLE__ __LINKAGE__ + +#endif diff --git a/usr/src/cmd/ast/libdll/sparcv9/Makefile b/usr/src/cmd/ast/libdll/sparcv9/Makefile new file mode 100644 index 0000000000..53f5bcbb15 --- /dev/null +++ b/usr/src/cmd/ast/libdll/sparcv9/Makefile @@ -0,0 +1,36 @@ +# +# 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. +# + +# Platform-specific config +# Note that "HOSTTYPE" matches the value used by AT&T upstream. +DLLPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"' + +include ../Makefile.com +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/cmd/ast/libpp/Makefile b/usr/src/cmd/ast/libpp/Makefile new file mode 100644 index 0000000000..bfaa868db1 --- /dev/null +++ b/usr/src/cmd/ast/libpp/Makefile @@ -0,0 +1,60 @@ +# +# 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) + +all := TARGET= all +clean := TARGET= clean +clobber := TARGET= clobber +install := TARGET= install +_msg := TARGET= _msg + +.KEEP_STATE: + +all clean clobber install: $(SUBDIRS) +_msg: $(MACH) +_feature: + +include ../Makefile.ast +include Makefile.defs +HDRS= $(HEADERINSTALL) +HDRDIR32= $(ASTSRC) +HDRDIR64= $(ASTSRC) +include ../Makefile.asthdr + +install_h: $(ROOTHDRS) +install: install_h + +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) +FRC: + +include $(SRC)/lib/Makefile.targ diff --git a/usr/src/cmd/ast/libpp/Makefile.com b/usr/src/cmd/ast/libpp/Makefile.com new file mode 100644 index 0000000000..6140425eec --- /dev/null +++ b/usr/src/cmd/ast/libpp/Makefile.com @@ -0,0 +1,91 @@ +# +# 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 2009 Sun Microsystems, Inc. All rights reserved. +# 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 + +include ../Makefile.defs + +OBJECTS += $(LIBOBJS) + +include $(SRC)/lib/Makefile.lib +include ../../Makefile.ast + +MAPFILES= ../mapfile-vers + +LIBS= $(DYNLIB) + +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= \ + $(DTEXTDOM) $(DTS_ERRNO) \ + -I. \ + -I$(ROOT)/usr/include/ast \ + -I$(ROOT)/usr/include \ + -D_PACKAGE_ast \ + '-DUSAGE_LICENSE=\ + "[-author?Glenn Fowler ]"\ + "[-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) + +CERRWARN += -_gcc=-Wno-parentheses +CERRWARN += $(CNOWARN_UNINIT) +CERRWARN += -_gcc=-Wno-char-subscripts +CERRWARN += -_gcc=-Wno-empty-body +CERRWARN += -_gcc=-Wno-unused-value + +# "pplex() parse error: turning off implications after 60 seconds" +SMATCH = off + +all: $(LIBS) + +include $(SRC)/lib/Makefile.targ + +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) + +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/cmd/ast/libpp/i386/Makefile b/usr/src/cmd/ast/libpp/i386/Makefile new file mode 100644 index 0000000000..6c35d1fc88 --- /dev/null +++ b/usr/src/cmd/ast/libpp/i386/Makefile @@ -0,0 +1,29 @@ +# +# 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. +# + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/ast/libpp/mapfile-vers b/usr/src/cmd/ast/libpp/mapfile-vers new file mode 100644 index 0000000000..76d7fcc53c --- /dev/null +++ b/usr/src/cmd/ast/libpp/mapfile-vers @@ -0,0 +1,53 @@ +# +# 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. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object versioning must comply with the rules detailed in +# +# usr/src/lib/README.mapfiles +# +# You should not be making modifications here until you've read the most current +# copy of that file. If you need help, contact a gatekeeper for guidance. +# +# MAPFILE HEADER END +# + +$mapfile_version 2 + +SYMBOL_VERSION SUNWprivate_1.1 { + global: + pp; + ppop; + pplex; + ppinput; + ppargs; + + local: + *; +}; diff --git a/usr/src/cmd/ast/libpp/sparc/Makefile b/usr/src/cmd/ast/libpp/sparc/Makefile new file mode 100644 index 0000000000..20c09d9e82 --- /dev/null +++ b/usr/src/cmd/ast/libpp/sparc/Makefile @@ -0,0 +1,31 @@ +# +# 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. +# + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/ast/libshell/Makefile b/usr/src/cmd/ast/libshell/Makefile new file mode 100644 index 0000000000..817297a67b --- /dev/null +++ b/usr/src/cmd/ast/libshell/Makefile @@ -0,0 +1,67 @@ +# +# 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 2009 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: + +ASTSRC= $(CONTRIB)/ast/src/cmd/ksh93 +include Makefile.demo +include Makefile.doc + +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/cmd/ast/libshell/Makefile.demo b/usr/src/cmd/ast/libshell/Makefile.demo new file mode 100644 index 0000000000..e1a81f07c2 --- /dev/null +++ b/usr/src/cmd/ast/libshell/Makefile.demo @@ -0,0 +1,188 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. +# + +DEMOFILESRCDIR= $(ASTSRC) +ROOTDEMODIRBASE= $(ROOT)/usr/demo/ksh + +DF_SRC= \ + src/cpvprint.sh \ + src/crawlsrccomments.sh \ + src/filemutexdemo1.sh \ + src/filetree1.sh \ + src/gnaw.sh \ + src/mandelbrotset1.sh \ + src/multifollow.sh \ + src/numtree1.sh \ + src/primenumbers1.sh \ + src/rssread.sh \ + src/shcalc.sh \ + src/shircbot.sh \ + src/shlint.sh \ + src/shman.sh \ + src/shnote.sh \ + src/shpiano.sh \ + src/shtinyurl.sh \ + src/shtwitter.sh \ + src/simplefileattributetree1.sh \ + src/simplefiletree1.sh \ + src/svcproptree1.sh \ + src/termclock.sh \ + src/test_net_sctp.sh \ + 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 \ + tests/arith.sh \ + tests/arrays.sh \ + tests/arrays2.sh \ + tests/attributes.sh \ + tests/basic.sh \ + tests/bracket.sh \ + tests/builtins.sh \ + tests/case.sh \ + tests/comvar.sh \ + tests/comvario.sh \ + tests/coprocess.sh \ + tests/cubetype.sh \ + tests/enum.sh \ + tests/exit.sh \ + tests/expand.sh \ + tests/functions.sh \ + tests/glob.sh \ + 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 \ + tests/select.sh \ + tests/sigchld.sh \ + tests/signal.sh \ + 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 \ + tests/sun_solaris_builtin_tail.sh \ + tests/sun_solaris_command_substitution.sh \ + tests/sun_solaris_compound_misc.sh \ + tests/sun_solaris_compound_nameref.sh \ + tests/sun_solaris_compoundvario.sh \ + tests/sun_solaris_cr_xxxxxxxx_template.sh \ + tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh \ + tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh \ + tests/sun_solaris_cr_6722134_background_CHLD_trap.sh \ + tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh \ + tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh \ + tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh \ + tests/sun_solaris_cr_6766246_pattern_matching_bug.sh \ + tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh \ + tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh \ + tests/sun_solaris_cr_6778077_sigthaw_trap.sh \ + tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh \ + tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh \ + tests/sun_solaris_cr_6805792_varmovetest1.sh \ + tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh \ + tests/sun_solaris_cr_6805795_negative_zero.sh \ + tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh \ + tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh \ + tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh \ + tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh \ + tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh \ + tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh \ + tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh \ + tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh \ + tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh \ + tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh \ + tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh \ + tests/sun_solaris_getconf.sh \ + tests/sun_solaris_locale_misc.sh \ + tests/sun_solaris_local_compound_nameref001.sh \ + tests/sun_solaris_staticvariables.sh \ + tests/sun_solaris_vartree001.sh \ + tests/sun_solaris_vartree002.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 +$(ROOTDEMODIRBASE)/fun/% := FILEMODE= 755 +$(ROOTDEMODIRBASE)/bin/% := FILEMODE= 755 + +$(ROOTDEMODIRBASE)/bin/%: common/scripts/%.sh + /usr/bin/shcomp "$<" >"$(@F)" + $(INS) -s -m $(FILEMODE) -f $(@D) "$(@F)" + $(RM) "$(@F)" + +$(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 + +_demoinstall: $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) +install: _demoinstall diff --git a/usr/src/cmd/ast/libshell/Makefile.doc b/usr/src/cmd/ast/libshell/Makefile.doc new file mode 100644 index 0000000000..2020c89dd8 --- /dev/null +++ b/usr/src/cmd/ast/libshell/Makefile.doc @@ -0,0 +1,80 @@ +# +# 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 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 + +DOCFILES= \ + RELEASE \ + README \ + TYPES \ + DESIGN \ + COMPATIBILITY \ + OBSOLETE \ + shell_styleguide.docbook \ + images/tag_bourne.png \ + images/tag_i18n.png \ + images/tag_ksh88.png \ + images/tag_ksh93.png \ + images/tag_ksh.png \ + images/tag_l10n.png \ + images/tag_perf.png \ + images/callouts/1.png \ + images/callouts/2.png \ + images/callouts/3.png \ + images/callouts/4.png \ + images/callouts/5.png \ + images/callouts/6.png \ + images/callouts/7.png \ + images/callouts/8.png \ + images/callouts/9.png \ + images/callouts/10.png + +# Documentation rules +$(ROOTDOCDIRBASE)/%: $(ASTSRC)/% + $(INS.file) + +$(ROOTDOCDIRBASE)/%: misc/% + $(INS.file) + +ROOTDOCDIRS= \ + $(ROOTDOCDIRBASE) .WAIT \ + $(ROOTDOCDIRBASE)/images .WAIT \ + $(ROOTDOCDIRBASE)/images/callouts + +# Generic documentation rules +DOCFILESRCDIR= common +ROOTDOCFILES= $(DOCFILES:%=$(ROOTDOCDIRBASE)/%) +$(ROOTDOCDIRS) := OWNER = root +$(ROOTDOCDIRS) := GROUP = bin +$(ROOTDOCDIRS) := DIRMODE = 755 + +$(ROOTDOCDIRS): + $(INS.dir) + +_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 ok */ +#define _dat_acct 1 /* acct in default lib(s) */ +#define _lib_acct 1 /* acct() in default lib(s) */ +#define _sys_acct 1 /* #include 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 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 ok */ +#if SHOPT_DYNAMIC +#include +#endif +#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC +# define SHOPT_FS_3D 1 +#endif /* !SHOPT_FS_3D */ +#if SHOPT_FS_3D +# undef mount +# include +#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 ok */ +#endif diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/externs b/usr/src/cmd/ast/libshell/amd64/FEATURE/externs new file mode 100644 index 0000000000..8828c30ba8 --- /dev/null +++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/externs @@ -0,0 +1,80 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_externs_ksh93 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_exec_attr 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _mem_name_exception 1 /* name is a member of struct exception */ +#define _lib_setreuid 1 /* setreuid() in default lib(s) */ +#define _lib_setregid 1 /* setregid() in default lib(s) */ +#define _lib_nice 1 /* nice() in default lib(s) */ +#define _lib_fork 1 /* fork() in default lib(s) */ +#define _lib_spawnveg 1 /* spawnveg() in default lib(s) */ +#define _lib_fchdir 1 /* fchdir() in default lib(s) */ +#define _sys_mman 1 /* #include ok */ +#define _lib_memcntl 1 /* memcntl() in default lib(s) */ +#define _LIB_secdb 1 /* -lsecdb is a library */ +#define _lib_getexecuser 1 /* getexecuser() in default lib(s) */ +#define _lib_free_execattr 1 /* free_execattr() in default lib(s) */ +#endif diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/locale b/usr/src/cmd/ast/libshell/amd64/FEATURE/locale new file mode 100644 index 0000000000..6b5aba0a08 --- /dev/null +++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/locale @@ -0,0 +1,42 @@ +/* : : 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 ok */ +#define _hdr_locale 1 /* #include ok */ +#define _hdr_wchar 1 /* #include ok */ +#define _hdr_wctype 1 /* #include 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 ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _typ_wctrans_t 1 /* wctrans_t is a type */ +#if _PACKAGE_ast +# undef _hdr_locale +# define _hdr_locale 1 +#else +# ifdef _hdr_locale +# include +# ifndef LC_MESSAGES +# define LC_MESSAGES LC_ALL +# endif /* LC_MESSAGES */ +# endif /* _hdr_locale */ +#endif /* _PACKAGE_ast */ +#ifdef _hdr_locale +# ifdef _lib_localeconv + static struct lconv *lp; +# define GETDECIMAL(x) (((lp=localeconv()) && lp->decimal_point && *lp->decimal_point) ? *lp->decimal_point : '.' ) +# else +# define GETDECIMAL(x) ('.') +# endif /* _lib_localeconv */ +#else +# define GETDECIMAL(x) ('.') +#endif /* _hdr_locale */ + +#endif diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/math b/usr/src/cmd/ast/libshell/amd64/FEATURE/math new file mode 100644 index 0000000000..b86d8d56ac --- /dev/null +++ b/usr/src/cmd/ast/libshell/amd64/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 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 +#include + +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/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 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/cmd/ast/libshell/amd64/FEATURE/poll b/usr/src/cmd/ast/libshell/amd64/FEATURE/poll new file mode 100644 index 0000000000..c76d76c633 --- /dev/null +++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/poll @@ -0,0 +1,117 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_poll_ksh93 1 +#define _sys_types 1 /* #include ok */ +#define _LIB_nsl 1 /* -lnsl is a library */ +#define _LIB_socket 1 /* -lsocket is a library */ +#define _hdr_poll 1 /* #include ok */ +#define _hdr_netinet_in 1 /* #include ok */ +#define _sys_poll 1 /* #include ok */ +#define _sys_socket 1 /* #include ok */ +#define _lib_select 1 /* select() in default lib(s) */ +#define _lib_poll 1 /* poll() in default lib(s) */ +#define _lib_socket 1 /* socket() in default lib(s) */ +#define _lib_htons 1 /* htons() in default lib(s) */ +#define _lib_htonl 1 /* htonl() in default lib(s) */ +#define _hdr_netdb 1 /* #include ok */ +#define _lib_getaddrinfo 1 /* getaddrinfo() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _sys_select 1 /* #include ok */ +#define _typ_fd_set 1 /* fd_set is a type */ +#define _hdr_unistd 1 /* #include ok */ +#define _typ_socklen_t 1 /* socklen_t is a type */ + +#ifdef _lib_poll +# define poll _SYS_poll +#else +# undef _hdr_poll +# undef _sys_poll +#endif /* _lib_poll */ +#ifdef _hdr_poll +# include +#else +# ifdef _sys_poll +# include +# endif /* _sys_poll */ +#endif /* _hdr_poll */ +#ifdef _lib_poll +# undef poll + extern __MANGLE__ int poll __PROTO__((struct pollfd*,unsigned long,int)); +#endif /* _lib_poll */ +#ifdef _lib_select +# ifndef FD_ZERO +# define FD_ZERO(x) (*(x)=0) +# endif /* FD_ZERO */ +# ifndef FD_SET +# define FD_SET(n,x) (*(x)|=(1L<<(n))) +# endif /* FD_SET */ +# ifndef _typ_fd_set + typedef long fd_set; +# endif /*_typ_fd_set */ +#endif /* _lib_select */ + +#endif 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 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 ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_resource 1 /* #include ok */ +#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */ +#define _lib_ulimit 1 /* ulimit() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include 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 +# 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/cmd/ast/libshell/amd64/FEATURE/setjmp b/usr/src/cmd/ast/libshell/amd64/FEATURE/setjmp new file mode 100644 index 0000000000..2e57e9cd18 --- /dev/null +++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/setjmp @@ -0,0 +1,30 @@ +/* : : 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 ok */ +#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) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_setjmp 1 /* #include ok */ +#define _typ_sigjmp_buf 1 /* sigjmp_buf is a type */ +#undef sigsetjmp +#undef siglongjmp +#undef sigjmp_buf +#define sigjmp_buf jmp_buf +#ifdef _lib__setjmp +# define sigsetjmp(a,b) _setjmp(a) +#else +# define sigsetjmp(a,b) setjmp(a) +#endif /* _lib__setjmp */ +#ifdef _lib__longjmp +# define siglongjmp(a,b) _longjmp(a,b) +#else +# define siglongjmp(a,b) longjmp(a,b) +#endif /* _lib__longjmp */ + +#endif diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/sigfeatures b/usr/src/cmd/ast/libshell/amd64/FEATURE/sigfeatures new file mode 100644 index 0000000000..39231bc866 --- /dev/null +++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/sigfeatures @@ -0,0 +1,48 @@ +/* : : 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 ok */ +#define _lib_sigrelse 1 /* sigrelse() in default lib(s) */ +#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_signal 1 /* #include ok */ +#define _typ_sigset_t 1 /* sigset_t is a type */ +#ifndef _mem_sigvec_sv_mask +# undef _lib_sigvec +#endif +#ifdef _lib_sigprocmask +# define sh_sigaction(s,action) do { sigset_t ss;\ + sigemptyset(&ss); \ + if(s) sigaddset(&ss,(s)); \ + sigprocmask(action,&ss,0); \ + }while(0) +# define sigrelease(s) sh_sigaction(s,SIG_UNBLOCK) +# define sigblock(s) sh_sigaction(s,SIG_BLOCK) +# define sig_begin() sh_sigaction(0,SIG_SETMASK) +#else +# ifndef _lib_sigblock +# define sigblock(s) +# endif +# ifdef _lib_sigsetmask +# define sigrelease(s) sigsetmask(0) +# define sig_begin() sigsetmask(0) +# else +# ifdef _lib_sigrelse +# define sigrelease sigrelse +# define sig_begin() +# else +# define sig_begin() (0) +# define sigrelease(s) (0) +# endif /* _lib_sigrelse */ +# endif /* _lib_sigsetmask */ +#endif /* _lib_sigprocmask */ + +#undef _SIGRTMIN +#define _SIGRTMIN 42 +#undef _SIGRTMAX +#define _SIGRTMAX 73 +#endif diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/time b/usr/src/cmd/ast/libshell/amd64/FEATURE/time new file mode 100644 index 0000000000..0e1c2627b6 --- /dev/null +++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/time @@ -0,0 +1,23 @@ +/* : : 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 ok */ +#define _hdr_utime 1 /* #include ok */ +#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */ +#define _lib_setitimer 1 /* setitimer() in default lib(s) */ +#define _sys_time 1 /* #include ok */ +#define _mem_tv_usec_timeval 1 /* tv_usec is a member of struct timeval */ +#define _lib_2_timeofday 1 /* 2 arg gettimeofday() */ +#undef _def_time +#include +#define _def_time 1 +#undef timeofday +#if _lib_2_timeofday +#define timeofday(p) gettimeofday(p,(struct timezone*)0) +#else +#if _lib_1_timeofday +#define timeofday(p) gettimeofday(p) +#endif +#endif + +#endif 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 ok */ +#define _hdr_termios 1 /* #include ok */ +#define _hdr_termio 1 /* #include ok */ +#define _hdr_sgtty 1 /* #include ok */ +#define _sys_termios 1 /* #include ok */ +#define _sys_termio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include ok */ +#define _sys_filio 1 /* #include 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/cmd/ast/libshell/amd64/Makefile b/usr/src/cmd/ast/libshell/amd64/Makefile new file mode 100644 index 0000000000..d6a7d68d4f --- /dev/null +++ b/usr/src/cmd/ast/libshell/amd64/Makefile @@ -0,0 +1,30 @@ +# +# 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. +# + +include ../Makefile.com +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/cmd/ast/libshell/common/illumos_cmdlist.h b/usr/src/cmd/ast/libshell/common/illumos_cmdlist.h new file mode 100644 index 0000000000..cb18d84ae6 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/illumos_cmdlist.h @@ -0,0 +1,186 @@ +/* + * 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. + * Copyright 2021 OmniOS Community Edition (OmniOSce) Association. + */ + +#ifndef _ILLUMOS_KSH_CMDLIST_H +#define _ILLUMOS_KSH_CMDLIST_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * List builtins for illumos. + * The list here is partially autogenerated and partially hand-picked + * based on compatibility with the native illumos versions of these + * tools + */ + +/* + * 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) }, +#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(expr) +GNUCMDLIST(expr) +XPG6CMDLIST(expr) +ASTCMDLIST(fds) +ASTCMDLIST(fmt) +ASTCMDLIST(fold) +BINCMDLIST(fold) +GNUCMDLIST(fold) +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(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) + +/* Mandatory for ksh93 test suite and AST scripts */ +BINCMDLIST(getconf) + +#ifdef __cplusplus +} +#endif + +#endif /* !_ILLUMOS_KSH_CMDLIST_H */ diff --git a/usr/src/cmd/ast/libshell/common/scripts/cpvprint.sh b/usr/src/cmd/ast/libshell/common/scripts/cpvprint.sh new file mode 100644 index 0000000000..5c8c706579 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/cpvprint.sh @@ -0,0 +1,184 @@ +#!/usr/bin/ksh93 + +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# cpvprint - compound variable pretty printer +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +function prettyprint_compoundvar +{ + nameref var=$1 + + # print tree + str="${ print -v var ; }" + # do some "pretty-printing" for human users (the output is still a + # valid compound variable value) + # (note: This does not scale well with large files) + str="${str//$'\t'typeset -l -E /$'\t'float }" + str="${str//$'\t'typeset -l -i /$'\t'integer }" + str="${str//$'\t'typeset -C /$'\t'compound }" + print -r -- "${str}" + + return 0 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${cpvprint_usage}" OPT '-?' + exit 2 +} + +# HTML constants +compound -r hc=( + compound -r doctype=( + compound -r xhtml=( + typeset -r transitional=$'\n' + ) + ) + compound -r namespace=( + typeset -r xhtml=$'http://www.w3.org/1999/xhtml' + ) + typeset -r xml_head=$'\n' +) + +# main +builtin basename + +set -o noglob +set -o errexit +set -o nounset + +# tree variable +compound tree + +typeset progname="${ basename "${0}" ; }" + +typeset -r cpvprint_usage=$'+ +[-?\n@(#)\$Id: cpvprint (Roland Mainz) 2009-06-15 \$\n] +[-author?Roland Mainz ] +[+NAME?cpvprint - render compound variable trees in various formats] +[+DESCRIPTION?\bcpvprint\b is converter which reads a ksh compound + variable and prints it on a different format. Supported + formats are \'default\', \'altdefault\', + \'tree\', \'alttree\', + \'pretty\', \'pretty.html\', \'list\' and \'fulllist\'] + +format [ arguments ] + +[+SEE ALSO?\bksh93\b(1), \bcpvlint\b(1)] +' + +while getopts -a "${progname}" "${cpvprint_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage ;; + esac +done +shift $((OPTIND-1)) + +# prechecks +(( $# > 0 )) || usage + +printformat="$1" +shift + +# read variable +case $# in + 0) + read -C tree || fatal_error $"Read error." + ;; + 1) + integer fd + + redirect {fd}<> "$1" || fatal_error $"Cannot open file." + read -u${fd} -C tree || fatal_error $"Read error." + redirect {fd}<&- || fatal_error $"Close error." + ;; + 2) + print -u2 -f $"%s: Unsupported number of arguments.\n" "$0" + exit 1 + ;; +esac + +# print variable +case ${printformat} in + 'default' | 'tree') + print -v tree + ;; + 'altdefault' | 'alttree') + print -C tree + ;; + 'pretty') + # print variable tree (same as $ print -v filetree # except that it "looks better") + prettyprint_compoundvar tree + ;; + 'pretty.html') + printf '%s%s\n%H\n
%H\n
\n' \ + "${hc.xml_head}" \ + "${hc.doctype.xhtml.transitional}" \ + "${hc.namespace.xhtml}" \ + "ksh Compound Variable Pretty Printer (cpvprint)" \ + "" \ + "$(prettyprint_compoundvar tree)" | iconv -f "UTF-8" - - + ;; + 'list') + set | egrep '^tree.' | sed 's/^tree\.//' | egrep -v '^[[:alnum:]]+(\.([[:alnum:]\.]+)(\[.*\])*)*=\(' + ;; + 'fulllist') + set | egrep "^tree." + ;; + *) + fatal_error $"Unsupported format." + ;; +esac + +exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/crawlsrccomments.sh b/usr/src/cmd/ast/libshell/common/scripts/crawlsrccomments.sh new file mode 100644 index 0000000000..109a69f0ab --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/crawlsrccomments.sh @@ -0,0 +1,1241 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +# constants values for tokenizer/parser stuff +compound -r ch=( + newline=$'\n' + tab=$'\t' + formfeed=$'\f' +) + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +function printmsg +{ + print -u2 "$*" +} + + +function attrstrtoattrarray +{ +#set -o xtrace + typeset s="$1" + nameref aa=$2 # attribute array + integer aa_count=0 + integer aa_count=0 + typeset nextattr + integer currattrlen=0 + typeset tagstr + typeset tagval + + while (( ${#s} > 0 )) ; do + # skip whitespaces + while [[ "${s:currattrlen:1}" == ~(E)[[:blank:][:space:]] ]] ; do + (( currattrlen++ )) + done + s="${s:currattrlen:${#s}}" + + # anything left ? + (( ${#s} == 0 )) && break + + # Pattern tests: + #x="foo=bar huz=123" ; print "${x##~(E)[[:alnum:]_-:]*=[^[:blank:]\"]*}" + #x='foo="ba=r o" huz=123' ; print "${x##~(E)[[:alnum:]_-:]*=\"[^\"]*\"}" + #x="foo='ba=r o' huz=123" ; print "${x##~(E)[[:alnum:]_-:]*=\'[^\"]*\'}" + #x="foox huz=123" ; print "${x##~(E)[[:alnum:]_-:]*}" + # All pattern combined via eregex (w|x|y|z): + #x='foo="bar=o" huz=123' ; print "${x##~(E)([[:alnum:]_-:]*=[^[:blank:]\"]*|[[:alnum:]_-:]*=\"[^\"]*\"|[[:alnum:]_-:]*=\'[^\"]*\')}" + nextattr="${s##~(E)([[:alnum:]_-:]*=[^[:blank:]\"]*|[[:alnum:]_-:]*=\"[^\"]*\"|[[:alnum:]_-:]*=\'[^\"]*\'|[[:alnum:]_-:]*)}" + currattrlen=$(( ${#s} - ${#nextattr})) + + # add entry + 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 + aa[${aa_count}]=( name="${tagstr}" ) + fi + (( aa_count++ )) + (( aa_count > 1000 )) && fatal_error "$0: aa_count too large" # assert + done +} + +# XML document handler +function handle_xml_document +{ +#set -o xtrace + nameref callbacks=${1} + typeset tag_type="${2}" + typeset tag_value="${3}" + typeset tag_attributes="${4}" + 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}]+=( + typeset tagtype="comment" + typeset tagvalue="${tag_value}" + ) + (( nodesnum++ )) + ;; + esac + +# print "xmltok: '${tag_type}' = '${tag_value}'" +} + +function xml_tok +{ + typeset buf="" + typeset namebuf="" + typeset attrbuf="" + typeset c="" + typeset isendtag # bool: true/false + typeset issingletag # bool: true/false (used for tags like "
") + 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 + else + buf="$c" + fi + IFS='' read -r -d '>' c + buf+="$c" + + # handle comments + if [[ "$buf" == ~(El)!-- ]] ; then + # did we read the comment completely ? + if [[ "$buf" != ~(Elr)!--.*-- ]] ; then + buf+=">" + while [[ "$buf" != ~(Elr)!--.*-- ]] ; do + IFS='' read -r -N 1 c || break + 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 "
") + if [[ "${buf}" == ~(Er).*/ ]] ; then + issingletag=true + buf="${buf%*/}" + 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:]].*}" + attrbuf="${buf#~(E).*[[:space:][:blank:]]}" + else + namebuf="$buf" + attrbuf="" + fi + + if ${isendtag} ; then + [[ ! -z "${callbacks["tag_end"]}" ]] && ${callbacks["tag_end"]} "${1}" "tag_end" "$namebuf" + else + [[ ! -z "${callbacks["tag_begin"]}" ]] && ${callbacks["tag_begin"]} "${1}" "tag_begin" "$namebuf" "$attrbuf" + + # handle tags like
(which are start- and end-tag in one piece) + if ${issingletag} ; then + [[ ! -z "${callbacks["tag_end"]}" ]] && ${callbacks["tag_end"]} "${1}" "tag_end" "$namebuf" + fi + fi + buf="" + else + buf+="$c" + fi + done + + [[ ! -z "${callbacks["document_end"]}" ]] && ${callbacks["document_end"]} "${1}" "document_end" "exit_success" + + print # final newline to make filters like "sed" happy +} + +# enumerate comments in a shell (or shell-like) script +function enumerate_comments_shell +{ + set -o errexit + + typeset input_file="$1" + nameref comment_array="$2" + integer max_num_comments="$3" + integer ca=0 # index in "comment_array" + + integer res=0 + + typeset comment="" + + 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 + fi + fi + done <"${input_file}" + + return 0 +} + + +# enumerate comments in a troff document +function enumerate_comments_troff +{ + set -o errexit + + typeset input_file="$1" + nameref comment_array="$2" + integer max_num_comments="$3" + integer ca=0 # index in "comment_array" + + integer res=0 + + typeset comment="" + + 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 + fi + fi + done <"${input_file}" + + return 0 +} + + +# enumerate comments in files which are preprocessed by +# CPP (e.g. C, C++, Imakefile etc.) +function enumerate_comments_cpp +{ + set -o errexit +# set -o nounset + + integer err=0 + + typeset input_file="$1" + nameref comment_array="$2" + integer max_num_comments="$3" + integer max_filesize_for_scan="$4" + integer ca=0 # index in "comment_array" + + typeset content + integer content_length + + integer file_pos # file position + compound line_pos=( + integer x=0 # X position in line + integer y=0 # Y position in line (line number) + ) + typeset c c2 + + typeset comment + + compound state=( + # C comment state + typeset in_c_comment=false + # C++ comment state + compound cxx=( + typeset in_comment=false + typeset comment_continued=false + # position of current //-pos + compound comment_pos=( + integer x=-1 + integer y=-1 + ) + # position of previous //-pos + compound comment_prev_pos=( + integer x=-1 + integer y=-1 + ) + ) + # literal state + typeset in_sq_literal=false # single-quote literal + typeset in_dq_literal=false # double-quote literal + ) + + content="$(< "${input_file}")" + + # Truncate file to "max_filesize_for_scan" charatcters. + # This was originally added to work around a performance problem with + # the ${str:offset:chunksize} operator which scales badly in ksh93 + # version 's' with the number of characters + if (( ${#content} > max_filesize_for_scan )) ; then + print -u2 -f "## WARNING: File '%s' truncated to %d characters\n" \ + "${input_file}" \ + max_filesize_for_scan + content="${content:0:max_filesize_for_scan}" + fi + content_length=${#content} + + # Iterate through the source code. The last character + # (when file_pos == content_length) will be empty to indicate + # EOF (this is needed for cases like when + # a C++ comment is not terminated by a newline... ;-/) + 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 + else + comment+="$c" + fi + 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}" + (( state.cxx.comment_prev_pos.x=state.cxx.comment_pos.x , + state.cxx.comment_prev_pos.y=state.cxx.comment_pos.y )) + else + comment_array[ca++]="${comment}" + (( state.cxx.comment_prev_pos.x=state.cxx.comment_pos.x , + state.cxx.comment_prev_pos.y=state.cxx.comment_pos.y )) + fi + comment="" + + if (( ca > max_num_comments )) ; then + break + fi + else + comment+="$c" + fi + elif ${state.in_sq_literal} ; then + if [[ "$c" == "'" && "${content:file_pos-1:1}" != '\' ]] ; then + state.in_sq_literal=false + fi + elif ${state.in_dq_literal} ; then + if [[ "$c" == '"' && "${content:file_pos-1:1}" != '\' ]] ; then + state.in_dq_literal=false + fi + else + if [[ "$c2" == "/*" ]] ; then + (( file_pos++, line_pos.x++ )) + state.in_c_comment=true + comment="" + elif [[ "$c2" == "//" ]] ; then + (( file_pos++, line_pos.x++ )) + if (( state.cxx.comment_prev_pos.x == line_pos.x && \ + state.cxx.comment_prev_pos.y == (line_pos.y-1) )) ; then + state.cxx.comment_continued=true + else + state.cxx.comment_continued=false + fi + (( state.cxx.comment_pos.x=line_pos.x , state.cxx.comment_pos.y=line_pos.y )) + state.cxx.in_comment=true + comment="" + elif [[ "$c" == "'" && "${content:file_pos-1:1}" != '\' ]] ; then + state.in_sq_literal=true + elif [[ "$c" == '"' && "${content:file_pos-1:1}" != '\' ]] ; then + state.in_dq_literal=true + fi + fi + done + + if [[ "$comment" != "" ]] ; then + print -u2 "## ERROR: Comment text buffer not empty at EOF." + err=1 + fi + + if ${state.in_c_comment} ; then + print -u2 "## ERROR: C comment did not close before EOF." + err=1 + fi + + if ${state.cxx.in_comment} ; then + print -u2 "## ERROR: C++ comment did not close before EOF." + err=1 + fi + + if ${state.in_dq_literal} ; then + print -u2 "## ERROR: Double-quoted literal did not close before EOF." + err=1 + fi + + # We treat this one only as warning since things like "foo.html.cpp" may + # trigger this condition accidently + if ${state.in_sq_literal} ; then + print -u2 "## WARNING: Single-quoted literal did not close before EOF." + fi + + return $err +} + +# determine file type +function get_file_format +{ + set -o errexit + + typeset filename="$1" + 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 + # and output unreliable) for many file formats and therefore + # 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 + *.[ch] | *.cpp | *.cc | *.cxx | *.hxx) + file_format="c_source" + return 0 + ;; + *Imakefile) + file_format="imakefile" + return 0 + ;; + *Makefile) + file_format="makefile" + return 0 + ;; + esac + + # pass two: match by file content via /usr/bin/file + fileeval="$(LC_ALL=C /usr/bin/file "$filename")" + case "$fileeval" in + ~(E)roff) + file_format="troff" + return 0 + ;; + ~(E)html\ document) + file_format="html" + return 0 + ;; + ~(E)sgml\ document) + file_format="sgml" + return 0 + ;; + ~(E)executable.*(shell|(/|/r|/pf)(sh|ksh|ksh93|rksh93|dtksh|tksh|bash))\ script) + file_format="shell" + return 0 + ;; + ~(E)executable.*/perl\ script) + file_format="perl" + return 0 + ;; + esac + + # pass three: fallhack to filename matching + case "$filename" in + *.man) + file_format="troff" + return 0 + ;; + *.html) + file_format="html" + return 0 + ;; + *.sgml) + file_format="sgml" + return 0 + ;; + *.xml) + file_format="xml" + return 0 + ;; + *.png) + file_format="image_png" + return 0 + ;; + *.xcf) + file_format="image_xcf" + return 0 + ;; + *.shar) + file_format="archive_shell" + return 0 + ;; + *.sh) + file_format="shell" + return 0 + ;; + *.pcf) + file_format="font_pcf" + return 0 + ;; + *.bdf) + file_format="font_bdf" + return 0 + ;; + *.pmf) + file_format="font_pmf" + return 0 + ;; + *.ttf | *.otf) + file_format="font_ttf" + return 0 + ;; + *.pfa | *.pfb) + file_format="font_postscript" + return 0 + ;; + esac + + return 1 +} + +function extract_comments +{ + set -o errexit + + nameref records="$1" + typeset filename="$2" + integer max_num_comments="$3" + integer max_filesize_for_scan="$4" + + typeset datatype="" + + records[${filename}]=( + typeset filename="$filename" + + 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")" + + if get_file_format "$filename" datatype ; then + records[${filename}].fileformat_found="true" + records[${filename}].file_format="$datatype" + else + return 1 + fi + + case "$datatype" in + c_source|imakefile) + enumerate_comments_cpp "${filename}" "records[${filename}].comments" ${max_num_comments} ${max_filesize_for_scan} && \ + records[${filename}].comments_parsed=true + ;; + shell|makefile) + enumerate_comments_shell "${filename}" "records[${filename}].comments" ${max_num_comments} ${max_filesize_for_scan} && \ + records[${filename}].comments_parsed=true + ;; + troff) + enumerate_comments_troff "${filename}" "records[${filename}].comments" ${max_num_comments} ${max_filesize_for_scan} && \ + records[${filename}].comments_parsed=true + ;; + # NOTE: Disabled for now + #xml|html|sgml) + # enumerate_comments_xml "${filename}" "records[${filename}].comments" ${max_num_comments} ${max_filesize_for_scan} && \ + # records[${filename}].comments_parsed=true + # ;; + esac + + return 0 +} + +# parse HTTP return code, cookies etc. +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] + [[ "$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 + + # strip '\r' at the end + i="${i/~(Er)$'\r'/}" + + case "$i" in + ~(Eli)Content-Type:.*) + response.content_type="${i/~(El).*:[[:blank:]]*/}" + ;; + ~(Eli)Content-Length:[[:blank:]]*[0-9]*) + integer response.content_length="${i/~(El).*:[[:blank:]]*/}" + ;; + ~(Eli)Transfer-Encoding:.*) + response.transfer_encoding="${i/~(El).*:[[:blank:]]*/}" + ;; + esac + done + + return 0 +} + +function cat_http_body +{ + typeset emode="$1" + typeset hexchunksize="0" + integer chunksize=0 + + if [[ "${emode}" == "chunked" ]] ; then + while IFS=$'\r' read hexchunksize && + [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] && + (( chunksize=$( printf "16#%s\n" "${hexchunksize}" ) )) && (( chunksize > 0 )) ; do + dd bs=1 count="${chunksize}" 2>/dev/null + done + else + cat + fi + + return 0 +} + +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 $? + elif [[ "${protocol}" == ~(Elr)http(|s) ]] ; then + typeset host="${path1%%/*}" + typeset path="${path1#*/}" + typeset port="${host##*:}" + + integer netfd + compound httpresponse # http response + + # If URL did not contain a port number in the host part then look at the + # protocol to get the port number + if [[ "${port}" == "${host}" ]] ; then + case "${protocol}" in + "http") port=80 ;; + "https") port=443 ;; + *) port="$(getent services "${protocol}" | sed 's/[^0-9]*//;s/\/.*//')" ;; + esac + 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 ; } + [[ "${host}" != "" ]] || { print -u2 -f "%s: host not set.\n" "$0" ; return 1 ; } + [[ "${path}" != "" ]] || { print -u2 -f "%s: path not set.\n" "$0" ; return 1 ; } + + # open TCP channel + if [[ "${protocol}" == "https" ]] ; then + compound sslfifo + 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 + 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 + 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 + 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 + return 1 + fi + # notreached +} + +function print_stats +{ + set -o errexit + + # gather some statistics + compound stats=( + integer files_with_comments=0 + integer files_without_comments=0 + + integer files_without_known_format=0 + + integer files_with_license_info=0 + integer files_without_license_info=0 + + integer total_num_files=0 + ) + + for i in $(printf "%s\n" "${!records[@]}" | sort) ; do + if "${records[$i].comments_parsed}" ; then + (( stats.files_with_comments++ )) + else + (( stats.files_without_comments++ )) + fi + + if ! "${records[$i].fileformat_found}" ; then + (( stats.files_without_known_format++ )) + fi + + if "${records[$i].license_info_found}" ; then + (( stats.files_with_license_info++ )) + else + (( stats.files_without_license_info++ )) + fi + + (( stats.total_num_files++ )) + done + + print -v stats + return 0 +} + + +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 + fi + if [[ "${options.filepattern.reject}" != "" ]] && \ + [[ "${node.filename}" == ${options.filepattern.reject} ]] ; then + continue + fi + + node.license_info_found=false + + if ! "${node.comments_parsed}" ; then + continue + fi + + for j in "${!node.comments[@]}" ; do + typeset s="${node.comments[$j]}" + typeset match=false + + if [[ "${options.commentpattern.accept}" != "" ]] && \ + [[ "$s" == ${options.commentpattern.accept} ]] ; then + match=true + fi + if [[ "${options.commentpattern.reject}" != "" ]] && \ + [[ "$s" == ${options.commentpattern.reject} ]] ; then + match=false + fi + + if "${match}" ; then + printf "\f#### filename='%s',\tcomment=%s\n" "${node.filename}" "$j" + printf "%s\n" "$s" + 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" \ + "${node.comments_parsed}" \ + "${node.fileformat_found}" \ + "${node.file_format}" + fi + done + + return 0 +} + +function print_comments_duplicates_compressed +{ + set -o errexit + + nameref records=$1 + nameref options=$2 + 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 + fi + if [[ "${options.filepattern.reject}" != "" ]] && \ + [[ "${node.filename}" == ${options.filepattern.reject} ]] ; then + continue + fi + + node.license_info_found=false + + if ! "${node.comments_parsed}" ; then + continue + fi + + for j in "${!node.comments[@]}" ; do + typeset s="${node.comments[$j]}" + typeset match=false + + if [[ "${options.commentpattern.accept}" != "" ]] && \ + [[ "$s" == ${options.commentpattern.accept} ]] ; then + match=true + fi + if [[ "${options.commentpattern.reject}" != "" ]] && \ + [[ "$s" == ${options.commentpattern.reject} ]] ; then + match=false + fi + + + if "${match}" ; then + typeset -l hashstring # lowercase + + # compress the comment (e.g. convert whiteapces and '.,:;()"' to newline characters) ... + hashstring="${s//+([\n\r\t\v*#.,:;\(\)\"[:space:][:blank:]])/${ch.newline}}" + # ... and then create a MD5 hash from this string + hash="$(sum -x md5 <<<"${hashstring}")" + + nameref hc_node=hashed_comments[${hash}] + + if [[ "${hc_node}" == "" ]] ; then + # build node if there isn't one yet + 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 "%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}" \ + "${node.fileformat_found}" \ + "${node.file_format}" + fi + done + + # print comments and all fileids (filename+hash sums) which include this comment + for i in "${!hashed_comments[@]}" ; do + printf "\f## The comment (ID=%s) ..." "${i}" + printf "\n-- snip --" + printf "\n%s" "${hashed_comments[${i}].comment}" + printf "\n-- snip --" + 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 +} + +function do_crawl +{ + set -o errexit + + compound options=( + integer max_filesize_for_scan=$((256*1024)) + integer max_num_comments=$((2**62)) # FIXME: This should be "+Inf" (=Infinite) + ) + + shift + while getopts -a "${progname}" "${do_crawl_usage}" OPT "$@" ; do + printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + S) options.max_filesize_for_scan="${OPTARG}" ;; + N) options.max_num_comments="${OPTARG}" ;; + *) usage do_crawl_usage ;; + esac + done + shift $((OPTIND-1)) + + compound scan=( + typeset -A records + ) + + # read filenames from stdin + while read i ; do + printf "## scanning %s ...\n" "$i" + extract_comments scan.records "$i" ${options.max_num_comments} ${options.max_filesize_for_scan} || true + done + + # 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 +} + +function do_getcomments +{ + set -o errexit + + # vars + compound scan + typeset database + typeset tmp + + compound options=( + typeset database="crawlsrccomments_extracted_comments.cpv" + + typeset print_stats=false + typeset zapduplicates=false + compound filepattern=( + typeset accept="*" + typeset reject="" + ) + compound commentpattern=( + typeset accept="~(Ei)(license|copyright)" + typeset reject="" + ) + ) + + shift + while getopts -a "${progname}" "${do_getcomments_usage}" OPT "$@" ; do + # printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + c) options.commentpattern.accept="${OPTARG}" ;; + C) options.commentpattern.reject="${OPTARG}" ;; + D) options.database="${OPTARG}" ;; + l) options.filepattern.accept="${OPTARG}" ;; + L) options.filepattern.reject="${OPTARG}" ;; + S) options.print_stats=true ;; + +S) options.print_stats=false ;; + Z) options.zapduplicates=true ;; + +Z) options.zapduplicates=false ;; + *) usage do_getcomments_usage ;; + esac + done + shift $((OPTIND-1)) + + # array of temporary files which should be cleaned-up upon exit + typeset -a tmpfiles + trap 'set -o errexit ; print -u2 "# Cleaning up..." ; ((${#tmpfiles[@]} > 0)) && rm -- "${tmpfiles[@]}" ; print -u2 "# Done."' EXIT + + # Support for HTTP URLs + if [[ "${options.database}" == ~(El)(http|https)://.* ]] ; then + database="/tmp/extract_license_cat_url_${PPID}_$$.tmp" + tmpfiles+=( "${database}" ) + print -u2 "# Loading URL..." + cat_url "${options.database}" >"${database}" + print -u2 "# Loading URL done." + else + database="${options.database}" + fi + + if [[ ! -r "${database}" ]] ; then + fatal_error "Can't read ${database}." + fi + + # Support for compressed database files + case "$(LC_ALL=C /usr/bin/file "${database}")" in + *bzip2*) + tmp="/tmp/extract_license_bzcat_${PPID}_$$.tmp" + tmpfiles+=( "${tmp}" ) + print -u2 "# Uncompressing data (bzip2) ..." + bzcat <"${database}" >"${tmp}" + print -u2 "# Uncompression done." + database="${tmp}" + ;; + *gzip*) + tmp="/tmp/extract_license_bzcat_${PPID}_$$.tmp" + tmpfiles+=( "${tmp}" ) + print -u2 "# Uncompressing data (gzip) ..." + gunzip -c <"${database}" >"${tmp}" + print -u2 "# Uncompression done." + database="${tmp}" + ;; + esac + + # Read compound variable which contain all recorded comments + print -u2 "# reading records..." + read -C scan <"${database}" || fatal_error 'Error reading data.' + print -u2 -f "# reading %d records done.\n" "${#scan.records[@]}" + + # print comments + print -u2 "# processing data..." + print "## comments start:" + if "${options.zapduplicates}" ; then + print_comments_duplicates_compressed scan.records options + else + print_comments_plain scan.records options + fi + print "## comments end" + print -u2 "# processing data done." + + if "${options.print_stats}" ; then + print_stats + fi + + return 0 +} + +function usage +{ + nameref usagemsg=$1 + OPTIND=0 + getopts -a "${progname}" "${usagemsg}" OPT '-?' + exit 2 +} + +typeset -r do_getcomments_usage=$'+ +[-?\n@(#)\$Id: getcomments (Roland Mainz) 2010-03-27 \$\n] +[-author?Roland Mainz ] +[-author?Roland Mainz ] +[+NAME?getcomments - extract license information from source files] +[+DESCRIPTION?\bgetcomments\b is a small utilty script which extracts + license information from the "\bgetcomments\b"-database + file created by \bcrawl\b. The script allows various + filters (see options below) to be applied on the database] +[+?The license extraction is done in two steps - first a crawler script + called \bcrawl\b will scan all source files, extract + the comments and stores this information in a "database" file called + "crawlsrccomments_extracted_comments.cpv" and then \bextract_license\b allows + queries on this database.] +[D:database?Database file for input (either file, http:// or https://-URL).]:[database] +[l:acceptfilepattern?Process only files which match pattern.]:[pattern] +[L:rejectfilepattern?Process only files which do not match pattern.]:[pattern] +[c:acceptcommentpattern?Match comments which match pattern. Defaults to ~(Ei)(license|copyright)]:[pattern] +[C:rejectcommentpattern?Discard comments which match pattern. Defaults to ""]:[pattern] +[S:stats?Print statistics.] +[Z:zapsimilar?Combine similar/duplicate comments in the report.] +[+SEE ALSO?\bksh93\b(1), \bsvcprop\b(1)] +' + +typeset -r do_crawl_usage=$'+ +[-?\n@(#)\$Id: crawl (Roland Mainz) 2010-03-27 \$\n] +[-author?Roland Mainz ] +[-author?Roland Mainz ] +[+NAME?crawl - crawl comment information from source files] +[+DESCRIPTION?\bcrawl\b is a small utilty script which reads + a list of source code files from stdin, determinates the type of + syntax used by these files and then extracts + comments from the source code and stores this information into a + "database"-like file called "crawlsrccomments_extracted_comments.cpv" which can then + be processed by \bextract_license\b or similar processing tools.] +[S:scanmaxcharacters?Scan a maximum number of numchars characters for comments. + Defaults to 256K characters.]:[numchars] +[N:maxnumcomments?Maximum numbers of comments to crawl. Defaults to "+Infinite"]:[numcomments] +[+SEE ALSO?\bksh93\b(1), \bsvcprop\b(1)] +' + +typeset -r crawlsrccomments_usage=$'+ +[-?\n@(#)\$Id: crawlsrccomments (Roland Mainz) 2010-03-27 \$\n] +[-author?Roland Mainz ] +[-author?Roland Mainz ] +[+NAME?crawlsrccomments - extract and filter comment information from source files] +[+DESCRIPTION?\bcrawlsrccomments\b is a small utilty script which reads + a list of source code files from stdin, determinates the type of + syntax used by these files and then extracts + comments from the source code and stores this information into a + "database"-like file called "crawlsrccomments_extracted_comments.cpv" which can then + be processed by \bextract_license\b or similar processing tools.] + +[crawl|getcomments] options + +[+SEE ALSO?\bksh93\b(1), \bsvcprop\b(1)] +' + + +# program start +builtin basename +builtin cat +builtin date +builtin uname +builtin rm +builtin sum || fatal_error "sum builtin not found." + +# exit at the first error we hit +set -o errexit + +typeset progname="${ basename "${0}" ; }" + +while getopts -a "${progname}" "${crawlsrccomments_usage}" OPT ; do + # printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage crawlsrccomments_usage ;; + esac +done +shift $((OPTIND-1)) + +typeset cmd="$1" + +case "$cmd" in + "crawl") + progname+=" ${cmd}" + do_crawl "$@" + exit $? + ;; + "getcomments") + progname+=" ${cmd}" + do_getcomments "$@" + exit $? + ;; + *) + usage crawlsrccomments_usage + ;; +esac + +fatal_error "not reached." +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/filemutexdemo1.sh b/usr/src/cmd/ast/libshell/common/scripts/filemutexdemo1.sh new file mode 100644 index 0000000000..bbfc84825c --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/filemutexdemo1.sh @@ -0,0 +1,266 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# filemutexdemo1 - a simple locking demo which supports read/write +# locks and critical sections (like JAVA's "syncronized" keyword) +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +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 + { + # make sure we return an error if the init didn't work + 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 + # the lock directory) + function create_child + { + # make sure we return an error if the init didn't work + 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 + print -u2 -f "filemutex_t.%s(%s): Wrong subshell level\n" "$1" "${_.name}" + return 1 + } + + 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 + } + + 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} + } + + # critical section support with shared lock + function synchronized_shared + { + 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 + rmdir "${_.lock_dirname}/shared_${PPID}_$$" + _.locked_shared="false" + return 0 + elif ${_.locked_exclusive} ; then + mkdir "${_.lock_dirname}" + _.locked_exclusive="false" + return 0 + fi + + 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 + { + _.check_subshell "destroy" || return 1 + + (${_.locked_exclusive} || ${_.locked_shared}) && _.unlock + rmdir "${_.lock_dirname}" + return 0 + } +) + +# main +builtin mkdir +builtin rmdir + +print "## Start." + +typeset -r mymutexname="hello_world" + +filemutex_t fs + +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 + sleep 10 + child_fs.unlock +) & + +sleep 1 + +printf "%T: # Waiting to obtain a shared lock...\n" +fs.lock_shared +printf "%T: # Obtained shared lock\n" + +printf "fs.locked_exclusive=%s, fs.locked_shared=%s\n" "${fs.locked_exclusive}" "${fs.locked_shared}" + +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' +) & + +printf "%T: # Sleeping 5 secs while holding the shared lock...\n" +sleep 5. + +printf "%T: # Releasing shared lock...\n" +fs.unlock + +sleep 5. +print "# Destroying lock..." +fs.destroy + +print "## Done." + +exit 0 diff --git a/usr/src/cmd/ast/libshell/common/scripts/filetree1.sh b/usr/src/cmd/ast/libshell/common/scripts/filetree1.sh new file mode 100644 index 0000000000..595e081cdb --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/filetree1.sh @@ -0,0 +1,231 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + + +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}"] + nameref node=tree.dirs["${basename}"] + typeset -C node.flags + node.flags.dir="true" + node.flags.file="false" + else + typeset -C tree.files["${basename}"] + nameref node=tree.files["${basename}"] + typeset -C node.flags + + node.flags.dir="false" + node.flags.file="true" + fi + + # basic attributes + typeset -C node.paths=( + dirname="${dirname}" + basename="${basename}" + path="${i}" + ) + + nameref nflags=node.flags + [[ -r "$i" ]] && nflags.readable="true" || nflags.readable="false" + [[ -w "$i" ]] && nflags.writeable="true" || nflags.writeable="false" + [[ -x "$i" ]] && nflags.executable="true" || nflags.executable="false" + + [[ -b "$i" ]] && nflags.blockdevice="true" || nflags.blockdevice="false" + [[ -c "$i" ]] && nflags.characterdevice="true" || nflags.characterdevice="false" + [[ -S "$i" ]] && nflags.socket="true" || nflags.socket="false" + + [[ -L "$i" ]] && nflags.symlink="true" || nflags.symlink="false" + + integer node.size + integer node.links + typeset -C node.owner + ( [[ -x /usr/bin/runat ]] && ls -@ade "$i" || ls -lade "$i" ) | + IFS=' ' read \ + node.mask \ + node.links \ + node.owner.uid \ + node.owner.gid \ + node.size \ + dummy + + typeset -C node.extended_attributes + if [[ ${node.mask} == ~(Er)@ ]] ; then + node.extended_attributes.hasattrs="true" + typeset -a attrlist=( + $( runat "$i" "ls -1" ) + ) + 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. + file -h "$i" | IFS=' ' read dummy node.filetype + fi + + if ${nflags.dir} ; then + do_directory "${!node}" "$i" + fi + done + + # remove empty lists + (( ${#tree.files[@]} == 0 )) && unset tree.files + (( ${#tree.dirs[@]} == 0 )) && unset tree.dirs + + return 0 +} + + +function pathtovartree +{ + nameref tree=$1 + typeset basedir="$2" + + do_directory tree "${basedir}" + + return 0 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${filetree1_usage}" OPT '-?' + exit 2 +} + +# program start +builtin basename +builtin cat +builtin dirname +builtin date +builtin uname + +typeset progname="${ basename "${0}" ; }" + +typeset -r filetree1_usage=$'+ +[-?\n@(#)\$Id: filetree1 (Roland Mainz) 2009-05-06 \$\n] +[-author?Roland Mainz ] +[-author?Roland Mainz ] +[+NAME?filetree1 - file tree demo] +[+DESCRIPTION?\bfiletree1\b is a small ksh93 compound variable demo + which accepts a directory name as input, and then builds tree + nodes for all files+directories and stores all file attributes + in these notes and then outputs the tree in the format + specified by viewmode (either "list", "namelist", "tree" or "compacttree")..] + +viewmode dirs + +[+SEE ALSO?\bksh93\b(1), \bfile\b(1)] +' + +while getopts -a "${progname}" "${filetree1_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage ;; + esac +done +shift $((OPTIND-1)) + +typeset viewmode="$1" +shift + +if [[ "${viewmode}" != ~(Elr)(list|namelist|tree|compacttree) ]] ; then + fatal_error $"Invalid view mode \"${viewmode}\"." +fi + +typeset -C myfiletree + +while (( $# > 0 )) ; do + print -u2 -f "# Scanning %s ...\n" "${1}" + pathtovartree myfiletree "${1}" + shift +done +print -u2 $"#parsing completed." + +case "${viewmode}" in + list) + set | egrep "^myfiletree\[" | fgrep -v ']=$' + ;; + namelist) + typeset + | egrep "^myfiletree\[" + ;; + tree) + print -v myfiletree + ;; + compacttree) + print -C myfiletree + ;; + *) + fatal_error $"Invalid view mode \"${viewmode}\"." + ;; +esac + +print -u2 $"#done." + +exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/gnaw.sh b/usr/src/cmd/ast/libshell/common/scripts/gnaw.sh new file mode 100644 index 0000000000..9876d9c5dd --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/gnaw.sh @@ -0,0 +1,1044 @@ +#!/usr/bin/ksh93 + +# +# 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. +# + +# +# gnaw - a simple ksh93 technology demo +# +# Note that this script has been written with the main idea to show +# many of ksh93's new features (comparing to ksh88/bash) and not +# as an example of efficient&&clean script code (much of the code +# could be done more efficient using compound variables, this script +# focus is the usage of associative arrays). +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function print_setcursorpos +{ + print -n -- "${vtcode[cup_${1}_${2}]}" +} + +function beep +{ + ${quiet} || print -n -- "${vtcode["bel"]}" +} + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +# Get terminal size and put values into a compound variable with the integer +# members "columns" and "lines" +function get_term_size +{ + nameref rect=$1 + + rect.columns=${ tput cols ; } || return 1 + rect.lines=${ tput lines ; } || return 1 + + return 0 +} + +function print_levelmap +{ + integer screen_y_offset=$1 + integer start_y_pos=$2 # start at this line in the map + integer max_numlines=$3 # maximum lines we're allowed to render + integer x + integer y + typeset line="" + + print_setcursorpos 0 ${screen_y_offset} + + for (( y=start_y_pos; (y-start_y_pos) < max_numlines && y < levelmap["max_y"] ; y++ )) ; do + line="" + for (( x=0 ; x < levelmap["max_x"] ; x++ )) ; do + line+="${levelmap["${x}_${y}"]}" + done + + print -- "${line} " + done + + # print lines filled with spaces for each line not filled + # by the level map + line="${vtcode["spaceline"]:0:${levelmap["max_x"]}}" + for (( ; (y-start_y_pos) < max_numlines ; y++ )) ; do + print -- "${line} " + done + return 0 +} + +function level_completed +{ + integer i + typeset dummy + typeset render_buffer="$( + print -n -- "${vtcode["clear"]}" + cat < %s <--\n" "${player["score"]}" + printf " LIVES: --> %s <--\n" "${player["lives"]}" + )" + print -- "${render_buffer}${end_of_frame}" + + # wait five seconds and swallow any user input + for (( i=0 ; i < 50 ; i++ )) ; do + read -r -t 0.1 -n 1 dummy + done + + print "Press any key to continue...${end_of_frame}" + # wait five secs or for a key + read -r -t 5 -n 1 dummy + return 0 +} + +function game_over +{ + typeset dummy + typeset render_buffer="$( + print -n -- "${vtcode["clear"]}" + cat < %s <--\n" "${player["score"]}" + )" + print -r -- "${render_buffer}${end_of_frame}" + + # wait five seconds and swallow any user input + for (( i=0 ; i < 50 ; i++ )) ; do + read -r -t 0.1 -n 1 dummy + done + + print "Press any key to continue...${end_of_frame}" + # wait five secs or for a key + read -r -t 5 -n 1 dummy + return 0 +} + +function run_logo +{ + typeset render_buffer="$( + cat <======================================\ +> /-\ .--. | +> | OO| / _.-' .-. .-. .-. .-. | +> | | \ '-. '-' '-' '-' '-' | +> ^^^^^ '--' | +>======\ /================\ .-. | +> | | | '-' | + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ENDOFTEXT + print " GNAW - the ksh93 maze game" + print "\n\tMenu:" + + print "\t - [L]evels:" + for (( i=0 ; i < numlevels ; i++ )) ; do + printf "\t %s %s \n" "$( (( i == selected_level )) && print -n "*" || print -n " ")" "${levellist[i]##levelmap_}" + done + + print "\t - Rendering options:" + printf "\t [%s] Use [U]nicode\n" "$( (( game_use_unicode == 1 )) && print -n "x" || print -n "_" )" + printf "\t [%s] Use [C]olors\n" "$( (( game_use_colors == 1 )) && print -n "x" || print -n "_" )" + + print "\t - [S]tart - [Q]uit" + + # wait 30 secs (before we switch to "attract mode") + c="" ; read -r -t 30 -n 1 c + case "$c" in + 'l') (( selected_level=(selected_level+numlevels+1) % numlevels )) ;; + 'L') (( selected_level=(selected_level+numlevels-1) % numlevels )) ;; + ~(Fi)s) + (( game_use_colors == 1 )) && print -- "${vtcode["bg_black"]}" + case "${game_use_colors}${game_use_unicode}" in + "00") main_loop "${levellist[selected_level]}" ;; + "01") main_loop "${levellist[selected_level]}" | map_filter 0 1 ;; + "10") main_loop "${levellist[selected_level]}" | map_filter 1 0 ;; + "11") main_loop "${levellist[selected_level]}" | map_filter 1 1 ;; + esac + print -- "${vtcode["vtreset"]}" + ;; + ~(Fi)q | $'\E') + # make sure we do not exit on a cursor key (e.g. [A,B,C,D) + read -r -t 0.01 -n 1 c + if [[ "$c" == "[" ]] ; then + # this was a cursor key sequence, just eat the 3rd charcater + read -r -t 0.01 -n 1 c + 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 + return 0 +} + +function levelmap_stripes +{ +cat <= screen_y_offset && m_pos_y < render_num_lines )) ; then + print_setcursorpos ${m_pos_x} ${m_pos_y} + print -n "x" + fi + done + + # status block + print_setcursorpos 0 $((render_num_lines+screen_y_offset)) + emptyline=" " + print -n " >> ${player["message"]} <<${emptyline:0:${#emptyline}-${#player["message"]}}" + )" + print -r -- "${render_buffer}${end_of_frame}" +# print "renderbuffersize=$(print "${render_buffer}" | wc -c) ${end_of_frame}" + return 0 +} + +function main_loop +{ + float sleep_per_cycle=0.2 + 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"]} + player["score"]=0 # player score + player["lives"]=5 # number of lives + player["invulnerable"]=10 # cycles how long the player remains invulnerable + player["message"]="Go..." + + monsterlist="maw claw jitterbug tentacle grendel" + + for currmonster in ${monsterlist} ; do + monster[${currmonster}_"pos_x"]=${levelmap["monsterstartpos_x"]} + monster[${currmonster}_"pos_y"]=${levelmap["monsterstartpos_y"]} + monster[${currmonster}_"xstep"]=0 + monster[${currmonster}_"ystep"]=0 + monster[${currmonster}_"homing"]=0 + 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. "[D"). If only is hit we + # quicky exit + if [[ "$c" == $'\E' ]] ; then + read -r -t 0.1 -n 1 c + if [[ "$c" != "[" ]] ; then + return 0 + fi + + # we assume the user is using the cursor keys, this |read| + # should fetch the 3rd byte of the three-character sequence + # for the cursor keys + read -r -t 0.1 -n 1 c + fi + + # 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 + # is given. + (( rs=sleep_per_cycle-(SECONDS-seconds_before_read) )) + (( rs > 0.001 )) && sleep ${rs} + + player["message"]="" + + case "$c" in + j|D|4) (( player["pos_x"]-=1 )) ;; + k|C|6) (( player["pos_x"]+=1 )) ;; + i|A|8) (( player["pos_y"]-=1 )) ;; + m|B|2) (( player["pos_y"]+=1 )) ;; + + q) return 0 ;; + esac + + if [[ "${levelmap["${player["pos_x"]}_${player["pos_y"]}"]}" == "." ]] ; then + levelmap["${player["pos_x"]}_${player["pos_y"]}"]=" " + (( levelmap["numdots"]-=1 )) + + (( player["score"]+=10 )) + player["message"]='GNAW!!' + + if (( levelmap["numdots"] <= 0 )) ; then + level_completed + return 0 + fi + fi + fi + + # generic player status change + if (( player["invulnerable"] > 0 )) ; then + (( player["invulnerable"]-=1 )) + fi + if (( player["lives"] <= 0 )) ; then + game_over + return 0 + fi + + # move monsters + for currmonster in ${monsterlist} ; do + # make monster as half as slow then the others when it is following the user + 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 )) + else + (( monster[${currmonster}_"xstep"]=+0 , monster[${currmonster}_"ystep"]=+1 )) + fi + monster[${currmonster}_"homing"]=1 + if (( player["invulnerable"] <= 0 )) ; then + player["message"]="Attention: ${currmonster} is chasing you" + fi + elif (( monster[${currmonster}_"pos_y"] == player["pos_y"] )) ; then + if (( (monster[${currmonster}_"pos_x"]-player["pos_x"]) > 0 )) ; then + (( monster[${currmonster}_"xstep"]=-1 , monster[${currmonster}_"ystep"]=-0 )) + else + (( monster[${currmonster}_"xstep"]=+1 , monster[${currmonster}_"ystep"]=+0 )) + fi + monster[${currmonster}_"homing"]=1 + if (( player["invulnerable"] <= 0 )) ; then + player["message"]="Attention: ${currmonster} is chasing you" + fi + else + if (( monster[${currmonster}_"homing"] == 0 )) ; then + case $((SECONDS % 6 + RANDOM % 4)) in + 0) (( monster[${currmonster}_"xstep"]=+0 , monster[${currmonster}_"ystep"]=+0 )) ;; + 2) (( monster[${currmonster}_"xstep"]=+0 , monster[${currmonster}_"ystep"]=+1 )) ;; + 3) (( monster[${currmonster}_"xstep"]=+1 , monster[${currmonster}_"ystep"]=+0 )) ;; + 5) (( monster[${currmonster}_"xstep"]=+0 , monster[${currmonster}_"ystep"]=-1 )) ;; + 6) (( monster[${currmonster}_"xstep"]=-1 , monster[${currmonster}_"ystep"]=+0 )) ;; + 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"] && \ + monster[${currmonster}_"pos_y"] == player["pos_y"] )) ; then + # if player was hit by a monster take one life and + # make him invulnerable for 10 cycles to avoid that + # the next cycle steals more lives + player["message"]="Ouuuchhhh" + player["invulnerable"]=10 + (( player["lives"]-=1 )) + + beep ; beep ; sleep 0.2 ; beep ; beep + fi + fi + done + + render_game + done + return 0 +} + +function map_filter +{ + typeset ch_player ch_monster ch_wall var + + if (( $1 == 1 )) ; then + ch_player="${vtcode["fg_yellow"]}" + ch_monster="${vtcode["fg_red"]}" + ch_wall="${vtcode["fg_blue"]}" + else + ch_player="" + ch_monster="" + ch_wall="" + fi + + if (( $2 == 1 )) ; then + # unicode map + ch_player+="$(printf '\u[24d2]')" + ch_monster+="$(printf '\u[2605]')" + ch_wall+="$(printf '\u[25a6]')" + else + # ascii map + ch_player+="@" + ch_monster+="x" + ch_wall+="#" + fi + + # note that this filter currently defeats the "double-buffering" + while IFS='' read -r -d "${end_of_frame}" var ; do + var="${var// /${vtcode["fg_grey"]} }" + var="${var//\./${vtcode["fg_lightred"]}.}" + var="${var//@/${ch_player}}" + var="${var//x/${ch_monster}}" + var="${var//#/${ch_wall}}" + + print -r -- "${var}" + done + return 0 +} + +function exit_trap +{ + # restore stty settings + stty ${saved_stty} + + print "bye." + return 0 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${gnaw_usage}" OPT '-?' + exit 2 +} + +# program start +# make sure we use the ksh93 "cat" builtin which supports the "-u" option +builtin basename +builtin cat +builtin wc + +typeset progname="${ basename "${0}" ; }" + +# terminal size rect +compound termsize=( + integer columns=-1 + integer lines=-1 +) + +# global variables +typeset quiet=false + +typeset -A levelmap +typeset -A player +typeset -A monster +# global rendering options +integer game_use_colors=0 +integer game_use_unicode=0 + +typeset -r gnaw_usage=$'+ +[-?\n@(#)\$Id: gnaw (Roland Mainz) 2009-05-09 \$\n] +[-author?Roland Mainz ] +[+NAME?gnaw - maze game written in ksh93] +[+DESCRIPTION?\bgnaw\b is a maze game. + The player maneuvers a yellow "@" sign to navigate a maze while eating + small dots. A level is finished when all the dots are eaten. Five monsters + (maw, claw, jitterbug, tentacle and grendel) also wander the maze in an attempt + to catch the "@". Each level begins with all ghosts in their home, and "@" near + the bottom of the maze. The monsters are released from the home one by one at the + start of each level and start their rentless hunt after the player.] +[q:quiet?Disable use of terminal bell.] +[+SEE ALSO?\bksh93\b(1)] +' + +while getopts -a "${progname}" "${gnaw_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + q) quiet=true ;; + +q) quiet=false ;; + *) usage ;; + esac +done +shift $((OPTIND-1)) + +# save stty values and register the exit trap which restores these values on exit +saved_stty="$(stty -g)" +trap exit_trap EXIT + +print "Loading..." + +# set stty values, "-icanon min 1 time 0 -inpck" should improve input latency, +# "-echo" turns the terminal echo off +stty -icanon min 1 time 0 -inpck -echo + +get_term_size termsize || fatal_error "Could not get terminal size." + +# prechecks +(( termsize.columns < 60 )) && fatal_error "Terminal width must be larger than 60 columns (currently ${termsize.columns})." + +typeset -A vtcode +# color values taken from http://frexx.de/xterm-256-notes/, other +# codes from http://vt100.net/docs/vt100-tm/ +vtcode=( + ["bg_black"]="$(print -n "\E[40m")" + ["fg_black"]="$(print -n "\E[30m")" + ["fg_red"]="$(print -n "\E[31m")" + ["fg_lightred"]="$(print -n "\E[1;31m")" + ["fg_green"]="$(print -n "\E[32m")" + ["fg_lightgreen"]="$(print -n "\E[1;32m")" + ["fg_yellow"]="$(print -n "\E[33m")" + ["fg_lightyellow"]="$(print -n "\E[1;33m")" + ["fg_blue"]="$(print -n "\E[34m")" + ["fg_lightblue"]="$(print -n "\E[1;34m")" + ["fg_grey"]="$(print -n "\E[1;37m")" + ["fg_white"]="$(print -n "\E[37m")" + + # misc other vt stuff + ["vtreset"]="$(tput reset)" + ["clear"]="$(tput clear)" + ["bel"]="$(tput bel)" + ["spaceline"]="$(for (( i=0 ; i < termsize.columns ; i++ )) ; do print -n " " ; done)" +) + +# character used to as marker that a single frame ends at this point - this +# is used by the "double buffering" code to make sure the "read" builtin +# can read a whole "frame" instead of reading stuff line-by-line +typeset -r end_of_frame=$'\t' + +# get terminal sequence to move cursor to position x,y +# (see http://vt100.net/docs/vt100-ug/chapter3.html#CPR) +case ${TERM} in + xterm | xterm-color | vt100 | vt220 | dtterm | sun | sun-color) + cup="$(infocmp -1 | \ + egrep '^[[:space:]]*cup=' | \ + sed -e 's/.*cup=//' \ + -e 's/%[%id]*p1[%id]*/%2\\\$d/g' \ + -e 's/%[%id]*p2[%id]*/%1\\\$d/g' \ + -e 's/,$//')" + for (( x=0 ; x < termsize.columns ; x++ )) ; do + for (( y=0 ; y < termsize.lines ; y++ )) ; do + vtcode[cup_${x}_${y}]="$(printf "${cup}" $((x + 1)) $((y + 1)) )" + done + done + ;; + *) + printf "# Unrecognised terminal type '%s', fetching %dx%d items from terminfo database, please wait...\n" "${TERM}" "${termsize.columns}" "${termsize.lines}" + for (( x=0 ; x < termsize.columns ; x++ )) ; do + for (( y=0 ; y < termsize.lines ; y++ )) ; do + vtcode[cup_${x}_${y}]="$(tput cup ${y} ${x})" + done + done + ;; +esac + +print -- "${vtcode["vtreset"]}" + +run_logo +run_menu + +exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/mandelbrotset1.sh b/usr/src/cmd/ast/libshell/common/scripts/mandelbrotset1.sh new file mode 100644 index 0000000000..726a577850 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/mandelbrotset1.sh @@ -0,0 +1,292 @@ +#!/usr/bin/ksh93 + +# +# 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. +# + +# +# mandelbrotset1 - a simple mandelbrot set generation and +# parallel execution demo +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function printmsg +{ + print -u2 "$*" +} + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +# Get terminal size and put values into a compound variable with the integer +# members "columns" and "lines" +function get_term_size +{ + nameref rect=$1 + + rect.columns=${ tput cols ; } || return 1 + rect.lines=${ tput lines ; } || return 1 + + return 0 +} + +function mandelbrot +{ + nameref result=$1 + float x=$2 + float y=$3 + float xx + float yy + float x1=$4 + float y1=$5 + integer iteration=$6 + integer max_iteration=$7 + float mag + + for (( mag=0 ; mag < max_mag && iteration < max_iteration ; iteration++ )) ; do + (( + xx=x*x , + yy=y*y , + mag=xx+yy , + y=x*y*2+y1 , + x=xx-yy+x1 + )) + done + + (( result=iteration )) + + return 0 +} + +# build mandelbrot image serially +function loop_serial +{ + integer value + typeset line="" + + for (( y=y_min ; y < y_max ; y+=stepwidth )) ; do + for (( x=x_min ; x < x_max ; x+=stepwidth )) ; do + mandelbrot value ${x} ${y} ${x} ${y} 1 ${symbollistlen} + line+="${symbollist:value:1}" + done + + line+=$'\n' + done + + print -r -- "${line}" + + return 0 +} + +# build mandelbrot image using parallel worker jobs +function loop_parallel +{ + integer numjobs=0 + # the following calculation suffers from rounding errors + integer lines_per_job=$(( ((m_height+(numcpus-1)) / numcpus) )) + typeset tmpjobdir + + printmsg $"# lines_per_job=${lines_per_job}" + printmsg $"# numcpus=${numcpus}" + + # "renice" worker jobs + set -o bgnice + + tmpjobdir="$(mktemp --default=/tmp --directory "mandelbrotset1${PPID}_$$_XXXXXX")" || fatal_error $"Could not create temporary directory." + trap "rm -r ${tmpjobdir}" EXIT # cleanup + + # try to generate a job identifer prefix which is unique across multiple hosts + jobident="job_host_$(uname -n)pid_$$_ppid${PPID}" + + printmsg $"## prepare..." + for (( y=y_min ; y < y_max ; y+=(stepwidth*lines_per_job) )) ; do + rm -f "${tmpjobdir}/${jobident}_child_$y.joboutput" + + (( numjobs++ )) + done + + printmsg $"## running ${numjobs} children..." + for (( y=y_min ; y < y_max ; y+=(stepwidth*lines_per_job) )) ; do + ( + integer value + typeset line="" + # save file name since we're going to modify "y" + typeset filename="${tmpjobdir}/${jobident}_child_$y.joboutput" + + for (( ; y < y_max && lines_per_job-- > 0 ; y+=stepwidth )) ; do + for (( x=x_min ; x < x_max ; x+=stepwidth )) ; do + mandelbrot value ${x} ${y} ${x} ${y} 1 ${symbollistlen} + line+="${symbollist:value:1}" + done + + line+=$'\n' + done + print -r -- "${line}" >"${filename}" + + exit 0 + ) & + done + + printmsg $"## waiting for ${numjobs} children..." + wait + + printmsg $"## output:" + for (( y=y_min ; y < y_max ; y+=(stepwidth*lines_per_job) )) ; do + print -r -- "$( < "${tmpjobdir}/${jobident}_child_$y.joboutput")" + # EXIT trap will cleanup temporary files + done + + return 0 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${mandelbrotset1_usage}" OPT '-?' + exit 2 +} + +# main +builtin basename +builtin cat +builtin rm +builtin uname # loop_parallel needs the ksh93 builtin version to generate unique job file names +builtin mktemp + +set -o noglob +set -o nounset + +typeset progname="${ basename "${0}" ; }" + +float x_max +float x_min +float y_max +float y_min +float m_width +float m_height +float max_mag +float stepwidth +integer numcpus + +# terminal size rect +compound termsize=( + integer columns=-1 + integer lines=-1 +) + +get_term_size termsize || fatal_error $"Could not get terminal size." + +typeset symbollist=' .:0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ%#' +typeset symbollistlen=$(( ${#symbollist} - 1)) +typeset mode="parallel" + +(( max_mag=400 )) +(( stepwidth=0.1 )) + +# calculate number of worker CPUs and use 3 as fallback +(( numcpus=$(getconf NPROCESSORS_ONLN || print "3") )) +(( numcpus=numcpus*4 )) + +(( m_width=termsize.columns-1 , m_height=termsize.lines-2 )) + +typeset -r mandelbrotset1_usage=$'+ +[-?\n@(#)\$Id: mandelbrotset1 (Roland Mainz) 2010-03-31 \$\n] +[-author?Roland Mainz ] +[+NAME?mandelbrotset1 - generate mandelbrot set fractals with ksh93] +[+DESCRIPTION?\bmandelbrotset1\b mandelbrot set fractal generator + which runs either in serial or parallel mode (using multiple worker jobs).] +[w:width?Width of fractal.]:[width] +[h:height?Height of fractal.]:[height] +[s:symbols?Symbols to build the fractal from.]:[symbolstring] +[m:mag?Magnification level.]:[magnificationlevel] +[p:stepwidth?Width per step.]:[widthperstep] +[S:serial?Run in serial mode.] +[P:parallel?Run in parallel mode.] +[M:mode?Execution mode.]:[mode] +[C:numcpus?Number of processors used for parallel execution.]:[numcpus] +[+SEE ALSO?\bjuliaset1\b(1), \bksh93\b(1)] +' + +while getopts -a "${progname}" "${mandelbrotset1_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + w) m_width="${OPTARG}" ;; + h) m_height="${OPTARG}" ;; + s) symbollist="${OPTARG}" ;; + m) max_mag="${OPTARG}" ;; + p) stepwidth="${OPTARG}" ;; + S) mode="serial" ;; + +S) mode="parallel" ;; + P) mode="parallel" ;; + +P) mode="serial" ;; + M) mode="${OPTARG}" ;; + C) numcpus="${OPTARG}" ;; + *) usage ;; + esac +done +shift $((OPTIND-1)) + +printmsg "# width=${m_width}" +printmsg "# height=${m_height}" +printmsg "# max_mag=${max_mag}" +printmsg "# stepwidth=${stepwidth}" +printmsg "# symbollist='${symbollist}'" +printmsg "# mode=${mode}" + +(( symbollistlen=${#symbollist}-1 )) + +(( + x_max=m_width*stepwidth/2. , + x_min=-x_max , + y_max=m_height*stepwidth/2. , + y_min=-y_max +)) + +case "${mode}" in + parallel) loop_parallel ; exit $? ;; + serial) loop_serial ; exit $? ;; + *) fatal_error $"Unknown mode \"${mode}\"." ;; +esac + +fatal_error "not reached." +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/multifollow.sh b/usr/src/cmd/ast/libshell/common/scripts/multifollow.sh new file mode 100644 index 0000000000..c3d6e3740d --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/multifollow.sh @@ -0,0 +1,147 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u 2 "${progname}: $@" + exit 1 +} + + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${multifollow_usage}" OPT '-?' + exit 2 +} + +# program start +builtin basename +builtin cat + +typeset progname="$(basename "${0}")" + +typeset -r multifollow_usage=$'+ +[-?\n@(#)\$Id: multifollow (Roland Mainz) 2009-04-08 \$\n] +[-author?Roland Mainz ] +[+NAME?multifollow - use tail -f on multiple files] +[+DESCRIPTION?\bmultifollow\b is a small utilty which can "follow" multiple + files similar to tail -f.] + +[ file ... ] + +[+SEE ALSO?\bksh93\b(1), \btail\b(1)] +' + +while getopts -a "${progname}" "${multifollow_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage ;; + esac +done +shift $((OPTIND-1)) + +# expecting at least one more arguments +(($# >= 1)) || usage + +builtin -f libshell.so.1 poll || fatal_error "poll builtin not found." + +typeset -a files +integer numfiles=0 +integer i + +# register trap to cleanup child processes +trap 'for ((i=0 ; i < numfiles ; i++ )) ; do kill -TERM ${files[i].childpid} ; done' EXIT + +# setup "tail -f" childs, FIFOs and information for the "poll" builtin +for (( ; $# > 0 ; numfiles++ )) ; do + typeset files[${numfiles}]=( + typeset name="$1" + typeset pipename="/tmp/multifollow_pipe_${PPID}_$$_${numfiles}" + integer childpid=-1 + + # poll(1) information + integer fd="-1" + typeset events="POLLIN" + typeset revents="" + ) + + mkfifo "${files[${numfiles}].pipename}" + redirect {files[numfiles].fd}<> "${files[numfiles].pipename}" + + tail -f "${files[${numfiles}].name}" >"${files[${numfiles}].pipename}" & + files[${numfiles}].childpid=$! + + rm "${files[${numfiles}].pipename}" + + shift +done + +typeset do_poll=true + +# event loop +while true ; do + if ${do_poll} ; then + for ((i=0 ; i < numfiles ; i++ )) ; do + files[i].revents="" + done + 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 + # should be sufficient to call "poll" and get "revents" set if there + # are any remaining data... + if read -t0 -u${files[i].fd} line ; then + print -- "#${i}: ${line}" + do_poll=false + fi + fi + done +done + +fatal_error "not reached." +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/numtree1.sh b/usr/src/cmd/ast/libshell/common/scripts/numtree1.sh new file mode 100644 index 0000000000..e736bc61b9 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/numtree1.sh @@ -0,0 +1,237 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# numtree1 - basic compound variable tree demo+benchmark +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +function add_number_to_tree +{ + typeset treename=$1 + integer num=$2 + integer i + typeset nodepath # full name of compound variable + integer -a pe # path elements + integer len + typeset revnums="$(rev <<<"${num}")" + + # first built an array containing the names of each path element + # (e.g. "135" results in an array containing "( 1 3 5 )") + # 10# is used to prevent leading zeros being interpreted + # as octals + for (( len=${#revnums} , i=$( printf "10#%s\n" "${revnums}" ) ; len > 0 ; len--, i=i/10 )) ; do + pe+=( $((i % 10)) ) + done + + # walk path described via the "pe" array and build nodes if + # there aren't any nodes yet + 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 + node.elements+=( ${num} ) + + # DEBUG only + [[ "${!node.elements[*]}" != "" ]] || fatal_error "assertion $LINENO FAILED" + [[ "${ typeset +p node.elements ;}" == *-a* ]] || fatal_error "assertion $LINENO FAILED" + [[ "${ typeset +p node.elements ;}" == *-i* ]] || fatal_error "assertion $LINENO FAILED" + [[ -v node ]] || fatal_error "assertion $LINENO FAILED" + [[ -R node ]] || fatal_error "assertion $LINENO FAILED" + [[ "${ typeset +p ${!node} ;}" == *-C* ]] || fatal_error "assertion $LINENO FAILED" + [[ "${!x.nodes[*]}" != "" ]] || fatal_error "assertion $LINENO FAILED" + [[ "${ typeset +p x.nodes ;}" == *-a* ]] || fatal_error "assertion $LINENO FAILED" + [[ "${ typeset +p x.nodes ;}" == *-C* ]] || fatal_error "assertion $LINENO FAILED" + + return 0 +} + + +# floating-point version of "seq" +function floatseq +{ + float i + float arg1=$1 + float arg2=$2 + float arg3=$3 + + case $# in + 1) + for (( i=1. ; i <= arg1 ; i=i+1. )) ; do + printf "%a\n" i + done + ;; + 2) + for (( i=arg1 ; i <= arg2 ; i=i+1. )) ; do + printf "%a\n" i + done + ;; + 3) + for (( i=arg1 ; i <= arg3 ; i+=arg2 )) ; do + printf "%a\n" i + done + ;; + *) + print -u2 -f "%s: Illegal number of arguments %d\n" "$0" $# + return 1 + ;; + esac + + return 0 +} + + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${numtree1_usage}" OPT '-?' + exit 2 +} + +# main +builtin basename +builtin rev + +set -o noglob +set -o errexit +set -o nounset + +compound base + +compound bench=( + float start + float stop +) + +integer i + +typeset progname="${ basename "${0}" ; }" + +typeset -r numtree1_usage=$'+ +[-?\n@(#)\$Id: numtree1 (Roland Mainz) 2010-03-27 \$\n] +[-author?Roland Mainz ] +[+NAME?numtree1 - generate sorted variable tree containing numbers] +[+DESCRIPTION?\bnumtree1\b is a simple variable tree generator + sorts a given set of numbers into a ksh compound variable tree). + the application supports two different modes: \'seq\' takes + 1-3 arguments to specify the set of numbers via seq(1) and + \'stdin\' reads the numbers from stdin (one per line)] + +method [ arguments ] + +[+SEE ALSO?\bksh93\b(1), \bseq\b(1)] +' + +while getopts -a "${progname}" "${numtree1_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage ;; + esac +done +shift $((OPTIND-1)) + +# prechecks +(( $# > 0 )) || usage + +cmd=$1 +shift + +# Read numbers from stdin outside benchmark loop +if [[ ${cmd} == 'stdin' ]] ; then + stdin_numbers="$( cat /dev/stdin )" || fatal_error "stdin read error" +fi + +(( bench.start=SECONDS )) + +case ${cmd} in + "seq") + for i in ${ floatseq "$@" ; } ; do + add_number_to_tree base "${i}" + done + ;; + "stdin") + for i in ${stdin_numbers} ; do + add_number_to_tree base "${i}" + done + ;; + "demo1") + for i in 1 32 33 34 34 38 90 ; do + add_number_to_tree base "${i}" + done + ;; + "demo2") + for (( i=1000000000 ; i < 1000000000+10 ; i++ )) ; do + add_number_to_tree base "$i" + done + ;; + *) + fatal_error "Invalid command ${cmd}." + ;; +esac + +(( bench.stop=SECONDS )) + +print -u2 -f "# time used: %f\n" $((bench.stop - bench.start)) + +# print tree +print -v base + +exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/primenumbers1.sh b/usr/src/cmd/ast/libshell/common/scripts/primenumbers1.sh new file mode 100644 index 0000000000..abb00a9ade --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/primenumbers1.sh @@ -0,0 +1,114 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# primenumbers1 - a simple prime number generator +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + + +# check whether arg1 is a prime number via comparing it against the "pn" array +function is_prime +{ + integer i + integer num=$1 + 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 + return 0 +} + +# main +set -o errexit + +# get arguments +integer max_prime=$1 # maximum prime number +typeset outputformat=$2 + +# variables +integer -a pn # integer array for the prime numbers +integer num_pn=1 # number of prime numbers +integer n # current number which should be tested +pn[0]=2 # start value + +# prechecks +(( max_prime > 1 )) || { print -u2 -f "%s: requires a positive integer as first input.\n" "$0" ; exit 1 ; } + +# calculate prime numbers +printf $"# %s: Calculating prime numbes from 1 to %i\n" "${ date '+%T' ; }" max_prime 1>&2 + +for (( n=3 ; n < max_prime ; n+=2 )) ; do + if is_prime $n ; then + (( pn[num_pn++]=n )) + fi +done + +# print results +printf $"# %s: Calculation done, printing results:\n" "${ date '+%T' ; }" 1>&2 + +for (( n=0 ; n < num_pn ; n++ )) ; do + # print prime number + case ${outputformat} in + block) + printf $"%i$( (( n % 8 == 0 )) && print -r '\n' || print -r ',\t')" pn[n] + ;; + line) + printf $"%i\n" pn[n] + ;; + *) + printf $"prime %i:\t%i\n" n pn[n] + ;; + esac +done + +if [[ ${outputformat} == "block" ]] && (( n % 8 != 1 )); then + print +fi + +printf $"# %s: Done.\n" "${ date '+%T' ; }" 1>&2 + +#EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/rssread.sh b/usr/src/cmd/ast/libshell/common/scripts/rssread.sh new file mode 100644 index 0000000000..97d391de98 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/rssread.sh @@ -0,0 +1,674 @@ +#!/usr/bin/ksh93 + +# +# 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. +# + +# +# rssread - a simple RSS2.0 reader with RSS to XHTML to +# plaintext conversion. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +function printmsg +{ + print -u2 "$*" +} + +function debugmsg +{ +# printmsg "$*" +true +} + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +typeset -T urlconnection_t=( + # public + typeset user_agent="ksh93/urlconnection_t" + + # private variables + typeset protocol + typeset path1 + typeset host + typeset path + typeset port + + compound netfd=( + integer in=-1 # incoming traffic + integer out=-1 # outgoing traffic + ) + + # only used for https + compound ssl=( + compound fifo=( + typeset dir="" + typeset in="" + typeset out="" + ) + integer openssl_client_pid=-1 + ) + + # parse HTTP return code, cookies etc. + 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] + [[ "$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 + + # strip '\r' at the end + i="${i/~(Er)$'\r'/}" + + case "$i" in + ~(Eli)Content-Type:.*) + response.content_type="${i/~(El).*:[[:blank:]]*/}" + ;; + ~(Eli)Content-Length:[[:blank:]]*[0-9]*) + integer response.content_length="${i/~(El).*:[[:blank:]]*/}" + ;; + ~(Eli)Transfer-Encoding:.*) + response.transfer_encoding="${i/~(El).*:[[:blank:]]*/}" + ;; + esac + done + + return 0 + } + + function cat_http_body + { + typeset emode="$1" + typeset hexchunksize="0" + integer chunksize=0 + + if [[ "${emode}" == "chunked" ]] ; then + while IFS=$'\n' read hexchunksize ; do + hexchunksize="${hexchunksize//$'\r'/}" + [[ "${hexchunksize}" != "" ]] || continue + [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] || break + (( chunksize=$( printf "16#%s\n" "${hexchunksize}" ) )) + (( chunksize > 0 )) || break + dd bs=1 count="${chunksize}" 2>/dev/null + done + else + cat + fi + + return 0 + } + + function init_url + { + _.protocol="${1%://*}" + _.path1="${1#*://}" # "http://foo.bat.net/x/y.html" ----> "foo.bat.net/x/y.html" + + if [[ "${_.protocol}" == ~(Elr)http(|s) ]] ; then + _.host="${_.path1%%/*}" + _.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 )) + fi + + 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 + _.ssl.fifo.dir="$(mktemp -t -d)" + _.ssl.fifo.in="${_.ssl.fifo.dir}/in" + _.ssl.fifo.out="${_.ssl.fifo.dir}/out" + + # Use "errexit" to leave it at the first error + # (this saves lots of if/fi tests for error checking) + set -o errexit + + mkfifo "${_.ssl.fifo.in}" "${_.ssl.fifo.out}" + + # 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}" + (( $? != 0 )) && { print -u2 -f "%s: Could not open %s\n" "$0" "${1}" ; return 1 ; } + (( _.netfd.out=_.netfd.in )) + fi + return 0 + } + + function send_request + { + typeset request="$1" + + set -o errexit + + if [[ "${_.protocol}" == "https" ]] ; then + print -n -- "${request}\r\n" >> "${_.ssl.fifo.in}" + + redirect {_.netfd.in}< "${_.ssl.fifo.out}" + else + print -n -- "${request}\r\n" >&${_.netfd.out} + fi + return 0 + } + + function cat_url + { + if [[ "${_.protocol}" == "file" ]] ; then + cat "${_.path1}" + return $? + elif [[ "${_.protocol}" == ~(Elr)http(|s) ]] ; then + compound httpresponse # http response + + # If URL did not contain a port number in the host part then look at the + # protocol to get the port number + if [[ "${_.port}" == "${_.host}" ]] ; then + case "${_.protocol}" in + "http") _.port=80 ;; + "https") _.port=443 ;; + *) _.port="$(getent services "${_.protocol}" | sed 's/[^0-9]*//;s/\/.*//')" ;; + esac + 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 ; } + [[ "${_.host}" != "" ]] || { print -u2 -f "%s: host not set.\n" "$0" ; return 1 ; } + [[ "${_.path}" != "" ]] || { print -u2 -f "%s: path not set.\n" "$0" ; return 1 ; } + + _.open_connection || return 1 + + # send HTTP request + request="GET /${_.path} HTTP/1.1\r\n" + request+="Host: ${_.host}\r\n" + request+="User-Agent: ${_.user_agent}\r\n" + request+="Connection: close\r\n" + _.send_request "${request}\r\n" + + # collect response and send it to stdout + { + _.parse_http_response httpresponse + _.cat_http_body "${httpresponse.transfer_encoding}" + } <&${_.netfd.in} + + _.close_connection + + return 0 + else + return 1 + fi + # notreached + } +) + +function html_entity_to_ascii +{ + typeset buf + typeset entity + typeset c + typeset value + + # Todo: Add more HTML/MathML entities here + # Note we use a static variable (typeset -S) here to make sure we + # don't loose the cache data between calls + typeset -S -A entity_cache=( + # entity to ascii (fixme: add UTF-8 transliterations) + ["nbsp"]=' ' + ["lt"]='<' + ["le"]='<=' + ["gt"]='>' + ["ge"]='>=' + ["amp"]='&' + ["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 + ";") + break + ;; + ~(Eilr)[a-z0-9#]) + entity+="$c" + continue + ;; + *) +# debugmsg "error &${entity}${c}#" + + print -n -r -- "${entity}${c}" + entity="" + continue 2 + ;; + esac + done + + value="" + if [[ "${entity_cache["${entity}"]}" != "" ]] ; then +# debugmsg "match #${entity}# = #${entity_cache["${entity}"]}#" + value="${entity_cache["${entity}"]}" + else + if [[ "${entity:0:1}" == "#" ]] ; then + # decimal literal + value="${ printf "\u[${ printf "%x" "${entity:1:8}" ; }]" ; }" + elif [[ "${entity:0:7}" == ~(Eilr)[0-9a-f]* ]] ; then + # hexadecimal literal + value="${ printf "\u[${entity:0:7}]" ; }" + else + # unknown literal - pass-through + value="ENT=|${entity}|" + fi + + entity_cache["${entity}"]="${value}" + +# debugmsg "lookup #${entity}# = #${entity_cache["${entity}"]}#" + fi + + printf "%s" "${value}" + done + + return 0 +} + +# dumb xhtml handler - no CSS, tables, images, iframes or nested +# structures are supported (and we assume that the input is correct +# xhtml). The code was written in a trial&&error manner and should be +# rewritten to parse xhtml correctly. +function handle_html +{ + # we can't use global variables here when multiple callbacks use the same + # callback function - but we can use the callback associative array for + # variable storage instead + nameref callbacks=${1} + typeset tag_type="$2" + typeset tag_value="$3" + + case "${tag_type}" in + tag_begin) + case "${tag_value}" in + br) printf "\n" ;; + hr) printf "\n-------------------------------------\n" ;; + pre) callbacks["html_pre"]='true' ;; + p) printf "\n" ;; + esac + ;; + + tag_end) + case "${tag_value}" in + pre) callbacks["html_pre"]='false' ;; + esac + ;; + + tag_text) + if ${callbacks["html_pre"]} ; then + printf "%s" "${tag_value}" + else + # compress spaces/newlines/tabs/etc. + printf "%s" "${tag_value//+([\n\r\t\v[:space:][:blank:]])/ }" + fi + ;; + + document_start) + callbacks["html_pre"]='false' + ;; + document_end) ;; + esac + + return 0 +} + +function handle_rss +{ + # we can't use global variables here when multiple callbacks use the same + # callback function - but we can use the callback associative array for + # variable storage instead + nameref callbacks=${1} + typeset tag_type="$2" + typeset tag_value="$3" + + case "${tag_type}" in + tag_begin) + case "${tag_value}" in + item) + item["title"]="" + item["link"]="" + item["tag"]="" + item["description"]="" + ;; + esac + callbacks["textbuf"]="" + ;; + tag_end) + case "${tag_value}" in + item) + # note that each RSS item needs to be converted seperately from RSS to HTML to plain text + # to make sure that the state of one RSS item doesn't affect others + ( + printf $"
#### RSS item: title: %s ####" "${item["title"]}" + printf $"
## author: %s" "${item["author"]}" + printf $"
## link: %s" "${item["link"]}" + printf $"
## date: %s" "${item["pubDate"]}" + printf $"
## begin description:" + printf $"
%s
" "${item["description"]}" + printf $"
## end description
" + 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 + ;; + title) item["title"]="${callbacks["textbuf"]}" ; callbacks["textbuf"]="" ;; + link) item["link"]="${callbacks["textbuf"]}" ; callbacks["textbuf"]="" ;; + dc:creator | author) item["author"]="${callbacks["textbuf"]}" ; callbacks["textbuf"]="" ;; + dc:date | pubDate) item["pubDate"]="${callbacks["textbuf"]}" ; callbacks["textbuf"]="" ;; + description) item["description"]="${callbacks["textbuf"]}" ; callbacks["textbuf"]="" ;; + esac + callbacks["textbuf"]="" + ;; + tag_text) + callbacks["textbuf"]+="${tag_value}" + ;; + document_start) ;; + document_end) ;; + esac + return 0 +} + +function xml_tok +{ + typeset buf="" + typeset namebuf="" + typeset attrbuf="" + typeset c="" + typeset isendtag # bool: true/false + typeset issingletag # bool: true/false (used for tags like "
") + 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 + else + buf="$c" + fi + IFS='' read -r -d '>' c + buf+="$c" + + # handle comments + if [[ "$buf" == ~(El)!-- ]] ; then + # did we read the comment completely ? + if [[ "$buf" != ~(Elr)!--.*-- ]] ; then + buf+=">" + while [[ "$buf" != ~(Elr)!--.*-- ]] ; do + IFS='' read -r -N 1 c || break + 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 "
") + if [[ "${buf}" == ~(Er).*/ ]] ; then + issingletag=true + buf="${buf%*/}" + 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:]].*}" + attrbuf="${buf#~(E).*[[:space:][:blank:]]}" + else + namebuf="$buf" + attrbuf="" + fi + + if ${isendtag} ; then + [[ ! -z "${callbacks["tag_end"]}" ]] && ${callbacks["tag_end"]} "${1}" "tag_end" "$namebuf" + else + [[ ! -z "${callbacks["tag_begin"]}" ]] && ${callbacks["tag_begin"]} "${1}" "tag_begin" "$namebuf" "$attrbuf" + + # handle tags like
(which are start- and end-tag in one piece) + if ${issingletag} ; then + [[ ! -z "${callbacks["tag_end"]}" ]] && ${callbacks["tag_end"]} "${1}" "tag_end" "$namebuf" + fi + fi + buf="" + else + buf+="$c" + fi + done + + [[ ! -z "${callbacks["document_end"]}" ]] && ${callbacks["document_end"]} "${1}" "document_end" "exit_success" + + print # final newline to make filters like "sed" happy +} + +# return the value of LC_MESSAGES needed for subprocesses which +# want to run in a different locale/encoding +function get_lc_messages +{ + [[ "${LC_ALL}" != "" ]] && { print "${LC_ALL}" ; return 0 ; } + [[ "${LC_MESSAGES}" != "" ]] && { print "${LC_MESSAGES}" ; return 0 ; } + [[ "${LANG}" != "" ]] && { print "${LANG}" ; return 0 ; } + print "C" ; return 0 +} + +function do_rssread +{ + # set unicode locale since RSS is encoded in UTF-8 + # (and make sure $LC_MESSAGES is set to the parent + # process's locale that all error messages are using + # the callers locale/encoding) + export \ + LC_MESSAGES="${ get_lc_messages ; }" \ + LC_MONETARY="en_US.UTF-8" \ + LC_NUMERIC="en_US.UTF-8" \ + LC_COLLATE="en_US.UTF-8" \ + LC_CTYPE="en_US.UTF-8" \ + LC_TIME="en_US.UTF-8" \ + LANG="en_US.UTF-8" + + # return non-zero exit code for this function if the rss processing below fails + set -o errexit + + 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 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${rssread_usage}" OPT '-?' + exit 2 +} + +# make sure we use the ksh93 builtin versions +builtin basename +builtin cat +builtin mkfifo + +typeset -A rsstok_cb # callbacks for xml_tok +rsstok_cb["tag_begin"]="handle_rss" +rsstok_cb["tag_end"]="handle_rss" +rsstok_cb["tag_text"]="handle_rss" +rsstok_cb["textbuf"]="" + +typeset -A xhtmltok_cb # callbacks for xml_tok +xhtmltok_cb["tag_begin"]="handle_html" +xhtmltok_cb["tag_end"]="handle_html" +xhtmltok_cb["tag_text"]="handle_html" +xhtmltok_cb["textbuf"]="" +xhtmltok_cb["html_pre"]='false' + +typeset -A item + +typeset -A bookmark_urls + +# "ramdom" urls for testing +bookmark_urls=( + ["google_blogs_ksh"]="http://blogsearch.google.com/blogsearch_feeds?hl=en&scoring=d&q=(%22ksh93%22%7C%22ksh+93%22+%7C+%22korn93%22+%7C+%22korn+93%22)&ie=utf-8&num=100&output=rss" + # some Sun staff/sites + ["blogs_sun_com"]="http://blogs.sun.com/main/feed/entries/rss" + ["bigadmin"]="http://www.sun.com/bigadmin/content/rss/motd.xml" + ["bigadmin_scripts"]="https://www.sun.com/bigadmin/content/rss/scripts.xml" + ["jmcp"]="http://www.jmcp.homeunix.com/roller/jmcp/feed/entries/rss" + ["katakai"]="http://blogs.sun.com/katakai/feed/entries/rss" + ["alanc"]="http://blogs.sun.com/alanc/feed/entries/rss" + ["planetsun"]="http://www.planetsun.org/rss20.xml" + ["planetsolaris"]="http://www.planetsolaris.org/rss20.xml" + ["planetopensolaris"]="http://planet.opensolaris.org/rss20.xml" + ["theregister_uk"]="http://www.theregister.co.uk/headlines.rss" + ["heise"]="http://www.heise.de/newsticker/heise.rdf" + ["slashdot"]="http://rss.slashdot.org/Slashdot/slashdot" + ["wikipedia_command_shells"]="http://en.wikipedia.org/w/index.php?title=Comparison_of_command_shells&feed=rss&action=history" +) + +typeset progname="${ basename "${0}" ; }" + +typeset -r rssread_usage=$'+ +[-?\n@(#)\$Id: rssread (Roland Mainz) 2010-03-27 \$\n] +[-author?Roland Mainz ] +[-author?Roland Mainz ] +[+NAME?rssread - fetch RSS messages and convert them to plain text] +[+DESCRIPTION?\brssread\b RSS to plain text converter + which fetches RSS streams via HTTP and converts them from + RSS to HTML to plain text in the current locale/encoding.] +[I:noiconv?Do not convert data from UTF-8 to current locale/encoding.] + +[ url ] + +[+SEE ALSO?\bksh93\b(1), \bshnote\b(1)] +' + +typeset noiconv=false + +while getopts -a "${progname}" "${rssread_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + I) noiconv=true ;; + +I) noiconv=false ;; + *) usage ;; + esac +done +shift $((OPTIND-1)) + +typeset url="$1" + +if [[ "${url}" == "" ]] ; then + fatal_error $"No url given." +fi + +if [[ "${bookmark_urls[${url}]}" != "" ]] ; then + printmsg $"Using bookmark ${url} = ${bookmark_urls[${url}]}" + url="${bookmark_urls[${url}]}" +fi + +if ${noiconv} ; then + do_rssread "${url}" +else + do_rssread "${url}" | iconv -f "UTF-8" - - +fi + +exit 0 +#EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/shcalc.sh b/usr/src/cmd/ast/libshell/common/scripts/shcalc.sh new file mode 100644 index 0000000000..6858ba12a1 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/shcalc.sh @@ -0,0 +1,150 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# shcalc - small shell-based calculator +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +function do_calculate +{ + typeset calcline="$1" + float x=0.0 + + printf "(( x=( %s ) ))\n" "${calcline}" | source /dev/stdin + if (( $? != 0 )) ; then + print -f $"%s: Syntax error in %s\n" "${progname}" "${calcline}" + return 1 + fi + + printf "%s == %.40g\n" "${calcline}" x + + return 0 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${shcalc_usage}" OPT '-?' + exit 2 +} + +# program start +# (be carefull with builtins here - they are unconditionally available +# in the shell's "restricted" mode) +builtin basename +builtin sum + +typeset progname="${ basename "${0}" ; }" + +typeset -r shcalc_usage=$'+ +[-?\n@(#)\$Id: shcalc (Roland Mainz) 2008-11-03 \$\n] +[-author?Roland Mainz ] +[+NAME?shcalc - simple shell calculator] +[+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), + \btgamma\b(3M), \btrunc\b(3M)] +' +while getopts -a "${progname}" "${shcalc_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage ;; + esac +done +shift $((OPTIND-1)) + +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 + + exit ${res} +else + while (( $# > 0 )) ; do + do_calculate "$1" + (( res=$? )) + shift + done + + exit ${res} +fi + +# not reached + +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/shircbot.sh b/usr/src/cmd/ast/libshell/common/scripts/shircbot.sh new file mode 100644 index 0000000000..7d415d2505 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/shircbot.sh @@ -0,0 +1,428 @@ +#!/usr/bin/ksh93 + +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# shircbot - a simple IRC client/bot demo +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +# Definition for a IRC session class +typeset -T ircsession_t=( + compound server=( + 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 + } + + function login + { + { + 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 + float -S last_tick=0 + # We use the linebuf_t class here since network traffic + # isn't guranteed to fit a single $'\n'-terminated line + # into one TCP package. linebuf_t buffers characters + # until it has one complete line. This avoids the need for + # async I/O normally used by IRC clients + linebuf_t serverbuf + linebuf_t clientbuf + integer fd=${_.fd} + + _.login + + while ${_.running} ; do + while serverbuf.readbuf line <&${fd} ; do + _.dispatch_serverevent "$line" + done + + while clientbuf.readbuf line &${fd} + done + + # call mainloop_tick function in intervals to handle + # async events (e.g. automatic /join etc.) + if (( (SECONDS-last_tick) > 5. )) ; then + (( last_tick=SECONDS )) + _.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=( + line="$line" + ) + _.serverevent_ping "ping_args" + ;; + ~(El):.*\ PRIVMSG) + compound privmsg_args=( + typeset line="$line" + typeset msguser="${line/~(Elr)([^ ]+) ([^ ]+) ([^ ]+) (.*)/\1}" + typeset msgchannel="${line/~(Elr)([^ ]+) ([^ ]+) ([^ ]+) (.*)/\3}" + typeset msg="${line/~(Elr)([^ ]+) ([^ ]+) ([^ ]+) (.*)/\4}" + ) + _.serverevent_privmsg "privmsg_args" + ;; + ~(El):.*\ INVITE) + compound invite_args=( + typeset line="$line" + typeset inviteuser="${line/~(Elr)([^ ]+) ([^ ]+) ([^ ]+) (.*)/\1}" + typeset invitenick="${line/~(Elr)([^ ]+) ([^ ]+) ([^ ]+) (.*)/\3}" + typeset invitechannel="${line/~(Elr)([^ ]+) ([^ ]+) ([^ ]+) (.*)/\4}" + ) + _.serverevent_invite "invite_args" + ;; + *) + 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" ? + printf "PRIVMSG %s :%s\n" "${channel}" "${msg}" >&${_.fd} + + return 0 + } + + function serverevent_ping + { + nameref args=$1 + + printf "PONG %s\n" "${args.line/~(Elr)([^ ]+) ([^ ]+).*/\2}" >&${_.fd} + + return 0 + } +) + +# line buffer class +# The buffer class tries to read characters from the given until +# it has read a whole line. +typeset -T linebuf_t=( + typeset buf + + function reset + { + _.buf="" + return 0 + } + + function readbuf + { + nameref var=$1 + typeset ch + + 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 + } +) + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${shircbot_usage}" OPT '-?' + exit 2 +} + +# program start +# (be carefull with builtins here - they are unconditionally available +# in the shell's "restricted" mode) +builtin basename +builtin sum + +typeset progname="${ basename "${0}" ; }" + +typeset -r shircbot_usage=$'+ +[-?\n@(#)\$Id: shircbot (Roland Mainz) 2009-09-09 \$\n] +[-author?Roland Mainz ] +[-author?Roland Mainz ] +[+NAME?shircbot - simple IRC bot demo] +[+DESCRIPTION?\bshircbot\b is a small demo IRC bot which provides + a simple IRC bot with several subcommands.] +[n:nickname?IRC nickname for this bot.]:[nick] +[s:ircserver?IRC servername.]:[servername] +[j:joinchannel?IRC servername.]:[channelname] +[+SEE ALSO?\bksh93\b(1)] +' + +compound config=( + typeset nickname="${LOGNAME}bot" + typeset servername="irc.freenode.net" + integer port=6667 + typeset -a join_channels +) + +while getopts -a "${progname}" "${shircbot_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + n) config.nickname="${OPTARG}" ;; + s) config.servername="${OPTARG}" ;; + j) config.join_channels+=( "${OPTARG}" ) ;; + *) usage ;; + esac +done +shift $((OPTIND-1)) + +# if no channel was provided we join a predefined set of channels +if (( ${#config.join_channels[@]} == 0 )) ; then + if [[ "${config.servername}" == "irc.freenode.net" ]] ; then + config.join_channels+=( "#opensolaris" ) + config.join_channels+=( "#opensolaris-dev" ) + config.join_channels+=( "#opensolaris-arc" ) + config.join_channels+=( "#opensolaris-meeting" ) + config.join_channels+=( "#ospkg" ) + config.join_channels+=( "#ksh" ) + elif [[ "${config.servername}" == ~(E)irc.(sfbay|sweden) ]] ; then + config.join_channels+=( "#onnv" ) + fi +fi + +print "## Start." + +ircsession_t mybot + +# override ircsession_t::serverevent_privmsg with a new method for our bot +function mybot.serverevent_privmsg +{ + nameref args=$1 + 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, + # we need to extract the sender's nickname from ${msguser} and put + # it into msgchannel + msgchannel="${msguser/~(El):(.*)!.*/\1}" + else + # check if this is a command for this bot + [[ "$msg" != ~(Eli):${_.nick}:[[:space:]] ]] && return 0 + fi + + # strip beginning (e.g. "::" or ":") plus extra spaces + msg="${msg/~(Eli)(:${_.nick})*:[[:space:]]*/}" + + printf "botmsg=%q\n" "$msg" + + case "$msg" in + ~(Eli)date) + _.send_privmsg "$msgchannel" "${ + printf "%(%Y-%m-%d, %Th/%Z)T\n" + }" + ;; + ~(Eli)echo) + _.send_privmsg "$msgchannel" "${msg#*echo}" + ;; + ~(Eli)exitbot) + typeset exitkey="$(print "$msguser" | sum -x sha1)" # this is unwise&&insecure + if [[ "$msg" == *${exitkey}* ]] ; then + _.running=false + fi + ;; + ~(Eli)help) + _.send_privmsg "$msgchannel" "${ + printf "Hello, this is shircbot, written in ksh93 (%s). " "${.sh.version}" + printf "Subcommands are 'say hello', 'math ', 'stocks', 'uuid', 'date' and 'echo'." + }" + ;; + ~(Eli)math) + if [[ "${msg}" == ~(E)[\`\$] ]] ; then + # "restricted" shell mode would prevent any damage but we try to be carefull... + _.send_privmsg "$msgchannel" "Syntax error." + else + typeset mathexpr="${msg#*math}" + + printf "Calculating '%s'\n" "${mathexpr}" + _.send_privmsg "$msgchannel" "${ + ( printf 'export PATH=/usr/${RANDOM}/$$/${RANDOM}/foo ; set -o restricted ; printf "%%s = %%.40g\n" "%s" $(( %s ))\n' "${mathexpr}" "${mathexpr}" | source /dev/stdin 2>&1 ) + }" + fi + ;; + ~(Eli)say\ hello) + _.send_privmsg "$msgchannel" "Hello, this is a bot." + ;; + ~(Eli)stocks) + typeset stockmsg tickersymbol + for tickersymbol in "JAVA" "ORCL" "IBM" "AAPL" "HPQ" ; do + stockmsg="$( /usr/sfw/bin/wget -q -O /dev/stdout "http://quote.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=${tickersymbol}" 2>&1 )" + _.send_privmsg "$msgchannel" "${tickersymbol}: ${stockmsg//,/ }" + done + ;; + ~(Eli)uuid) + _.send_privmsg "$msgchannel" "${ + print "%(%Y%M%D%S%N)T$((RANDOM))%s\n" "${msguser}" | sum -x sha256 + }" + ;; + esac + + return 0 +} + +# Automatically join the list of channels listed in |config.join_channels| +# after the client is connected to the server for some time +function mybot.mainloop_tick +{ + integer -S autojoin_done=2 + integer i + + if (( autojoin_done-- == 0 && ${#config.join_channels[@]} > 0 )) ; then + print "# Autojoin channels..." + + for ((i=0 ; i < ${#config.join_channels[@]} ; i++ )) ; do + mybot.join_channel "${config.join_channels[i]}" + done + fi + + return 0 +} + +mybot.createsession "${config.servername}" ${config.port} "${config.nickname}" + +# This is a network-facing application - once we've set eveything up +# we set PATH to a random value and switch to the shell's restricted +# mode to make sure noone can escape the jail. +#export PATH=/usr/$RANDOM/foo +#set -o restricted + +mybot.mainloop + +print "## End." + +exit 0 diff --git a/usr/src/cmd/ast/libshell/common/scripts/shlint.sh b/usr/src/cmd/ast/libshell/common/scripts/shlint.sh new file mode 100644 index 0000000000..23df1805c2 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/shlint.sh @@ -0,0 +1,95 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# shlint - a simple lint wrapper around "shcomp" +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${shlint_usage}" OPT '-?' + exit 2 +} + +# program start +builtin basename + +typeset progname="${ basename "${0}" ; }" + +typeset -r shlint_usage=$'+ +[-?\n@(#)\$Id: shlint (Roland Mainz) 2009-03-15 \$\n] +[-author?Roland Mainz ] +[-author?Roland Mainz ] +[+NAME?shlint - lint for POSIX shell scripts] +[+DESCRIPTION?\bshlint\b is a lint for POSIX shell scripts.] +[+SEE ALSO?\bshcomp\b(1), \bksh93\b(1)] +' + +while getopts -a "${progname}" "${shlint_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage ;; + esac +done +shift $((OPTIND-1)) + +(( $# > 0 )) || usage + +file="$1" +[[ ! -f "$file" ]] && fatal_error $"File ${file} not found." +[[ ! -r "$file" ]] && fatal_error $"File ${file} not readable." + +x="$( /usr/bin/shcomp -n "${file}" /dev/null 2>&1 1>/dev/null )" + +printf "%s\n" "$x" + +[[ "$x" != "" ]] && exit 1 || exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/shman.sh b/usr/src/cmd/ast/libshell/common/scripts/shman.sh new file mode 100644 index 0000000000..6d40ddd66e --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/shman.sh @@ -0,0 +1,395 @@ +#!/usr/bin/ksh93 + +# +# 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. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +function debug_print +{ + # don't use "--" here to allow "-f" for formatting +# print -u2 "$@" + return 0 +} + +# Build a list of compound variables calculated from MANPATH and +# locale which contain... +# "manpath_element" - the MANPATH element this entry belongs to +# "dir" - physical directory of "manpath_element" +# "sect" - section (if "manpath_element" is something like /usr/share/man,1b) +# ... and put the result in the array named by argv[1] +function enumerate_mandirs +{ + nameref md=$1 + typeset manpath_element dir sect manlang + integer i=0 + + if [[ "${LC_MESSAGES}" != "" ]] ; then + manlang="${LC_MESSAGES}" + else + manlang="${LANG}" + fi + + print -r -- "${MANPATH//:/$'\n'}" | while read manpath_element ; do + # strip section from manpath elements like "/usr/share/man,1b" + dir="${manpath_element/~(E)(.*),(.*)/\1}" + sect="${manpath_element/~(E)(.*),(.*)/\2}" + [[ "${sect}" == "${dir}" ]] && sect="" + + if [[ "${manlang}" != "" && -d "${dir}/${manlang}" ]] ; then + md+=( + manpath_element="${manpath_element}" + dir="${dir}/${manlang}" + sect="${sect}" + ) + fi + if [[ -d "${dir}" ]] ; then + md+=( + manpath_element="${manpath_element}" + dir="${dir}" + sect="${sect}" + ) + fi + done + + return 0 +} + +function enumerate_mansects +{ + nameref ms=$1 + 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 + x="${MANSECTS//,/$'\n'}" + elif [[ -f "${mancf}" && -r "${mancf}" ]] ; then + x="$(egrep -v '^#|^[[:space:]]*$' <"${mancf}" | egrep '^MANSECTS=')" + x="${x/MANSECTS=}/" + x="${x//,/$'\n'}" + else + x="$(cd "${mandir_node.dir}" ; \ + ls -1d ~(El)(sman|man).*/ | \ + while read s ; do \ + s="${s/~(El)(sman|man)/}" ; \ + s="${s/~(Er)\//}" ; \ + 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 +} + +# wrapper around more/less +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//\//}" + + # check if we have "less" installed, if not fall back to /usr/xpg4/bin/more + 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 + tmpdirname="$(mktemp -t -d "shman_${PPID}_$$_XXXXXX")" + + mkdir -p "${tmpdirname}" || { print -u2 -f $"Couldn't create tmp. dir %s\n" "${tmpdirname}" ; return 1 ; } + + ( + cd "${tmpdirname}" + + # note: we need to support /dev/stdin + cat <"${doc_filename}" >"./${doc_title}" + + /usr/xpg4/bin/more "${doc_title}" + + rm -f "${doc_title}" + ) + + rmdir "${tmpdirname}" + fi + + return 0 +} + +# /usr/bin/man +function show_manpage +{ + compound -a mandirs + integer i + integer j + + enumerate_mandirs mandirs +# debug_print -- "${mandirs[@]}" + + integer num_mandirs=${#mandirs[@]} + + for ((i=0 ; i < num_mandirs ; i++ )) ; do + typeset mandir="${mandirs[i].dir}" + + typeset -a mansects + enumerate_mansects mansects "mandirs[$i]" + + integer num_mansects="${#mansects[@]}" +# debug_print -- "mansects=${mansects[@]}" + + for ((j=0 ; j < num_mansects ; j++ )) ; do + typeset mansect="${mansects[j]}" + + # try 1: SGML 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 + + # try 2: troff manpage + match="${mandir}/man${mansect}/${manname}.${mansect}" + if [[ -r "${match}" ]] ; then + debug_print -f "match: %s\n" "${match}" + tbl <"${match}" | eqn | nroff -u0 -Tlp -man - | col -x | browse_manpage /dev/stdin "${manname}(${mansect})" + return 0 + fi + done + unset mansects num_mansects + done + + printf $"No manual entry for %s.\n" "${manname}" + return 0 +} + +# /usr/bin/man -l +function list_manpages +{ + compound -a mandirs + + enumerate_mandirs mandirs + #debug_print -- "${mandirs[@]}" + + integer num_mandirs=${#mandirs[@]} + + for ((i=0 ; i < num_mandirs ; i++ )) ; do + typeset mandir="${mandirs[i].dir}" + + typeset -a mansects + enumerate_mansects mansects "mandirs[$i]" + + integer num_mansects="${#mansects[@]}" +# debug_print -- "mansects=${mansects[@]}" + + for ((j=0 ; j < num_mansects ; j++ )) ; do + mansect="${mansects[j]}" + + # try 1: SGML manpage + match="${mandir}/sman${mansect}/${manname}.${mansect}" + if [[ -r "${match}" ]] ; then + printf "%s (%s)\t-M %s\n" "${manname}" "${mansect}" "${mandir}" + continue + fi + + # try 2: troff manpage + match="${mandir}/man${mansect}/${manname}.${mansect}" + if [[ -r "${match}" ]] ; then + printf "%s (%s)\t-M %s\n" "${manname}" "${mansect}" "${mandir}" + continue + fi + done + unset mansects num_mansects + done + + return 0 +} + +# /usr/bin/appropos +function list_keywords +{ + typeset -a mandirs + typeset name namesec title + + enumerate_mandirs mandirs + #debug_print -- "${mandirs[@]}" + + integer num_mandirs=${#mandirs[@]} + + 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 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${man_usage}" OPT '-?' + exit 2 +} + +# program start +builtin basename +builtin cat +builtin date + +typeset progname="$(basename "${0}")" + +typeset -r man_usage=$'+ +[-?\n@(#)\$Id: shman (Roland Mainz) 2009-12-02 \$\n] +[-author?Roland Mainz ] +[-author?Roland Mainz ] +[+NAME?man - find and display reference manual pages] +[+DESCRIPTION?The man command displays information from the reference + manuals. It displays complete manual pages that you select + by name, or one-line summaries selected either by keyword + (-k), or by the name of an associated file (-f). If no + manual page is located, man prints an error message.] +[+?write me.] +[k:keyword?Prints out one-line summaries from the windex database (table of contents) that + contain any of the given keywords. The windex database is created using + catman(1M).] +[l:list?Lists all manual pages found matching name within the search path.] +[M:mpath?Specifies an alternate search path for manual pages. path is a colon-separated + list of directories that contain manual page directory subtrees. For example, if + path is /usr/share/man:/usr/local/man, man searches for name in the standard + location, and then /usr/local/man. When used with the -k or -f options, the -M + option must appear first. Each directory in the path is assumed to contain subdirectories of the form man* or sman* , + one for each section. This option overrides the MANPATH environment variable.]:[path] +[s:section?Specifies sections of the manual for man to search. The directories searched for + name are limited to those specified by section. section can be a numerical + digit, perhaps followed by one or more letters to match the desired section of + the manual, for example, "3libucb". Also, section can be a word, for example, + local, new, old, public. section can also be a letter. + To specify multiple sections, separate each section with + 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)] +' + +typeset do_list=false +typeset do_keyword=false + +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}" ;; + *) usage ;; + esac +done +shift $((OPTIND-1)) + +# cd /usr/man; LC_MESSAGES=C /usr/lib/sgml/sgml2roff /usr/man/sman1as/asadmin-list-timers.1as | tbl | eqn | nroff -u0 -Tlp -man - | col -x > /tmp/mpLQaqac + +# prechecks +(( $# > 0 )) || usage + +# process arguments +while (( $# > 0 )) ; do + typeset manname="$1" + shift + + debug_print -f "# searching for %s ...\n" "${manname}" + + if ${do_keyword} ; then + list_keywords + elif ${do_list} ; then + list_manpages + else + show_manpage + fi +done + +# todo: better exit codes +exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/shnote.sh b/usr/src/cmd/ast/libshell/common/scripts/shnote.sh new file mode 100644 index 0000000000..06e28a219f --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/shnote.sh @@ -0,0 +1,413 @@ +#!/usr/bin/ksh93 + +# +# 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. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +function encode_multipart_form_data +{ + nameref formdata="$1" + nameref content="formdata.content" + 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}]" + + content+="--${formdata.boundary}\n" + content+="Content-Disposition: form-data; name=\"${element.name}\"\n" + content+="\n" + # make sure we quote the '\' properly since we pass these data to one instance of + # "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} + + # add content tail (which MUST not be added to the content length) + content+="--${formdata.boundary}--\n" + + return 0 +} + +# parse HTTP return code, cookies etc. +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] + [[ "$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 + + # strip '\r' at the end + i="${i/~(Er)$'\r'/}" + + case "$i" in + ~(Eli)Content-Type:.*) + response.content_type="${i/~(El).*:[[:blank:]]*/}" + ;; + ~(Eli)Content-Length:[[:blank:]]*[0-9]*) + integer response.content_length="${i/~(El).*:[[:blank:]]*/}" + ;; + ~(Eli)Transfer-Encoding:.*) + response.transfer_encoding="${i/~(El).*:[[:blank:]]*/}" + ;; + esac + done + + return 0 +} + +function cat_http_body +{ + typeset emode="$1" + typeset hexchunksize="0" + integer chunksize=0 + + if [[ "${emode}" == "chunked" ]] ; then + while IFS=$'\r' read hexchunksize && + [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] && + (( chunksize=$( printf "16#%s\n" "${hexchunksize}" ) )) && (( chunksize > 0 )) ; do + dd bs=1 count="${chunksize}" 2>/dev/null + done + else + cat + fi + + return 0 +} + +function history_write_record +{ + # rec: history record: + # rec.title + # rec.description + # rec.provider + # rec.providertoken + # rec.url + nameref rec="$1" + integer histfd + + mkdir -p "${HOME}/.shnote" + + { + # write a single-line record which can be read + # as a compound variable back into the shell + printf "title=%q description=%q date=%q provider=%q providertoken=%q url=%q\n" \ + "${rec.title}" \ + "${rec.description}" \ + "$(date)" \ + "${rec.provider}" \ + "${rec.providertoken}" \ + "${rec.url}" + } >>"${history_file}" + + return $? +} + +function print_history +{ + integer histfd # http stream number + typeset line + + (( $# != 0 && $# != 1 )) && { print -u2 -f $"%s: Wrong number of arguments.\n" "$0" ; return 1 ; } + + # default output format is: + # / <date> <access url> + [[ "$1" == "-l" ]] || printf "# %s\t\t\t\t\t%s\t%s\n" "<url>" "<title>" "<date>" + + # no history file ? + if [[ ! -f "${history_file}" ]] ; then + return 0 + fi + + # 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 + 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 +} + +function put_note_pastebin_ca +{ + # key to autheticate this script against pastebin.ca + typeset -r pastebin_ca_key="9CFXFyeNC3iga/vthok75kTBu5kSSLPD" + # site setup + typeset url_host="opensolaris.pastebin.ca" + typeset url_path="/quiet-paste.php?api=${pastebin_ca_key}" + 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 ; } + + # argument for "encode_multipart_form_data" + compound mimeform=( + # input + typeset boundary + typeset -a form + # output + typeset content + integer content_length + ) + + typeset request="" + typeset content="" + + typeset -r boundary="--------shnote_${RANDOM}_Xfish_${RANDOM}_Yeats_${RANDOM}_Zchicken_${RANDOM}monster_--------" + + mimeform.boundary="${boundary}" + mimeform.form=( # we use explicit index numbers since we rely on them below when filling the history + [0]=( name="name" data="${LOGNAME}" ) + [1]=( name="expiry" data="Never" ) + [2]=( name="type" data="1" ) + [3]=( name="description" data="logname=${LOGNAME};hostname=$(hostname);date=$(date)" ) + [4]=( name="content" data="$1" ) + ) + encode_multipart_form_data mimeform + + content="${mimeform.content}" + + request="POST ${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" + 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" + (( $? != 0 )) && { print -u2 -f $"%s: Could not open connection to %s.\n" "$0" "${url_host}" ; return 1 ; } + + # send http post + { + print -n -- "${request}\r\n" + print -n -- "${content}\r\n" + } >&${netfd} + + # process reply + parse_http_response httpresponse <&${netfd} + response="$(cat_http_body "${httpresponse.transfer_encoding}" <&${netfd})" + + # 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}" + description="${mimeform.form[3].data}" + providertoken="${response_token}" + provider="opensolaris.pastebin.ca" + url="http://opensolaris.pastebin.ca/${response_token}" + ) + + history_write_record histrec + return 0 + else + printf "ERROR: %s\n" "${response}" + return 1 + fi + + # not reached +} + +function get_note_pastebin_ca +{ + typeset recordname="$1" + 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 + ;; + ~(Elr)http://opensolaris.pastebin.ca/raw/[0-9]*) + recordname="${recordname/~(El)http:\/\/opensolaris.pastebin.ca\/raw\//}" + ;; + ~(Elr)http://opensolaris.pastebin.ca/[0-9]*) + recordname="${recordname/~(El)http:\/\/opensolaris.pastebin.ca\//}" + ;; + *) + fatal_error $"Unsupported record name ${recordname}." + esac + + print -u2 -f "# Record name is '%s'\n" "${recordname}" + + typeset url_host="opensolaris.pastebin.ca" + typeset url_path="/raw/${recordname}" + typeset url="http://${url_host}${url_path}" + # I hereby curse Solaris for not having an entry for "http" in /etc/services + + # open TCP channel + 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 + 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 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${USAGE}" OPT '-?' + exit 2 +} + +# program start +builtin basename +builtin cat +builtin date +builtin uname + +typeset progname="${ basename "${0}" ; }" + +# HTTP protocol client identifer +typeset -r http_user_agent="shnote/ksh93 (2010-03-27; $(uname -s -r -p))" + +# name of history log (the number after "history" is some kind of version +# counter to handle incompatible changes to the history file format) +typeset -r history_file="${HOME}/.shnote/history0.txt" + +typeset -r shnote_usage=$'+ +[-?\n@(#)\$Id: shnote (Roland Mainz) 2010-03-27 \$\n] +[-author?Roland Mainz <roland.mainz@nrubsig.org>] +[+NAME?shnote - read/write text data to internet clipboards] +[+DESCRIPTION?\bshnote\b is a small utilty which can read and write text + data to internet "clipboards" such as opensolaris.pastebin.ca.] +[+?The first arg \bmethod\b describes one of the methods, "put" saves a string + to the internet clipboard, returning an identifer and the full URL + where the data are stored. The method "get" retrives the raw + information using the identifer from the previous "put" action. + The method "hist" prints a history of transactions created with the + "put" method and the keys to retrive them again using the "get" method.] +[+?The second arg \bstring\b contains either the string data which should be + stored on the clipboard using the "put" method, the "get" method uses + this information as identifer to retrive the raw data from the + clipboard.] + +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 +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage ;; + esac +done +shift $((OPTIND-1)) + +# expecting at least one more argument, the single method below will do +# the checks for more arguments if needed ("put" and "get" methods need +# at least one extra argument, "hist" none). +(($# >= 1)) || usage + +typeset method="$1" +shift + +case "${method}" in + put) put_note_pastebin_ca "$@" ; exit $? ;; + get) get_note_pastebin_ca "$@" ; exit $? ;; + hist) print_history "$@" ; exit $? ;; + *) usage ;; +esac + +fatal_error $"not reached." +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/shpiano.sh b/usr/src/cmd/ast/libshell/common/scripts/shpiano.sh new file mode 100644 index 0000000000..d144af8bed --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/shpiano.sh @@ -0,0 +1,1414 @@ +#!/usr/bin/ksh93 + +# +# 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. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +function beep +{ + tput bel + return 0 +} + +# 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=( + ["C3"]=( float freq=261.63 ; typeset sample_set="false" ; typeset -b sample ) + ["C#3"]=( float freq=277.18 ; typeset sample_set="false" ; typeset -b sample ) + ["D3"]=( float freq=293.66 ; typeset sample_set="false" ; typeset -b sample ) + ["D#3"]=( float freq=311.13 ; typeset sample_set="false" ; typeset -b sample ) + ["E3"]=( float freq=329.63 ; typeset sample_set="false" ; typeset -b sample ) + ["F3"]=( float freq=349.23 ; typeset sample_set="false" ; typeset -b sample ) + ["F#3"]=( float freq=369.99 ; typeset sample_set="false" ; typeset -b sample ) + ["G3"]=( float freq=391.99 ; typeset sample_set="false" ; typeset -b sample ) + ["G#3"]=( float freq=415.31 ; typeset sample_set="false" ; typeset -b sample ) + ["A3"]=( float freq=440.00 ; typeset sample_set="false" ; typeset -b sample ) + ["A#3"]=( float freq=466.16 ; typeset sample_set="false" ; typeset -b sample ) + ["B3"]=( float freq=493.88 ; typeset sample_set="false" ; typeset -b sample ) + ["C4"]=( float freq=523.25 ; typeset sample_set="false" ; typeset -b sample ) + ["C#4"]=( float freq=554.37 ; typeset sample_set="false" ; typeset -b sample ) + ["D4"]=( float freq=587.33 ; typeset sample_set="false" ; typeset -b sample ) + ["D#4"]=( float freq=622.25 ; typeset sample_set="false" ; typeset -b sample ) + ["E4"]=( float freq=659.26 ; typeset sample_set="false" ; typeset -b sample ) + ["F4"]=( float freq=698.46 ; typeset sample_set="false" ; typeset -b sample ) + ["F#4"]=( float freq=739.99 ; typeset sample_set="false" ; typeset -b sample ) + ["G4"]=( float freq=783.99 ; typeset sample_set="false" ; typeset -b sample ) + ["G#4"]=( float freq=830.61 ; typeset sample_set="false" ; typeset -b sample ) + ["A4"]=( float freq=880.00 ; typeset sample_set="false" ; typeset -b sample ) + ["A#4"]=( float freq=932.32 ; typeset sample_set="false" ; typeset -b sample ) + ["B4"]=( float freq=987.77 ; typeset sample_set="false" ; typeset -b sample ) + ["C5"]=( float freq=1046.5 ; typeset sample_set="false" ; typeset -b sample ) + + # dummy entry for pause + ["p"]=( float freq=NaN ; typeset sample_set="false" ; typeset -b sample ) +) + +# alias table which translates the various names of "notes" to the matching entry +# in the "tones" table +compound -r -A notes=( + ["C3"]=( val=tones["C3"] ) ["key_d"]=( val=tones["C3"] ) + ["C#3"]=( val=tones["C#3"] ) ["key_r"]=( val=tones["C#3"] ) + ["D3"]=( val=tones["D3"] ) ["key_f"]=( val=tones["D3"] ) + ["D#3"]=( val=tones["D#3"] ) ["key_t"]=( val=tones["D#3"] ) + ["E3"]=( val=tones["E3"] ) ["key_g"]=( val=tones["E3"] ) + ["F3"]=( val=tones["F3"] ) ["key_h"]=( val=tones["F3"] ) + ["F#3"]=( val=tones["F#3"] ) ["key_u"]=( val=tones["F#3"] ) + ["G3"]=( val=tones["G3"] ) ["key_j"]=( val=tones["G3"] ) + ["G#3"]=( val=tones["G#3"] ) ["key_i"]=( val=tones["G#3"] ) + ["A3"]=( val=tones["A3"] ) ["key_k"]=( val=tones["A3"] ) + ["A#3"]=( val=tones["A#3"] ) ["key_o"]=( val=tones["A#3"] ) + ["B3"]=( val=tones["B3"] ) ["key_l"]=( val=tones["B3"] ) + ["C4"]=( val=tones["C4"] ) ["key_D"]=( val=tones["C4"] ) + ["C#4"]=( val=tones["C#4"] ) ["key_R"]=( val=tones["C#4"] ) + ["D4"]=( val=tones["D4"] ) ["key_F"]=( val=tones["D4"] ) + ["D#4"]=( val=tones["D#4"] ) ["key_T"]=( val=tones["D#4"] ) + ["E4"]=( val=tones["E4"] ) ["key_G"]=( val=tones["E4"] ) + ["F4"]=( val=tones["F4"] ) ["key_H"]=( val=tones["F4"] ) + ["F#4"]=( val=tones["F#4"] ) ["key_U"]=( val=tones["F#4"] ) + ["G4"]=( val=tones["G4"] ) ["key_J"]=( val=tones["G4"] ) + ["G#4"]=( val=tones["G#4"] ) ["key_I"]=( val=tones["G#4"] ) + ["A4"]=( val=tones["A4"] ) ["key_K"]=( val=tones["A4"] ) + ["A#4"]=( val=tones["A#4"] ) ["key_O"]=( val=tones["A#4"] ) + ["B4"]=( val=tones["B4"] ) ["key_L"]=( val=tones["B4"] ) + ["C5"]=( val=tones["C5"] ) +) + +# 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=( + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x00 0x00 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 + 0x01 0x01 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 + 0x02 0x02 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03 + 0x03 0x03 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 + 0x04 0x04 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 + 0x05 0x05 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 + 0x06 0x06 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 0x07 + 0x07 0x07 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 + 0x08 0x08 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 + 0x09 0x09 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a + 0x0a 0x0a 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b + 0x0b 0x0b 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c + 0x0c 0x0c 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d 0x0d + 0x0d 0x0d 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e + 0x0e 0x0e 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f 0x0f + 0x0f 0x0f 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + 0x10 0x10 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 + 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 + 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 + 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 + 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 + 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 + 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 + 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 + 0x11 0x11 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 + 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 + 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 + 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 + 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 + 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 + 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 + 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 + 0x12 0x12 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 + 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 + 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 + 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 + 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 + 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 + 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 + 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 + 0x13 0x13 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 + 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 + 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 + 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 + 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 + 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 + 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 + 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 + 0x14 0x14 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 + 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 + 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 + 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 + 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 + 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 + 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 + 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 + 0x15 0x15 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 + 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 + 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 + 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 + 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 + 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 + 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 + 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 + 0x16 0x16 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 + 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 + 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 + 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 + 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 + 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 + 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 + 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 + 0x17 0x17 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 + 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 + 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 + 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 + 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 + 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 + 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 + 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18 + 0x18 0x18 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 + 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 + 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 + 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 + 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 + 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 + 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 + 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 0x19 + 0x19 0x19 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a + 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a + 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a + 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a + 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a + 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a + 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a + 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a 0x1a + 0x1a 0x1a 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b + 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b + 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b + 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b + 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b + 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b + 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b + 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b + 0x1b 0x1b 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c + 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c + 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c + 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c + 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c + 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c + 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c + 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c + 0x1c 0x1c 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d + 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d + 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d + 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d + 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d + 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d + 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d + 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d + 0x1d 0x1d 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e + 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e + 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e + 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e + 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e + 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e + 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e + 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e + 0x1e 0x1e 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f + 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f + 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f + 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f + 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f + 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f + 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f + 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f + 0x1f 0x1f 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 + 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 + 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 + 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 + 0x20 0x20 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 + 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 + 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 + 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 0x21 + 0x21 0x21 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 + 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 + 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 + 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 0x22 + 0x22 0x22 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 + 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 + 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 + 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 0x23 + 0x23 0x23 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 + 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 + 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 + 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 0x24 + 0x24 0x24 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 + 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 + 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 + 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 0x25 + 0x25 0x25 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 + 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 + 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 + 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 0x26 + 0x26 0x26 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 + 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 + 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 + 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 0x27 + 0x27 0x27 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 + 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 + 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 + 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 0x28 + 0x28 0x28 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 + 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 + 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 + 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 0x29 + 0x29 0x29 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a + 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a + 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a + 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a + 0x2a 0x2a 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b + 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b + 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b + 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b 0x2b + 0x2b 0x2b 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c + 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c + 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c + 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c + 0x2c 0x2c 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d + 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d + 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d + 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d 0x2d + 0x2d 0x2d 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e + 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e + 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e + 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e 0x2e + 0x2e 0x2e 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f + 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f + 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f + 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f + 0x2f 0x2f 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 + 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 + 0x30 0x30 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 + 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 0x31 + 0x31 0x31 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 + 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 0x32 + 0x32 0x32 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 + 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 + 0x33 0x33 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 + 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 0x34 + 0x34 0x34 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 + 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 0x35 + 0x35 0x35 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 + 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 0x36 + 0x36 0x36 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 + 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 0x37 + 0x37 0x37 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 + 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 + 0x38 0x38 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 + 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 + 0x39 0x39 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a + 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a + 0x3a 0x3a 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b + 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b 0x3b + 0x3b 0x3b 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c + 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c + 0x3c 0x3c 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d + 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d 0x3d + 0x3d 0x3d 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e + 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e 0x3e + 0x3e 0x3e 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f + 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f + 0x3f 0x3f 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 + 0x40 0x40 0x41 0x41 0x41 0x41 0x41 0x41 0x41 0x41 0x41 0x41 0x41 0x41 0x41 0x41 + 0x41 0x41 0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42 + 0x42 0x42 0x43 0x43 0x43 0x43 0x43 0x43 0x43 0x43 0x43 0x43 0x43 0x43 0x43 0x43 + 0x43 0x43 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 + 0x44 0x44 0x45 0x45 0x45 0x45 0x45 0x45 0x45 0x45 0x45 0x45 0x45 0x45 0x45 0x45 + 0x45 0x45 0x46 0x46 0x46 0x46 0x46 0x46 0x46 0x46 0x46 0x46 0x46 0x46 0x46 0x46 + 0x46 0x46 0x47 0x47 0x47 0x47 0x47 0x47 0x47 0x47 0x47 0x47 0x47 0x47 0x47 0x47 + 0x47 0x47 0x48 0x48 0x48 0x48 0x48 0x48 0x48 0x48 0x48 0x48 0x48 0x48 0x48 0x48 + 0x48 0x48 0x49 0x49 0x49 0x49 0x49 0x49 0x49 0x49 0x49 0x49 0x49 0x49 0x49 0x49 + 0x49 0x49 0x4a 0x4a 0x4a 0x4a 0x4a 0x4a 0x4a 0x4a 0x4a 0x4a 0x4a 0x4a 0x4a 0x4a + 0x4a 0x4a 0x4b 0x4b 0x4b 0x4b 0x4b 0x4b 0x4b 0x4b 0x4b 0x4b 0x4b 0x4b 0x4b 0x4b + 0x4b 0x4b 0x4c 0x4c 0x4c 0x4c 0x4c 0x4c 0x4c 0x4c 0x4c 0x4c 0x4c 0x4c 0x4c 0x4c + 0x4c 0x4c 0x4d 0x4d 0x4d 0x4d 0x4d 0x4d 0x4d 0x4d 0x4d 0x4d 0x4d 0x4d 0x4d 0x4d + 0x4d 0x4d 0x4e 0x4e 0x4e 0x4e 0x4e 0x4e 0x4e 0x4e 0x4e 0x4e 0x4e 0x4e 0x4e 0x4e + 0x4e 0x4e 0x4f 0x4f 0x4f 0x4f 0x4f 0x4f 0x4f 0x4f 0x4f 0x4f 0x4f 0x4f 0x4f 0x4f + 0x4f 0x4f 0x50 0x50 0x50 0x50 0x50 0x50 0x50 0x50 0x51 0x51 0x51 0x51 0x51 0x51 + 0x51 0x51 0x52 0x52 0x52 0x52 0x52 0x52 0x52 0x52 0x53 0x53 0x53 0x53 0x53 0x53 + 0x53 0x53 0x54 0x54 0x54 0x54 0x54 0x54 0x54 0x54 0x55 0x55 0x55 0x55 0x55 0x55 + 0x55 0x55 0x56 0x56 0x56 0x56 0x56 0x56 0x56 0x56 0x57 0x57 0x57 0x57 0x57 0x57 + 0x57 0x57 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x59 0x59 0x59 0x59 0x59 0x59 + 0x59 0x59 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5a 0x5b 0x5b 0x5b 0x5b 0x5b 0x5b + 0x5b 0x5b 0x5c 0x5c 0x5c 0x5c 0x5c 0x5c 0x5c 0x5c 0x5d 0x5d 0x5d 0x5d 0x5d 0x5d + 0x5d 0x5d 0x5e 0x5e 0x5e 0x5e 0x5e 0x5e 0x5e 0x5e 0x5f 0x5f 0x5f 0x5f 0x5f 0x5f + 0x5f 0x5f 0x60 0x60 0x60 0x60 0x61 0x61 0x61 0x61 0x62 0x62 0x62 0x62 0x63 0x63 + 0x63 0x63 0x64 0x64 0x64 0x64 0x65 0x65 0x65 0x65 0x66 0x66 0x66 0x66 0x67 0x67 + 0x67 0x67 0x68 0x68 0x68 0x68 0x69 0x69 0x69 0x69 0x6a 0x6a 0x6a 0x6a 0x6b 0x6b + 0x6b 0x6b 0x6c 0x6c 0x6c 0x6c 0x6d 0x6d 0x6d 0x6d 0x6e 0x6e 0x6e 0x6e 0x6f 0x6f + 0x6f 0x6f 0x70 0x70 0x71 0x71 0x72 0x72 0x73 0x73 0x74 0x74 0x75 0x75 0x76 0x76 + 0x77 0x77 0x78 0x78 0x79 0x79 0x7a 0x7a 0x7b 0x7b 0x7c 0x7c 0x7d 0x7d 0x7e 0x7e + 0xff 0xfe 0xfe 0xfd 0xfd 0xfc 0xfc 0xfb 0xfb 0xfa 0xfa 0xf9 0xf9 0xf8 0xf8 0xf7 + 0xf7 0xf6 0xf6 0xf5 0xf5 0xf4 0xf4 0xf3 0xf3 0xf2 0xf2 0xf1 0xf1 0xf0 0xf0 0xef + 0xef 0xef 0xef 0xee 0xee 0xee 0xee 0xed 0xed 0xed 0xed 0xec 0xec 0xec 0xec 0xeb + 0xeb 0xeb 0xeb 0xea 0xea 0xea 0xea 0xe9 0xe9 0xe9 0xe9 0xe8 0xe8 0xe8 0xe8 0xe7 + 0xe7 0xe7 0xe7 0xe6 0xe6 0xe6 0xe6 0xe5 0xe5 0xe5 0xe5 0xe4 0xe4 0xe4 0xe4 0xe3 + 0xe3 0xe3 0xe3 0xe2 0xe2 0xe2 0xe2 0xe1 0xe1 0xe1 0xe1 0xe0 0xe0 0xe0 0xe0 0xdf + 0xdf 0xdf 0xdf 0xdf 0xdf 0xdf 0xdf 0xde 0xde 0xde 0xde 0xde 0xde 0xde 0xde 0xdd + 0xdd 0xdd 0xdd 0xdd 0xdd 0xdd 0xdd 0xdc 0xdc 0xdc 0xdc 0xdc 0xdc 0xdc 0xdc 0xdb + 0xdb 0xdb 0xdb 0xdb 0xdb 0xdb 0xdb 0xda 0xda 0xda 0xda 0xda 0xda 0xda 0xda 0xd9 + 0xd9 0xd9 0xd9 0xd9 0xd9 0xd9 0xd9 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd8 0xd7 + 0xd7 0xd7 0xd7 0xd7 0xd7 0xd7 0xd7 0xd6 0xd6 0xd6 0xd6 0xd6 0xd6 0xd6 0xd6 0xd5 + 0xd5 0xd5 0xd5 0xd5 0xd5 0xd5 0xd5 0xd4 0xd4 0xd4 0xd4 0xd4 0xd4 0xd4 0xd4 0xd3 + 0xd3 0xd3 0xd3 0xd3 0xd3 0xd3 0xd3 0xd2 0xd2 0xd2 0xd2 0xd2 0xd2 0xd2 0xd2 0xd1 + 0xd1 0xd1 0xd1 0xd1 0xd1 0xd1 0xd1 0xd0 0xd0 0xd0 0xd0 0xd0 0xd0 0xd0 0xd0 0xcf + 0xcf 0xcf 0xcf 0xcf 0xcf 0xcf 0xcf 0xcf 0xcf 0xcf 0xcf 0xcf 0xcf 0xcf 0xcf 0xce + 0xce 0xce 0xce 0xce 0xce 0xce 0xce 0xce 0xce 0xce 0xce 0xce 0xce 0xce 0xce 0xcd + 0xcd 0xcd 0xcd 0xcd 0xcd 0xcd 0xcd 0xcd 0xcd 0xcd 0xcd 0xcd 0xcd 0xcd 0xcd 0xcc + 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcb + 0xcb 0xcb 0xcb 0xcb 0xcb 0xcb 0xcb 0xcb 0xcb 0xcb 0xcb 0xcb 0xcb 0xcb 0xcb 0xca + 0xca 0xca 0xca 0xca 0xca 0xca 0xca 0xca 0xca 0xca 0xca 0xca 0xca 0xca 0xca 0xc9 + 0xc9 0xc9 0xc9 0xc9 0xc9 0xc9 0xc9 0xc9 0xc9 0xc9 0xc9 0xc9 0xc9 0xc9 0xc9 0xc8 + 0xc8 0xc8 0xc8 0xc8 0xc8 0xc8 0xc8 0xc8 0xc8 0xc8 0xc8 0xc8 0xc8 0xc8 0xc8 0xc7 + 0xc7 0xc7 0xc7 0xc7 0xc7 0xc7 0xc7 0xc7 0xc7 0xc7 0xc7 0xc7 0xc7 0xc7 0xc7 0xc6 + 0xc6 0xc6 0xc6 0xc6 0xc6 0xc6 0xc6 0xc6 0xc6 0xc6 0xc6 0xc6 0xc6 0xc6 0xc6 0xc5 + 0xc5 0xc5 0xc5 0xc5 0xc5 0xc5 0xc5 0xc5 0xc5 0xc5 0xc5 0xc5 0xc5 0xc5 0xc5 0xc4 + 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc4 0xc3 + 0xc3 0xc3 0xc3 0xc3 0xc3 0xc3 0xc3 0xc3 0xc3 0xc3 0xc3 0xc3 0xc3 0xc3 0xc3 0xc2 + 0xc2 0xc2 0xc2 0xc2 0xc2 0xc2 0xc2 0xc2 0xc2 0xc2 0xc2 0xc2 0xc2 0xc2 0xc2 0xc1 + 0xc1 0xc1 0xc1 0xc1 0xc1 0xc1 0xc1 0xc1 0xc1 0xc1 0xc1 0xc1 0xc1 0xc1 0xc1 0xc0 + 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xbf + 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf + 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbf 0xbe + 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe + 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbe 0xbd + 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd + 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbd 0xbc + 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc + 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbc 0xbb + 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb + 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xbb 0xba + 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba + 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xba 0xb9 + 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 + 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb9 0xb8 + 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 + 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb8 0xb7 + 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 + 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb7 0xb6 + 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 + 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb6 0xb5 + 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 + 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb5 0xb4 + 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 + 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb4 0xb3 + 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 + 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb3 0xb2 + 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 + 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb2 0xb1 + 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 + 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb1 0xb0 + 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 + 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xb0 0xaf + 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf + 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf + 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf + 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xaf 0xae + 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae + 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae + 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae + 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xae 0xad + 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad + 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad + 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad + 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xad 0xac + 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac + 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac + 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac + 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xac 0xab + 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab + 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab + 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab + 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xab 0xaa + 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa + 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa + 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa + 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xaa 0xa9 + 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 + 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 + 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 + 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa9 0xa8 + 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 + 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 + 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 + 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa8 0xa7 + 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 + 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 + 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 + 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa7 0xa6 + 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 + 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 + 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 + 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa6 0xa5 + 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 + 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 + 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 + 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa4 + 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 + 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 + 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 + 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa4 0xa3 + 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 + 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 + 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 + 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa3 0xa2 + 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 + 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 + 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 + 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa2 0xa1 + 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 + 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 + 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 + 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa1 0xa0 + 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 + 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 + 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 + 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0xa0 0x9f + 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f + 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f + 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f + 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f + 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f + 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f + 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f + 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9f 0x9e + 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e + 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e + 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e + 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e + 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e + 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e + 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e + 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9e 0x9d + 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d + 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d + 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d + 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d + 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d + 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d + 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d + 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9d 0x9c + 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c + 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c + 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c + 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c + 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c + 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c + 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c + 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9c 0x9b + 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b + 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b + 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b + 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b + 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b + 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b + 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b + 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9b 0x9a + 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a + 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a + 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a + 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a + 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a + 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a + 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a + 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a 0x99 + 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 + 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 + 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 + 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 + 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 + 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 + 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 + 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x99 0x98 + 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 + 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 + 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 + 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 + 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 + 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 + 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 + 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x97 + 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 + 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 + 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 + 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 + 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 + 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 + 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 + 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x97 0x96 + 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 + 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 + 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 + 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 + 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 + 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 + 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 + 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x96 0x95 + 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 + 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 + 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 + 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 + 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 + 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 + 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 + 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x95 0x94 + 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 + 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 + 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 + 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 + 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 + 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 + 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 + 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x94 0x93 + 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 + 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 + 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 + 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 + 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 + 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 + 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 + 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x93 0x92 + 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 + 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 + 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 + 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 + 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 + 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 + 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 + 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x92 0x91 + 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 + 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 + 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 + 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 + 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 + 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 + 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 + 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x91 0x90 + 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 + 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 + 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 + 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 + 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 + 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 + 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 + 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f + 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8f 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e + 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8e 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d + 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8d 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c + 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8c 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b + 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8b 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a + 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x8a 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 + 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x89 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 + 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x88 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 + 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x87 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 + 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x86 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 + 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x85 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 + 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x84 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 + 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x83 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 + 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x82 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 + 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 +) + +# base64 handling stuff +typeset -r base64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" + +function bytearraytobase64 +{ + nameref bytearray=$1 + typeset out="" + integer len + integer i i0 i1 i2 + + (( len=${#bytearray[*]}-1 )) + for (( i=0 ; i < len ; i+=3 )) ; do + (( i0=bytearray[i+0] , i1=bytearray[i+1] , i2=bytearray[i+2] )) + + out+="${base64chars:$(( i0 >> 2 )):1}" + out+="${base64chars:$(( ((i0 & 0x03) << 4) | ((i1 & 0xf0) >> 4) )):1}" + (( (i+1) < len )) && { out+="${base64chars:$(( ((i1 & 0x0f) << 2) | ((i2 & 0xc0) >> 6) )):1}" ; } || out+="=" + (( (i+2) < len )) && { out+="${base64chars:$(( i2 & 0x3f )):1}" ; } || out+="=" + done + + printf "%s" "${out}" + return 0 +} + + +# stack layout: +# stack.currpos = current position +# stack.data = nameref to integer array +function stack_init +{ + nameref stk=$1 + stk.currpos=0 + return 0 +} + +function stack_put_byte +{ + nameref stk=$1 + stk.data[stk.currpos++]=$(( $2 & 0xFF )) + return 0 +} + +function stack_put_uint16 +{ + integer val=$2 + stack_put_byte $1 $(( (val >> 8) & 0xFF )) + stack_put_byte $1 $(( val & 0xFF )) + return 0 +} + +# put an au(4) header on a stack variable +function audio_put_au_header +{ + nameref au=$1 + + # au_magic: magic number + stack_put_byte au $(('.')) + stack_put_byte au $(('s')) + stack_put_byte au $(('n')) + stack_put_byte au $(('d')) + # au_offset + stack_put_byte au 0x00 + stack_put_byte au 0x00 + stack_put_byte au 0x00 + stack_put_byte au 0x1C + # au_data_size (0xFFFFFFFF = AUDIO_AU_UNKNOWN_SIZE ((unsigned)(~0))) + stack_put_byte au 0xFF + stack_put_byte au 0xFF + stack_put_byte au 0xFF + stack_put_byte au 0xFF + # au_encoding + stack_put_byte au 0x00 + stack_put_byte au 0x00 + stack_put_byte au 0x00 + stack_put_byte au 1 + # au_sample_rate + stack_put_byte au 0x00 + stack_put_byte au 0x00 + stack_put_byte au 0x1f + stack_put_byte au 0x40 + # au_channels + stack_put_byte au 0x00 + stack_put_byte au 0x00 + stack_put_byte au 0x00 + stack_put_byte au 0x01 + # dummy + stack_put_byte au 0 + stack_put_byte au 0 + stack_put_byte au 0 + stack_put_byte au 0 + return 0 +} + +function print_piano_layout +{ + cat <<ENDOFTEXT +---------------------------------------------------- + | ##### ##### | ##### ##### ##### | + | ##### ##### | ##### ##### ##### | + | ##### ##### | ##### ##### ##### | + | #cis# #dis# | #fis# #gis# #ais# | + | #des# # es# | #ges# # as# # b # | + | \###/ \###/ | \###/ \###/ \###/ | + | | | | | | | | + | | | | | | | | + | c | d | e | f | g | a | h | + | | | | | | | | +/\-----/\-----/\-----/\-----/\-----/\-----/\-----/\- + +Keys: + R T U I O + D F G H J K L +ENDOFTEXT + return 0 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${shpiano_usage}" OPT '-?' + exit 2 +} + +# program start +builtin basename + +typeset progname="${ basename "${0}" ; }" + +typeset -r shpiano_usage=$'+ +[-?\n@(#)\$Id: shpiano (Roland Mainz) 2009-05-09 \$\n] +[-author?Roland Mainz <roland.mainz@nrubsig.org>] +[-author?Valeria Elisabeth Mainz <valeria.mainz@no.such.email.toddler>] +[+NAME?shpiano - simple audio demo] +[+DESCRIPTION?\bshpiano\b is a small demo application which converts + keyboard input into 8bit Mu-law audio samples which are + send to /dev/audio.] +[b:babymode?Mode to entertain toddlers. Plays a sound for any key + and ignores SIGINT. Requires ESC to quit the application.] +[+SEE ALSO?\bksh93\b(1), \bau\b(4), \baudio\b(7i)] +' +typeset babymode=false + +while getopts -a "${progname}" "${shpiano_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + b) babymode=true ;; + +b) babymode=false ;; + *) usage ;; + esac +done +shift $((OPTIND-1)) + +float -r M_PI=3.14159265358979323846 + +float sample_rate=8000. +float duration=0.10 +float freq +float w # temporary "wave" value +integer i +integer audiofd # audio device file descriptor +typeset key +compound audio=( integer currpos=0 ; integer -a data=( [0]=0 ) ) # stack object + +clear +print_piano_layout + +if ${babymode} ; then + [[ -x /usr/bin/banner ]] || fatal_error "-n requires /usr/bin/banner" + + typeset lastkeys + + nameref curr_note=tones["A#4"] + (( freq=curr_note.freq )) + + trap "" INT +fi + +if [[ "${AUDIODEV}" == "" ]] ; then + AUDIODEV="/dev/audio" +fi +print -u2 -f $"Playing sound to device %s\n" "${AUDIODEV}" + +# open channel to audio device +redirect {audiofd}<> "${AUDIODEV}" +(( $? != 0 )) && fatal_error $"Could not open audio device." + +# build pause sample +stack_init audio +for ((i=0 ; i < ((sample_rate*duration)/2.) ; i++)) ; do + stack_put_byte audio 0 +done +typeset -b pause_sample=${ bytearraytobase64 audio.data ; } + +stack_init audio +audio_put_au_header audio +typeset -b au_header=${ bytearraytobase64 audio.data ; } + +# begin playing +printf "%B" au_header >&${audiofd} + + +# warning: the math used here is so wrong that your head may +# explode when you continue reading this +while read -r -N 1 key?$'\r > ' ; do + if [[ ${key} == $'\E' ]] || [[ ${babymode} != "true" && ${key} == ~(E)($'\E'|'q'|'Q') ]] ; then + break # quit + fi + + printf "\r" + if [[ -v notes[key_${key}] ]] ; then + nameref curr_note="${notes[key_${key}].val}" + (( freq=curr_note.freq )) + else + if ${babymode} ; then + nameref curr_note=tones["A#4"] + (( freq=curr_note.freq )) + else + nameref curr_note=tones["p"] + (( freq=1.*(1./duration) )) + fi + fi + + # babymode: print "keys" to screen via /usr/bin/banner + if ${babymode} ; then + lastkeys="${lastkeys/~(Er).*(........)/\1}${key}" + banner "${lastkeys}" + fi + +# printf "note=%s sample_rate=%f, freq=%f\n" "${!curr_note}" sample_rate freq >&2 + + # Create sample data if they didn't exist yet and + # store them in the "tones" array + if ! ${curr_note.sample_set} ; then + stack_init audio + + for ((i=0 ; i < (sample_rate*duration) ; i++)) ; do + # first create the sinus wave... + (( w=sin( ((i*freq)/sample_rate) * (2.*M_PI)) )) + # ...scale it to 14bit signed PCM linear and... + (( w=8192.+w*8191. )) + # ...then convert it to 8bit ulaw + # ("audio_pcmulinear14bittoulaw8bit" is unsigned but we use + # "8192" above as starting point to do the "signed to unsigned" + # conversion) ... + stack_put_byte audio $(( audio_pcmulinear14bittoulaw8bit[int(w)] )) + done + + curr_note.sample=${ bytearraytobase64 audio.data ; } + curr_note.sample_set="true" + fi + + # output sample + { + printf "%B" curr_note.sample + printf "%B" pause_sample + } >&${audiofd} +done + +# close audio device +redirect {audiofd}<&- + +print -u2 $"# done." +exit 0 +#EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/shtinyurl.sh b/usr/src/cmd/ast/libshell/common/scripts/shtinyurl.sh new file mode 100644 index 0000000000..38f5e393d7 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/shtinyurl.sh @@ -0,0 +1,265 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +# parse HTTP return code, cookies etc. +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 + + # strip '\r' at the end + i="${i/~(Er)$'\r'/}" + + case "$i" in + ~(Eli)Content-Type:.*) + response.content_type="${i/~(El).*:[[:blank:]]*/}" + ;; + ~(Eli)Content-Length:[[:blank:]]*[0-9]*) + integer response.content_length="${i/~(El).*:[[:blank:]]*/}" + ;; + ~(Eli)Transfer-Encoding:.*) + response.transfer_encoding="${i/~(El).*:[[:blank:]]*/}" + ;; + esac + done + + return 0 +} + +function cat_http_body +{ + typeset emode="$1" + typeset hexchunksize="0" + integer chunksize=0 + + if [[ "${emode}" == "chunked" ]] ; then + while IFS=$'\r' read hexchunksize && + [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] && + (( chunksize=$( printf "16#%s\n" "${hexchunksize}" ) )) && (( chunksize > 0 )) ; do + dd bs=1 count="${chunksize}" 2>/dev/null + done + else + cat + fi + + return 0 +} + +function request_tinyurl +{ + # site setup + typeset url_host="tinyurl.com" + typeset url_path="/api-create.php" + typeset url="http://${url_host}${url_path}" + integer netfd # http stream number + typeset inputurl="$1" + compound httpresponse # http response + typeset request="" + + # we assume "inputurl" is a correctly encoded URL which doesn't + # require any further mangling + url_path+="?url=${inputurl}" + + 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" + + 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 + { + print -n -- "${request}\r\n" + } >&${netfd} + + # process reply + parse_http_response httpresponse <&${netfd} + response="${ cat_http_body "${httpresponse.transfer_encoding}" <&${netfd} ; }" + + # close connection + redirect {netfd}<&- + + if (( httpresponse.statuscode >= 200 && httpresponse.statuscode <= 299 )) ; then + print -r -- "${response}" + return 0 + else + print -u2 -f $"tinyurl response was (%s,%s):\n%s\n" "${httpresponse.statuscode}" "${httpresponse.statusmsg}" "${response}" + return 1 + fi + + # not reached +} + +function request_trimurl +{ + # site setup + typeset url_host="api.tr.im" + typeset url_path="/api/trim_url.xml" + typeset url="http://${url_host}${url_path}" + integer netfd # http stream number + typeset inputurl="$1" + compound httpresponse # http response + typeset request="" + + # we assume "inputurl" is a correctly encoded URL which doesn't + # require any further mangling + url_path+="?url=${inputurl}" + + 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" + + 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 + { + print -n -- "${request}\r\n" + } >&${netfd} + + # process reply + parse_http_response httpresponse <&${netfd} + response="${ cat_http_body "${httpresponse.transfer_encoding}" <&${netfd} ; }" + + # 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}" + return 0 + else + print -u2 -f $"tr.im response was (%s,%s):\n%s\n" "${httpresponse.statuscode}" "${httpresponse.statusmsg}" "${response}" + return 1 + fi + + # not reached +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${shtinyurl_usage}" OPT '-?' + exit 2 +} + +# program start +builtin basename +builtin cat +builtin date +builtin uname + +typeset progname="${ basename "${0}" ; }" + +# HTTP protocol client identifer +typeset -r http_user_agent="shtinyurl/ksh93 (2010-03-27; ${ uname -s -r -p ; })" + +typeset -r shtinyurl_usage=$'+ +[-?\n@(#)\$Id: shtinyurl (Roland Mainz) 2010-03-27 \$\n] +[-author?Roland Mainz <roland.mainz@nrubsig.org>] +[+NAME?shtinyurl - create short alias URL from long URL] +[+DESCRIPTION?\bshtinyurl\b is a small utility which passes a given URL + to internet service which creates short aliases in the + form of http://<servicename>/XXXXXXXX to redirect long URLs.] +[+?The first arg \burl\b describes a long URL which is transformed into + a tinyurl.com short alias.] +[P:provider?Service provider (either \'tinyurl.com\' or \'tr.im\').]:[mode] + +url + +[+SEE ALSO?\bksh93\b(1), \brssread\b(1), \bshtwitter\b(1), http://www.tinyurl.com, http://tr.im] +' + +typeset service_provider="tr.im" + +while getopts -a "${progname}" "${shtinyurl_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + P) service_provider="${OPTARG}" ;; + *) usage ;; + esac +done +shift $((OPTIND-1)) + +# expecting at least one more argument +(( $# >= 1 )) || usage + +typeset url="$1" +shift + +case "${service_provider}" in + "tinyurl.com") + request_tinyurl "${url}" + exit $? + ;; + "tr.im") + request_trimurl "${url}" + exit $? + ;; + *) + fatal_error "Unsupported service provider." +esac + +# not reached + +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/shtwitter.sh b/usr/src/cmd/ast/libshell/common/scripts/shtwitter.sh new file mode 100644 index 0000000000..d088a1d01a --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/shtwitter.sh @@ -0,0 +1,355 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +function encode_x_www_form_urlencoded +{ + nameref formdata=$1 + 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}" + integer datalen="${#data}" + typeset c + + [[ "$content" != "" ]] && content+="&" + + content+="${element.name}=" + + for ((j=0 ; j < datalen ; j++)) ; do + c="${data:j:1}" + case "$c" in + ' ') c="+" ;; + '!') c="%21" ;; + '*') c="%2A" ;; + "'") c="%27" ;; + '(') c="%28" ;; + ')') c="%29" ;; + ';') c="%3B" ;; + ':') c="%3A" ;; + '@') c="%40" ;; + '&') c="%26" ;; + '=') c="%3D" ;; + '+') c="%2B" ;; + '$') c="%24" ;; + ',') c="%2C" ;; + '/') c="%2F" ;; + '?') c="%3F" ;; + '%') c="%25" ;; + '#') c="%23" ;; + '[') c="%5B" ;; + '\') c="%5C" ;; # we need this to avoid the '\'-quoting hell + ']') c="%5D" ;; + *) ;; + esac + content+="$c" + done + done + + formdata.content_length=${#content} + + return 0 +} + +# parse HTTP return code, cookies etc. +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 + + # strip '\r' at the end + i="${i/~(Er)$'\r'/}" + + case "$i" in + ~(Eli)Content-Type:.*) + response.content_type="${i/~(El).*:[[:blank:]]*/}" + ;; + ~(Eli)Content-Length:[[:blank:]]*[0-9]*) + integer response.content_length="${i/~(El).*:[[:blank:]]*/}" + ;; + ~(Eli)Transfer-Encoding:.*) + response.transfer_encoding="${i/~(El).*:[[:blank:]]*/}" + ;; + esac + done + + return 0 +} + +function cat_http_body +{ + typeset emode="$1" + typeset hexchunksize="0" + integer chunksize=0 + + if [[ "${emode}" == "chunked" ]] ; then + while IFS=$'\r' read hexchunksize && + [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] && + (( chunksize=$( printf "16#%s\n" "${hexchunksize}" ) )) && (( chunksize > 0 )) ; do + dd bs=1 count="${chunksize}" 2>/dev/null + done + else + cat + fi + + return 0 +} + +function encode_http_basic_auth +{ + typeset user="$1" + typeset passwd="$2" + 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" + # and then print this variable as ASCII. + 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 +} + +function put_twitter_message +{ + [[ "$SHTWITTER_USER" == "" ]] && { print -u2 -f $"%s: SHTWITTER_USER not set.\n" "$0" ; return 1 ; } + [[ "$SHTWITTER_PASSWD" == "" ]] && { print -u2 -f $"%s: SHTWITTER_PASSWD not set.\n" "$0" ; return 1 ; } + + (( $# != 1 )) && { print -u2 -f $"%s: Wrong number of arguments.\n" "$0" ; return 1 ; } + + # site setup + typeset url_host="twitter.com" + typeset url_path="/statuses/update.xml" + typeset url="http://${url_host}${url_path}" + integer netfd # http stream number + typeset msgtext="$1" + compound httpresponse # http response + + # argument for "encode_x_www_form_urlencoded" + compound urlform=( + # input + compound -a form=( + ( name="status" data="${msgtext}" ) + ) + # output + 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" + request+="Host: ${url_host}\r\n" + request+="Authorization: Basic ${ encode_http_basic_auth "${SHTWITTER_USER}" "${SHTWITTER_PASSWD}" ; }\r\n" + request+="User-Agent: ${http_user_agent}\r\n" + request+="Connection: close\r\n" + 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" + (( $? != 0 )) && { print -u2 -f "%s: Could not open connection to %s\n." "$0" "${url_host}" ; return 1 ; } + + # send http post + { + print -n -- "${request}\r\n" + print -n -- "${content}\r\n" + } >&${netfd} + + # process reply + parse_http_response httpresponse <&${netfd} + response="${ cat_http_body "${httpresponse.transfer_encoding}" <&${netfd} ; }" + + # 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 + return 1 + fi + + # not reached +} + +function verify_twitter_credentials +{ + [[ "$SHTWITTER_USER" == "" ]] && { print -u2 -f $"%s: SHTWITTER_USER not set.\n" "$0" ; return 1 ; } + [[ "$SHTWITTER_PASSWD" == "" ]] && { print -u2 -f $"%s: SHTWITTER_PASSWD not set.\n" "$0" ; return 1 ; } + + (( $# != 0 )) && { print -u2 -f $"%s: Wrong number of arguments.\n" "$0" ; return 1 ; } + + # site setup + typeset url_host="twitter.com" + typeset url_path="/account/verify_credentials.xml" + typeset url="http://${url_host}${url_path}" + integer netfd # http stream number + compound httpresponse # http response + + typeset request="" + + request="POST ${url_path} HTTP/1.1\r\n" + request+="Host: ${url_host}\r\n" + request+="Authorization: Basic ${ encode_http_basic_auth "${SHTWITTER_USER}" "${SHTWITTER_PASSWD}" ; }\r\n" + request+="User-Agent: ${http_user_agent}\r\n" + request+="Connection: close\r\n" + request+="Content-Type: application/x-www-form-urlencoded\r\n" + request+="Content-Length: 0\r\n" # dummy + + 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 + { + print -n -- "${request}\r\n" + } >&${netfd} + + # process reply + parse_http_response httpresponse <&${netfd} + response="${ cat_http_body "${httpresponse.transfer_encoding}" <&${netfd} ; }" + + # 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 + return 1 + fi + + # not reached +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${shtwitter_usage}" OPT '-?' + exit 2 +} + +# program start +builtin basename +builtin cat +builtin date +builtin uname + +typeset progname="${ basename "${0}" ; }" + +# HTTP protocol client identifer +typeset -r http_user_agent="shtwitter/ksh93 (2010-03-27; ${ uname -s -r -p ; })" + +typeset -r shtwitter_usage=$'+ +[-?\n@(#)\$Id: shtwitter (Roland Mainz) 2010-03-27 \$\n] +[-author?Roland Mainz <roland.mainz@nrubsig.org>] +[+NAME?shtwitter - read/write text data to internet clipboards] +[+DESCRIPTION?\bshtwitter\b is a small utility which can read and write text + to the twitter.com microblogging site.] +[+?The first arg \bmethod\b describes one of the methods, "update" posts a + text message to the users twitter blog, returning the raw response + message from the twitter server.] +[+?The second arg \bstring\b contains the string data which should be + stored on twitter.com.] + +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 +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage ;; + esac +done +shift $((OPTIND-1)) + +# expecting at least one more argument +(($# >= 1)) || usage + +typeset method="$1" +shift + +case "${method}" in + update|blog) put_twitter_message "$@" ; exit $? ;; + verify_credentials) verify_twitter_credentials "$@" ; exit $? ;; + *) usage ;; +esac + +fatal_error $"not reached." +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/simplefileattributetree1.sh b/usr/src/cmd/ast/libshell/common/scripts/simplefileattributetree1.sh new file mode 100644 index 0000000000..8be1f0acf3 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/simplefileattributetree1.sh @@ -0,0 +1,276 @@ +#!/usr/bin/ksh93 + +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# simplefileattributetree1 - build a simple file tree (including file attributes) +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + + +function add_file_to_tree +{ + typeset treename=$1 + typeset filename=$2 + nameref destnodename=$3 + integer i + typeset nodepath # full name of compound variable + typeset -a pe # path elements + + # first built an array containing the names of each path element + # (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 + # there aren't any nodes yet + nodepath="${treename}" + for (( i=0 ; i < (${#pe[@]}-1) ; 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 + nameref node="${nodepath}" + [[ "${ typeset +p node.elements ; }" == "" ]] && compound -A node.elements + node.elements[${pe[i]}]=( + filepath="${filename}" + ) + + destnodename="${!node}.elements[${pe[i]}]" + + return 0 +} + +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 + + integer out.inodenum="${str/~(Elr)[[:space:]]*([[:digit:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]-]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]]*[[:space:]]+[[:digit:]]*[[:space:]]+[[:digit:]:]+)[[:space:]]+(.+)/\1}" + integer out.kbblocks="${str/~(Elr)[[:space:]]*([[:digit:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]-]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]]*[[:space:]]+[[:digit:]]*[[:space:]]+[[:digit:]:]+)[[:space:]]+(.+)/\2}" + typeset out.mode="${str/~(Elr)[[:space:]]*([[:digit:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]-]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]]*[[:space:]]+[[:digit:]]*[[:space:]]+[[:digit:]:]+)[[:space:]]+(.+)/\3}" + integer out.numlinks="${str/~(Elr)[[:space:]]*([[:digit:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]-]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]]*[[:space:]]+[[:digit:]]*[[:space:]]+[[:digit:]:]+)[[:space:]]+(.+)/\4}" + compound out.owner=( + typeset user="${str/~(Elr)[[:space:]]*([[:digit:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]-]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]]*[[:space:]]+[[:digit:]]*[[:space:]]+[[:digit:]:]+)[[:space:]]+(.+)/\5}" + typeset group="${str/~(Elr)[[:space:]]*([[:digit:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]-]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]]*[[:space:]]+[[:digit:]]*[[:space:]]+[[:digit:]:]+)[[:space:]]+(.+)/\6}" + ) + integer out.filesize="${str/~(Elr)[[:space:]]*([[:digit:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]-]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]]*[[:space:]]+[[:digit:]]*[[:space:]]+[[:digit:]:]+)[[:space:]]+(.+)/\7}" + typeset out.date="${str/~(Elr)[[:space:]]*([[:digit:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]-]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]]*[[:space:]]+[[:digit:]]*[[:space:]]+[[:digit:]:]+)[[:space:]]+(.+)/\8}" + typeset out.filepath="${str/~(Elr)[[:space:]]*([[:digit:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]-]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:alnum:]]+)[[:space:]]+([[:digit:]]+)[[:space:]]+([[:alpha:]]*[[:space:]]+[[:digit:]]*[[:space:]]+[[:digit:]:]+)[[:space:]]+(.+)/\9}" + + return 0 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${simplefileattributetree1_usage}" OPT '-?' + exit 2 +} + +# main +builtin basename +builtin dirname + +set -o noglob +set -o nounset + +# tree base +compound filetree + +# benchmark data +compound bench=( + float start + float stop +) + +compound appconfig=( + typeset do_benchmarking=false + compound do_record=( + typeset content=false + typeset filetype=false + ) +) + + +integer i + +typeset progname="${ basename "${0}" ; }" + +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 + 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] +[b:benchmark?Print time needed to generate the tree.] +[c:includecontent?Include the file\'s content in the tree, split into 1kb blocks.] +[t:includefiletype?Include the file type (output of /usr/xpg4/bin/file).] + +path + +[+SEE ALSO?\bksh93\b(1), \bfile\b(1), \bfind\b(1)] +' + +while getopts -a "${progname}" "${simplefileattributetree1_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + b) appconfig.do_benchmarking="true" ;; + +b) appconfig.do_benchmarking="false" ;; + c) appconfig.do_record.content="true" ;; + +c) appconfig.do_record.content="false" ;; + t) appconfig.do_record.filetype="true" ;; + +t) appconfig.do_record.filetype="false" ;; + *) usage ;; + esac +done +shift $((OPTIND-1)) + + +# argument prechecks +if (( $# == 0 )) ; then + print -u2 -f "%s: Missing <path> argument.\n" "${progname}" + exit 1 +fi + + +print -u2 -f "# reading file names...\n" +while (( $# > 0 )) ; do + # "ulimit -c 0" use used to force ksh93 to use a seperate process for subshells, + # this is used to work around a bug with LC_ALL changes bleeding through subshells + IFS=$'\n' ; typeset -a findls_lines=( $(ulimit -c 0 ; LC_ALL=C find "$1" -type f -ls) ) ; IFS=$' \t\n' + shift +done + + +print -u2 -f "# building tree...\n" + +${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 + # files with holes (and later alternative streams, too) + compound -a treenode.content + integer cl=0 + while \ + { + treenode.content[${cl}]=( + typeset type="data" # (todo: "add support for "holes" (sparse files)) + typeset -b bin + ) + read -n1024 treenode.content[${cl}].bin + } ; do + (( cl++ )) + done < "${treenode.filepath}" + unset treenode.content[${cl}] + + typeset -A treenode.hashsum=( + [md5]="$(sum -x md5 < "${treenode.filepath}")" + [sha512]="$(sum -x sha512 < "${treenode.filepath}")" + ) + + # we do this for internal debugging only + if [[ "${ { + integer j + for (( j=0 ; j < ${#treenode.content[@]} ; j++ )) ; do + printf "%B" treenode.content[$j].bin + done + } | sum -x sha512 ; }" != "${treenode.hashsum[sha512]}" ]] ; then + # this should never happen... + print -u2 -f "fatal hash mismatch for %s\n" "${treenode.filepath}" + unset treenode.content treenode.hashsum + fi + fi + fi +done + +${appconfig.do_benchmarking} && (( bench.stop=SECONDS )) + + +if ${appconfig.do_benchmarking} ; then + # print benchmark data + print -u2 -f "# time used: %f\n" $((bench.stop - bench.start)) +fi + +# print variable tree +print -v filetree + +exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/simplefiletree1.sh b/usr/src/cmd/ast/libshell/common/scripts/simplefiletree1.sh new file mode 100644 index 0000000000..d3c75d3652 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/simplefiletree1.sh @@ -0,0 +1,129 @@ +#!/usr/bin/ksh93 + +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# simplefiletree1 - build a simple file tree +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + + +function add_file_to_tree +{ + typeset treename=$1 + typeset filename=$2 + integer i + typeset nodepath # full name of compound variable + typeset -a pe # path elements + + # first built an array containing the names of each path element + # (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 + # there aren't any nodes yet + nodepath="${treename}" + for (( i=0 ; i < (${#pe[@]}-1) ; 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 + nameref node="${nodepath}" + [[ "${ typeset +p node.elements ; }" == "" ]] && typeset -a node.elements + node.elements+=( "${pe[i]}" ) + + return 0 +} + +# main +builtin rev + +# tree base +compound filetree + +# benchmark data +compound bench=( + float start + float stop +) + +typeset i + +# argument prechecks +if (( $# == 0 )) ; then + print -u2 -f "%s: Missing <path> argument." "$0" + exit 1 +fi + +print -u2 "# reading file names" +while (( $# > 0 )) ; do + IFS=$'\n' ; typeset -a filenames=( $(find "$1" -type f) ) ; IFS=$' \t\n' + shift +done +print -u2 "# building tree..." + +(( bench.start=SECONDS )) + +for ((i=0 ; i < ${#filenames[@]} ; i++ )) ; do + add_file_to_tree filetree "${filenames[i]}" +done + +(( bench.stop=SECONDS )) + +# print benchmark data +print -u2 -f "# time used: %f\n" $((bench.stop - bench.start)) + +# print tree +print -v filetree + +exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/svcproptree1.sh b/usr/src/cmd/ast/libshell/common/scripts/svcproptree1.sh new file mode 100644 index 0000000000..11ee1577f6 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/svcproptree1.sh @@ -0,0 +1,172 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + + +function svcproptovartree +{ + nameref tree=$1 + + typeset name + typeset servicename + typeset propname + + typeset datatype + + typeset -a fields + integer num_fields + integer i + + while IFS=' ' read -A fields ; do + num_fields=${#fields[*]} + + name="${fields[0]}" + datatype="${fields[1]}" + # parse service/property name + servicename="${name%~(Er):properties/.*}" + servicename="${servicename/~(El)svc:\//}" # strip "svc:/" + propname="${name#~(El).*:properties/}" + + [[ "${ typeset +p "tree[${servicename}].properties" ; }" == "" ]] && compound -A tree[${servicename}].properties + + nameref node=tree[${servicename}].properties[${propname}] + + node=( + typeset datatype="${datatype}" + typeset valuelist="true" + typeset -a values + ) + + for (( i=2 ; i < num_fields ; i++ )) ; do + node.values+=( "${fields[i]}" ) + done + done + + return 0 +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${svcproptree1_usage}" OPT '-?' + exit 2 +} + +# program start +builtin basename +builtin cat +builtin date +builtin uname + +typeset progname="${ basename "${0}" ; }" + +typeset -r svcproptree1_usage=$'+ +[-?\n@(#)\$Id: svcproptree1 (Roland Mainz) 2010-04-02 \$\n] +[-author?Roland Mainz <roland.mainz@nrubsig.org>] +[+NAME?svcproptree1 - SMF tree demo] +[+DESCRIPTION?\bsvcproptree1\b is a small ksh93 compound variable demo + which reads accepts a SMF service pattern name input file, + reads the matching service properties and converts them into an internal + variable tree representation and outputs it in the format + specified by viewmode (either "list", "namelist", "tree" or "compacttree")..] + +pattern viewmode + +[+SEE ALSO?\bksh93\b(1), \bsvcprop\b(1)] +' + +while getopts -a "${progname}" "${svcproptree1_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage ;; + esac +done +shift $((OPTIND-1)) + +typeset svcpattern="$1" +typeset viewmode="$2" + +if [[ "${viewmode}" != ~(Elr)(list|namelist|tree|compacttree) ]] ; then + fatal_error $"Invalid view mode \"${viewmode}\"." +fi + +compound svc=( + typeset -A proptree +) + +typeset s + +s="$(/usr/bin/svcprop -f "${svcpattern}")" || fatal_error $"svcprop failed with exit code $?." +print -u2 $"#loading completed." + +print -r -- "$s" | svcproptovartree svc.proptree +print -u2 $"#parsing completed." + +case "${viewmode}" in + list) + set | egrep "^svc.proptree\[" | fgrep -v ']=$' + ;; + namelist) + typeset + | egrep "^svc.proptree\[" + ;; + tree) + print -v svc + ;; + compacttree) + print -C svc + ;; + *) + fatal_error $"Invalid view mode \"${viewmode}\"." + ;; +esac + +print -u2 $"#done." + +exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/termclock.sh b/usr/src/cmd/ast/libshell/common/scripts/termclock.sh new file mode 100644 index 0000000000..e9b84a70a1 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/termclock.sh @@ -0,0 +1,311 @@ +#!/usr/bin/ksh93 + +# +# 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. +# + +# +# termclock - a simple analog clock for terminals +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# Make sure all math stuff runs in the "C" locale to avoid problems +# with alternative # radix point representations (e.g. ',' instead of +# '.' in de_DE.*-locales). This needs to be set _before_ any +# floating-point constants are defined in this script). +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} + +# cache tput values (to avoid |fork()|'ing a "tput" child every second) +function tput_cup +{ + # static variable as cache for "tput_cup" + typeset -S -A tput_cup_cache + + 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 + c="${ printf "\E[%d;%dH" y+1 x+1 ; }" + else + c="${ tput cup $y $x ; }" + fi + fi + + print -r -n -- "$c" + return 0 +} + +# Get terminal size and put values into a compound variable with the integer +# members "columns" and "lines" +function get_term_size +{ + nameref rect=$1 + + rect.columns=${ tput cols ; } || return 1 + rect.lines=${ tput lines ; } || return 1 + + return 0 +} + +function draw_clock +{ + float angle a + float x y + integer i=1 + + for(( angle=0.0 ; angle < 360. ; angle+=6 )) ; do + (( + a=angle/360.*(2*M_PI) , + + x=clock.len_x*cos(a) , + y=clock.len_y*sin(a) + )) + + 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))" + else + print -r -n "x" + fi + done + return 0 +} + +function draw_hand +{ + float angle="$1" a + 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 + (( + x=(clock.len_x*(s/10.)*(length/100.))*cos(a) , + y=(clock.len_y*(s/10.)*(length/100.))*sin(a) + )) + + tput_cup $(( y+clock.middle_y )) $(( x+clock.middle_x )) + print -r -n -- "${ch}" + done + return 0 +} + +function draw_clock_hand +{ + nameref hand=$1 + draw_hand $(( 360.*(hand.val/hand.scale)-90. )) "${hand.ch}" ${hand.length} + return 0 +} + +function clear_clock_hand +{ + nameref hand=$1 + draw_hand $(( 360.*(hand.val/hand.scale)-90. )) " " ${hand.length} + return 0 +} + +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 + if ${init_screen} ; then + init_screen="false" + + get_term_size termsize || fatal_error $"Couldn't get terminal size." + + (( + clock.middle_x=termsize.columns/2.-.5 , + clock.middle_y=termsize.lines/2.-.5 , + clock.len_x=termsize.columns/2-2 , + clock.len_y=termsize.lines/2-2 , + )) + + { + clear + draw_clock + } >&6 + fi + + { + (( ${ date +"hours.val=%H , minutes.val=%M , seconds.val=%S" ; } )) + + # small trick to get a smooth "analog" flair + (( + hours.val+=minutes.val/60. , + minutes.val+=seconds.val/60. + )) + + draw_clock_hand seconds + draw_clock_hand minutes + draw_clock_hand hours + + # move cursor to home position + tput_cup 0 0 + } >&6 + + 6<#((0)) + cat <&6 + + redirect 6<&- ; rm -f "${scratchfile}" ; redirect 6<> "${scratchfile}" + + c="" ; read -r -t ${update_interval} -N 1 c + if [[ "$c" != "" ]] ; then + case "$c" in + ~(Fi)q | $'\E') return 0 ;; + esac + fi + + { + clear_clock_hand hours + clear_clock_hand minutes + clear_clock_hand seconds + } >&6 + done +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${termclock_usage}" OPT '-?' + exit 2 +} + +# program start +builtin basename +builtin cat +builtin date +builtin mktemp +builtin rm + +typeset progname="${ basename "${0}" ; }" + +float -r M_PI=3.14159265358979323846 + +# terminal size rect +compound termsize=( + integer columns=-1 + integer lines=-1 +) + +typeset init_screen="true" + +compound clock=( + float middle_x + float middle_y + integer len_x + integer len_y +) + + +# set clock properties +compound seconds=( + float val + typeset ch + float scale + integer length ) +compound minutes=( + float val + typeset ch + float scale + integer length ) +compound hours=( + float val + typeset ch + float scale + integer length ) + +seconds.length=90 seconds.scale=60 seconds.ch=$"s" +minutes.length=75 minutes.scale=60 minutes.ch=$"m" +hours.length=50 hours.scale=12 hours.ch=$"h" + +float update_interval=0.9 + +typeset -r termclock_usage=$'+ +[-?\n@(#)\$Id: termclock (Roland Mainz) 2009-12-02 \$\n] +[-author?Roland Mainz <roland.mainz@nrubsig.org>] +[-author?David Korn <dgk@research.att.com>] +[+NAME?termclock - analog clock for terminals] +[+DESCRIPTION?\btermclock\b is an analog clock for terminals. + The termclock program displays the time in analog or digital + form. The time is continuously updated at a frequency which + may be specified by the user.] +[u:update?Update interval (defaults to 0.9 seconds).]:[interval] +[+SEE ALSO?\bksh93\b(1), \bxclock\b(1)] +' + +while getopts -a "${progname}" "${termclock_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + u) update_interval=${OPTARG} ;; + *) usage ;; + esac +done +shift $((OPTIND-1)) + +# prechecks +which tput >/dev/null || fatal_error $"tput not found." +(( update_interval >= 0. && update_interval <= 7200. )) || fatal_error $"invalid update_interval value." + +# create temporary file for double-buffering and register an EXIT trap +# to remove this file when the shell interpreter exits +scratchfile="${ mktemp -t "termclock.ppid${PPID}_pid$$.XXXXXX" ; }" +[[ "${scratchfile}" != "" ]] || fatal_error $"Could not create temporary file name." +trap 'rm -f "${scratchfile}"' EXIT +rm -f "${scratchfile}" ; redirect 6<> "${scratchfile}" || fatal_error $"Could not create temporary file." + +# register trap to handle window size changes +trap 'init_screen="true"' WINCH + +main_loop + +# exiting - put cursor below clock +tput_cup $((termsize.lines-2)) 0 + +exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/test_net_sctp.sh b/usr/src/cmd/ast/libshell/common/scripts/test_net_sctp.sh new file mode 100644 index 0000000000..6b863d5fbc --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/test_net_sctp.sh @@ -0,0 +1,64 @@ +#!/usr/bin/ksh93 + +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# test_net_sctp - a simple ksh93 SCTP demo +# + +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +set -o xtrace +set -o errexit + +# declare variables +integer netfd +typeset request + +# print intro +print "# testing SCTP support" +print "# (via fetching the main page of http://www.sctp.org/ via SCTP)" + +# open sctp stream and print it's number +redirect {netfd}<> /dev/sctp/www.sctp.org/80 +print "sctp fd=${netfd}" + +# 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" +request+="Connection: close\r\n" +print -u${netfd} -n -- "${request}\r\n" + +# print response to stdout +cat <&${netfd} + +# close connection +redirect {netfd}<&- + +print "#done" + +#EOF. diff --git a/usr/src/cmd/ast/libshell/common/scripts/xmldocumenttree1.sh b/usr/src/cmd/ast/libshell/common/scripts/xmldocumenttree1.sh new file mode 100644 index 0000000000..e527fed85f --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/scripts/xmldocumenttree1.sh @@ -0,0 +1,358 @@ +#!/usr/bin/ksh93 + +# +# 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. +# + +# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +function fatal_error +{ + print -u 2 "${progname}: $*" + exit 1 +} + +function attrstrtoattrarray +{ +#set -o xtrace + typeset s="$1" + nameref aa=$2 # attribute array + integer aa_count=0 + integer aa_count=0 + typeset nextattr + integer currattrlen=0 + typeset tagstr + typeset tagval + + while (( ${#s} > 0 )) ; do + # skip whitespaces + while [[ "${s:currattrlen:1}" == ~(E)[[:blank:][:space:]] ]] ; do + (( currattrlen++ )) + done + s="${s:currattrlen:${#s}}" + + # anything left ? + (( ${#s} == 0 )) && break + + # Pattern tests: + #x="foo=bar huz=123" ; print "${x##~(E)[[:alnum:]_-:]*=[^[:blank:]\"]*}" + #x='foo="ba=r o" huz=123' ; print "${x##~(E)[[:alnum:]_-:]*=\"[^\"]*\"}" + #x="foo='ba=r o' huz=123" ; print "${x##~(E)[[:alnum:]_-:]*=\'[^\"]*\'}" + #x="foox huz=123" ; print "${x##~(E)[[:alnum:]_-:]*}" + # All pattern combined via eregex (w|x|y|z): + #x='foo="bar=o" huz=123' ; print "${x##~(E)([[:alnum:]_-:]*=[^[:blank:]\"]*|[[:alnum:]_-:]*=\"[^\"]*\"|[[:alnum:]_-:]*=\'[^\"]*\')}" + nextattr="${s##~(E)([[:alnum:]_-:]*=[^[:blank:]\"]*|[[:alnum:]_-:]*=\"[^\"]*\"|[[:alnum:]_-:]*=\'[^\"]*\'|[[:alnum:]_-:]*)}" + currattrlen=$(( ${#s} - ${#nextattr})) + + # add entry + 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> + aa[${aa_count}]=( name="${tagstr}" ) + fi + (( aa_count++ )) + (( aa_count > 1000 )) && fatal_error "$0: aa_count too large" # assert + done +} + + +function handle_document +{ +#set -o xtrace + nameref callbacks=${1} + typeset tag_type="${2}" + typeset tag_value="${3}" + typeset tag_attributes="${4}" + 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}]+=( + typeset tagtype="element" + typeset tagname="${tag_value}" + compound -A tagattributes + compound -A nodes + integer nodesnum=0 + ) + + # fill attributes + 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++ )) + ;; + tag_end) + (( stack.pos-- )) + ;; + tag_text) + nodepath[${nodesnum}]+=( + typeset tagtype="text" + typeset tagvalue="${tag_value}" + ) + (( nodesnum++ )) + ;; + tag_comment) + nodepath[${nodesnum}]+=( + typeset tagtype="comment" + typeset tagvalue="${tag_value}" + ) + (( nodesnum++ )) + ;; + document_start) + ;; + document_end) + ;; + esac + +# print "xmltok: '${tag_type}' = '${tag_value}'" +} + +function xml_tok +{ + typeset buf="" + typeset namebuf="" + typeset attrbuf="" + typeset c="" + 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 + else + buf="$c" + fi + IFS='' read -r -d '>' c + buf+="$c" + + # handle comments + if [[ "$buf" == ~(El)!-- ]] ; then + # did we read the comment completely ? + if [[ "$buf" != ~(Elr)!--.*-- ]] ; then + buf+=">" + while [[ "$buf" != ~(Elr)!--.*-- ]] ; do + IFS='' read -r -N 1 c || break + 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 + buf="${buf%*/}" + 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:]].*}" + attrbuf="${buf#~(E).*[[:space:][:blank:]]}" + else + namebuf="$buf" + attrbuf="" + fi + + if ${isendtag} ; then + [[ ! -z "${callbacks["tag_end"]}" ]] && ${callbacks["tag_end"]} "${1}" "tag_end" "$namebuf" + else + [[ ! -z "${callbacks["tag_begin"]}" ]] && ${callbacks["tag_begin"]} "${1}" "tag_begin" "$namebuf" "$attrbuf" + + # handle tags like <br/> (which are start- and end-tag in one piece) + if ${issingletag} ; then + [[ ! -z "${callbacks["tag_end"]}" ]] && ${callbacks["tag_end"]} "${1}" "tag_end" "$namebuf" + fi + fi + buf="" + else + buf+="$c" + fi + done + + [[ ! -z "${callbacks["document_end"]}" ]] && ${callbacks["document_end"]} "${1}" "document_end" "exit_success" + + print # final newline to make filters like "sed" happy +} + +function print_sample1_xml +{ +cat <<EOF +<br /> +<score-partwise instrument="flute1"> + <identification> + <kaiman>nocrocodile</kaiman> + </identification> + <!-- a comment --> + <partlist> + <foo>myfootext</foo> + <bar>mybartext</bar> + <snap /> + <!-- another + comment --> + <ttt>myttttext</ttt> + </partlist> +</score-partwise> +EOF +} + +function usage +{ + OPTIND=0 + getopts -a "${progname}" "${xmldocumenttree1_usage}" OPT '-?' + exit 2 +} + +# program start +builtin basename +builtin cat +builtin date +builtin uname + +typeset progname="${ basename "${0}" ; }" + +typeset -r xmldocumenttree1_usage=$'+ +[-?\n@(#)\$Id: xmldocumenttree1 (Roland Mainz) 2009-05-09 \$\n] +[-author?Roland Mainz <roland.mainz@nrubsig.org>] +[+NAME?xmldocumenttree1 - XML tree demo] +[+DESCRIPTION?\bxmldocumenttree\b is a small ksh93 compound variable demo + which reads a XML input file, converts it into an internal + variable tree representation and outputs it in the format + specified by viewmode (either "list", "namelist", "tree" or "compacttree").] + +file viewmode + +[+SEE ALSO?\bksh93\b(1)] +' + +while getopts -a "${progname}" "${xmldocumenttree1_usage}" OPT ; do +# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|" + case ${OPT} in + *) usage ;; + esac +done +shift $((OPTIND-1)) + +typeset xmlfile="$1" +typeset viewmode="$2" + +if [[ "${xmlfile}" == "" ]] ; then + fatal_error $"No file given." +fi + +if [[ "${viewmode}" != ~(Elr)(list|namelist|tree|compacttree) ]] ; then + fatal_error $"Invalid view mode \"${viewmode}\"." +fi + +compound xdoc +compound -A xdoc.nodes +integer xdoc.nodesnum=0 + +compound stack +typeset -a stack.items=( [0]="doc.nodes" ) +integer stack.pos=0 + +# setup callbacks for xml_tok +typeset -A document_cb # callbacks for xml_tok +document_cb["document_start"]="handle_document" +document_cb["document_end"]="handle_document" +document_cb["tag_begin"]="handle_document" +document_cb["tag_end"]="handle_document" +document_cb["tag_text"]="handle_document" +document_cb["tag_comment"]="handle_document" +# argument for "handle_document" +document_cb["arg_tree"]="xdoc" + + +if [[ "${xmlfile}" == "#sample1" ]] ; then + print_sample1_xml | xml_tok document_cb +elif [[ "${xmlfile}" == "#sample2" ]] ; then + /usr/sfw/bin/wget \ + --user-agent='ksh93_xmldocumenttree' \ + --output-document=- \ + 'http://www.google.com/custom?q=gummi+bears' | + /usr/bin/iconv -f "ISO8859-1" | + xml_tok document_cb +else + cat "${xmlfile}" | xml_tok document_cb +fi + +print -u2 "#parsing completed." + +case "${viewmode}" in + list) + set | egrep "xdoc.*(tagname|tagtype|tagval|tagattributes)" | fgrep -v ']=$' + ;; + namelist) + typeset + | egrep "xdoc.*(tagname|tagtype|tagval|tagattributes)" + ;; + tree) + print -v xdoc + ;; + compacttree) + print -C xdoc + ;; + *) + fatal_error $"Invalid view mode \"${viewmode}\"." + ;; +esac + +print -u2 "#done." + +exit 0 +# EOF. diff --git a/usr/src/cmd/ast/libshell/common/tests/README.tests b/usr/src/cmd/ast/libshell/common/tests/README.tests new file mode 100644 index 0000000000..91a83d4394 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/README.tests @@ -0,0 +1,51 @@ + +#### ksh93 test suite + +## 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: + -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> + Sets one or more environment variables to value "value". +<testmodule> + file name of test module + +## Basic usage in illumos: + +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 "$t" +done + +Note that you MUST NOT use "/usr/bin/ksh93" as value for +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 # 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/cmd/ast/libshell/common/tests/sun_solaris_array_default_datatype.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_array_default_datatype.sh new file mode 100644 index 0000000000..97e6e3e784 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_array_default_datatype.sh @@ -0,0 +1,302 @@ +# +# 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) 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 +# exist yet. +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +# the test cannot use "nounset" +Command=${0##*/} +integer Errors=0 + +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 +} + +# function to add the floating-point value 1.1 to array element "34" +# floating-point datatypes should increment by 1.1, integers by 1 +function add_float +{ + nameref arr=$1 + + arr[34]+=1.1 + + return 0 +} + +# function to add a compound variable called "val" to array element arr[34] +function add_compound +{ + nameref arr=$1 + + arr[34]+=( float val=1.1 ) + + return 0 +} + +# We run the tests in multiple cyles: +# First cycle uses a normal compound variable as basis +# Second cycle uses a nameref to a compound variable as basis +# Third cycle uses a nameref to a nameref to a compound variable as basis +for cycle in \ + c1 c2 c3 c4 \ + c2_sub c3_sub c4_sub \ + c2_indexed_array c3_indexed_array c4_indexed_array \ + c2_associative_array c3_associative_array c4_associative_array; do + case ${cycle} in + c1) + compound mycpv + ;; + c2) + compound rootcpv + nameref mycpv=rootcpv + ;; + c3) + compound rootcpv + nameref namereftoroot=rootcpv + nameref mycpv=namereftoroot + ;; + c4) + compound rootcpv + nameref namereftoroot0=rootcpv + nameref namereftoroot1=namereftoroot0 + nameref mycpv=namereftoroot1 + ;; + # same as cX but uses a subvariable of rootcpv + c2_sub) + compound rootcpv + compound rootcpv.sub + nameref mycpv=rootcpv.sub + ;; + c3_sub) + compound rootcpv + compound rootcpv.sub + nameref namereftoroot=rootcpv.sub + nameref mycpv=namereftoroot + ;; + c4_sub) + compound rootcpv + compound rootcpv.sub + nameref namereftoroot0=rootcpv.sub + nameref namereftoroot1=namereftoroot0 + nameref mycpv=namereftoroot1 + ;; + # same as cX but uses a subvariable of an indexed array + c2_indexed_array) + compound -a rootcpv + nameref mycpv=rootcpv[4] + ;; + c3_indexed_array) + compound -a rootcpv + nameref namereftoroot=rootcpv[4] + nameref mycpv=namereftoroot + ;; + c4_indexed_array) + compound -a rootcpv + nameref namereftoroot0=rootcpv[4] + nameref namereftoroot1=namereftoroot0 + nameref mycpv=namereftoroot1 + ;; + # same as cX but uses a subvariable of an indexed array + c2_associative_array) + compound -A rootcpv + nameref mycpv=rootcpv["hello world"] + ;; + c3_associative_array) + compound -A rootcpv + nameref namereftoroot=rootcpv["hello world"] + nameref mycpv=namereftoroot + ;; + c4_associative_array) + compound -A rootcpv + nameref namereftoroot0=rootcpv["hello world"] + nameref namereftoroot1=namereftoroot0 + nameref mycpv=namereftoroot1 + ;; + *) + err_exit "${cycle}: Should not happen." + ;; + esac + + + # Test 001: Test indexed floating-point array + float -a mycpv.myindexedfloatarray + + add_float mycpv.myindexedfloatarray + (( mycpv.myindexedfloatarray[34] == 1.1 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] == ${mycpv.myindexedfloatarray[34]}, expected 1.1" + add_float mycpv.myindexedfloatarray + (( mycpv.myindexedfloatarray[34] == 2.2 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] == ${mycpv.myindexedfloatarray[34]}, expected 2.2" + unset mycpv.myindexedfloatarray[34] + (( mycpv.myindexedfloatarray[34] == 0.0 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] == ${mycpv.myindexedfloatarray[34]}, expected 0.0" + + # 2nd try (we do this to check whether "unset" works properly) + add_float mycpv.myindexedfloatarray + (( mycpv.myindexedfloatarray[34] == 1.1 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] == ${mycpv.myindexedfloatarray[34]}, expected 1.1" + add_float mycpv.myindexedfloatarray + (( mycpv.myindexedfloatarray[34] == 2.2 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] == ${mycpv.myindexedfloatarray[34]}, expected 2.2" + unset mycpv.myindexedfloatarray[34] + (( mycpv.myindexedfloatarray[34] == 0.0 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] == ${mycpv.myindexedfloatarray[34]}, expected 0.0" + + + + # Test 002: Test associative floating-point array + float -A mycpv.myassociativefloatarray + add_float mycpv.myassociativefloatarray + (( mycpv.myassociativefloatarray[34] == 1.1 )) || err_exit "${cycle}: mycpv.myassociativefloatarray[34] == ${mycpv.myassociativefloatarray[34]}, expected 1.1" + add_float mycpv.myassociativefloatarray + (( mycpv.myassociativefloatarray[34] == 2.2 )) || err_exit "${cycle}: mycpv.myassociativefloatarray[34] == ${mycpv.myassociativefloatarray[34]}, expected 2.2" + unset mycpv.myassociativefloatarray[34] + (( mycpv.myassociativefloatarray[34] == 0.0 )) || err_exit "${cycle}: mycpv.myassociativefloatarray[34] == ${mycpv.myassociativefloatarray[34]}, expected 0.0" + + # 2nd try (we do this to check whether "unset" works properly) + add_float mycpv.myassociativefloatarray + (( mycpv.myassociativefloatarray[34] == 1.1 )) || err_exit "${cycle}: mycpv.myassociativefloatarray[34] == ${mycpv.myassociativefloatarray[34]}, expected 1.1" + add_float mycpv.myassociativefloatarray + (( mycpv.myassociativefloatarray[34] == 2.2 )) || err_exit "${cycle}: mycpv.myassociativefloatarray[34] == ${mycpv.myassociativefloatarray[34]}, expected 2.2" + unset mycpv.myassociativefloatarray[34] + (( mycpv.myassociativefloatarray[34] == 0.0 )) || err_exit "${cycle}: mycpv.myassociativefloatarray[34] == ${mycpv.myassociativefloatarray[34]}, expected 0.0" + + + + # Test 003: Test indexed integer array + integer -a mycpv.myindexedintegerarray + + add_float mycpv.myindexedintegerarray + (( mycpv.myindexedintegerarray[34] == 1 )) || err_exit "${cycle}: mycpv.myindexedintegerarray[34] == ${mycpv.myindexedintegerarray[34]}, expected 1" + add_float mycpv.myindexedintegerarray + (( mycpv.myindexedintegerarray[34] == 2 )) || err_exit "${cycle}: mycpv.myindexedintegerarray[34] == ${mycpv.myindexedintegerarray[34]}, expected 2" + unset mycpv.myindexedintegerarray[34] + (( mycpv.myindexedintegerarray[34] == 0 )) || err_exit "${cycle}: mycpv.myindexedintegerarray[34] == ${mycpv.myindexedintegerarray[34]}, expected 0" + + # 2nd try (we do this to check whether "unset" works properly) + add_float mycpv.myindexedintegerarray + (( mycpv.myindexedintegerarray[34] == 1 )) || err_exit "${cycle}: mycpv.myindexedintegerarray[34] == ${mycpv.myindexedintegerarray[34]}, expected 1" + add_float mycpv.myindexedintegerarray + (( mycpv.myindexedintegerarray[34] == 2 )) || err_exit "${cycle}: mycpv.myindexedintegerarray[34] == ${mycpv.myindexedintegerarray[34]}, expected 2" + unset mycpv.myindexedintegerarray[34] + (( mycpv.myindexedintegerarray[34] == 0 )) || err_exit "${cycle}: mycpv.myindexedintegerarray[34] == ${mycpv.myindexedintegerarray[34]}, expected 0" + + + + # Test 004: Test associative integer array + integer -A mycpv.myassociativeintegerarray + + add_float mycpv.myassociativeintegerarray + (( mycpv.myassociativeintegerarray[34] == 1 )) || err_exit "${cycle}: mycpv.myassociativeintegerarray[34] == ${mycpv.myassociativeintegerarray[34]}, expected 1" + add_float mycpv.myassociativeintegerarray + (( mycpv.myassociativeintegerarray[34] == 2 )) || err_exit "${cycle}: mycpv.myassociativeintegerarray[34] == ${mycpv.myassociativeintegerarray[34]}, expected 2" + unset mycpv.myassociativeintegerarray[34] + (( mycpv.myassociativeintegerarray[34] == 0 )) || err_exit "${cycle}: mycpv.myassociativeintegerarray[34] == ${mycpv.myassociativeintegerarray[34]}, expected 0" + + # 2nd try (we do this to check whether "unset" works properly) + add_float mycpv.myassociativeintegerarray + (( mycpv.myassociativeintegerarray[34] == 1 )) || err_exit "${cycle}: mycpv.myassociativeintegerarray[34] == ${mycpv.myassociativeintegerarray[34]}, expected 1" + add_float mycpv.myassociativeintegerarray + (( mycpv.myassociativeintegerarray[34] == 2 )) || err_exit "${cycle}: mycpv.myassociativeintegerarray[34] == ${mycpv.myassociativeintegerarray[34]}, expected 2" + unset mycpv.myassociativeintegerarray[34] + (( mycpv.myassociativeintegerarray[34] == 0 )) || err_exit "${cycle}: mycpv.myassociativeintegerarray[34] == ${mycpv.myassociativeintegerarray[34]}, expected 0" + + + + # Test 005: Tested indexed compound variable array + compound -a mycpv.myindexedcompoundarray + add_compound mycpv.myindexedcompoundarray + (( mycpv.myindexedcompoundarray[34].val == 1.1 )) || err_exit "${cycle}: mycpv.myindexedcompoundarray[34].val == ${mycpv.myindexedcompoundarray[34].val}, expected 1.1" + # try to add it a 2nd time - since the new element will replace the old + # one the value will _not_ be incremented (or better: The compound + # variable value "val" will be added, not the value of the "val" + # variable) + add_compound mycpv.myindexedcompoundarray + (( mycpv.myindexedcompoundarray[34].val == 1.1 )) || err_exit "${cycle}: mycpv.myindexedcompoundarray[34].val == ${mycpv.myindexedcompoundarray[34].val}, expected 1.1" + unset mycpv.myindexedcompoundarray[34] + [[ ! -v mycpv.myindexedcompoundarray[34].val ]] || err_exit "${cycle}: [[ ! -v mycpv.myindexedcompoundarray[34].val ]] should return failure, got $?" + (( mycpv.myindexedcompoundarray[34].val == 0.0 )) || err_exit "${cycle}: mycpv.myindexedcompoundarray[34].val == ${mycpv.myindexedcompoundarray[34].val}, expected 0.0" + [[ "${mycpv.myindexedcompoundarray[34]}" == "" ]] || err_exit "${cycle}: mycpv.myindexedcompoundarray[34] expected to be equal to an empty string but contains |${mycpv.myindexedcompoundarray[34]}|" + + + + # Test 006: Tested associative compound variable array + compound -A mycpv.myassociativecompoundarray + add_compound mycpv.myassociativecompoundarray + (( mycpv.myassociativecompoundarray[34].val == 1.1 )) || err_exit "${cycle}: mycpv.myassociativecompoundarray[34].val == ${mycpv.myassociativecompoundarray[34].val}, expected 1.1" + # try to add it a 2nd time - since the new element will replace the old + # one the value will _not_ be incremented (or better: The compound + # variable value "val" will be added, not the value of the "val" + # variable) + add_compound mycpv.myassociativecompoundarray + (( mycpv.myassociativecompoundarray[34].val == 1.1 )) || err_exit "${cycle}: mycpv.myassociativecompoundarray[34].val == ${mycpv.myassociativecompoundarray[34].val}, expected 1.1" + unset mycpv.myassociativecompoundarray[34] + [[ ! -v mycpv.myassociativecompoundarray[34].val ]] || err_exit "${cycle}: [[ ! -v mycpv.myassociativecompoundarray[34].val ]] should return failure, got $?" + (( mycpv.myassociativecompoundarray[34].val == 0.0 )) || err_exit "${cycle}: mycpv.myassociativecompoundarray[34].val == ${mycpv.myassociativecompoundarray[34].val}, expected 0.0" + [[ "${mycpv.myassociativecompoundarray[34]}" == "" ]] || err_exit "${cycle}: mycpv.myassociativecompoundarray[34] expected to be equal to an empty string but contains |${mycpv.myassociativecompoundarray[34]}|" + + + # check whether the compound variable output is still Ok + count_brackets "${mycpv}" || err_exit "${cycle}: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}" + count_brackets "$(print -v mycpv)" || err_exit "${cycle}: print -v mycpy: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}" + count_brackets "$(print -C mycpv)" || err_exit "${cycle}: print -C mycpy: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}" + + + # reset + unset mycpv + [[ ! -v mycpv ]] || err_exit "${cycle}: mycpy should not exist" + [[ "${mycpv}" == "" ]] || err_exit "${cycle}: mycpv expected to be empty" +done + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_poll.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_poll.sh new file mode 100644 index 0000000000..5dc5f5cce1 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_poll.sh @@ -0,0 +1,72 @@ +# +# 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 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# Test whether the ksh93/poll builtin works as expected +# + +# 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 + + +builtin -f libshell.so.1 poll || err_exit "poll builtin not found." + +compound d1=( + compound -A u=( + [y]=( fd=5 events="POLLIN" revents="" ) + [x]=( fd=5 events="POLLIN" revents="" ) + ) +) + +# test 1: +cat /dev/zero | { redirect 5<&0 ; poll -e d1.res -t 5. d1.u ; } || err_exit "poll returned non-zero exit code $?" +[[ "${d1.u[x].revents}" == "POLLIN" ]] || err_exit "d1.u[x].revents contains '${d1.u[x].revents}', not POLLIN" +[[ "${d1.u[y].revents}" == "POLLIN" ]] || err_exit "d1.u[y].revents contains '${d1.u[y].revents}', not POLLIN" +[[ "${d1.res[*]}" == "x y" ]] || err_exit "d1.res contains '${d1.res[*]}', not 'x y'" + +# test 2: +unset d1.res + +d1.u[z]=( fd=5 events="POLLOUT" revents="" ) +{ poll -e d1.res -t 5. d1.u ; } 5</dev/null 5>/dev/null || err_exit "poll returned non-zero exit code $?" +[[ "${d1.u[x].revents}" == "POLLIN" ]] || err_exit "d1.u[x].revents contains '${d1.u[x].revents}', not 'POLLIN'" +[[ "${d1.u[y].revents}" == "POLLIN" ]] || err_exit "d1.u[y].revents contains '${d1.u[y].revents}', not 'POLLIN'" +[[ "${d1.u[z].revents}" == "POLLOUT|POLLWRNORM" ]] || err_exit "d1.u[z].revents contains '${d1.u[z].revents}', not 'POLLOUT|POLLWRNORM,'" +[[ "${d1.res[*]}" == "x y z" ]] || err_exit "d1.res contains '${d1.res[*]}', not 'x y z'" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_sum.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_sum.sh new file mode 100644 index 0000000000..9dd209cc74 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_sum.sh @@ -0,0 +1,110 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test whether the ksh93/libcmd sum builtin is compatible to +# Solaris/SystemV /usr/bin/sum +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +typeset x + +builtin sum || err_exit "sum builtin not found" + +# Basic tests +x="$(print 'hello' | /usr/bin/sum)" || err_exit "/usr/bin/sum pipe failed." +[[ "$x" == "542 1" ]] || err_exit "print 'hello' | /usr/bin/sum did not return 542 1, got $x" +x="$(print 'hello' | sum)" || err_exit "sum builtin pipe failed." +[[ "$x" == "542 1" ]] || err_exit "print 'hello' | sum builtin did not return 542 1, got $x" +x="$(print 'hello' | sum -x md5)" || err_exit "sum md5 builtin pipe failed." +[[ "$x" == "b1946ac92492d2347c6235b4d2611184" ]] || err_exit "print 'hello' | sum md5 builtin did not return b1946ac92492d2347c6235b4d2611184, got $x" +x="$(print 'hello' | sum -x sha1)" || err_exit "sum sha1 builtin pipe failed." +[[ "$x" == "f572d396fae9206628714fb2ce00f72e94f2258f" ]] || err_exit "print 'hello' | sum sha1 builtin did not return f572d396fae9206628714fb2ce00f72e94f2258f, got $x" +x="$(print 'hello' | sum -x sha256)" || err_exit "sum sha256 builtin pipe failed." +[[ "$x" == "5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03" ]] || err_exit "print 'hello' | sum sha256 builtin did not return 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03, got $x" +x="$(print 'hello' | sum -x sha512)" || err_exit "sum sha512 builtin pipe failed." +[[ "$x" == "e7c22b994c59d9cf2b48e549b1e24666636045930d3da7c1acb299d1c3b7f931f94aae41edda2c2b207a36e10f8bcb8d45223e54878f5b316e7ce3b6bc019629" ]] || err_exit "print 'hello' | sum sha512 builtin did not return e7c22b994c59d9cf2b48e549b1e24666636045930d3da7c1acb299d1c3b7f931f94aae41edda2c2b207a36e10f8bcb8d45223e54878f5b316e7ce3b6bc019629, got $x" +# note that Solaris /usr/bin/cksum outputs $'3015617425\t6' (which may be a bug in Solaris /usr/bin/cksum) +x="$(print 'hello' | sum -x cksum)" || err_exit "sum cksum builtin pipe failed." +[[ "$x" == $'3015617425 6' ]] || err_exit "print 'hello' | sum cksum builtin did not return \$'3015617425 6', got $(printf "%q\n" "$x")" + +[[ "$(print 'hello' | /usr/bin/sum)" == "$(print 'hello' | sum)" ]] || err_exit "sum hello != /usr/bin/sum hello" +[[ "$(print 'fish' | /usr/bin/sum)" == "$(print 'fish' | sum)" ]] || err_exit "sum fish != /usr/bin/sum fish" +[[ "$(print '12345' | /usr/bin/sum)" == "$(print '12345' | sum)" ]] || err_exit "sum 12345 != /usr/bin/sum 12345" +[[ "$(print '\n\r\n \v' | /usr/bin/sum)" == "$(print '\n\r\n \v' | sum)" ]] || err_exit "sum spaces != /usr/bin/sum spaces" + +# Test some binary files... +x="/usr/bin/ls" +[[ "$(cat "$x" | /usr/bin/sum)" == "$(cat "$x" | sum)" ]] || err_exit "pipe: /usr/bin/sum $x != sum $x" +[[ "$(/usr/bin/sum "$x")" == "$(sum "$x")" ]] || err_exit "file: /usr/bin/sum $x != sum $x" + +x="/usr/bin/chmod" +[[ "$(cat "$x" | /usr/bin/sum)" == "$(cat "$x" | sum)" ]] || err_exit "pipe: /usr/bin/sum $x != sum $x" +[[ "$(/usr/bin/sum "$x")" == "$(sum "$x")" ]] || err_exit "file: /usr/bin/sum $x != sum $x" + +x="/usr/bin/tee" +[[ "$(cat "$x" | /usr/bin/sum)" == "$(cat "$x" | sum)" ]] || err_exit "pipe: /usr/bin/sum $x != sum $x" +[[ "$(/usr/bin/sum "$x")" == "$(sum "$x")" ]] || err_exit "file: /usr/bin/sum $x != sum $x" + +x="/usr/bin/grep" +[[ "$(cat "$x" | /usr/bin/sum)" == "$(cat "$x" | sum)" ]] || err_exit "pipe: /usr/bin/sum $x != sum $x" +[[ "$(/usr/bin/sum "$x")" == "$(sum "$x")" ]] || err_exit "file: /usr/bin/sum $x != sum $x" + +x="/usr/bin/egrep" +[[ "$(cat "$x" | /usr/bin/sum)" == "$(cat "$x" | sum)" ]] || err_exit "pipe: /usr/bin/sum $x != sum $x" +[[ "$(/usr/bin/sum "$x")" == "$(sum "$x")" ]] || err_exit "file: /usr/bin/sum $x != sum $x" + +x="/usr/bin/awk" +[[ "$(cat "$x" | /usr/bin/sum)" == "$(cat "$x" | sum)" ]] || err_exit "pipe: /usr/bin/sum $x != sum $x" +[[ "$(/usr/bin/sum "$x")" == "$(sum "$x")" ]] || err_exit "file: /usr/bin/sum $x != sum $x" + +x="/usr/bin/nawk" +[[ "$(cat "$x" | /usr/bin/sum)" == "$(cat "$x" | sum)" ]] || err_exit "pipe: /usr/bin/sum $x != sum $x" +[[ "$(/usr/bin/sum "$x")" == "$(sum "$x")" ]] || err_exit "file: /usr/bin/sum $x != sum $x" + +x="/usr/bin/ksh" +[[ "$(cat "$x" | /usr/bin/sum)" == "$(cat "$x" | sum)" ]] || err_exit "pipe: /usr/bin/sum $x != sum $x" +[[ "$(/usr/bin/sum "$x")" == "$(sum "$x")" ]] || err_exit "file: /usr/bin/sum $x != sum $x" + +x="/usr/bin/sh" +[[ "$(cat "$x" | /usr/bin/sum)" == "$(cat "$x" | sum)" ]] || err_exit "pipe: /usr/bin/sum $x != sum $x" +[[ "$(/usr/bin/sum "$x")" == "$(sum "$x")" ]] || err_exit "file: /usr/bin/sum $x != sum $x" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_tail.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_tail.sh new file mode 100644 index 0000000000..cf10a8fb01 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_tail.sh @@ -0,0 +1,497 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test whether the ksh93/libcmd tail builtin is compatible to +# Solaris/SystemV { /usr/bin/tail, /usr/xpg4/bin/tail } and +# POSIX "tail" +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +# common functions +function isvalidpid +{ + kill -0 ${1} 2>/dev/null && return 0 + return 1 +} + +function waitpidtimeout +{ + integer pid=$1 + float timeout=$2 + float i + 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 + + case $# in + 1) + for (( i=1 ; i <= $1 ; i++ )) ; do + printf "%d\n" i + done + ;; + 2) + for (( i=$1 ; i <= $2 ; i++ )) ; do + printf "%d\n" i + done + ;; + 3) + for (( i=$1 ; i <= $3 ; i+=$2 )) ; do + printf "%d\n" i + done + ;; + *) + print -u2 -f "%s: Illegal number of arguments %d\n" "$0" $# + return 1 + ;; + esac + + return 0 +} + +# quote input string but use single-backslash that "err_exit" prints +# the strings correctly +function singlebackslashquote +{ + typeset s + s="$(printf "%q\n" "$1")" + print -r "$s" + return 0 +} + +# quote input string but use double-backslash that "err_exit" prints +# the strings correctly +function doublebackslashquote +{ + typeset s + s="$(printf "%q\n" "$1")" + s="${s//\\/\\\\}" + print -r "$s" + return 0 +} + + +# main +builtin mktemp || err_exit "mktemp builtin not found" +builtin rm || err_exit "rm builtin not found" +builtin tail || err_exit "tail builtin not found" + +typeset ocwd +typeset tmpdir + +# create temporary test directory +ocwd="$PWD" +tmpdir="$(mktemp -t -d "test_sun_solaris_builtin_tail.XXXXXXXX")" || err_exit "Cannot create temporary directory" + +cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } + + +# run tests: + +# test1: basic tests +compound -a testcases=( + ( + name="reverse_n" + input=$'hello\nworld' + compound -A tail_args=( + [legacy]=( argv=( "-r" ) ) + ) + expected_output=$'world\nhello' + ) + ( + name="revlist0n" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "-0" ) ) + [std_like]=( argv=( "-n" "0" ) ) + ) + expected_output=$'' + ) + ( + name="revlist0nr" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "-0r" ) ) + [std_like]=( argv=( "-n" "0" "-r" ) ) + [long_options]=( argv=( "--lines" "0" "--reverse" ) ) + ) + expected_output=$'' ) + ( + name="revlist1n" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "-1" ) ) + [std_like]=( argv=( "-n" "1" ) ) + [long_options]=( argv=( "--lines" "1" ) ) + ) + expected_output=$'4' ) + ( + name="revlist1nr" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "-1r" ) ) + [std_like]=( argv=( "-n" "1" "-r" ) ) + [long_options]=( argv=( "--lines" "1" "--reverse" ) ) + ) + expected_output=$'4' + ) + ( + name="revlist2n" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "-2" ) ) + [std_like]=( argv=( "-n" "2" ) ) + ) + expected_output=$'3\n4' + ) + ( + name="revlist2nr" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "-2r" ) ) + [std_like]=( argv=( "-n" "2" "-r" ) ) + ) + expected_output=$'4\n3' + ) + ( + name="revlist3nr" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "-3r" ) ) + [std_like]=( argv=( "-n" "3" "-r" ) ) + ) + expected_output=$'4\n3\n2' + ) + ( + name="revlist2p" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "+2" ) ) + [std_like]=( argv=( "-n" "+2" ) ) + ) + expected_output=$'2\n3\n4' + ) + ( + name="revlist2pr" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "+2r" ) ) + [std_like]=( argv=( "-n" "+2" "-r" ) ) + ) + expected_output=$'4\n3\n2' + ) + ( + name="revlist3p" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "+3" ) ) + [std_like]=( argv=( "-n" "+3" ) ) + ) + expected_output=$'3\n4' + ) + ( + name="revlist3pr" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "+3r" ) ) + [std_like]=( argv=( "-n" "+3" "-r" ) ) + ) + expected_output=$'4\n3' + ) + ( + name="revlist4p" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "+4" ) ) + [std_like]=( argv=( "-n" "+4" ) ) + ) + expected_output=$'4' + ) + ( + name="revlist4pr" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "+4r" ) ) + [std_like]=( argv=( "-n" "+4" "-r" ) ) + ) + expected_output=$'4' + ) + ( + name="revlist5p" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "+5" ) ) + [std_like]=( argv=( "-n" "+5" ) ) + ) + expected_output=$'' + ) + ( + name="revlist5pr" + input=$'1\n2\n3\n4' + compound -A tail_args=( + [legacy]=( argv=( "+5r" ) ) + [std_like]=( argv=( "-n" "+5" "-r" ) ) + ) + expected_output=$'' + ) +) + +for testid in "${!testcases[@]}" ; do + nameref tc=testcases[${testid}] + + for argv_variants in "${!tc.tail_args[@]}" ; do + nameref argv=tc.tail_args[${argv_variants}].argv + output=$( + 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'" + + +# 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 $?" + + +# test 4: FIFO tests + +# FIFO test functions +# (we use functions here to do propper garbage collection) +function test_tail_fifo_1 +{ + typeset tail_cmd="$1" + integer i + integer tail_pid=-1 + + # cleanup trap + trap "rm -f tailtestfifo tailout" EXIT + + # create test FIFO + mkfifo tailtestfifo + + ${tail_cmd} -f <tailtestfifo >tailout & + tail_pid=$! + + myintseq 20 >tailtestfifo + + waitpidtimeout ${tail_pid} 5 + + if isvalidpid ${tail_pid} ; then + err_exit "test_tail_fifo_1: # tail hung (not expected)" + kill -KILL ${tail_pid} + 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 +} + +function test_tail_fifo_2 +{ + typeset tail_cmd="$1" + integer i + integer tail_pid=-1 + + # cleanup trap + trap "rm -f tailtestfifo tailout" EXIT + + # create test FIFO + mkfifo tailtestfifo + + ${tail_cmd} -f tailtestfifo >tailout & + tail_pid=$! + + myintseq 14 >tailtestfifo + + waitpidtimeout ${tail_pid} 5 + + if isvalidpid ${tail_pid} ; then + [[ "$(cat tailout)" == $'5\n6\n7\n8\n9\n10\n11\n12\n13\n14' ]] || err_exit "test_tail_fifo_2: Expected $(doublebackslashquote $'5\n6\n7\n8\n9\n10\n11\n12\n13\n14'), got $(doublebackslashquote "$(cat tailout)")" + + myintseq 15 >>tailtestfifo + + waitpidtimeout ${tail_pid} 5 + + if isvalidpid ${tail_pid} ; then + kill -KILL ${tail_pid} + else + err_exit "test_tail_fifo_2: # tail exit with return code $? (not expected)" + fi + 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 +} + +# fixme: This should test /usr/bin/tail and /usr/xpg4/bin/tail in Solaris +test_tail_fifo_1 "tail" +test_tail_fifo_2 "tail" + + +# test 5: "tail -f" tests +function followtest1 +{ + typeset -r FOLLOWFILE="followfile.txt" + typeset -r OUTFILE="outfile.txt" + + typeset title="$1" + typeset testcmd="$2" + typeset usenewline=$3 + typeset followstr="" + typeset newline="" + integer i + integer tailchild=-1 + + if ${usenewline} ; then + newline=$'\n' + fi + + rm -f "${FOLLOWFILE}" "${OUTFILE}" + print -n "${newline}" > "${FOLLOWFILE}" + + ${testcmd} -f "${FOLLOWFILE}" >"${OUTFILE}" & + (( tailchild=$! )) + + for (( i=0 ; i < 10 ; i++)) ; do + followstr+="${newline}${i}" + print -n "${i}${newline}" >>"${FOLLOWFILE}" + sleep 2 + + [[ "$( < "${OUTFILE}")" == "${followstr}" ]] || err_exit "${title}: Expected $(doublebackslashquote "${followstr}"), got "$(doublebackslashquote "$( < "${OUTFILE}")")"" + done + + 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 +} + +followtest1 "test5a" "tail" true +# fixme: later we should test this, too: +#followtest1 "test5b" "tail" false +#followtest1 "test5c" "/usr/xpg4/bin/tail" true +#followtest1 "test5d" "/usr/xpg4/bin/tail" false +#followtest1 "test5e" "/usr/bin/tail" true +#followtest1 "test5f" "/usr/bin/tail" false + + +# test 6: "tail -f" tests +function followtest2 +{ + typeset -r FOLLOWFILE="followfile.txt" + typeset -r OUTFILE="outfile.txt" + + typeset title="$1" + typeset testcmd="$2" + integer tailchild=-1 + + rm -f "${FOLLOWFILE}" "${OUTFILE}" + + myintseq 50000 >"${FOLLOWFILE}" + + ${testcmd} -n 60000 -f "${FOLLOWFILE}" >"${OUTFILE}" & + (( tailchild=$! )) + + sleep 10 + + kill -KILL ${tailchild} 2>/dev/null + #kill -TERM ${tailchild} 2>/dev/null + waitpidtimeout ${tailchild} 5 + + if isvalidpid ${tailchild} ; then + err_exit "${title}: tail pid=${tailchild} hung." + kill -KILL ${tailchild} 2>/dev/null + fi + + wait ${tailchild} 2>/dev/null + + # this tail should be an external process + outstr=$(/usr/bin/tail "${OUTFILE}") || err_exit "tail returned non-zero exit code $?" + [[ "${outstr}" == 49991*50000 ]] || err_exit "${title}: Expected match for 49991*50000, got "$(singlebackslashquote "${outstr}")"" + + rm -f "${FOLLOWFILE}" "${OUTFILE}" + + return 0 +} + +followtest2 "test6a" "tail" +followtest2 "test6b" "/usr/xpg4/bin/tail" +# fixme: later we should test this, too: +#followtest2 "test6c" "/usr/bin/tail" + + +# cleanup +cd "${ocwd}" +rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}". + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_command_substitution.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_command_substitution.sh new file mode 100644 index 0000000000..7a1b0dab46 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_command_substitution.sh @@ -0,0 +1,290 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Written by Roland Mainz <roland.mainz@nrubsig.org> +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +function isvalidpid +{ + kill -0 ${1} 2>/dev/null && return 0 + return 1 +} +integer testfilesize i maxwait +typeset tmpfile +integer testid + + +######################################################################## +#### test set 001: +# run loop and check various temp filesizes +# (Please keep this test syncted with sun_solaris_cr_6800929_large_command_substitution_hang.sh) + +# test 1: run loop and check various temp filesizes +tmpfile="$(mktemp -t "ksh93_tests_command_substitution.${PPID}.$$.XXXXXX")" || err_exit "Cannot create temporary file." + +compound test1=( + compound -a testcases=( + # test 1a: Run test child for $(...) + # (note the pipe chain has to end in a builtin command, an external command may not trigger the bug) + ( name="test1a" cmd="builtin cat ; print -- \"\$(cat \"${tmpfile}\" | cat)\" ; true" ) + # test 1b: Same as test1a but uses ${... ; } instead if $(...) + ( name="test1b" cmd="builtin cat ; print -- \"\${ cat \"${tmpfile}\" | cat ; }\" ; true" ) + # test 1c: Same as test1a but does not use a pipe + ( name="test1c" cmd="builtin cat ; print -- \"\$(cat \"${tmpfile}\" ; true)\" ; true" ) + # test 1d: Same as test1a but does not use a pipe + ( name="test1d" cmd="builtin cat ; print -- \"\${ cat \"${tmpfile}\" ; true ; }\" ; true" ) + + # test 1e: Same as test1a but uses an external "cat" command + ( name="test1e" cmd="builtin -d cat /bin/cat ; print -- \"\$(cat \"${tmpfile}\" | cat)\" ; true" ) + # test 1f: Same as test1a but uses an external "cat" command + ( name="test1f" cmd="builtin -d cat /bin/cat ; print -- \"\${ cat \"${tmpfile}\" | cat ; }\" ; true" ) + # test 1g: Same as test1a but uses an external "cat" command + ( name="test1g" cmd="builtin -d cat /bin/cat ; print -- \"\$(cat \"${tmpfile}\" ; true)\" ; true" ) + # test 1h: Same as test1a but uses an external "cat" command + ( name="test1h" cmd="builtin -d cat /bin/cat ; print -- \"\${ cat \"${tmpfile}\" ; true ; }\" ; true" ) + ) +) + +for (( testfilesize=1*1024 ; testfilesize <= 1024*1024 ; testfilesize*=2 )) ; do + # Create temp file + { + for (( i=0 ; i < testfilesize ; i+=64 )) ; do + print "0123456789abcdef01234567890ABCDEF0123456789abcdef01234567890ABCDE" + done + } >"${tmpfile}" + + # 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" & + (( childpid=$! )) + + for (( i=0 ; i < maxwait ; i++ )) ; do + isvalidpid ${childpid} || break + sleep 0.25 + done + + if isvalidpid ${childpid} ; then + err_exit "${currtst.name}: child (pid=${childpid}) still busy, filesize=${testfilesize}." + kill -KILL ${childpid} 2>/dev/null + fi + wait || err_exit "${currtst.name}: Child returned non-zero exit code." # wait for child (and/or avoid zombies/slime) + + # compare input/output + cmp -s "${tmpfile}" "${tmpfile}.out" || err_exit "${currtst.name}: ${tmpfile} and ${tmpfile}.out differ, filesize=${testfilesize}." + rm "${tmpfile}.out" + done + + # Cleanup + rm "${tmpfile}" +done + + +######################################################################## +#### test set 002: +# If a command substitution calls a function and that function contains +# a command substitution which contains a piped command, the original +# command substitution calling the function will return 127 instead of 0. +# This is causing problems in several VSC tests. +# If we remove the piped command from the simple +# case in the attached script, it returns 0. + +typeset str +typeset testbody +typeset testout + +testbody=$( +# <CS> means command substitution start, <CE> means command substitution end +cat <<EOF +myfunc () +{ + pipedcmd=<CS> printf "hi" | tr "h" "H" <CE> + echo \$pipedcmd + + return 0 +} + +foo=<CS>myfunc<CE> +retval=\$? + +if [ "\$foo"X != "HiX" ]; then + echo "myfunc returned '\${foo}'; expected 'Hi'" +fi + +if [ \$retval -ne 0 ]; then + echo "command substitution calling myfunc returned \"\${retval}\"; expected 0" +else + echo "command substitution calling myfunc successfully returned 0" +fi +EOF +) + + +# Test 002/a: Plain test +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/b: Same as test002/a but replaces "$(" with "${" +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/c: Same as test002/a but forces |fork()| for a subshell via "ulimit -c 0" +testout=${ printf "%B\n" testbody | sed 's/<CS>/$( ulimit -c 0 ; /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/d: Same as test002/a but uses extra subshell +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 "${ " +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 set 003: +# An expression within backticks which should return false, instead +# returns true (0). + +typeset str +typeset testbody +typeset testout + +testbody=$( +# <CS> means command substitution start, <CE> means command substitution end +cat <<EOF +if <CS>expr "NOMATCH" : ".*Z" > /dev/null<CE> ; then + echo "xerror" +else + echo "xok" +fi +EOF +) + + +# Test 003/a: Plain test +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/b: Same as test003/a but replaces "$(" with "${" +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/c: Same as test003/a but forces |fork()| for a subshell via "ulimit -c 0" +testout=${ printf "%B\n" testbody | sed 's/<CS>/$( ulimit -c 0 ; /g;s/<CE>/)/g' | ${SHELL} 2>&1 || err_exit "command returned exit code $?" } +[[ "${testout}" == "xok" ]] || err_exit "Expected 'xok', got ${testout}" + +# Test 003/d: Same as test003/a but uses extra subshell +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 "${ " +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 set 004: +# test pipe within ${... ; } command subtitution ending in a +# non-builtin command (therefore we use "/bin/cat" instead of "cat" below +# to force the use of the external "cat" command). ast-ksh.2009-01-20 +# had a bug which caused this test to fail. +testout=$( ${SHELL} -c 'pipedcmd=${ printf "hi" | /bin/cat ; } ; print $pipedcmd' ) +[[ "${testout}" == "hi" ]] || err_exit "test004: Expected 'hi', got '${testout}'" + + +######################################################################## +#### test set 005: +# 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. +# configure --enable-thread-safety --without-readline) +compound test5=( + compound -a testcases=( + # gsf's reduced testcase + ( name="test5_a" cmd='exec 5>/dev/null; print $(eval ls -d . 2>&1 1>&5)done' ) + # gisburn's reduced testcase + ( name="test5_b" cmd='exec 5>/dev/null; print $(eval "/bin/printf hello\n" 2>&1 1>&5)done' ) + + ## The following tests do not trigger the problem but are included here for completeness + ## and to make sure we don't get other incarnations of the same problem later... + + # same as test5_a but uses ${ ... ; } instead of $(...) + ( name="test5_c" cmd='exec 5>/dev/null; print "${ eval ls -d . 2>&1 1>&5 ;}done"' ) + # same as test5_b but uses ${ ... ; } instead of $(...) + ( name="test5_d" cmd='exec 5>/dev/null; print "${ eval "/bin/printf hello\n" 2>&1 1>&5 ;}done"' ) + # same as test5_a but uses "ulimit -c 0" to force the shell to use a seperare process for $(...) + ( name="test5_e" cmd='exec 5>/dev/null; print $(ulimit -c 0 ; eval ls -d . 2>&1 1>&5)done' ) + # same as test5_b but uses "ulimit -c 0" to force the shell to use a seperare process for $(...) + ( name="test5_f" cmd='exec 5>/dev/null; print $(ulimit -c 0 ; eval "/bin/printf hello\n" 2>&1 1>&5)done' ) + ) +) + +maxwait=5 +for testid in "${!test5.testcases[@]}" ; do + nameref currtst=test5.testcases[testid] + ${SHELL} -o errexit -c "${currtst.cmd}" >"${tmpfile}.out" & + (( childpid=$! )) + + for (( i=0 ; i < maxwait ; i++ )) ; do + isvalidpid ${childpid} || break + sleep 0.25 + done + + if isvalidpid ${childpid} ; then + err_exit "${currtst.name}: child (pid=${childpid}) still busy." + kill -KILL ${childpid} 2>/dev/null + fi + wait || err_exit "${currtst.name}: Child returned non-zero exit code." # wait for child (and/or avoid zombies/slime) + + testout="$( < "${tmpfile}.out")" + rm "${tmpfile}.out" || err_exit "File '${tmpfile}.out' could not be removed." + [[ "${testout}" == "done" ]] || err_exit "test '${currtst.name}' failed, expected 'done', got '${testout}'" +done + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_misc.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_misc.sh new file mode 100644 index 0000000000..a512d85f41 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_misc.sh @@ -0,0 +1,163 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test module contains misc compound tests which do not have +# their own module yet. +# +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +# global utility functions +compound bracketstat=( + integer bopen=0 + integer bclose=0 +) + +function count_brackets +{ + typeset x="$1" + typeset c + + integer i + (( bracketstat.bopen=0 , bracketstat.bclose=0 )) + + for (( i=0 ; i < ${#x} ; i++ )) ; do + c="${x:i:1}" + [[ "$c" == "(" ]] && (( bracketstat.bopen++ )) + [[ "$c" == ")" ]] && (( bracketstat.bclose++ )) + done + + (( bracketstat.bopen != bracketstat.bclose )) && return 1 + + return 0 +} + + +typeset ocwd +typeset tmpdir + +# create temporary test directory +ocwd="$PWD" +tmpdir="$(mktemp -t -d "test_sun_solaris_compound_misc.XXXXXXXX")" || err_exit "Cannot create temporary directory" + +cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } + +# ksh93 <= ast-ksh.2010-03-09 prints garbage for compound x=( compound -a nodes=( [4]=( ) ) );typeset -p x +function test_compound_indexed_array_init_1 +{ + compound vx=( compound -a nodes=( [4]=( ) ) ) + compound vy + compound -a vy.nodes=( [4]=( ) ) + compound vz + compound -a vz.nodes + vz.nodes[4]=( ) + + cx="$(typeset -p vx)" ; cx="${cx//vx/tt}" + cy="$(typeset -p vy)" ; cy="${cy//vy/tt}" + cz="$(typeset -p vz)" ; cz="${cz//vz/tt}" + [[ "$cx" == "$cy" ]] || err_exit "'$cx' != '$cy'" + [[ "$cx" == "$cz" ]] || err_exit "'$cx' != '$cz'" + [[ "$cy" == "$cz" ]] || err_exit "'$cy' != '$cz'" + + count_brackets "$cx" || err_exit "Brackets not balanced for '$cx'" + count_brackets "$cy" || err_exit "Brackets not balanced for '$cy'" + count_brackets "$cz" || err_exit "Brackets not balanced for '$cz'" + count_brackets "$(print -v vx)" || err_exit "Brackets not balanced for '$(print -v vx)'" + count_brackets "$(print -v vy)" || err_exit "Brackets not balanced for '$(print -v vy)'" + count_brackets "$(print -v vz)" || err_exit "Brackets not balanced for '$(print -v vz)'" + count_brackets "$(print -C vx)" || err_exit "Brackets not balanced for '$(print -C vx)'" + count_brackets "$(print -C vy)" || err_exit "Brackets not balanced for '$(print -C vy)'" + count_brackets "$(print -C vz)" || err_exit "Brackets not balanced for '$(print -C vz)'" + + cx="$(typeset +p vx.nodes)" ; [[ "$cx" == *-C* && "$cx" == *-a* ]] || err_exit "'$cx' lacks -C/-a attribute" + cy="$(typeset +p vy.nodes)" ; [[ "$cy" == *-C* && "$cy" == *-a* ]] || err_exit "'$cy' lacks -C/-a attribute" + cz="$(typeset +p vz.nodes)" ; [[ "$cz" == *-C* && "$cz" == *-a* ]] || err_exit "'$cz' lacks -C/-a attribute" + cx="$(typeset +p vx.nodes[4])" ; [[ "$cx" == *-C* ]] || err_exit "'$cx' lacks -C attribute" + cy="$(typeset +p vy.nodes[4])" ; [[ "$cy" == *-C* ]] || err_exit "'$cy' lacks -C attribute" + cz="$(typeset +p vz.nodes[4])" ; [[ "$cz" == *-C* ]] || err_exit "'$cz' lacks -C attribute" + + return 0 +} + +# ksh93 <= ast-ksh.2010-03-09 prints garbage for compound x=( compound -a nodes=( [4]=( ) ) );typeset -p x +# this test is the same as test_compound_indexed_array_init_1 but "-a" was replaced with "-A" +function test_compound_associative_array_init_1 +{ + compound vx=( compound -A nodes=( [4]=( ) ) ) + compound vy + compound -A vy.nodes=( [4]=( ) ) + compound vz + compound -A vz.nodes + vz.nodes[4]=( ) + + cx="$(typeset -p vx)" ; cx="${cx//vx/tt}" + cy="$(typeset -p vy)" ; cy="${cy//vy/tt}" + cz="$(typeset -p vz)" ; cz="${cz//vz/tt}" + [[ "$cx" == "$cy" ]] || err_exit "'$cx' != '$cy'" + [[ "$cx" == "$cz" ]] || err_exit "'$cx' != '$cz'" + [[ "$cy" == "$cz" ]] || err_exit "'$cy' != '$cz'" + + count_brackets "$cx" || err_exit "Brackets not balanced for '$cx'" + count_brackets "$cy" || err_exit "Brackets not balanced for '$cy'" + count_brackets "$cz" || err_exit "Brackets not balanced for '$cz'" + count_brackets "$(print -v vx)" || err_exit "Brackets not balanced for '$(print -v vx)'" + count_brackets "$(print -v vy)" || err_exit "Brackets not balanced for '$(print -v vy)'" + count_brackets "$(print -v vz)" || err_exit "Brackets not balanced for '$(print -v vz)'" + count_brackets "$(print -C vx)" || err_exit "Brackets not balanced for '$(print -C vx)'" + count_brackets "$(print -C vy)" || err_exit "Brackets not balanced for '$(print -C vy)'" + count_brackets "$(print -C vz)" || err_exit "Brackets not balanced for '$(print -C vz)'" + + cx="$(typeset +p vx.nodes)" ; [[ "$cx" == *-C* && "$cx" == *-A* ]] || err_exit "'$cx' lacks -C/-A attribute" + cy="$(typeset +p vy.nodes)" ; [[ "$cy" == *-C* && "$cy" == *-A* ]] || err_exit "'$cy' lacks -C/-A attribute" + cz="$(typeset +p vz.nodes)" ; [[ "$cz" == *-C* && "$cz" == *-A* ]] || err_exit "'$cz' lacks -C/-A attribute" + cx="$(typeset +p vx.nodes[4])" ; [[ "$cx" == *-C* ]] || err_exit "'$cx' lacks -C attribute" + cy="$(typeset +p vy.nodes[4])" ; [[ "$cy" == *-C* ]] || err_exit "'$cy' lacks -C attribute" + cz="$(typeset +p vz.nodes[4])" ; [[ "$cz" == *-C* ]] || err_exit "'$cz' lacks -C attribute" + + return 0 +} + +# run tests +test_compound_indexed_array_init_1 +test_compound_associative_array_init_1 + +cd "${ocwd}" +rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}". + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_nameref.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_nameref.sh new file mode 100644 index 0000000000..8179e478b7 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_nameref.sh @@ -0,0 +1,214 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + + + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +# +# name reference test #001 +# Note we run this test in a seperate shell to make sure the memory +# corruption originally reported can be reproduced (which precisely +# depends on ordering in the testcase) +( +cat <<EOF + function err_exit + { + print -u2 -n "\t" + print -u2 -r \${Command}[\$1]: "\${@:2}" + (( Errors++ )) + } + alias err_exit='err_exit \$LINENO' + + function function2 + { + nameref v=\$1 + + v.x=19 + v.y=20 + } + + function function1 + { + typeset compound_var=() + + function2 compound_var + + printf "x=%d, y=%d\n" compound_var.x compound_var.y + } + + x="\$(function1)" + + [[ "\$x" == 'x=19, y=20' ]] || err_exit "expected 'x=19, y=20', got '\${x}'" + +EOF +) | ${SHELL} +(( Errors+=$? )) + + +# +# name reference test #002 +# Originally derived from the xmldocumenttree1.sh demo which failed +# with ast-ksh.2009-04-15 since the nodepath+nodesnum nameref calls +# were removing the compound variable members nodes+nodesnum (caused +# by a scoping bug) +# +( +cat <<EOF + compound xdoc + compound -A xdoc.nodes + integer xdoc.nodesnum=0 + + function test1 + { + nameref doc=xdoc + nameref nodepath="doc.nodes" + nameref nodesnum="doc.nodesnum" + print -v doc + } + + test1 +EOF +) | out=$( ${SHELL} ) || err_exit "shell returned exit code $?" + +(( ${ wc -l <<<"${out}" ; } == 4 )) || err_exit "Expected four lines of output, got ${out}" +(set -o errexit ; read -C tmp <<<"${out}" ; [[ "$(typeset +p tmp.nodes)" == *-A* ]]) || err_exit "missing variable tmp.nodes" +(set -o errexit ; read -C tmp <<<"${out}" ; [[ -v tmp.nodesnum ]]) || err_exit "missing variable tmp.nodesnum" + + +# +# name reference test #003a +# ast-ksh.2009-06-30 failed with the following compound variable/nameref test +# +( +cat <<EOF + compound -A addrsp + + nameref sp=addrsp + + sp[14]=( size=1 ) + + if [[ -v sp[19] ]] ; then + print "should not happen" + else + print "Ok" + fi +EOF +) | out=$( ${SHELL} ) || err_exit "shell returned exit code $?" +[[ "${out}" == "Ok" ]] || err_exit "Expected 'Ok', got ${out}" + + +# +# name reference test #003b +# (same as test #003a but uses a function) +# ast-ksh.2009-06-30 failed with the following compound variable/nameref test +# +( +cat <<EOF + compound -A addrsp + + function t1 + { + nameref sp=\$1 + + sp[14]=( size=1 ) + + if [[ -v sp[19] ]] ; then + print "should not happen" + else + print "Ok" + fi + } + + t1 addrsp +EOF +) | out=$( ${SHELL} ) || err_exit "shell returned exit code $?" +[[ "${out}" == "Ok" ]] || err_exit "Expected 'Ok', got ${out}" + + +# +# name reference test #004a +# (same as #003a but uses an indexed array instead of an associative one) +# ast-ksh.2009-06-30 failed with the following compound variable/nameref test +# +( +cat <<EOF + compound -a addrsp + + nameref sp=addrsp + + sp[14]=( size=1 ) + + if [[ -v sp[19] ]] ; then + print "should not happen" + else + print "Ok" + fi +EOF +) | out=$( ${SHELL} ) || err_exit "shell returned exit code $?" +[[ "${out}" == "Ok" ]] || err_exit "Expected 'Ok', got ${out}" + + +# +# name reference test #004b +# (same as test #004a but uses a function) +# ast-ksh.2009-06-30 failed with the following compound variable/nameref test +# +( +cat <<EOF + compound -a addrsp + + function t1 + { + nameref sp=\$1 + + sp[14]=( size=1 ) + + if [[ -v sp[19] ]] ; then + print "should not happen" + else + print "Ok" + fi + } + + t1 addrsp +EOF +) | out=$( ${SHELL} ) || err_exit "shell returned exit code $?" +[[ "${out}" == "Ok" ]] || err_exit "Expected 'Ok', got ${out}" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compoundvario.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compoundvario.sh new file mode 100644 index 0000000000..d16019ba59 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compoundvario.sh @@ -0,0 +1,334 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +# "nounset" disabled for now +#set -o nounset +Command=${0##*/} +integer Errors=0 + +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" +(( 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" +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" "${y}")." + +# 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" +(( signbit(x.myarray3[a_nan].my_nan) )) || err_exit "x.myarray3[a_nan].my_nan not negative" + +# 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}" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..28c7f8dde7 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh @@ -0,0 +1,214 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether the issue described in CR #6687139 +# ("command substitution, exec, and stdout redirection cause +# allocation loop") has been fixed: +# -- 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. +# +# `exec > file` +# +# has the same result. Using $() instead of `` also has the same +# effect. +# +# This works fine under all other bourne-compatible shells. +# -- snip -- +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +function isvalidpid +{ + kill -0 ${1} 2>/dev/null && return 0 + return 1 +} + +integer childpid +typeset testdir +integer childretval + +testdir="/tmp/sun_solaris_cr_6687139_pid$$_${PPID}" +mkdir -p "${testdir}" || err_exit "Cannot create test dirctory" +cd "${testdir}" || { err_exit "Cannot cd to test dirctory" ; exit $Errors ; } + +############################################################################## +## +## test variant 1a: Use command substitution $( ... ) +## + +# Run testcase with "nice" to make sure a "runaway" process can +# still be caught&&terminated by the current shell +nice -n 10 ${SHELL} -c 'touch z ; $(exec nosuchprogram_for_cr_6687139 > z) ; rm z' 2>/dev/null & +childpid=$! + +sleep 5 + +if isvalidpid ${childpid} ; then + # First _stop_, then log error since the child may eat up memory + # VERY VERY quickly + kill -STOP ${childpid} + + err_exit "Child still active after 5 seconds (hang ?)" + + # Get sample stack trace + pstack ${childpid} + kill -KILL ${childpid} +fi + +# collect child's return status +wait ${childpid} +childretval=$? + +(( childretval == 0 )) || err_exit "Child returned non-zero exit code ${childretval}." + +[[ ! -f "z" ]] || { rm "z" ; err_exit "Child did not remove test file" ; } + + +############################################################################## +## +## test variant 1b: Same as test 1a but forces the shell to |fork()| for the +## subshell +## + +# Run testcase with "nice" to make sure a "runaway" process can +# still be caught&&terminated by the current shell +nice -n 10 ${SHELL} -c 'touch z ; $(ulimit -c 0 ; exec nosuchprogram_for_cr_6687139 > z) ; rm z' 2>/dev/null & +childpid=$! + +sleep 5 + +if isvalidpid ${childpid} ; then + # First _stop_, then log error since the child may eat up memory + # VERY VERY quickly + kill -STOP ${childpid} + + err_exit "Child still active after 5 seconds (hang ?)" + + # Get sample stack trace + pstack ${childpid} + kill -KILL ${childpid} +fi + +# collect child's return status +wait ${childpid} +childretval=$? + +(( childretval == 0 )) || err_exit "Child returned non-zero exit code ${childretval}." + +[[ ! -f "z" ]] || { rm "z" ; err_exit "Child did not remove test file" ; } + + +############################################################################## +## +## test variant 2a: Use plain subshell ( ... ) +## + +# Run testcase with "nice" to make sure a "runaway" process can +# still be caught&&terminated by the current shell +nice -n 10 ${SHELL} -c 'touch z ; (exec nosuchprogram_for_cr_6687139 > z) ; rm z' 2>/dev/null & +childpid=$! + +sleep 5 + +if isvalidpid ${childpid} ; then + # First _stop_, then log error since the child may eat up memory + # VERY VERY quickly + kill -STOP ${childpid} + + err_exit "Child still active after 5 seconds (hang ?)" + + # Get sample stack trace + pstack ${childpid} + kill -KILL ${childpid} +fi + +# collect child's return status +wait ${childpid} +childretval=$? + +(( childretval == 0 )) || err_exit "Child returned non-zero exit code ${childretval}." + +[[ ! -f "z" ]] || { rm "z" ; err_exit "Child did not remove test file" ; } + + +############################################################################## +## +## test variant 2b: Same as test 2a but forces the shell to |fork()| for the +## subshell +## + +# Run testcase with "nice" to make sure a "runaway" process can +# still be caught&&terminated by the current shell +nice -n 10 ${SHELL} -c 'touch z ; (ulimit -c 0 ; exec nosuchprogram_for_cr_6687139 > z) ; rm z' 2>/dev/null & +childpid=$! + +sleep 5 + +if isvalidpid ${childpid} ; then + # First _stop_, then log error since the child may eat up memory + # VERY VERY quickly + kill -STOP ${childpid} + + err_exit "Child still active after 5 seconds (hang ?)" + + # Get sample stack trace + pstack ${childpid} + kill -KILL ${childpid} +fi + +# collect child's return status +wait ${childpid} +childretval=$? + +(( childretval == 0 )) || err_exit "Child returned non-zero exit code ${childretval}." + +[[ ! -f "z" ]] || { rm "z" ; err_exit "Child did not remove test file" ; } + +# tests done, remove temporary test subdir +cd /tmp +rmdir "${testdir}" || err_exit "Could not remove temporary test directory ${testdir}" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..d2e8c79284 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh @@ -0,0 +1,111 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test whether CR #6713682 has been fixed. +# +# Creating a compound variable in s subshell "bleeds through" to the calling subshell in some conditions. +# Example: +# -- snip -- +# $ ksh93 -c 'unset l ; ( l=( a=1 b="BE" ) ; print "$l" ) ; print $l' +# ( +# a=1 +# b=BE +# ) +# ( ) +# -- 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 -- +# $ ksh93 -c 'unset l ; ( ulimit -c 0 ; l=( a=1 b="BE" ) ; print "$l" ) ; print $l' +# ( +# a=1 +# b=BE +# ) +# -- snip -- +# ... provides the correct output. +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +typeset var1 var2 + +# use unset, l=() compound syntax and print +var1="$(${SHELL} -c 'unset l ; ( l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err_exit "Non-zero exit code." +var2="$(${SHELL} -c 'unset l ; ( ulimit -c 0 ; l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err_exit "Non-zero exit code." +[[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed subshell output (with unset)." + +# do not use unset, l=() compound syntax and print +var1="$(${SHELL} -c '( l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err_exit "Non-zero exit code." +var2="$(${SHELL} -c '( ulimit -c 0 ; l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err_exit "Non-zero exit code." +[[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed subshell output (without unset)." + +# use unset, typeset -C compound syntax and print +var1="$(${SHELL} -c 'unset l ; ( compound l ; l.a=1 ; l.b="BE" ; print "$l" ) ; print $l')" || err_exit "Non-zero exit code." +var2="$(${SHELL} -c 'unset l ; ( ulimit -c 0 ; compound l ; l.a=1 ; l.b="BE" ; print "$l" ) ; print $l')" || err_exit "Non-zero exit code." +[[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed subshell output (with unset)." + +# do not use unset, typeset -C compound syntax and print +var1="$(${SHELL} -c '( compound l ; l.a=1 ; l.b="BE" ; print "$l" ) ; print $l')" || err_exit "Non-zero exit code." +var2="$(${SHELL} -c '( ulimit -c 0 ; compound l ; l.a=1 ; l.b="BE" ; print "$l" ) ; print $l')" || err_exit "Non-zero exit code." +[[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed subshell output (with unset)." + +# use unset, l=() compound syntax and printf "%B\n" +var1="$(${SHELL} -c 'unset l ; ( l=( a=1 b="BE" ) ; printf "%B\n" l ) ; printf "%B\n" l')" || err_exit "Non-zero exit code." +var2="$(${SHELL} -c 'unset l ; ( ulimit -c 0 ; l=( a=1 b="BE" ) ; printf "%B\n" l ) ; printf "%B\n" l')" || err_exit "Non-zero exit code." +[[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed subshell output (with unset)." + +# do not use unset, l=() compound syntax and printf "%B\n" +var1="$(${SHELL} -c '( l=( a=1 b="BE" ) ; printf "%B\n" l) ; printf "%B\n" l')" || err_exit "Non-zero exit code." +var2="$(${SHELL} -c '( ulimit -c 0 ; l=( a=1 b="BE" ) ; printf "%B\n" l) ; printf "%B\n" l')" || err_exit "Non-zero exit code." +[[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed subshell output (without unset)." + +# use unset, typeset -C compound syntax and printf "%B\n" +var1="$(${SHELL} -c 'unset l ; ( compound l ; l.a=1 ; l.b="BE" ; printf "%B\n" l) ; printf "%B\n" l')" || err_exit "Non-zero exit code." +var2="$(${SHELL} -c 'unset l ; ( ulimit -c 0 ; compound l ; l.a=1 ; l.b="BE" ; printf "%B\n" l) ; printf "%B\n" l')" || err_exit "Non-zero exit code." +[[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed subshell output (with unset)." + +# do not use unset, typeset -C compound syntax and printf "%B\n" +var1="$(${SHELL} -c '( compound l ; l.a=1 ; l.b="BE" ; printf "%B\n" l) ; printf "%B\n" l')" || err_exit "Non-zero exit code." +var2="$(${SHELL} -c '( ulimit -c 0 ; compound l ; l.a=1 ; l.b="BE" ; printf "%B\n" l) ; printf "%B\n" l')" || err_exit "Non-zero exit code." +[[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed subshell output (with unset)." + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..4197088e0d --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh @@ -0,0 +1,122 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether ksh93 (like ksh88) generates calls a +# CHLD/SIGCHLD trap for background jobs and _not_ for foreground jobs. +# +# This was reported as CR #6722134 ("*ksh93* (20080624_snapshot) +# doesn't execute CHLD trap"): +# -- snip -- +# With "set -o monitor" on and "set -o notify" off, ksh88 executes the CHLD +# trap while waiting for interactive input when a background job completes. +# ksh93 appears not to execute the CHLD trap when a background job terminates. +# Probably related: I noticed that with no CHLD trap set, but -o monitor and +# -o notify set, there should be a similar asynchronous job completion notice. +# It works in ksh88 but not in this ksh93 build. +# -- snip -- +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +## +## test one: +## +s="$($SHELL -c ' +set -o errexit +integer i + +trap "print got_child" SIGCHLD + +sleep 5 & +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 +done +print "loop finished" +wait +print "done" +' 2>&1 )" || err_exit "test loop failed." + +[[ "$s" == ~(Er)$'14\nloop finished\ndone' ]] || err_exit "Expected '14\nloop finished\ndone' at the end of the output, got ${s}." +[[ "$s" == ~(El)$'0\n1\n2' ]] || err_exit "Expected '0\n1\n2' as at the beginning of the output, got ${s}." + +integer count +(( count=$(fgrep "got_child" <<< "$s" | wc -l) )) || err_exit "counting failed." +(( count == 2 )) || err_exit "Expected count==2, got count==${count}." + + +## +## test two: +## (same as test "one" except that this test has one more "sleep" child) +## +s="$($SHELL -c ' +set -o errexit +integer i + +trap "print got_child" SIGCHLD + +sleep 5 & +sleep 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 +done +print "loop finished" +wait +print "done" +' 2>&1 )" || err_exit "test loop failed." + +[[ "$s" == ~(Er)$'14\nloop finished\ndone' ]] || err_exit "Expected '14\nloop finished\ndone' at the end of the output, got ${s}." +[[ "$s" == ~(El)$'0\n1\n2' ]] || err_exit "Expected '0\n1\n2' as at the beginning of the output, got ${s}." + +(( count=$(fgrep "got_child" <<< "$s" | wc -l) )) || err_exit "counting failed." +(( count == 3 )) || err_exit "Expected count==3, got count==${count}." + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..399c256354 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh @@ -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) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test whether CR #6753538 ("umask modification leaks out of a ksh93 +# subshell") has been fixed. +# +# Quote from CR #6753538: +# -- snip -- +# I discovered that Solaris 11's /bin/sh exhibits the following +# surprising behavior: +# +# $ /bin/sh -c 'umask 22; (umask 0); umask' +# 0000 +# +# All other shells I tried print 22. +# -- snip -- + + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +# +# test set 1: Simple umask in subshell +# +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') +[[ "$x" == "0020" ]] || err_exit "expected umask 0020, got $x" + +x=$(${SHELL} -c 'umask 0; (umask 22); umask') +[[ "$x" == "0000" ]] || err_exit "expected umask 0000, got $x" + + +# +# test set 2: Simple umask in two subshells +# +x=$(${SHELL} -c 'umask 22; ( (umask 10); umask 0); umask') +[[ "$x" == "0022" ]] || err_exit "expected umask 0022, got $x" + +x=$(${SHELL} -c 'umask 20; ( (umask 10); umask 0); umask') +[[ "$x" == "0020" ]] || err_exit "expected umas k 0020, got $x" + +x=$(${SHELL} -c 'umask 0; ( (umask 10); umask 22); umask') +[[ "$x" == "0000" ]] || err_exit "expected umask 0000, got $x" + + +# +# test set 3: Compare normal subshell vs. subshell in seperate process +# ($ ulimit -c 0 # forced the subshell to |fork()| +# +x=$(${SHELL} -c 'umask 22; ( umask 0); umask') || err_exit "shell failed." +y=$(${SHELL} -c 'umask 22; (ulimit -c 0 ; umask 0); umask') || err_exit "shell failed." +[[ "$x" == "$y" ]] || err_exit "$x != $y" + +x=$(${SHELL} -c 'umask 20; ( umask 0); umask') || err_exit "shell failed." +y=$(${SHELL} -c 'umask 20; (ulimit -c 0 ; umask 0); umask') || err_exit "shell failed." +[[ "$x" == "$y" ]] || err_exit "$x != $y" + +x=$(${SHELL} -c 'umask 0; ( umask 20); umask') || err_exit "shell failed." +y=$(${SHELL} -c 'umask 0; (ulimit -c 0 ; umask 20); umask') || err_exit "shell failed." +[[ "$x" == "$y" ]] || err_exit "$x != $y" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..96285378b3 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh @@ -0,0 +1,80 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test whether CR #6754020 ("ksh93 does weird '[' expansion") has +# been fixed. +# +# 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 ---- + + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +typeset s + +# test using "echo" +s="$(${SHELL} -c 'echo F[[O]')" +[[ "$s" == 'F[[O]' ]] || err_exit "Expected 'F[[O]', got $s" + +s="$(${SHELL} -c 'echo F[[[O]]')" +[[ "$s" == 'F[[[O]]' ]] || err_exit "Expected 'F[[[O]]', got $s" + + +# test using "print" +s="$(${SHELL} -c 'print F[[O]')" +[[ "$s" == 'F[[O]' ]] || err_exit "Expected 'F[[O]', got $s" + +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/cmd/ast/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 new file mode 100644 index 0000000000..cb6e5f956d --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh @@ -0,0 +1,98 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test whether CR #6763594 ('ksh93 executes command after "command" +# builtin twice on failure') has been fixed. +# +# 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: +# -- snip -- +# $ ksh93 -x -c 'print "true" >myfoo ; chmod a+x,a-r myfoo ; command ./myfoo ; +# print $?' +# + print true +# + 1> myfoo +# + chmod a+x,a-r myfoo +# + command ./myfoo +# ksh93[1]: ./myfoo: ./myfoo: cannot open [Permission denied] +# + print 1 +# 1 +# + print 0 +# 0 +# -- snip -- +# The "print" command at the end is executed twice in this case since +# the shell jumps to the wrong position in the execution sequence. +# +# The correct output should be: +# -- snip -- +# $ ksh93 -x -c 'print "true" >myfoo ; chmod a+x,a-r myfoo ; command ./myfoo ; +# print $?' +# + print true +# + 1> myfoo +# + chmod a+x,a-r myfoo +# + command ./myfoo +# ksh93[1]: ./myfoo: ./myfoo: cannot open [Permission denied] +# + print 1 +# 1 +# -- snip -- +# ---- snip ---- + + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +typeset testtmpdir=/tmp/ksh93_test_cr_6763594_${PPID}_$$ +mkdir "${testtmpdir}" || { err_exit "Could not create temporary directory ${testtmpdir}." ; exit ${Errors} ; } + +cd "${testtmpdir}" || { err_exit "Cannot cd to temporary directory ${testtmpdir}." ; exit ${Errors} ; } + +typeset s + +${SHELL} -c 'print "true" >myfoo ; chmod a+x,a-r myfoo ; command ./myfoo ; print $?' 1>out_stdout 2>out_stderr +(( $? == 0 )) || err_exit "Return code $?, expected 0" + +s=$( < out_stdout ) ; [[ "$s" == '126' ]] || err_exit "Expected '126', got $(printf "%q\n" "$s")." +s=$( < out_stderr ) ; [[ "$s" == ~(Elr)(.*:\ \./myfoo:\ \./myfoo:\ .*\[.*\]) ]] || err_exit "Output $(printf "%q\n" "$s") does not match pattern '~(Elr)(.*:\ \./myfoo:\ \./myfoo:\ .*\[.*\])'." + +rm "myfoo" "out_stdout" "out_stderr" || err_exit "rm failed." +cd .. +rmdir "${testtmpdir}" || err_exit "Failed to remove temporary directory ${testtmpdir}." + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..64526125ef --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh @@ -0,0 +1,174 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test whether CR #6766246 ("bug in pattern matching") has been fixed. +# +# Quote from CR #6766246: +# ---- snip ---- +# The bootstrap script of pkgsrc contains this code +# checkarg_sane_absolute_path() { +# case "$1" in +# "") ;; # the default value will be used. +# *[!-A-Za-z0-9_./]*) +# die "ERROR: Invalid characters in path $1 (from $2)." ;; +# /*) ;; +# *) die "ERROR: The argument to $2 must be an absolute path." ;; +# esac +# } +# It turns out, the leading "!" in the pattern is not interpreted +# as negation, and the first "-" not as a literal. Instead the +# character range "! to A" is constructed. Paths containing "%" +# 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 +# case "$1" in +# *[!-A-Za-z0-9_./]*) +# echo invalid characters used in $1 +# ;; +# *) +# echo only valid characters used in $1 +# ;; +# esac +# -- snip -- +# Expected Result: +# strings containing a "-" should be accepted, strings containing +# a "@" should be rejected +# Actual Result: +# strings containing a "-" are rejected, strings containing a +# "@" are accepted +# Workaround +# The pattern "*[!A-Za-z0-9_./-]*" (i.e. shifting the dash to +# the end) works as expected. +# ---- snip ---- + + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +## test 1 (based on the bug report): + +function do_match +{ + case "$1" in + *[!-A-Za-z0-9_./]*) + print "match" + ;; + *) + print "nomatch" + ;; + esac + return 0 +} + +typeset pat + +pat="foo-bar" ; [[ "$(do_match "${pat}")" == "nomatch" ]] || err_exit "${pat} matched." +pat="foo+bar" ; [[ "$(do_match "${pat}")" == "match" ]] || err_exit "${pat} not matched." +pat="foo/bar" ; [[ "$(do_match "${pat}")" == "nomatch" ]] || err_exit "${pat} matched." +pat="foo_bar" ; [[ "$(do_match "${pat}")" == "nomatch" ]] || err_exit "${pat} matched." +pat="foo@bar" ; [[ "$(do_match "${pat}")" == "match" ]] || err_exit "${pat} not matched." +pat="foobar-" ; [[ "$(do_match "${pat}")" == "nomatch" ]] || err_exit "${pat} matched." +pat="foobar+" ; [[ "$(do_match "${pat}")" == "match" ]] || err_exit "${pat} not matched." +pat="foobar/" ; [[ "$(do_match "${pat}")" == "nomatch" ]] || err_exit "${pat} matched." +pat="foobar_" ; [[ "$(do_match "${pat}")" == "nomatch" ]] || err_exit "${pat} matched." +pat="foobar@" ; [[ "$(do_match "${pat}")" == "match" ]] || err_exit "${pat} not matched." +pat="-foobar" ; [[ "$(do_match "${pat}")" == "nomatch" ]] || err_exit "${pat} matched." +pat="+foobar" ; [[ "$(do_match "${pat}")" == "match" ]] || err_exit "${pat} not matched." +pat="/foobar" ; [[ "$(do_match "${pat}")" == "nomatch" ]] || err_exit "${pat} matched." +pat="_foobar" ; [[ "$(do_match "${pat}")" == "nomatch" ]] || err_exit "${pat} matched." +pat="@foobar" ; [[ "$(do_match "${pat}")" == "match" ]] || err_exit "${pat} not matched." + + +## test 2 (gsf's test chain): + +# Make sure LC_COLLATE has a value +if [[ ! -v LC_COLLATE ]] ; then + if [[ -v LANG && ! -v LC_ALL ]]; then + LC_COLLATE="${LANG}" + fi +fi + +if [[ -v LC_ALL ]] ; then + LC_COLLATE="${LC_ALL}" +fi + +[[ -v LC_COLLATE ]] || LC_COLLATE=C + +set -- \ + 'A' 0 1 1 0 1 1 1 0 0 1 0 0 \ + 'Z' 0 1 1 0 1 1 1 0 0 1 0 0 \ + '/' 0 0 0 0 0 0 1 1 1 1 1 1 \ + '.' 0 0 0 0 0 0 1 1 1 1 1 1 \ + '_' 0 0 0 0 0 0 1 1 1 1 1 1 \ + '-' 1 1 1 1 1 1 0 0 0 0 0 0 \ + '%' 0 0 0 0 0 0 1 1 1 1 1 1 \ + '@' 0 0 0 0 0 0 1 1 1 1 1 1 \ + '!' 0 0 0 0 0 0 1 1 1 1 1 1 \ + '^' 0 0 0 0 0 0 1 1 1 1 1 1 \ + # retain this line # +while (( $# >= 13 )) ; do + c=$1 + shift + for p in \ + '[![.-.]]' \ + '[![.-.][:upper:]]' \ + '[![.-.]A-Z]' \ + '[!-]' \ + '[!-[:upper:]]' \ + '[!-A-Z]' \ + '[[.-.]]' \ + '[[.-.][:upper:]]' \ + '[[.-.]A-Z]' \ + '[-]' \ + '[-[:upper:]]' \ + '[-A-Z]' \ + # retain this line # + do e=$1 + shift + [[ $c == $p ]] + g=$? + [[ $g == $e ]] || err_exit "[[ '$c' == $p ]] for LC_COLLATE=$l failed -- expected $e, got $g" + done +done + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..57de58997f --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh @@ -0,0 +1,123 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether ksh93 supports more than 256 recursive +# function+command substitution calls. +# +# This was reported as CR #6769332 ('Recursive function+command +# substitutions terminate shell after 257 iterations'): +# ------------ snip ------------ +# Recursive function+command substitutions +# (e.g. func1() { x=$( func2 ) ; } ; x=$( func1 ) ) terminate the +# ksh93 shell after 257 iterations with a exit code of "0" (it +# seems the shell just "quits" after the last "return 0" statement +# in the function). +# Running the attached testcase terminates the shell after 257 +# iterations (g=257 in the script) while 256 iterations (replace +# "257" with "256" in the script) just works fine. +# The same testcase works Ok in ksh88 (=/usr/bin/ksh in +# Solaris 10U5) +# +# Expected Result +# The script should output "done" and return the exit code 0. +# +# Actual Result +# No messsge. Exit code "0". +# +# Error Message(s) +# None (exit code is "0"). +# +# Test Case +# f1() +# { +# h=$1 +# (( h=h-1 )) +# (( h <= 0 )) && return 0 +# x=$(f1 "$h" "$l" "$g" d e "$l") || print -u2 "$g/$h: fail" +# return 0 +# } +# l="" +# g=257 +# i=0 +# while (( i < $g )) ; do +# l="${l}x" +# (( i=i+1 )) +# done +# f1 "$g" "$l" "$g" d e "$l" || print -u2 "$g: fail0" +# print "done" +# exit 0 +# +# Workaround +# - +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +# +# test1: Testcase from CR #6769332 +# +( +cat <<EOF +# make sure we have enougth stack (needed for 64bit SPARC and SystemZ) +ulimit -s 65536 + +f1() +{ + h=\$1 + (( h=h-1 )) + (( h <= 0 )) && return 0 + x=\$(f1 "\$h" "\$l" "\$g" d e "\$l") || print -u2 "\$g/\$h: fail" + return 0 +} +l="" +g=257 +i=0 +while (( i < \$g )) ; do + l="\${l}x" + (( i=i+1 )) +done +f1 "\$g" "\$l" "\$g" d e "\$l" || print -u2 "\$g: fail0" +print "done" +EOF +) | out="$( ${SHELL} 2>&1 ; )" || err_exit "Shell returned non-zero exit code $?." + +[[ "${out}" == "done" ]] || err_exit "Output expected to be 'done', got '${out}'." + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..d18a8c1513 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh @@ -0,0 +1,94 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether the arithmetric function "iszero" is available. +# +# This was reported as CR #6777491 ("*ksh93* lacks arithmetric function +# iszero()"): +# ------------ snip ------------ +# ksh93 lacks arithmetric function "iszero()" which limits the ability +# to classify floating-point values or even correctly match against +# zero (since IEEE754-1985/2008 floating-point math differs between +# positive and negaive zero values). +# Frequency +# Always +# Regression +# No +# Steps to Reproduce +# $ ksh93 -c '(( iszero(0) )) && print "0 is a zero"' +# Expected Result +# Output to stdout: +# -- snip -- +# 0 is a zero +# -- snip -- +# Actual Result +# ksh93 exists with: +# -- snip -- +# ksh93: iszero(0) : unknown function +# -- snip -- +# Error Message(s) +# ksh93: iszero(0) : unknown function +# Test Case +# ksh93 -c '(( iszero(0) )) && print "0 is a zero"' +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset str +integer i + +typeset -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 + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..8585613222 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh @@ -0,0 +1,82 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether ksh93 supports traps for the SIGTHAW +# signal. +# +# This was reported as CR #6778077 ("*ksh93* does not understand "THAW" +# as a signal for use with trap"): +# -- 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 -- +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +## test one: Check whether the shell supports SIGTHAW as trap +${SHELL} -o errexit -c 'trap "true" SIGTHAW ; true' || err_exit "SIGTHAW not supported." +${SHELL} -o errexit -c 'trap "true" THAW ; true' || err_exit "THAW not supported." +${SHELL} -o errexit -c 'trap "true" 35 ; true' || err_exit "signal 35 not supported." + + +## test two: Check whether the shell supports SIGFREEZE as trap +## (we check this since it is SIGTHAW's counterpart) +${SHELL} -o errexit -c 'trap "true" SIGFREEZE ; true' || err_exit "SIGFREEZE not supported." +${SHELL} -o errexit -c 'trap "true" FREEZE ; true' || err_exit "FREEZE not supported." +${SHELL} -o errexit -c 'trap "true" 34 ; true' || err_exit "signal 34 not supported." + + +## test three: Check all other signals listed by "kill -l" +kill -l | while read i ; do + str="$( ${SHELL} -c "trap true $i ; print 'ok'" 2>&1 )" || err_exit "shell returned code $? for trap $i" + [[ "${str}" == "ok" ]] || err_exit "expected 'ok', got $str" +done + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..c54733cba6 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh @@ -0,0 +1,129 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether arithmetric math correctly supports +# negative zero values +# +# This was reported as CR #6789247 ("libast/ksh93 1-digit hexfloat base conversion rounds incorrectly"): +# ---- snip ---- +# Description +# [The same issue was described in http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2008-December/006737.html] +# This is basically a spin-off of http://bugs.opensolaris.org/view_bug.do?bug_id=6773712 ("1-digit hex fp +# base conversion of long double rounds incorrectly"). +# 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); +# > printf("%.0La\n", 1.5L); +# > return 0; +# > } +# > leviathan% cc -o a a.c +# > leviathan% a +# > 0x1p+1 +# > 0x1p+0 +# > leviathan% +# If I compile the testcase with libast on Solaris 11/B84 SPARC (which +# matches ast-open.2008-11-04) I get this: +# -- snip -- +# $ cc -xc99=%all -I/usr/include/ast -last a.c -o a && +# ./a +# 0x1p+00 +# 0x1p+00 +# -- snip -- +# ... which seems to be incorrect per the bugs comment above and should +# be: +# -- snip -- +# 0x1p+1 +# 0x1p+1 +# -- snip -- +# ksh93 has the same problem: +# $ ksh93 -c 'float r=1.5 ; printf "%.0a\n" r' +# 0x1p+00 +# Steps to Reproduce +# Compile and run testcase like this: +# -- snip -- +# $ cc -xc99=%all -I/usr/include/ast -last a.c -o a && +# ./a +# -- snip -- +# Expected Result +# 0x1p+1 +# 0x1p+1 +# Actual Result +# 0x1p+00 +# 0x1p+00 +# ---- snip ---- +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +float r +float result +typeset str + +# Test #001/a - check whether the result of a rounded 1.5 is 2.0 +r=1.5 +result=$(printf "%.0a\n" r) || err_exit "printf returned non-zero exit code" +(( result == 2.0 )) || err_exit "result expected to be 2.0, got ${result}" + + +# Test #001/b - same as test #001/a but uses "%.0A\n" instead of "%.0a\n" +r=1.5 +result=$(printf "%.0A\n" r) || err_exit "printf returned non-zero exit code" +(( result == 2.0 )) || err_exit "result expected to be 2.0, got ${result}" + + +# Test #002/a - check whether the hexfloat string value matches the expected pattern +r=1.5 +str=$(printf "%.0a\n" r) || err_exit "printf returned non-zero exit code" +[[ "${str}" == ~(Glri)0x0*1p\+0*1 ]] || err_exit "str expected to match ~(Glri)0x0*1p\+0*1, got |${str}|" + + +# Test #002/b - same as test #002/a but uses "%.0A\n" instead of "%.0a\n" +r=1.5 +str=$(printf "%.0A\n" r) || err_exit "printf returned non-zero exit code" +[[ "${str}" == ~(Glri)0x0*1p\+0*1 ]] || err_exit "str expected to match ~(Glri)0x0*1p\+0*1, got |${str}|" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..8159526bda --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh @@ -0,0 +1,211 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test whether CR #6800929 ("snv_106 ksh93 update breaks Install(1M)") has been fixed. +# +# 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> +# $ pstack 204600 +# 204600: /bin/ksh /opt/onbld/bin/Install -o debug -k i86xpv -T domu-219:/tmp +# fffffd7fff2e3d1a write (1, 4154c0, 64) +# fffffd7ffefdafc8 sfwr () + 2d0 +# fffffd7ffefc0f6f _sfflsbuf () + 217 +# fffffd7ffefcb9f7 sfsync () + 17f +# fffffd7ffefc5c58 _sfphead () + 188 +# fffffd7ffefc5ef5 _sfpmove () + 55 +# fffffd7ffefc2595 _sfmode () + 22d +# fffffd7ffefc5fb1 sfpool () + 99 +# fffffd7fff15eb8e sh_exec () + 2f56 +# fffffd7fff15f78c sh_exec () + 3b54 +# fffffd7fff15d9c8 sh_exec () + 1d90 +# fffffd7fff15788e sh_subshell () + 646 +# fffffd7fff134562 comsubst () + 8a2 +# fffffd7fff12f61f copyto () + bcf +# fffffd7fff12df79 sh_macexpand () + 1f1 +# fffffd7fff1129f5 arg_expand () + a5 +# fffffd7fff112812 sh_argbuild () + 9a +# fffffd7fff15dbe2 sh_exec () + 1faa +# fffffd7fff15d854 sh_exec () + 1c1c +# fffffd7fff0f22ef b_dot_cmd () + 507 +# fffffd7fff161559 sh_funct () + 199 +# fffffd7fff15ef35 sh_exec () + 32fd +# fffffd7fff136e86 exfile () + 786 +# fffffd7fff136676 sh_main () + 7fe +# 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 +# $ set -- `cat /etc/termcap | sort | uniq` +# <hang> +# ---8<--- +# ---- snip ---- + + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +# common functions/variables +function isvalidpid +{ + kill -0 ${1} 2>/dev/null && return 0 + return 1 +} +integer testfilesize i maxwait +typeset tmpfile +integer testid + + +# test 1: run loop and check various temp filesizes +tmpfile="$(mktemp -t "sun_solaris_cr_6800929_large_command_substitution_hang.${PPID}.$$.XXXXXX")" || err_exit "Cannot create temporary file." + +compound -a testcases=( + # test 1a: Run test child for $(...) + # (note the pipe chain has to end in a builtin command, an external command may not trigger the bug) + ( name="test1a" cmd="builtin cat ; print -- \"\$(cat \"${tmpfile}\" | cat)\" ; true" ) + # test 1b: Same as test1a but uses ${... ; } instead if $(...) + ( name="test1b" cmd="builtin cat ; print -- \"\${ cat \"${tmpfile}\" | cat ; }\" ; true" ) + # test 1c: Same as test1a but does not use a pipe + ( name="test1c" cmd="builtin cat ; print -- \"\$(cat \"${tmpfile}\" ; true)\" ; true" ) + # test 1d: Same as test1a but does not use a pipe + ( name="test1d" cmd="builtin cat ; print -- \"\${ cat \"${tmpfile}\" ; true ; }\" ; true" ) + + # test 1e: Same as test1a but uses an external "cat" command + ( name="test1e" cmd="builtin -d cat /bin/cat ; print -- \"\$(cat \"${tmpfile}\" | cat)\" ; true" ) + # test 1f: Same as test1a but uses an external "cat" command + ( name="test1f" cmd="builtin -d cat /bin/cat ; print -- \"\${ cat \"${tmpfile}\" | cat ; }\" ; true" ) + # test 1g: Same as test1a but uses an external "cat" command + ( name="test1g" cmd="builtin -d cat /bin/cat ; print -- \"\$(cat \"${tmpfile}\" ; true)\" ; true" ) + # test 1h: Same as test1a but uses an external "cat" command + ( name="test1h" cmd="builtin -d cat /bin/cat ; print -- \"\${ cat \"${tmpfile}\" ; true ; }\" ; true" ) +) + +for (( testfilesize=1*1024 ; testfilesize <= 1024*1024 ; testfilesize*=2 )) ; do + # Create temp file + { + for (( i=0 ; i < testfilesize ; i+=64 )) ; do + print "0123456789abcdef01234567890ABCDEF0123456789abcdef01234567890ABCDE" + done + } >"${tmpfile}" + + # 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" & + (( childpid=$! )) + + for (( i=0 ; i < maxwait ; i++ )) ; do + isvalidpid ${childpid} || break + sleep 0.25 + done + + if isvalidpid ${childpid} ; then + err_exit "${currtst.name}: child (pid=${childpid}) still busy, filesize=${testfilesize}." + kill -KILL ${childpid} 2>/dev/null + fi + wait || err_exit "${currtst.name}: Child returned non-zero exit code." # wait for child (and/or avoid zombies/slime) + + # compare input/output + cmp -s "${tmpfile}" "${tmpfile}.out" || err_exit "${currtst.name}: ${tmpfile} and ${tmpfile}.out differ, filesize=${testfilesize}." + rm "${tmpfile}.out" + done + + # Cleanup + rm "${tmpfile}" +done + + +# test 2a: Edward Pilatowicz <edward.pilatowicz@sun.com>'s Solaris-specific testcase +${SHELL} -o errexit -c 'builtin uniq ; set -- `cat /etc/termcap | sort | uniq` ; true' >/dev/null & +(( childpid=$! )) +sleep 5 +if isvalidpid ${childpid} ; then + err_exit "test2a: child (pid=${childpid}) still busy." + kill -KILL ${childpid} 2>/dev/null +fi +wait || err_exit "test2a: Child returned non-zero exit code." # wait for child (and/or avoid zombies/slime) + + +# test 2b: Same as test 2a but uses ${... ; } instead of $(...) +${SHELL} -o errexit -c 'builtin uniq ; set -- ${ cat /etc/termcap | sort | uniq ; } ; true' >/dev/null & +(( childpid=$! )) +sleep 5 +if isvalidpid ${childpid} ; then + err_exit "test2b: child (pid=${childpid}) still busy." + kill -KILL ${childpid} 2>/dev/null +fi +wait || err_exit "test2b: Child returned non-zero exit code." # wait for child (and/or avoid zombies/slime) + + +# test 2c: Same as test 2a but makes sure that "uniq" is not a builtin +${SHELL} -o errexit -c 'builtin -d uniq /bin/uniq ; set -- `cat /etc/termcap | sort | uniq` ; true' >/dev/null & +(( childpid=$! )) +sleep 5 +if isvalidpid ${childpid} ; then + err_exit "test2c: child (pid=${childpid}) still busy." + kill -KILL ${childpid} 2>/dev/null +fi +wait || err_exit "test2c: Child returned non-zero exit code." # wait for child (and/or avoid zombies/slime) + + +# test 2d: Same as test 2c but uses ${... ; } instead of $(...) +${SHELL} -o errexit -c 'builtin -d uniq /bin/uniq ; set -- ${ cat /etc/termcap | sort | uniq ; } ; true' >/dev/null & +(( childpid=$! )) +sleep 5 +if isvalidpid ${childpid} ; then + err_exit "test2d: child (pid=${childpid}) still busy." + kill -KILL ${childpid} 2>/dev/null +fi +wait || err_exit "test2d: Child returned non-zero exit code." # wait for child (and/or avoid zombies/slime) + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh new file mode 100644 index 0000000000..be2037260b --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh @@ -0,0 +1,151 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether "typeset -m" correctly moves local variables +# into a global variable tree. +# +# This was reported as CR #6805792 ("XXXX"): +# -------- snip -------- +# The following attempt to move a local node into an associative array +# fails like this: +# -- snip -- +# typeset -C tree +# 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 +# printf "%B\n" tree +# print "ok" +# exit 0 +# -- snip -- +# The output looks like this: +# -- snip -- +# $ ksh93 +# varmovetest1.sh +# ( +# ( +# ) +# ok +# -- snip -- +# ... but AFAIK it should print: +# -- snip -- +# ( +# typeset -A subtree=( +# [a_node]=( +# one=hello +# two=world +# ) +# ) +# ) +# ok +# -- snip -- +# -------- snip -------- +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +## test start +compound 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 + + 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. + # (note that "f1" must be first function and the first being + # called, otherwise the crash will not occur) + nameref nodeone=node.one + nameref nodetwo=node.two + nodeone="hello" + nodetwo="world" + + # move local note into the array + 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'"$(diff -u <( printf '%B\n' tree1 ) <( printf '%B\n' tree2 ) )" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..4176b62015 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh @@ -0,0 +1,105 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether arithmetric operator '<character> +# is working +# +# This was reported as CR #6805794 ('[ku1] printf returns "invalid character constant" for $ printf "%d\n" "'<euro>"'): +# ------------ snip ------------ +# There seems be a bug in how ast-ksh.2008-11-04's "printf" builtin +# handles multibyte characters. For example if I try this in the +# en_US.UTF-8 locale ("<euro>" needs to be replace with the EURO symbol): +# -- snip -- +# $ printf "%d\n" "'<euro>" +# -ksh93: printf: warning: ': invalid character constant +# 226 +# -- snip -- +# AFAIK the correct behaviour was to return the numeric value of the +# <euro> symbol in this case (hexadecimal "20ac", decimal 8364), e.g. +# -- snip -- +# $ printf "%d\n" +# "'<euro>" +# 8364 +# -- snip -- +# Frequency +# Always +# Regression +# No +# Steps to Reproduce +# Enter this in an interractive shell: +# $ printf "%d\n" "'<euro>" +# Expected Result +# -- snip -- +# $ printf "%d\n" +# "'<euro>" +# 8364 +# -- snip -- +# Actual Result +# -- snip -- +# $ printf "%d\n" "'<euro>" +# -ksh93: printf: warning: ': invalid character constant +# 226 +# -- snip -- +# Error Message(s) +# printf: warning: ': invalid character constant +# Test Case +# printf "%d\n" "'<euro>" +# Workaround +# None. +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +# declare variables +typeset str + +# test whether the locale uses an UTF-8 (-like) encoding and override it on demand +[[ "$(printf "\u[20ac]")" == $'\342\202\254' ]] || LC_ALL=en_US.UTF-8 +if [[ "$(printf "\u[20ac]")" != $'\342\202\254' ]] ; then + err_exit "Local overrride failed." + exit $((Errors)) +fi + +# run test +str=$(print $'printf "%d\\\\n" "\'\342\202\254"' | source /dev/stdin) +[[ "${str}" == "8364" ]] || err_exit "expected 8364, got ${str}" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..5d3e50b486 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh @@ -0,0 +1,169 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether arithmetric math correctly supports +# negative zero values +# +# This was reported as CR #6805795 ("[ku1] ksh93 does not differ between -0 and +0"): +# ------------ snip ------------ +# Original bug report was: +# ------ snip ------ +# Is there a reason why ksh93 does not display the negative sign for the +# value zero ? For example if I have use the C99 function "copysign" +# (copies absolute value of operant a and sign of operant b) I get this +# for { a=5, b=-0 }: +# -- snip -- +# $ ksh93 -c 'float x; (( x=copysign(5, -0) )) ; printf "%f\n" +# x' +# -5.000000 +# -- snip -- +# Now if I swap operands a and b I get this result: +# -- snip -- +# $ ksh93 -c 'float x; (( x=copysign(0, -5) )) ; printf "%f\n" x' +# 0.000000 +# -- snip -- +# AFAIK this result should be "-0.000000" ... or not ? +# BTW: Parsing of "-0" doesn't seem to work either, e.g. +# -- snip -- +# $ ksh93 -c 'float x a=-1 b=-0; (( x=copysign(a, b) )) ; printf "%f\n" +# x' +# 1.000000 +# -- snip -- +# ... while AFAIK it should be "-1.000000" since the 2nd operand of +# "copysign" defines the sign of the result. +# ------ snip ------ +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset str + +# test 1: test "copysign()" using constant values +str=$( + set -o errexit + + print -- $(( copysign(0, -5) )) + ) || err_exit "test failed." +[[ "${str}" == "-0" ]] || err_exit "Expected copysign(0, -5) == -0, got ${str}" + + +# test 2: Same as test 1 but using variables for the values +str=$( + set -o errexit + + float a + float b + float c + + a=0. + b=-5. + + (( c=copysign(a, b) )) + + print -- "$c" + ) || err_exit "test failed." +[[ "${str}" == "-0" ]] || err_exit "Expected c == -0, got ${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}" + + +# test 4: test "signbit()" +str=$( + set -o errexit + + float a + float c + + a=-0. + + (( c=signbit(a) )) + + print -- "$c" + ) || err_exit "test failed." +[[ "${str}" == "1" ]] || err_exit "Expected c == 1, got ${str}" + + +# test 5: test whether "typeset -X" (C99 "hexfloat") correctly recognizes +# 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}" + + +# test 6: Reverse of test 5: Test whether "float" correctly recognizes +# 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}" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..79b0c24f85 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh @@ -0,0 +1,88 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether ksh93 does unneccesaty |libc::getpwnam()| +# calls for "~(modifer)pattern"-style shell patterns +# +# This was reported as CR #6807179 ("ksh93 does unneccesary |libc::getpwnam()| lookups for ~(modifier) pattern patterns"): +# ------------ snip ------------ +# ksh93 does unneccesary |libc::getpwnam()| lookups for +# ~(modifer)pattern patterns, e.g. [[ $foo == ~(E)hello.*world ]]. +# The problem is that the shell ~(modifer)pattern is an extended +# pattern syntax which allows to specify a "modifer" to change +# the behaviour for "pattern". However the '~' at the beginning +# of this string is causing a tilde expansion (or better: It's +# filling an internal buffer as preparation for tilde expansion +# and this code calls |libc::getpwnam()|) which shouldn't be +# done in this case. +# [1]=For example the "modifer" allows to specifcy "perl", +# "fgrep", "grep", "egrep", "POSIX shell", "korn shell" and +# other types of pattern matching systems (or select stuff +# like archors, case-insensitive matching etc. etc.). +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset tmpfile + +tmpfile="$(mktemp -t "sun_solaris_cr_6807179_shellpattern_uses_getpwnam.${PPID}.$$.XXXXXX")" || err_exit "Cannot create temporary file." +rm -f "${tmpfile}" + + +# test 1: Check if the shell uses |libc::getpwnam()| for pattern "~(Elr)wo.*ld" +truss -u :: -o "${tmpfile}" ${SHELL} -c '[[ ${hello} == ~(Elr)wo.*ld ]] ; true' || err_exit "truss returned failure=$?" +[[ "$( < "${tmpfile}")" != *getpwnam* ]] || err_exit "truss log reports the use of getpwnam() for pattern ~(Elr)wo.*ld" +rm "${tmpfile}" || err_exit "rm ${tmpfile} failed." + + +# test 2: Check if the shell uses |libc::getpwnam()| for pattern "~(Si)wo*ld" +truss -u :: -o "${tmpfile}" ${SHELL} -c '[[ ${hello} == ~(Si)wo*ld ]] ; true' || err_exit "truss returned failure=$?" +[[ "$( < "${tmpfile}")" != *getpwnam* ]] || err_exit "truss log reports the use of getpwnam() for pattern ~(Si)wo*ld" +rm "${tmpfile}" || err_exit "rm ${tmpfile} failed." + + +# test 3: Same as test 1 but uses ~root/ as pattern which will force the use of |libc::getpwnam()| +getent passwd root >/dev/null || err_exit "getent passwd root failed" # safeguard to make sure we get a warning if user root is missing + +truss -u :: -o "${tmpfile}" ${SHELL} -c '[[ ${hello} == ~root/ ]] ; true' || err_exit "truss returned failure=$?" +[[ "$( < "${tmpfile}" )" == *getpwnam* ]] || err_exit "truss log reports the use of getpwnam() for pattern ~root/" +rm "${tmpfile}" || err_exit "rm ${tmpfile} failed." + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..6945b64985 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh @@ -0,0 +1,138 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether ksh93's builtin "cat" command properly +# supports the "-n" option. +# +# This was reported as CR #6835835 ('ksh93 "cat" builtin does not handle "-n" correctly'): +# ------------ snip ------------ +# [Originally reported in +# http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/007050.html +# by Casper Dik] +# -- snip -- +# I just noticed this in ksh93: +# ksh93 -c 'yes "" | head -5|cat -n' +# 1 +# 2 +# 3 +# 4 +# (I used this for older shells when I want to a list of all integers from 1 +# to a particular number) +# -- snip -- +# Frequency +# Always +# Regression +# No +# Steps to Reproduce +# Execute $ ksh93 -c 'yes "" | head -5|cat -n' # +# Expected Result +# 1 +# 2 +# 3 +# 4 +# 5 +# Actual Result +# +# +# 1 +# 2 +# +# 3 +# +# 4 +# Error Message(s) +# None. +# Test Case +# See description. +# Workaround +# Disable ksh93's builtin "cat" command either via using an absolute path +# to the "cat" command (POSIX-style workaround) or using ksh93's +# "builtin" command to remove "cat" from the list of builtin +# commands (e.g. $ builtin -d /bin/cat /usr/bin/cat #). +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +# +# test 1: Compare output of various "cat -n" combinations +# +integer i +typeset expected_output +typeset out + +expected_output=$( ${SHELL} -c 'for ((i=1 ; i <= 12 ; i++ )) ; do printf "%6d\t\n" i ; done' ) + +compound -a testcases=( + # note: we have to add an extra /usr/bin/cat at the end of the pipe to make + # sure the "cat" builtin uses the correct buffering mode to trigger + # the error and a "true" to make sure the "cat" command isn't the last command + # of the shell + ( name="test1a" cmd='integer i ; builtin cat ; for ((i=1 ; i <= 12 ; i++ )) ; do print ; done | cat -n | /usr/bin/cat ; true' ) + # same as "test1a" but uses external "cat" command + ( name="test1b" cmd='integer i ; for ((i=1 ; i <= 12 ; i++ )) ; do print ; done | /usr/bin/cat -n | /usr/bin/cat ; true' ) + + # same as "test1a" but without the last /usr/bin/cat in the pipe + ( name="test1c" cmd='integer i ; builtin cat ; for ((i=1 ; i <= 12 ; i++ )) ; do print ; done | cat -n ; true' ) + # same as "test1b" but without the last /usr/bin/cat in the pipe + ( name="test1d" cmd='integer i ; for ((i=1 ; i <= 12 ; i++ )) ; do print ; done | /usr/bin/cat -n ; true' ) +) + +for testid in "${!testcases[@]}" ; do + nameref tc=testcases[${testid}] + + out="$( ${SHELL} -o errexit -c "${tc.cmd}" )" || err_exit "${tc.name}: Shell failed" + [[ "${expected_output}" == "${out}" ]] || err_exit "${tc.name}: Builtin output does not match expected output" + + out="$( ${SHELL} +o errexit -c "${tc.cmd}" )" || err_exit "${tc.name}: Shell failed" + [[ "${expected_output}" == "${out}" ]] || err_exit "${tc.name}: Builtin output does not match expected output" +done + + +# +# test 2: Casper Dik's original testcase +# from http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/007050.html +# + +cmp -s \ + <( ${SHELL} -c 'yes "" | head -5 | cat -n' ) \ + <( for ((i=1 ; i <= 5 ; i++ )) ; do printf "%6d\t\n" i ; done ) \ + || err_exit 'yes "" | head -5 | cat -n does not match expected output.' + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..f4e6096d22 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh @@ -0,0 +1,93 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether ksh93 does not execute builtin command +# "foo" when referencing variable "foo" when the variable is not +# set (this applies to all builtin commands not bound to a +# specific PATH element, e.g. "test", "sleep", "print" etc.). +# +# This was reported as CR #6848486 ('"echo ${test}" with test +# undefined crashes the shell') +# ------------ snip ------------ +# This is an odd one: +# +# $ ksh93 --version +# version sh (AT&T Research) 93t 2008-11-04 +# $ ksh93 +# jl138328@gir:~$ echo $test +# +# jl138328@gir:~$ echo ${test} +# Segmentation Fault (core dumped) +# ------------ snip ------------ +# +# The bug originates from the ksh93 "type system" which allows +# an application to define it's own types in ksh93. In such cases +# the output of function "mytype.len" is used when type "mytype" +# has no member variable "len" (note it requires the use of +# ${foo} since the use of $foo does not allow "foo" to contain +# a dot in the variable name). +# The implementation in ast-ksh.2009-11-04 however does this +# for _all_ types of variables and not only for those which +# are a member of an application-defined type, therefore +# causing this bug. +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +# Test 1: Test whether the shell crashes when looking for an empty +# "shell" variable. +# (note: return code 78 was just picked randomly) +$SHELL -c 'unset test ; print ${test} ; exit 78' >/dev/null 2>&1 +(( $? == 78 )) || err_exit "expected return code is 78, got $?" + + +# Test 2: Test whether the shell can reach a point (which prints +# "#mark") after the use of ${test} in the script. +out=$($SHELL -o errexit -c 'unset test ; print ${test} ; print "#mark"' 2>&1 ) || err_exit "Shell returned error code $?, expected 0." +[[ "$out" == $'\n#mark' ]] || err_exit "Expected output \$'\n#mark', got '${out}'" + + +# Test 3: Check whether the use of ${sleep} returns nothing +# (ast-ksh.2008-11-04 will return the usage string of the sleep +# builtin) +out=$($SHELL -o errexit -c 'print ${sleep} ; print "#mark"' 2>&1 ) || err_exit "Shell returned error code $?, expected 0." +[[ "$out" == $'\n#mark' ]] || err_exit "Expected output \$'\n#mark', got '${out}'" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..fa3f32da1b --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh @@ -0,0 +1,144 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether arithmetric math correctly +# converts a IEEE 754-2008 floating-point value to the C99 hexfloat format +# and back _without_ using digits. +# +# This was reported as CR #6855875 ("typeset -X x ; print $x # does not +# print sufficient digits to restore value"): +# ------------ snip ------------ +# $ typeset -X varname # was added to ksh93 to get a reliable way +# (using the C99 "hexfloat" format (see printf(3c)'s "%a" format)) to +# serialise a IEEE754-2008 floating-point value to a string and later feed +# it back into a application _without_ loosing any precision (normal +# base10 floating-point values (e.g. used by $ typeset -E/-F-G #) cause +# rounding errors since IEEE754-2008 |long double| uses base2). +# However $ typeset -l -X x ; ... ; print $x # currently does not print +# sufficient number of digits to restore the full |long double| value as +# expected, instead some digits are missing, resulting in an unwanted +# rounding. +# Example: +# -- snip -- +# $ ksh93 -c 'typeset -l -X y y_ascii; (( y=sin(90) )) ; y_ascii=$y ; (( y +# == y_ascii )) || print "no match,\n\t$(printf "%a\n" y)\n!=\n\t$(printf +# "%a\n" y_ascii)"' +# no match, +# 0x1.c9b9ee41cb8665c7890a136ace6bp-01 +# != +# 0x1.c9b9ee41cc000000000000000000p-01 +# -- snip -- +# Frequency +# Always +# Regression +# No +# Steps to Reproduce +# [See description] +# Expected Result +# [See description] +# Actual Result +# [See description] +# Error Message(s) +# - +# Test Case +# typeset -l -X y y_ascii +# (( y=sin(90) )) +# y_ascii=$y # convert y to string and store it in "y_ascii" +# if (( y == y_ascii )) ; then +# print "no match,\n\t$(printf "%a\n" y)\n!=\n\t$(printf "%a\n" +# y_ascii)" +# fi +# Workaround +# 1. Manually increase the number of digits via typeset +# -X<numdigits> +# OR +# 2. Use $ printf "%a" varname # +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +# declare variables +typeset str +integer i +float x +float -a test_values + +typeset -l -X y # hexfloat +typeset -l -E y_restored1 +typeset -l -F y_restored2 +typeset -l -X y_restored3 + + +# create array of test values +for (( x=-181. ; x < 361. ; x+=.1 )) ; do + test_values+=( x ) +done +test_values+=( 0 -0 +0 ) # (nan -nan inf -inf) are excluded since nan!=nan is always "true" + + +# run the tests +for (( i=0 ; i < ${#test_values[@]} ; i++ )) ; do + (( y=sin(test_values[i]) )) + + # convert floating-point value to string (using the hexfloat format) and store it in "str" + str="${y}" + + # convert it back (via string assignment) + y_restored1="${str}" + y_restored2="${str}" + y_restored3="${str}" + (( y == y_restored1 )) || err_exit "no match,"$'\n\t'"$(printf "%a\n" y)"$'\n'"!="$'\n\t'"$(printf "%a\n" y_restored1)" + (( y == y_restored2 )) || err_exit "no match,"$'\n\t'"$(printf "%a\n" y)"$'\n'"!="$'\n\t'"$(printf "%a\n" y_restored2)" + (( y == y_restored3 )) || err_exit "no match,"$'\n\t'"$(printf "%a\n" y)"$'\n'"!="$'\n\t'"$(printf "%a\n" y_restored3)" + + # convert it back (using arithmetric expression) + (( y_restored1=str )) + (( y_restored2=str )) + (( y_restored3=str )) + (( y == y_restored1 )) || err_exit "no match,"$'\n\t'"$(printf "%a\n" y)"$'\n'"!="$'\n\t'"$(printf "%a\n" y_restored1)" + (( y == y_restored2 )) || err_exit "no match,"$'\n\t'"$(printf "%a\n" y)"$'\n'"!="$'\n\t'"$(printf "%a\n" y_restored2)" + (( y == y_restored3 )) || err_exit "no match,"$'\n\t'"$(printf "%a\n" y)"$'\n'"!="$'\n\t'"$(printf "%a\n" y_restored3)" + + # we exit if we get more than 8 errors (126 would be the maximum) + (( Errors > 8 )) && exit $((Errors)) +done + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..11ccdc7572 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh @@ -0,0 +1,110 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether the Solaris kernel can directly execute compiled +# shell code. +# +# This was reported as CR #6862121 ("shbinexec kernel module defunct"): +# ------------ snip ------------ +# [Originally reported by Sun Japan] +# The new shbinexec kernel module added in B106 is defunct, originally +# caused by my mismerge of the original development tree and later +# because the matching test module didn't test it correctly (April +# quickly discovered the problem but the issue drowned in the cleanup +# putbacks ). +# Frequency +# Always +# Regression +# No +# Steps to Reproduce +# $ cat test1.sh +# print hello +# printf "args=%s\n" "$@" +# $ shcomp test1.sh test1 +# # note: this MUST be bash since ksh93 has special support for compiled shell +# # scripts which causes the kernel module to be bypassed (that's why the tes +# # never worked) +# $ bash -c './test1 "a b" "c" "d"' +# Expected Result +# hello +# args=a a1 +# args=b +# args=c +# Actual Result +# ./test1: line 1: a: not found +# Error Message(s) +# ./test1: line 1: a: not found +# Test Case +# See above. +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset ocwd +typeset tmpdir +typeset out + +# create temporary test directory +ocwd="$PWD" +tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.XXXXXXXX")" || err_exit "Cannot create temporary directory" + +cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } + + +# run tests +{ +cat <<EOF + print hello + printf "args=%s\n" "\$@" +EOF +} >script1.sh + +# Compile script (note we use the platform's /usr/bin/shcomp, _not_ ${SHCOMP}) +/usr/bin/shcomp "script1.sh" "script1" || err_exit "shcomp failed with error=$?" + +[[ -x "./script1" ]] || err_exit "Script script1 not executable" +out="$(/usr/bin/bash -c './script1 a b "c d"' 2>&1 )" || err_exit "Compiled script failed to execute, error=$?" +[[ "${out}" == $'hello\nargs=a\nargs=b\nargs=c d' ]] || err_exit "Expected xxx, got $(printf "%q\n" "$out")" + +# cleanup +rm "script1" "script1.sh" +cd "${ocwd}" +rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}". + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..28da9597db --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh @@ -0,0 +1,81 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether a background process called in a subshell can +# cause it to wait for the child process instead of exiting. +# +# This was reported as CR #6881017 ("Subshell doesn't exit, holds pipe +# 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 +# the output and hangs on the open pipe. It was hard to track down. +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +float tstart tstop tdiff + +# run test with 10 second timeout +(( tstart=SECONDS )) +$SHELL -c '( sleep 10 </dev/null >/dev/null 2>&1 & ) ; exit 0' | cat >/dev/null +(( tstop=SECONDS )) + +# we remove two seconds below to make sure we don't run into issues +# with smaller xntpd adjustments +(( tdiff=tstop-tstart )) +(( tdiff < (10.-2.) )) || err_exit "test run needed ${tdiff} seconds to complete (instead of < 8.)" + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..4c17d4785f --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh @@ -0,0 +1,183 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether the return code of a child process +# is reported properly. +# +# This was reported as CR #6887363 ("Korn shell 93 sometimes +# mishandles return value of its child process"): +# ------------ snip ------------ +# Following construction sometimes ends with wrong return value. +# +# 56 echo $op | grep rand 2>&1 >/dev/null +# 57 if [ $? = 0 ]; then +# 58 randseq="rand${SEED}" +# 59 else +# 60 randseq="seq" +# 61 fi +# +# Sometimes, the given result is "rand..." even when there is +# no "rand" word in $op. This can be demonstrated with +# TSufs/SnapShots/Func test case which excercises shown code +# quite often. +# +# As it happens only sometimes, I suppose there is an +# race-condition in handling return value from a child process. +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset ocwd +typeset tmpdir +typeset out + +# create temporary test directory +ocwd="$PWD" +tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.XXXXXXXX")" || err_exit "Cannot create temporary directory" + +cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } + + +# run tests + +# print test case from bug that ksh93 can read this script via stdin +function cat_test +{ +cat <<EOF +#!/bin/sh +# +# Test derived from Sun's SnapShots Functional Suite +# + +export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin + +# WARNING: make sure "expr" and "grep" are _external_ commands in this test + +# start test +_pcnt=0 + +PASS(){ + _pcnt=\`/usr/bin/expr \$_pcnt + 1\` + true +} + +doblockstamper() { + output=\`/usr/bin/sleep .01\` + _status=\$? + + PASS "Here I am" +} + +lotsaFiles() { + OPS="read-seq read-rand syncread-seq syncread-seq" + echo \$OPS + for op in \$OPS; do + echo \$op + echo \$op | /usr/bin/grep rand 2>&1 >/dev/null + status=\$? + if [ \$status = 0 ]; then + randseq="rand" + phrase="read-rand" + else + randseq="seq" + phrase="read-seq" + fi + retcode=\$status + + echo \$op | /usr/bin/grep sync 2>&1 >/dev/null + status=\$? + if [ \$status = 0 ]; then + syncasync="sync" + phrase="sync\$phrase" + else + syncasync="async" + fi + retcode=\${status}-\${retcode} + + if [ "\$op" != "\$phrase" ]; then + echo "Bad mode: \$op != \$phrase (\$retcode)" + exit 2 + fi + + for sz in 1 2 3 4; do + for type in 1 2 3 4; do + PASS "Something" + doblockstamper & + done + wait # Let a few finish + done + done + + wait # Make sure everyone got done + + PASS "lotsafiles \$1 \$fill" +} + +cycle=0 +while [ cycle -lt 24 ]; do + cycle=\`/usr/bin/expr \$cycle + 1\` + + lotsaFiles write + lotsaFiles write + lotsaFiles write + + lotsaFiles read + lotsaFiles read + lotsaFiles read + + PASS "Cycle" +done +exit 0 +EOF +} + +# FIXME: we reset the VMALLOC_OPTIONS (and the depreciated VMDEBUG (for now)) variable for the run to avoid +# that the test may run for hours. This may require re-investigation why this happens. +out="$(unset VMALLOC_OPTIONS VMDEBUG ; cat_test | ${SHELL} 2>&1)" || err_exit "Unexpected exit code $?" +[[ "${out}" != "" ]] || err_exit "No output from test" + +# filter output and check it +out2="$(/usr/bin/egrep -v '^((read-seq|read-rand|syncread-seq|syncread-seq)[[:space:][:blank:]]*)*$' <<<"${out}")" +[[ "${out2}" == "" ]] || err_exit "Unexpected output '${out2}'" + + +cd "${ocwd}" +rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}". + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..018c80b635 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh @@ -0,0 +1,174 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether "wc" builtin counts the number of bytes +# and multibyte characters in different locales correctly. +# +# This was reported as CR #6904557 ("wc no longer counts number of +# bytes correctly"): +# ------------ snip ------------ +# wc no longer count bytes. +# +# $ echo $LANG +# en_US.UTF-8 +# $ ls -l mb.utf8 +# -rw-r--r-- 1 nakanon staff 7 Nov 2 14:06 mb.utf8 +# $ wc mb.utf8 +# 1 1 4 mb.utf8 +# $ +# +# mb.utf8 is attached. +# +# Man page says: +# +# If no option is specified, the default is -lwc (counts +# lines, words, and bytes.) +# +# SUS says: +# http://www.opengroup.org/onlinepubs/000095399/utilities/wc.html +# +# By default, the standard output shall contain an entry for each +# input file of the form: +# +# "%d %d %d %s\n", <newlines>, <words>, <bytes>, <file> +# +# If the -m option is specified, the number of characters shall +# replace the <bytes> field in this format. +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset ocwd +typeset tmpdir +typeset out + +# create temporary test directory +ocwd="$PWD" +tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.XXXXXXXX")" || err_exit "Cannot create temporary directory" + +cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } + + +# run tests + +function test1 +{ + typeset wc_cmd="$1" + typeset testid + typeset out + typeset testname + compound saved_locale + + # save locale information + [[ -v LC_ALL ]] && saved_locale.LC_ALL="${LC_ALL}" + [[ -v LC_CTYPE ]] && saved_locale.LC_CTYPE="${LC_CTYPE}" + [[ -v LANG ]] && saved_locale.LANG="${LANG}" + + compound -r -a testcases=( + ( + typeset name="unicode_plain" + typeset locale="<unicode>" + typeset input_format='\xc3\xa1\xc3\xa2\xc3\xa3\x0a' + typeset output_pattern='~(Elr)[[:space:][:blank:]]*1[[:space:][:blank:]]*1[[:space:][:blank:]]*7' + typeset -a wc_args=( ) + ) + ( + typeset name="unicode_clw" + typeset locale="<unicode>" + typeset input_format='\xc3\xa1\xc3\xa2\xc3\xa3\x0a' + typeset output_pattern='~(Elr)[[:space:][:blank:]]*1[[:space:][:blank:]]*1[[:space:][:blank:]]*7' + typeset -a wc_args=( "-c" "-l" "-w" ) + ) + ( + typeset name="unicode_widechars_lines_words" + typeset locale="<unicode>" + typeset input_format='\xc3\xa1\xc3\xa2\xc3\xa3\x0a' + typeset output_pattern='~(Elr)[[:space:][:blank:]]*1[[:space:][:blank:]]*1[[:space:][:blank:]]*4' + typeset -a wc_args=( "-C" "-l" "-w" ) + ) + ( + typeset name="ja_JP.eucJP_plain" + typeset locale="ja_JP.eucJP" + typeset input_format='\x74\x32\xa1\xf7\x66\x31\x0a' + typeset output_pattern='~(Elr)[[:space:][:blank:]]*1[[:space:][:blank:]]*1[[:space:][:blank:]]*7' + typeset -a wc_args=( ) + ) + ( + typeset name="ja_JP.eucJP_widechars_lines_words" + typeset locale="ja_JP.eucJP" + typeset input_format='\x74\x32\xa1\xf7\x66\x31\x0a' + typeset output_pattern='~(Elr)[[:space:][:blank:]]*1[[:space:][:blank:]]*1[[:space:][:blank:]]*6' + typeset -a wc_args=( "-C" "-l" "-w" ) + ) + ) + + for testid in "${!testcases[@]}" ; do + nameref tc=testcases[${testid}] + testname="${wc_cmd}/${tc.name}" + + if [[ "${tc.locale}" == "<unicode>" ]] ; then + if [[ "$LC_ALL" != *.UTF-8 ]] ; then + export LC_ALL='en_US.UTF-8' + fi + else + export LC_ALL="${tc.locale}" + fi + + out="$(printf "${tc.input_format}" | ${SHELL} -c "${wc_cmd} \"\$@\"" dummy "${tc.wc_args[@]}" 2>&1)" || err_exit "${testname}: Command returned exit code $?" + [[ "${out}" == ${tc.output_pattern} ]] || err_exit "${testname}: Expected match for $(printf "%q\n" "${tc.output_pattern}"), got $(printf "%q\n" "${out}")" + + # restore locale settings + [[ -v saved_locale.LC_ALL ]] && LC_ALL="${saved_locale.LC_ALL}" || unset LC_ALL + [[ -v saved_locale.LC_CTYPE ]] && LC_CTYPE="${saved_locale.LC_CTYPE}" || unset LC_CTYPE + [[ -v saved_locale.LANG ]] && LANG="${saved_locale.LANG}" || unset LANG + done + + return 0 +} + +#for cmd in "wc" "/usr/bin/wc" ; do +for cmd in "wc" ; do + test1 "${cmd}" +done + + +cd "${ocwd}" +rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}". + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..05c1095957 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh @@ -0,0 +1,193 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether the AST "cut" utility's "-d" option +# works with multibyte characters +# +# This was reported as CR #6904575 ("cut -d with multibyte character no longer works"): +# ------------ snip ------------ +# cut -d with multibyte char no longer work correctly. +# +# $ echo $LANG +# ja +# $ od -tx1 mb.eucjp +# 0000000 a4 a2 a4 a4 a4 a4 a4 a6 a4 a8 0a +# 0000013 +# $ od -tx1 delim +# 0000000 a4 a4 0a +# 0000003 +# $ wc -m mb.eucjp +# 6 mb.eucjp +# +# It has 5 characters (2byte each). +# +# $ /usr/bin/cut -d `cat delim` -f1 mb.eucjp | od -tx1 +# 0000000 0a +# 0000001 +# +# correct output is +# +# 0000000 a4 a2 0a +# 0000003 +# +# files are attached. +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset ocwd +typeset tmpdir +typeset out + +# create temporary test directory +ocwd="$PWD" +tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.XXXXXXXX")" || err_exit "Cannot create temporary directory" + +cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } + + +# run tests + + +function test1 +{ + typeset cut_cmd="$1" + typeset testid + typeset out + typeset testname + compound saved_locale + + # save locale information + [[ -v LC_ALL ]] && saved_locale.LC_ALL="${LC_ALL}" + [[ -v LC_CTYPE ]] && saved_locale.LC_CTYPE="${LC_CTYPE}" + [[ -v LANG ]] && saved_locale.LANG="${LANG}" + + compound -r -a testcases=( + ( + typeset name="ascii_plain" + typeset locale="C" + typeset input_format='abcdefg' + typeset -a cut_args_format=( "-f1" "-d" "e" ) + typeset output_format='abcd' + ) + ( + typeset name="unicode_plain" + typeset locale="<unicode>" + typeset input_format='abcd\u[20ac]fg' + typeset -a cut_args_format=( '-f1' '-d' '\u[20ac]' ) + typeset output_format='abcd' + ) + ( + typeset name="unicode_plain2" + typeset locale="<unicode>" + typeset input_format='abcd\u[20ac]fg' + typeset -a cut_args_format=( '-f1' '-d' 'f' ) + typeset output_format='abcd\u[20ac]' + ) + ) + + for testid in "${!testcases[@]}" ; do + nameref tc=testcases[${testid}] + testname="${cut_cmd}/${tc.name}" + + if [[ "${tc.locale}" == "<unicode>" ]] ; then + if [[ ! -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 $?" + [[ "${out}" == ${output_format} ]] || err_exit "${testname}: Expected match for $(printf "%q\n" "${output_format}"), got $(printf "%q\n" "${out}")" + + # cleanup and restore locale settings + unset cut_args arg_index + [[ -v saved_locale.LC_ALL ]] && LC_ALL="${saved_locale.LC_ALL}" || unset LC_ALL + [[ -v saved_locale.LC_CTYPE ]] && LC_CTYPE="${saved_locale.LC_CTYPE}" || unset LC_CTYPE + [[ -v saved_locale.LANG ]] && LANG="${saved_locale.LANG}" || unset LANG + done + + return 0 +} + + +function test2 +{ + typeset cutcmd=$1 + typeset testname="${cutcmd}" + typeset out + + # create files + printf "\xa4\xa2\xa4\xa4\xa4\xa4\xa4\xa6\xa4\xa8\x0a" >"mb.eucjp" + printf "\xa4\xa4\x0a" >"delim" + + # run test + out=$( LC_ALL=ja_JP.eucJP ${SHELL} -o pipefail -o errexit -c '$1 -d $(cat delim) -f1 "mb.eucjp" | od -tx1' dummy "${cutcmd}" 2>&1 ) || err_exit "${testname}: Test failed with exit code $?" + [[ "${out}" == $'0000000 a4 a2 0a\n0000003' ]] || err_exit "${testname}: Expected \$'0000000 a4 a2 0a\n0000003', got $(printf "%q\n" "${out}")" + + # cleanup + rm "mb.eucjp" "delim" + + return 0 +} + +#for cmd in "/usr/bin/cut" "cut" ; do +for cmd in "cut" ; do + test1 "${cmd}" + test2 "${cmd}" +done + + + +cd "${ocwd}" +rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}". + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..2892401ede --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh @@ -0,0 +1,190 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether the AST "join" utility works with +# multibyte characters as seperator. +# +# This was reported as CR #6904878 ("join -t no longer works with multibyte char separator"): +# ------------ snip ------------ +# join doesn't handle multibyte separator correctly. +# +# $ echo $LANG +# ja +# $ od -tx1 input1 +# 0000000 66 31 a1 f7 66 32 0a +# 0000007 +# $ od -tx1 input2 +# 0000000 74 32 a1 f7 66 31 0a +# 0000007 +# # 0xa1 0xf7 in the file is multibyte character. +# $ od -tx1 delim +# 0000000 a1 f7 0a +# 0000003 +# +# $ /usr/bin/join -j1 1 -j2 2 -o 1.1 -t `cat delim` input1 input2 +# $ +# +# It should output "f1". +# +# files are attached. +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset ocwd +typeset tmpdir +typeset out + +# create temporary test directory +ocwd="$PWD" +tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.XXXXXXXX")" || err_exit "Cannot create temporary directory" + +cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } + + +# run tests + + +function test1 +{ + typeset join_cmd="$1" + typeset testid + typeset out + typeset testname + compound saved_locale + + # save locale information + [[ -v LC_ALL ]] && saved_locale.LC_ALL="${LC_ALL}" + [[ -v LC_CTYPE ]] && saved_locale.LC_CTYPE="${LC_CTYPE}" + [[ -v LANG ]] && saved_locale.LANG="${LANG}" + + compound -r -a testcases=( + ( + typeset name="ascii_simple" + typeset locale="C" + typeset input1_format="fish 81 91\n" + typeset input2_format="fish B A\n" + typeset -a join_args_format=( "input1" "input2" ) + typeset output_format="fish 81 91 B A" + ) + ( + typeset name="ja_JP.eucJP_multibyte_delimiter" + typeset locale="ja_JP.eucJP" + typeset input1_format="\x66\x31\xa1\xf7\x66\x32\x0a" + typeset input2_format="\x74\x32\xa1\xf7\x66\x31\x0a" + typeset -a join_args_format=( "-j1" "1" "-j2" "2" "-o" "1.1" "-t" "\xa1\xf7" "input1" "input2" ) + typeset output_format="f1" + ) + ) + + for testid in "${!testcases[@]}" ; do + nameref tc=testcases[${testid}] + testname="${join_cmd}/${tc.name}" + + if [[ "${tc.locale}" == "<unicode>" ]] ; then + if [[ "$LC_ALL" != *.UTF-8 ]] ; then + export LC_ALL='en_US.UTF-8' + fi + else + export LC_ALL="${tc.locale}" + fi + + # build "join_args" array with multibyte characters in the current locale + typeset -a join_args + integer arg_index + for arg_index in "${!tc.join_args_format[@]}" ; do + join_args+=( "$( printf -- "${tc.join_args_format[arg_index]}" )" ) + done + + typeset output_format="$( printf -- "${tc.output_format}" )" + + #printf "args=|%q|\n" "${join_args[@]}" + + printf "${tc.input1_format}" >"input1" + printf "${tc.input2_format}" >"input2" + + out="$(${SHELL} -c "${join_cmd} \"\$@\"" dummy "${join_args[@]}" 2>&1)" || err_exit "${testname}: Command returned exit code $?" + [[ "${out}" == ${output_format} ]] || err_exit "${testname}: Expected match for $(printf "%q\n" "${output_format}"), got $(printf "%q\n" "${out}")" + + rm "input1" "input2" + + # cleanup and restore locale settings + unset join_args arg_index + [[ -v saved_locale.LC_ALL ]] && LC_ALL="${saved_locale.LC_ALL}" || unset LC_ALL + [[ -v saved_locale.LC_CTYPE ]] && LC_CTYPE="${saved_locale.LC_CTYPE}" || unset LC_CTYPE + [[ -v saved_locale.LANG ]] && LANG="${saved_locale.LANG}" || unset LANG + done + + return 0 +} + + +function test2 +{ + typeset joincmd=$1 + typeset testname="${joincmd}" + typeset out + + # create files + printf "\x66\x31\xa1\xf7\x66\x32\x0a" >"input1" + printf "\x74\x32\xa1\xf7\x66\x31\x0a" >"input2" + printf "\xa1\xf7\x0a" >"delim" + + # run test + out=$( LC_ALL=ja_JP.eucJP ${SHELL} -o pipefail -o errexit -c '$1 -j1 1 -j2 2 -o 1.1 -t $(cat delim) input1 input2' dummy "${joincmd}" 2>&1 ) || err_exit "${testname}: Test failed with exit code $?" + [[ "${out}" == 'f1' ]] || err_exit "${testname}: Expected 'f1', got $(printf "%q\n" "${out}")" + + # cleanup + rm "input1" "input2" "delim" + + return 0 +} + +#for cmd in "/usr/bin/join" "join" ; do +for cmd in "join" ; do + test1 "${cmd}" + test2 "${cmd}" +done + + + +cd "${ocwd}" +rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}". + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/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 new file mode 100644 index 0000000000..117cde1283 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh @@ -0,0 +1,221 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test checks whether the EXIT trap is called correctly in subshells +# +# This was reported as CR #6907460 ("EXIT trap handlers are sometimes executed twice"): +# ------------ snip ------------ +# During SST testing of snv_128(RE) we found out that ksh93 executes EXIT +# trap handlers twice under some circumstances. +# +# Here is a test script: +# --- +# #!/bin/ksh93 -x +# +# function A +# { +# set -x +# trap "print TRAP A >>log" EXIT +# print >&2 +# } +# +# function B +# { +# set -x +# trap "print TRAP B >>log" EXIT +# A +# } +# +# rm -f log +# x=$(B) +# --- +# +# It produces the following output on snv_128: +# --- +# + rm -f log +# + B +# + trap 'print TRAP B >>log' EXIT +# + A +# + trap 'print TRAP A >>log' EXIT +# + print +# + + print TRAP A +# 1>& 2 +# + 1>> log +# + print TRAP B +# +# + 1>> log +# + print TRAP A +# + 1>> log +# + print TRAP B +# + 1>> log +# + x='' +# --- +# +# The log file then contains: +# TRAP A +# TRAP B +# TRAP A +# TRAP B +# +# However, the expected log would be: +# TRAP A +# TRAP B +# +# When the "x=$(B)" line is changed to "B", the log is correct: +# TRAP A +# TRAP B +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset ocwd +typeset tmpdir +typeset out + +# create temporary test directory +ocwd="$PWD" +tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.XXXXXXXX")" || err_exit "Cannot create temporary directory" + +cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } + + +# run tests + +# test 1: Run test with some variations +compound vari +typeset testname + +for vari.shell_options in \ + "" \ + "-o xtrace" \ + "-o errexit" \ + "-o errexit -o xtrace" ; do + for vari.xtrace1 in \ + "" \ + "set -x" ; do + for vari.xtrace2 in \ + "" \ + "set -x" ; do + for vari.func_A_end in \ + "" \ + "print >&2" \ + "return 0" \ + "print >&2 ; return 0" ; do + for vari.subshell in \ + $'x=$(B)' \ + $'x=$( ( B ) )' \ + $'x=${ B ; }' \ + $'x=${ ( B ) ; }' \ + $'( x=$(B) )' \ + $'( x=$( ( B ) ) )' \ + $'( x=${ B ; } )' \ + $'( x=${ ( B ) ; } )' ; do + testname="$( printf "test |%#B|\n" vari )" + +cat >"testscript.sh" <<EOF + function A + { + ${vari.xtrace1} + trap "print TRAP A >>log" EXIT + ${vari.func_A_end} + } + + function B + { + ${vari.xtrace2} + trap "print TRAP B >>log" EXIT + A + } + + rm -f log + ${vari.subshell} +EOF + ${SHELL} ${vari.shell_options} "testscript.sh" >/dev/null 2>&1 || err_exit "${testname}: Unexpected error code $?" + rm "testscript.sh" + + if [[ -f "log" ]] ; then + out="$( < log )" + rm "log" + else + err_exit "${testname}: File 'log' not found." + fi + [[ "${out}" == $'TRAP A\nTRAP B' ]] || err_exit "${testname}: Expected \$'TRAP A\nTRAP B', got $(printf "%q\n" "${out}")" + done + done + done + done +done + + + +# test 2: This is the unmodified test from the bugster bug report +( +cat <<EOF + function A + { + set -x + trap "print TRAP A >>log" EXIT + print >&2 + } + + function B + { + set -x + trap "print TRAP B >>log" EXIT + A + } + + rm -f log + x=\$(B) +EOF +) | ${SHELL} >/dev/null 2>&1 || err_exit "Unexpected error code $?" + +if [[ -f "log" ]] ; then + out="$( < log )" + rm "log" +else + err_exit "File 'log' not found." +fi +[[ "${out}" == $'TRAP A\nTRAP B' ]] || err_exit "Expected \$'TRAP A\nTRAP B', got $(printf "%q\n" "${out}")" + + +cd "${ocwd}" +rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}". + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh new file mode 100644 index 0000000000..b1c40f22f5 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh @@ -0,0 +1,66 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# <short summary> +# +# This was reported as CR #xxxxxxxx ("<title>"): +# ------------ snip ------------ +# <description> +# ------------ snip ------------ +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset ocwd +typeset tmpdir +typeset out + +# create temporary test directory +ocwd="$PWD" +tmpdir="$(mktemp -t -d "test_<description>.XXXXXXXX")" || err_exit "Cannot create temporary directory" + +cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } + + +# run tests + + +cd "${ocwd}" +rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}". + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_getconf.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_getconf.sh new file mode 100644 index 0000000000..cabd0566b7 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_getconf.sh @@ -0,0 +1,175 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# sun_solaris_getconf.sh - test the ksh93 getconf builtin for compatibility +# with /usr/bin/getconf +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + + +# setup +integer mismatch # counts mismatches between builtin and external command +integer getconf_keys # counts tests (paranoid check to make sure the test loop works) +export PATH=/usr/bin:/bin + +# prechecks +[[ ! -f "/bin/getconf" ]] && err_exit '/bin/getconf not found.' +[[ ! -x "/bin/getconf" ]] && err_exit '/bin/getconf not executable.' + +# Define test functions and store them in a string for repeated usagae +# (we can't use "functions" (alias "typeset -f") since this does not +# work in compiled shell scripts) +typeset -r getconf_test_functions="$( +cat <<EOF +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 +# compare builtin getconf output with /usr/bin/getconf +function compare_normal +{ + mismach=0 getconf_keys=0 + /usr/bin/getconf -a | + while read i ; do + (( getconf_keys++ )) + t="\${i%:*}" + + a="\$(getconf "\$t" 2>/dev/null)" + b="\$(/usr/bin/getconf "\$t" 2>/dev/null)" + + if [[ "\$a" != "\$b" ]] ; then + print -u2 "getconf/normal built mismatch: |\$t|:|\$a| != |\$b|" + (( mismatch++ )) + fi + done +} + +# compare builtin getconf output with /usr/bin/getconf while passing a path argument +function compare_path +{ + mismach=0 getconf_keys=0 + /usr/bin/getconf -a | + while read i ; do + (( getconf_keys++ )) + t="\${i%:*}" + + a="\$(getconf "\$t" "/tmp" 2>/dev/null)" + b="\$(/usr/bin/getconf "\$t" "/tmp" 2>/dev/null)" + + if [[ "\$a" != "\$b" ]] ; then + print -u2 "getconf/path built mismatch: |\$t|:|\$a| != |\$b|" + (( mismatch++ )) + fi + done +} +EOF +)" + +print -r -- "$getconf_test_functions" | source /dev/stdin + +# future versions of this test should test the following ${PATH}s, too: +# "/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin" \ +#"/usr/xpg4/bin:/bin:/usr/bin" \ +for i in \ + "/usr/bin:/bin" \ + "/bin:/usr/bin" +do + export PATH="${i}" + + ## test whether the getconf builtin is available + if [[ "$(builtin | fgrep "/bin/getconf")" == "" ]] ; then + err_exit '/bin/getconf not found in the list of builtins.' + fi + + + ## compare "getconf -a" output + if [[ "$(getconf -a)" != "$(/usr/bin/getconf -a)" ]] ; then + err_exit 'getconf -a output mismatch.' + fi + + + ## check for a key which is only supported by the AST builtin version of getconf: + if [[ "$(getconf LIBPREFIX)" != "lib" ]] ; then + err_exit 'getconf LIBPREFIX did not return "lib".' + fi + + + ## run normal test + 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} + # contains /usr/xpg6/bin before ksh93 is started)). + ${SHELL} -c "integer mismatch ; \ + integer getconf_keys ; \ + ${getconf_test_functions} ; \ + 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}).\" ; \ + exit $((Errors))" + (( Errors+=$? )) + + + ## run test with path argument + compare_path + (( getconf_keys == 0 )) && err_exit "getconf/path not working." + (( mismatch > 0 )) && err_exit "getconf/path test found ${mismatch} differences." + + # run the same test in a seperate shell + # (see comment above) + ${SHELL} -c "integer mismatch ; \ + integer getconf_keys ; \ + ${getconf_test_functions} ; \ + compare_path ; + (( getconf_keys == 0 )) && err_exit \"getconf/normal not working (PATH=\${PATH}).\" ; \ + (( mismatch > 0 )) && err_exit \"getconf/normal test found \${mismatch} differences (PATH=\${PATH}).\" ; \ + exit $((Errors))" + (( Errors+=$? )) +done + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_local_compound_nameref001.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_local_compound_nameref001.sh new file mode 100644 index 0000000000..c069717412 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_local_compound_nameref001.sh @@ -0,0 +1,68 @@ +# +# 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. +# + +# +# name reference test #001 +# + +# 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 + + +function function2 +{ + nameref v=$1 + + v.x=19 + v.y=20 +} + +function function1 +{ + typeset compound_var=() + + function2 compound_var + + printf "x=%d, y=%d\n" compound_var.x compound_var.y +} + +x="$(function1)" + +[[ "$x" != 'x=19, y=20' ]] && err_exit "expected 'x=19, y=20', got '${x}'" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_locale_misc.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_locale_misc.sh new file mode 100644 index 0000000000..6775cf85db --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_locale_misc.sh @@ -0,0 +1,188 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# This test module contains misc l10n tests +# +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +set -o nounset +Command=${0##*/} +integer Errors=0 + +typeset ocwd +typeset tmpdir + +# create temporary test directory +ocwd="$PWD" +tmpdir="$(mktemp -t -d "test_sun_solaris_locale_misc.XXXXXXXX")" || err_exit "Cannot create temporary directory" + +cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; } + +# +# utility functions +# + +function string_has_multibyte_characters +{ + typeset str="$1" + integer bytecount + integer mbcharactercount + + (( mbcharactercount=$(LC_ALL="en_US.UTF-8" wc -C <<<"${str}") )) + (( bytecount=$(wc -c <<<"${str}") )) + + (( bytecount != mbcharactercount )) && return 0 + return 1 +} + +# +# test functions +# + +# test whether LC_ALL correctly overrides LC_MESSAGES in the choice of the system message +# catalog +# 1. This test assumes that the machine has ko_KR.UTF-8 + matching message catalogs installed +# 2. We run this test in a |fork()|'ed subshell to isolate it from the other tests +function test_lc_all_override1 +{ + typeset out + + ( + ulimit -c 0 # force ksh93 to |fork()| for this subshell + + unset ${!LC_*} LANG + #export LANG=en_US.UTF-8 + export LC_ALL="en_US.UTF-8" + + integer ch_val + integer korean_count=0 + ${SHELL} -c 'LC_MESSAGES=C ${SHELL} -c "cd no_dir_llkk ; export LC_ALL="ko_KR.UTF-8" ; cd "no_dir_ooo" ; true"' >"out" 2>&1 || err_exit "Test shell failed with non-zero exit code $?" + + while read -N1 c ; do + (( ch_val='${c} )) + + (( ch_val >= 0xac00 && ch_val <= 0xdfff )) && (( korean_count++ )) + done <"out" + + # Solaris 11/B110 returns 13 characters for this test + (( korean_count >= 10 )) || err_exit "Expected at least 10 korean characters, got ${korean_count}" + + rm "out" + + exit $((Errors)) + ) + (( Errors += $? )) + return 0 +} + +# test whether the shell internally selects the correct message catalogs +# when the value of LC_* or LANG is restored to a "previous" value (e.g. +# subshell, function) or gets "reset" (e.g. unset) +function test_lc_l10n_scope1 +{ + compound -r -a testgroups=( + ( + name="subshell" + typeset -a tests=( + 'LC_ALL="C" ; cd "nosuchdir2" ; (LC_ALL="ja_JP.UTF-8" ; cd "nosuchdir2") ; cd "nosuchdir2" ; true' + 'LC_MESSAGES="C" ; cd "nosuchdir2" ; (LC_MESSAGES="ja_JP.UTF-8" ; cd "nosuchdir2") ; cd "nosuchdir2" ; true' + 'LANG="C" ; cd "nosuchdir2" ; (LANG="ja_JP.UTF-8" ; cd "nosuchdir2") ; cd "nosuchdir2" ; true' + ) + ) + ( + name="unset" + typeset -a tests=( + 'LC_ALL="C" ; cd "nosuchdir2" ; LC_ALL="ja_JP.UTF-8" ; cd "nosuchdir2" ; unset LC_ALL ; cd "nosuchdir2" ; true' + 'LC_MESSAGES="C" ; cd "nosuchdir2" ; LC_MESSAGES="ja_JP.UTF-8" ; cd "nosuchdir2" ; unset LC_MESSAGES ; cd "nosuchdir2" ; true' + 'LANG="C" ; cd "nosuchdir2" ; LANG="ja_JP.UTF-8" ; cd "nosuchdir2" ; unset LANG ; cd "nosuchdir2" ; true' + ) + ) + ( + name="empty LC_xxx" + typeset -a tests=( + 'LC_ALL="C" ; cd "nosuchdir2" ; LC_ALL="ja_JP.UTF-8" ; cd "nosuchdir2" ; LC_ALL="" ; cd "nosuchdir2" ; true' + 'LC_MESSAGES="C" ; cd "nosuchdir2" ; LC_MESSAGES="ja_JP.UTF-8" ; cd "nosuchdir2" ; LC_MESSAGES="" ; cd "nosuchdir2" ; true' + 'LANG="C" ; cd "nosuchdir2" ; LANG="ja_JP.UTF-8" ; cd "nosuchdir2" ; LANG="" ; cd "nosuchdir2" ; true' + ) + ) + ( + name="function" + typeset -a tests=( + 'LC_ALL="C" ; cd "nosuchdir2" ; function x { typeset LC_ALL="ja_JP.UTF-8" ; cd "nosuchdir2" ; } ; x ; cd "nosuchdir2" ; true' + 'LC_MESSAGES="C" ; cd "nosuchdir2" ; function x { typeset LC_MESSAGES="ja_JP.UTF-8" ; cd "nosuchdir2" ; } ; x ; cd "nosuchdir2" ; true' + 'LANG="C" ; cd "nosuchdir2" ; function x { typeset LANG="ja_JP.UTF-8" ; cd "nosuchdir2" ; } ; x ; cd "nosuchdir2" ; true' + ) + ) + ) + + + typeset tgi ti out2 + + for tgi in "${!testgroups[@]}" ; do + nameref tg=testgroups[${tgi}] + + for ti in "${!tg.tests[@]}" ; do + nameref ts=tg.tests[${ti}] + + ${SHELL} -c "unset LANG \${!LC_*} ; ${SHELL} -c \"${ts}\"" >out 2>&1 || err_exit "test returned non-zero exit code $?" + out2="${ + while read -r line ; do + string_has_multibyte_characters "${line}" && print -n "A" || print -n "_" + done <"out" + print "" + }" + if [[ "${out2}" != '_A_' ]] ; then + err_exit "test '${tg.name}'/'$ts' failed: Expected '_A_', got '${out2}'" + #cat out + fi + done + done + + rm "out" + + return 0 +} + + +# run tests +test_lc_all_override1 +test_lc_l10n_scope1 + + +cd "${ocwd}" +rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}". + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_staticvariables.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_staticvariables.sh new file mode 100644 index 0000000000..4264d9cab5 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_staticvariables.sh @@ -0,0 +1,113 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +function err_exit2 +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} + +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' + +set -o nounset +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 +[[ "$( + function ar + { + typeset -a -S s=( "hello" ) + + s+=( "an element" ) + + $1 && { printf '%s' "${s[@]}" ; printf '\n' ; } + } + ar false ; ar false ; ar true +)" != "helloan elementan elementan element" ]] && err_exit "static array var failed" + + +# 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" + + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree001.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree001.sh new file mode 100644 index 0000000000..55be05fd13 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree001.sh @@ -0,0 +1,192 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# 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 +# =>[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" +# [5] nv_putv(np = 0x1003809e0, value = (nil), flags = 524289, nfp = 0x100381db0), line 141 in "nvdisc.c" +# [6] _nv_unset(np = 0x1003809e0, flags = 524289), line 1976 in "name.c" +# [7] table_unset(shp = 0x10033e900, root = 0x100380900, flags = 524289, oroot = 0x100360980), line 1902 in "name.c" +# [8] sh_unscope(shp = 0x10033e900), line 2711 in "name.c" +# [9] sh_funscope(argn = 1, argv = 0x10035e680, fun = (nil), arg = 0xffffffff7ffff118, execflg = 4), line 2470 in "xec.c" +# [10] sh_funct(np = 0x100380860, argn = 1, argv = 0x10035e680, envlist = (nil), execflg = 4), line 2528 in "xec.c" +# [11] sh_exec(t = 0x10035e620, flags = 4), line 1032 in "xec.c" +# [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 +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +# the test cannot use "nounset" +Command=${0##*/} +integer Errors=0 + + +function build_tree +{ +#set -o errexit -o xtrace + typeset index + typeset s + 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 + + typeset -A dest_tree.l1 + + for index in "${!srcdata.hashnodes[@]}" ; do + nameref node=srcdata.hashnodes["${index}"] + + 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 + fi + + if [[ "${dest_tree.l1["$a"].l2["$b"]}" == "" ]] ; then + #if ! (unset dest_tree.l1["$a"].l2["$b"]) ; then + typeset -A dest_tree.l1["$a"].l2["$b"].l3 + fi + + 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 + new_index=$(( ${#dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[@]}+1 )) + else + new_index="${node.name}" + + # skip if the leaf node already exists + if [[ "${dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[${new_index}]}" != "" ]] ; then + continue + fi + fi + + add_tree_leaf dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[${new_index}] "${index}" "${tree_mode}" + done + done + + return 0 +} + +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}" + return 0 + ;; + "leaf_compound") + tree_leafnode=( + typeset name="${data_node.name}" + typeset -a filenames=( "${data_node.filenames[@]}" ) + typeset -a comments=( "${data_node.comments[@]}" ) + typeset -a xlfd=( "${data_node.xlfd[@]}" ) + ) + return 0 + ;; + *) + print -u2 -f "ERROR: Unknown mode %s in add_tree_leaf\n" "${add_mode}" + return 1 + ;; + esac + + # not reached + return 1 +} + +function main +{ + typeset mysrcdata=( + typeset -A hashnodes=( + [abcd]=( + name='abcd' + typeset -a xlfd=( + '-urw-itc zapfchancery-medium-i-normal--0-0-0-0-p-0-iso8859-1' + '-urw-itc zapfdingbats-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific' + '-urw-itc zapfdingbats-medium-r-normal--0-0-0-0-p-0-sun-fontspecific' + ) + typeset -a comments=( + 'comment 1' + 'comment 2' + 'comment 3' + ) + typeset -a filenames=( + '/home/foo/abcd_1' + '/home/foo/abcd_2' + '/home/foo/abcd_3' + ) + ) + ) + ) + + mytree=() + build_tree mytree mysrcdata leaf_compound +# (( $(print -r -- "$mytree" | wc -l) > 10 )) || err_exit "Compound tree too small." +} + +main + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree002.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree002.sh new file mode 100644 index 0000000000..04d8862995 --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree002.sh @@ -0,0 +1,358 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# variable tree test #002 +# Propose of this test is whether ksh93 handles global variable trees +# and function-local variable trees the same way, including "nameref" +# and "unset" handling. +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +# the test cannot use "nounset" +Command=${0##*/} +integer Errors=0 + +# "built_tree1" and "built_tree2" are identical except the way how they test +# 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. +function build_tree1 +{ +#set -o errexit -o xtrace + typeset index + typeset s + 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 + + typeset -A dest_tree.l1 + + for index in "${!srcdata.hashnodes[@]}" ; do + nameref node=srcdata.hashnodes["${index}"] + + 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 + fi + + if [[ "${dest_tree.l1["$a"].l2["$b"]}" == "" ]] ; then + #if ! (unset dest_tree.l1["$a"].l2["$b"]) ; then + typeset -A dest_tree.l1["$a"].l2["$b"].l3 + fi + + 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 )) + else + new_index="${node.name}" + + # skip if the leaf node already exists + if [[ "${dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[${new_index}]}" != "" ]] ; then + continue + fi + fi + + add_tree_leaf dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[${new_index}] "${index}" "${tree_mode}" + done + done + + return 0 +} + +# "built_tree1" and "built_tree2" are identical except the way how they test +# 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. +function build_tree2 +{ +#set -o errexit -o xtrace + typeset index + typeset s + 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 + + typeset -A dest_tree.l1 + + for index in "${!srcdata.hashnodes[@]}" ; do + nameref node=srcdata.hashnodes["${index}"] + + 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 + fi + + #if [[ "${dest_tree.l1["$a"].l2["$b"]}" == "" ]] ; then + if ! ([[ -v dest_tree.l1["$a"].l2["$b"] ]] ; res=$? ; unset dest_tree.l1["$a"].l2["$b"] ; exit $res) ; then + typeset -A dest_tree.l1["$a"].l2["$b"].l3 + fi + + 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 )) + else + new_index="${node.name}" + + # skip if the leaf node already exists + if [[ "${dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[${new_index}]}" != "" ]] ; then + continue + fi + fi + + add_tree_leaf dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[${new_index}] "${index}" "${tree_mode}" + done + done + + return 0 +} + + +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}" + return 0 + ;; + "leaf_compound") + tree_leafnode=( + typeset name="${data_node.name}" + typeset -a filenames=( "${data_node.filenames[@]}" ) + typeset -a comments=( "${data_node.comments[@]}" ) + typeset -a xlfd=( "${data_node.xlfd[@]}" ) + ) + return 0 + ;; + *) + print -u2 -f "ERROR: Unknown mode %s in add_tree_leaf\n" "${add_mode}" + return 1 + ;; + esac + + # not reached + return 1 +} + +# "mysrcdata_local" and "mysrcdata_global" must be identical +typeset mysrcdata_global=( + typeset -A hashnodes=( + [abcd]=( + name='abcd' + typeset -a xlfd=( + '-urw-itc zapfchancery-medium-i-normal--0-0-0-0-p-0-iso8859-1' + '-urw-itc zapfdingbats-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific' + '-urw-itc zapfdingbats-medium-r-normal--0-0-0-0-p-0-sun-fontspecific' + ) + typeset -a comments=( + 'comment 1' + 'comment 2' + 'comment 3' + ) + typeset -a filenames=( + '/home/foo/abcd_1' + '/home/foo/abcd_2' + '/home/foo/abcd_3' + ) + ) + ) +) + +mytree_global1=() +mytree_global2=() + +function main +{ + # "mysrcdata_local" and "mysrcdata_global" must be identical + typeset mysrcdata_local=( + typeset -A hashnodes=( + [abcd]=( + name='abcd' + typeset -a xlfd=( + '-urw-itc zapfchancery-medium-i-normal--0-0-0-0-p-0-iso8859-1' + '-urw-itc zapfdingbats-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific' + '-urw-itc zapfdingbats-medium-r-normal--0-0-0-0-p-0-sun-fontspecific' + ) + typeset -a comments=( + 'comment 1' + 'comment 2' + 'comment 3' + ) + typeset -a filenames=( + '/home/foo/abcd_1' + '/home/foo/abcd_2' + '/home/foo/abcd_3' + ) + ) + ) + ) + + #### Build tree using global tree variables + build_tree1 mytree_global1 mysrcdata_global leaf_compound || \ + err_exit 'build_tree1 mytree_global1 mysrcdata_global leaf_compound returned an error' + (( $(print -r -- "${mytree_global1}" | wc -l) > 10 )) || err_exit "Compound tree 'mytree_global1' too small." + + build_tree2 mytree_global2 mysrcdata_global leaf_compound || \ + err_exit 'build_tree2 mytree_global2 mysrcdata_global leaf_compound returned an error' + (( $(print -r -- "${mytree_global2}" | wc -l) > 10 )) || err_exit "Compound tree 'mytree_global2' too small." + + + #### build tree using local tree variables + mytree_local1=() + mytree_local2=() + + build_tree1 mytree_local1 mysrcdata_local leaf_compound || \ + err_exit 'build_tree1 mytree_local1 mysrcdata_local leaf_compound returned an error' + (( $(print -r -- "${mytree_local1}" | wc -l) > 10 )) || err_exit "Compound tree 'mytree_local1' too small." + + build_tree2 mytree_local2 mysrcdata_local leaf_compound || \ + 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" + diff -u <( printf "%s\n" "${mytree_global1}" ) <( printf "%s\n" "${mytree_local1}" ) + fi + + if [[ "${mytree_global1}" != "${mytree_global2}" ]] ; then + err_exit "Compound trees 'mytree_global1' and 'mytree_global2' not identical" + diff -u <( printf "%s\n" "${mytree_global1}" ) <( printf "%s\n" "${mytree_global2}" ) + fi + + if [[ "${mytree_local1}" != "${mytree_local2}" ]] ; then + err_exit "Compound trees 'mytree_local1' and 'mytree_local2' not identical" + diff -u <( printf "%s\n" "${mytree_local1}" ) <( printf "%s\n" "${mytree_local2}" ) + fi + + + #### 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." + ( [[ -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." + + # 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" + ( + 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" + + # 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" + ( + 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" + + + #### 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." + + [[ "${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." + + # 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 +} + +main + +# tests done +exit $((Errors)) diff --git a/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree003.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree003.sh new file mode 100644 index 0000000000..5255f09c7d --- /dev/null +++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree003.sh @@ -0,0 +1,199 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# variable tree test #003 +# Propose of this test is whether ksh93 handles global variable trees +# and function-local variable trees the same way, including "nameref" +# and "unset" handling. +# + +# test setup +function err_exit +{ + print -u2 -n "\t" + print -u2 -r ${Command}[$1]: "${@:2}" + (( Errors < 127 && Errors++ )) +} +alias err_exit='err_exit $LINENO' + +# the test cannot use "nounset" +Command=${0##*/} +integer Errors=0 + +function example_tree +{ +cat <<EOF +( + typeset -A l1=( + [adobe]=( + typeset -A l2=( + [avantgarde]=( + typeset -A l3=( + [demi]=( + typeset -A entries=( + [182c069a485316b1bc7ae001c04c7835]=( + typeset -a comments=( + FONT + -adobe-avantgarde-demi-r-normal--199-120-1200-1200-p-1130-iso8859-1 + COPYRIGHT + 'Copyright Notice not available' + RAW_PIXELSIZE + RAW_POINTSIZE + -- + section + diaeresis + copyright + ordfeminine + guillemotleft + ) + typeset -a filenames=( + X11Rx/R6.4/xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/AvantGarde-Demi.pmf + ) + md5sum=182c069a485316b1bc7ae001c04c7835 + typeset -a xlfd=( + -adobe-avantgarde-demi-r-normal--199-120-1200-1200-p-1130-iso8859-1 + ) + ) + [7db15b51965d8fe1f1c55fcb101d7616]=( + typeset -a comments=( + FONT + -adobe-avantgarde-demi-i-normal--199-120-1200-1200-p-1130-iso8859-1 + COPYRIGHT + 'Copyright Notice not available' + RAW_PIXELSIZE + RAW_POINTSIZE + -- + section + diaeresis + copyright + ordfeminine + guillemotleft + ) + typeset -a filenames=( + X11Rx/R6.4/xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/AvantGarde-DemiOblique.pmf + ) + md5sum=7db15b51965d8fe1f1c55fcb101d7616 + typeset -a xlfd=( + -adobe-avantgarde-demi-i-normal--199-120-1200-1200-p-1130-iso8859-1 + ) + ) + [a37e4a4a5035abf6f294d830fbd9e775]=( + typeset -a comments=( + FONT + -adobe-avantgarde-demi-r-normal--422-120-2540-2540-p-2395-iso8859-1 + COPYRIGHT + 'Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated. All Rights Reserved.ITC Avant Garde Gothic is a registered trademark of International Typeface Corporation.' + RAW_PIXELSIZE + RAW_POINTSIZE + -- + section + diaeresis + copyright + ordfeminine + guillemotleft + ) + typeset -a filenames=( + fox-gate/XW_NV/open-src/tarballs/xorg-server-1.3.0.0/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Demi.pmf + ) + md5sum=a37e4a4a5035abf6f294d830fbd9e775 + typeset -a xlfd=( + -adobe-avantgarde-demi-r-normal--422-120-2540-2540-p-2395-iso8859-1 + ) + ) + [da3d6d94fcf759b95c7f829ce5619374]=( + typeset -a comments=( + FONT + -adobe-avantgarde-demi-i-normal--422-120-2540-2540-p-2395-iso8859-1 + COPYRIGHT + 'Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated. All Rights Reserved.ITC Avant Garde Gothic is a registered trademark of International Typeface Corporation.' + RAW_PIXELSIZE + RAW_POINTSIZE + -- + section + diaeresis + copyright + ordfeminine + guillemotleft + ) + typeset -a filenames=( + fox-gate/XW_NV/open-src/tarballs/xorg-server-1.3.0.0/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmf + ) + md5sum=da3d6d94fcf759b95c7f829ce5619374 + typeset -a xlfd=( + -adobe-avantgarde-demi-i-normal--422-120-2540-2540-p-2395-iso8859-1 + ) + ) + ) + ) + ) + ) + ) + ) + ) +) +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 + for i in "${!xlfd_tree.l1[@]}" ; do + 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}" + break + fi + done + done + done + done + done + + # filter chain end + + return 0 +} + +main || ((Errors++)) + +# tests done +exit $((Errors)) 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/cmd/ast/libshell/i386/FEATURE/externs b/usr/src/cmd/ast/libshell/i386/FEATURE/externs new file mode 100644 index 0000000000..8828c30ba8 --- /dev/null +++ b/usr/src/cmd/ast/libshell/i386/FEATURE/externs @@ -0,0 +1,80 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_externs_ksh93 1 +#define _sys_types 1 /* #include <sys/types.h> ok */ +#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 */ +#define _lib_setreuid 1 /* setreuid() in default lib(s) */ +#define _lib_setregid 1 /* setregid() in default lib(s) */ +#define _lib_nice 1 /* nice() in default lib(s) */ +#define _lib_fork 1 /* fork() in default lib(s) */ +#define _lib_spawnveg 1 /* spawnveg() in default lib(s) */ +#define _lib_fchdir 1 /* fchdir() in default lib(s) */ +#define _sys_mman 1 /* #include <sys/mman.h> ok */ +#define _lib_memcntl 1 /* memcntl() in default lib(s) */ +#define _LIB_secdb 1 /* -lsecdb is a library */ +#define _lib_getexecuser 1 /* getexecuser() in default lib(s) */ +#define _lib_free_execattr 1 /* free_execattr() in default lib(s) */ +#endif diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/locale b/usr/src/cmd/ast/libshell/i386/FEATURE/locale new file mode 100644 index 0000000000..6b5aba0a08 --- /dev/null +++ b/usr/src/cmd/ast/libshell/i386/FEATURE/locale @@ -0,0 +1,42 @@ +/* : : 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 _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 +#else +# ifdef _hdr_locale +# include <locale.h> +# ifndef LC_MESSAGES +# define LC_MESSAGES LC_ALL +# endif /* LC_MESSAGES */ +# endif /* _hdr_locale */ +#endif /* _PACKAGE_ast */ +#ifdef _hdr_locale +# ifdef _lib_localeconv + static struct lconv *lp; +# define GETDECIMAL(x) (((lp=localeconv()) && lp->decimal_point && *lp->decimal_point) ? *lp->decimal_point : '.' ) +# else +# define GETDECIMAL(x) ('.') +# endif /* _lib_localeconv */ +#else +# define GETDECIMAL(x) ('.') +#endif /* _hdr_locale */ + +#endif diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/math b/usr/src/cmd/ast/libshell/i386/FEATURE/math new file mode 100644 index 0000000000..b86d8d56ac --- /dev/null +++ b/usr/src/cmd/ast/libshell/i386/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/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/cmd/ast/libshell/i386/FEATURE/poll b/usr/src/cmd/ast/libshell/i386/FEATURE/poll new file mode 100644 index 0000000000..c76d76c633 --- /dev/null +++ b/usr/src/cmd/ast/libshell/i386/FEATURE/poll @@ -0,0 +1,117 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_poll_ksh93 1 +#define _sys_types 1 /* #include <sys/types.h> ok */ +#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 */ +#define _sys_socket 1 /* #include <sys/socket.h> ok */ +#define _lib_select 1 /* select() in default lib(s) */ +#define _lib_poll 1 /* poll() in default lib(s) */ +#define _lib_socket 1 /* socket() in default lib(s) */ +#define _lib_htons 1 /* htons() in default lib(s) */ +#define _lib_htonl 1 /* htonl() in default lib(s) */ +#define _hdr_netdb 1 /* #include <netdb.h> ok */ +#define _lib_getaddrinfo 1 /* getaddrinfo() 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 _sys_select 1 /* #include <sys/select.h> ok */ +#define _typ_fd_set 1 /* fd_set is a type */ +#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 +# undef _hdr_poll +# undef _sys_poll +#endif /* _lib_poll */ +#ifdef _hdr_poll +# include <poll.h> +#else +# ifdef _sys_poll +# include <sys/poll.h> +# endif /* _sys_poll */ +#endif /* _hdr_poll */ +#ifdef _lib_poll +# undef poll + extern __MANGLE__ int poll __PROTO__((struct pollfd*,unsigned long,int)); +#endif /* _lib_poll */ +#ifdef _lib_select +# ifndef FD_ZERO +# define FD_ZERO(x) (*(x)=0) +# endif /* FD_ZERO */ +# ifndef FD_SET +# define FD_SET(n,x) (*(x)|=(1L<<(n))) +# endif /* FD_SET */ +# ifndef _typ_fd_set + typedef long fd_set; +# endif /*_typ_fd_set */ +#endif /* _lib_select */ + +#endif 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/cmd/ast/libshell/i386/FEATURE/setjmp b/usr/src/cmd/ast/libshell/i386/FEATURE/setjmp new file mode 100644 index 0000000000..2e57e9cd18 --- /dev/null +++ b/usr/src/cmd/ast/libshell/i386/FEATURE/setjmp @@ -0,0 +1,30 @@ +/* : : 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_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) */ +#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 _hdr_setjmp 1 /* #include <setjmp.h> ok */ +#define _typ_sigjmp_buf 1 /* sigjmp_buf is a type */ +#undef sigsetjmp +#undef siglongjmp +#undef sigjmp_buf +#define sigjmp_buf jmp_buf +#ifdef _lib__setjmp +# define sigsetjmp(a,b) _setjmp(a) +#else +# define sigsetjmp(a,b) setjmp(a) +#endif /* _lib__setjmp */ +#ifdef _lib__longjmp +# define siglongjmp(a,b) _longjmp(a,b) +#else +# define siglongjmp(a,b) longjmp(a,b) +#endif /* _lib__longjmp */ + +#endif diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/sigfeatures b/usr/src/cmd/ast/libshell/i386/FEATURE/sigfeatures new file mode 100644 index 0000000000..39231bc866 --- /dev/null +++ b/usr/src/cmd/ast/libshell/i386/FEATURE/sigfeatures @@ -0,0 +1,48 @@ +/* : : 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_sigrelse 1 /* sigrelse() in default lib(s) */ +#define _lib_sigprocmask 1 /* sigprocmask() 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 _hdr_signal 1 /* #include <signal.h> ok */ +#define _typ_sigset_t 1 /* sigset_t is a type */ +#ifndef _mem_sigvec_sv_mask +# undef _lib_sigvec +#endif +#ifdef _lib_sigprocmask +# define sh_sigaction(s,action) do { sigset_t ss;\ + sigemptyset(&ss); \ + if(s) sigaddset(&ss,(s)); \ + sigprocmask(action,&ss,0); \ + }while(0) +# define sigrelease(s) sh_sigaction(s,SIG_UNBLOCK) +# define sigblock(s) sh_sigaction(s,SIG_BLOCK) +# define sig_begin() sh_sigaction(0,SIG_SETMASK) +#else +# ifndef _lib_sigblock +# define sigblock(s) +# endif +# ifdef _lib_sigsetmask +# define sigrelease(s) sigsetmask(0) +# define sig_begin() sigsetmask(0) +# else +# ifdef _lib_sigrelse +# define sigrelease sigrelse +# define sig_begin() +# else +# define sig_begin() (0) +# define sigrelease(s) (0) +# endif /* _lib_sigrelse */ +# endif /* _lib_sigsetmask */ +#endif /* _lib_sigprocmask */ + +#undef _SIGRTMIN +#define _SIGRTMIN 42 +#undef _SIGRTMAX +#define _SIGRTMAX 73 +#endif diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/time b/usr/src/cmd/ast/libshell/i386/FEATURE/time new file mode 100644 index 0000000000..0e1c2627b6 --- /dev/null +++ b/usr/src/cmd/ast/libshell/i386/FEATURE/time @@ -0,0 +1,23 @@ +/* : : 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 _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) */ +#define _sys_time 1 /* #include <sys/time.h> ok */ +#define _mem_tv_usec_timeval 1 /* tv_usec is a member of struct timeval */ +#define _lib_2_timeofday 1 /* 2 arg gettimeofday() */ +#undef _def_time +#include <times.h> +#define _def_time 1 +#undef timeofday +#if _lib_2_timeofday +#define timeofday(p) gettimeofday(p,(struct timezone*)0) +#else +#if _lib_1_timeofday +#define timeofday(p) gettimeofday(p) +#endif +#endif + +#endif 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/cmd/ast/libshell/i386/Makefile b/usr/src/cmd/ast/libshell/i386/Makefile new file mode 100644 index 0000000000..6c35d1fc88 --- /dev/null +++ b/usr/src/cmd/ast/libshell/i386/Makefile @@ -0,0 +1,29 @@ +# +# 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. +# + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) 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/cmd/ast/libshell/mapfile-vers b/usr/src/cmd/ast/libshell/mapfile-vers new file mode 100644 index 0000000000..de5e85d7c1 --- /dev/null +++ b/usr/src/cmd/ast/libshell/mapfile-vers @@ -0,0 +1,185 @@ +# +# 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. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object versioning must comply with the rules detailed in +# +# usr/src/lib/README.mapfiles +# +# You should not be making modifications here until you've read the most current +# copy of that file. If you need help, contact a gatekeeper for guidance. +# +# MAPFILE HEADER END +# + +$mapfile_version 2 + +SYMBOL_VERSION SUNWprivate_1.1 { + global: + plugin_version; + + sh_access; + sh_addbuiltin; + sh_bltin_tree; + sh_close; + sh_delay; + 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_offoption; + sh_onoption; + sh_open; + sh_parse; + sh_pathopen; + sh_pipe; + sh_read; + sh_reinit; + sh_seek; + sh_setscope; + sh_sigcheck; + sh_strnum; + sh_subfork; + sh_tdump; + sh_trap; + sh_waitnotify; + sh_waitsafe; + 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_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_unset; + + # semi-private, needed for shcomp + sh; + e_dict; + + local: + *; +}; + +# Builtin shell commands +# (see libshell/common/include/builtins.h) +# Note: We have to export all the |b_*()| symbols that the "builtin" command +# can load builtins which are not enabled by the default OS/Net configuration. +SYMBOL_VERSION SUNWprivate_1.1 { + global: + B_echo; + B_login; + b_alarm; + b_alias; + b_bg; + b_break; + b_builtin; + b_cd; + b_close; + b_command; + b_dot_cmd; + b_dup; + b_eval; + b_exec; + b_false; + b_getopts; + b_hist; + b_jobs; + b_kill; + b_let; + b_open; + b_poll; + b_print; + b_printf; + b_pwd; + b_read; + b_readonly; + b_return; + b_rewind; + b_set; + b_shift; + b_sleep; + b_stat; + b_test; + b_tmpfile; + b_trap; + b_true; + b_typeset; + b_ulimit; + b_umask; + b_unalias; + b_unset; + b_vpath; + b_wait; + b_whence; + local: + *; +}; diff --git a/usr/src/cmd/ast/libshell/misc/images/callouts/1.png b/usr/src/cmd/ast/libshell/misc/images/callouts/1.png new file mode 100644 index 0000000000..608fad3596 Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/callouts/1.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/callouts/10.png b/usr/src/cmd/ast/libshell/misc/images/callouts/10.png new file mode 100644 index 0000000000..39e55197cf Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/callouts/10.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/callouts/2.png b/usr/src/cmd/ast/libshell/misc/images/callouts/2.png new file mode 100644 index 0000000000..5444738841 Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/callouts/2.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/callouts/3.png b/usr/src/cmd/ast/libshell/misc/images/callouts/3.png new file mode 100644 index 0000000000..64b87c7151 Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/callouts/3.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/callouts/4.png b/usr/src/cmd/ast/libshell/misc/images/callouts/4.png new file mode 100644 index 0000000000..c308193ac4 Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/callouts/4.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/callouts/5.png b/usr/src/cmd/ast/libshell/misc/images/callouts/5.png new file mode 100644 index 0000000000..24799f0a43 Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/callouts/5.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/callouts/6.png b/usr/src/cmd/ast/libshell/misc/images/callouts/6.png new file mode 100644 index 0000000000..8919a670cd Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/callouts/6.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/callouts/7.png b/usr/src/cmd/ast/libshell/misc/images/callouts/7.png new file mode 100644 index 0000000000..e30e8a70cb Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/callouts/7.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/callouts/8.png b/usr/src/cmd/ast/libshell/misc/images/callouts/8.png new file mode 100644 index 0000000000..3e35c8827c Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/callouts/8.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/callouts/9.png b/usr/src/cmd/ast/libshell/misc/images/callouts/9.png new file mode 100644 index 0000000000..ed2f14b4eb Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/callouts/9.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/tag_bourne.png b/usr/src/cmd/ast/libshell/misc/images/tag_bourne.png new file mode 100644 index 0000000000..f1f78e3a25 Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/tag_bourne.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/tag_i18n.png b/usr/src/cmd/ast/libshell/misc/images/tag_i18n.png new file mode 100644 index 0000000000..559929df2a Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/tag_i18n.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/tag_ksh.png b/usr/src/cmd/ast/libshell/misc/images/tag_ksh.png new file mode 100644 index 0000000000..b33d5a7aa1 Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/tag_ksh.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/tag_ksh88.png b/usr/src/cmd/ast/libshell/misc/images/tag_ksh88.png new file mode 100644 index 0000000000..d36dc0f5f5 Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/tag_ksh88.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/tag_ksh93.png b/usr/src/cmd/ast/libshell/misc/images/tag_ksh93.png new file mode 100644 index 0000000000..357ee3c50a Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/tag_ksh93.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/tag_l10n.png b/usr/src/cmd/ast/libshell/misc/images/tag_l10n.png new file mode 100644 index 0000000000..be89f7a163 Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/tag_l10n.png differ diff --git a/usr/src/cmd/ast/libshell/misc/images/tag_perf.png b/usr/src/cmd/ast/libshell/misc/images/tag_perf.png new file mode 100644 index 0000000000..fcb2960852 Binary files /dev/null and b/usr/src/cmd/ast/libshell/misc/images/tag_perf.png differ diff --git a/usr/src/cmd/ast/libshell/misc/shell_styleguide.docbook b/usr/src/cmd/ast/libshell/misc/shell_styleguide.docbook new file mode 100644 index 0000000000..74bc7501b5 --- /dev/null +++ b/usr/src/cmd/ast/libshell/misc/shell_styleguide.docbook @@ -0,0 +1,1464 @@ +<?xml version="1.0"?> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN" "http://www.oasis-open.org/docbook/xml/5.0b5/dtd/docbook.dtd" [ + <!ENTITY tag_bourneonly '<inlinemediaobject><imageobject><imagedata fileref="images/tag_bourne.png"></imagedata></imageobject><textobject><phrase>[Bourne]</phrase></textobject></inlinemediaobject> '> + <!ENTITY tag_kshonly '<inlinemediaobject><imageobject><imagedata fileref="images/tag_ksh.png"></imagedata></imageobject><textobject><phrase>[ksh]</phrase></textobject></inlinemediaobject> '> + <!ENTITY tag_ksh88only '<inlinemediaobject><imageobject><imagedata fileref="images/tag_ksh88.png"></imagedata></imageobject><textobject><phrase>[ksh88]</phrase></textobject></inlinemediaobject> '> + <!ENTITY tag_ksh93only '<inlinemediaobject><imageobject><imagedata fileref="images/tag_ksh93.png"></imagedata></imageobject><textobject><phrase>[ksh93]</phrase></textobject></inlinemediaobject> '> + <!ENTITY tag_performance '<inlinemediaobject><imageobject><imagedata fileref="images/tag_perf.png"></imagedata></imageobject><textobject><phrase>[perf]</phrase></textobject></inlinemediaobject> '> + <!ENTITY tag_i18n '<inlinemediaobject><imageobject><imagedata fileref="images/tag_i18n.png"></imagedata></imageobject><textobject><phrase>[i18n]</phrase></textobject></inlinemediaobject> '> + <!ENTITY tag_l10n '<inlinemediaobject><imageobject><imagedata fileref="images/tag_l10n.png"></imagedata></imageobject><textobject><phrase>[l10n]</phrase></textobject></inlinemediaobject> '> +]> +<!-- + + 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 2009 Sun Microsystems, Inc. All rights reserved. + Use is subject to license terms. + +--> + +<!-- tag images were created like this: +$ (text="perf" ; + pbmtext -nomargins -lspace 0 -builtin fixed "${text}" | + pbmtopgm 1 1 | + pgmtoppm 1.0,1.0,1.0-0,0,0 /dev/stdin | + ppmtogif | + giftopnm | + pnmtopng >"tag_${text}.png") +--> + +<!-- compile with: +xsltproc −−stringparam generate.section.toc.level 0 \ + −−stringparam toc.max.depth 3 \ + −−stringparam toc.section.depth 12 \ + −−xinclude -o opensolaris_shell_styleguide.html /usr/share/sgml/docbook/docbook-xsl-stylesheets-1.69.1/html/docbook.xsl opensolaris_shell_styleguide.docbook +--> + +<article + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://docbook.org/ns/docbook" + xml:lang="en"> + <!-- xmlns:xi="http://www.w3.org/2001/XInclude" --> + + <info> + <title><emphasis>[DRAFT]</emphasis> Bourne/Korn Shell Coding Conventions + + + + This page is currently work-in-progress until it is approved by the OS/Net community. Please send any comments to + shell-discuss@opensolaris.org. + + + + + + OpenSolaris.org + + + +
+ Intro + This document describes the shell coding style used for all the SMF script changes integrated into (Open)Solaris. + All new SMF shell code should conform to this coding standard, which is intended to match our existing C coding standard. + When in doubt, think "what would be the C-Style equivalent ?" and "What does the POSIX (shell) standard say ?" +
+ + +
+ Rules + + + +
+ General + +
+ Basic Format + Similar to cstyle, the basic format is that all + lines are indented by TABs or eight spaces, and continuation lines (which + in the shell end with "\") are indented by an equivalent number of TABs + and then an additional four spaces, e.g. + +cp foo bar +cp some_realllllllllllllllly_realllllllllllllly_long_path \ + to_another_really_long_path + + + The encoding used for the shell scripts is either ASCII + or UTF-8, alternative encodings are only allowed when the + application requires this. +
+ + +
+ Commenting + Shell comments are preceded by the '#' character. Place + single-line comments in the right-hand margin. Use an extra '#' + above and below the comment in the case of multi-line comments: + +cp foo bar # Copy foo to bar + +# +# Modify the permissions on bar. We need to set them to root/sys +# in order to match the package prototype. +# +chown root bar +chgrp sys bar + + +
+ + +
+ Interpreter magic + The proper interpreter magic for your shell script should be one of these: + +#!/bin/sh Standard Bourne shell script +#!/bin/ksh -p Standard Korn shell 88 script. You should always write ksh + scripts with -p so that ${ENV} (if set by the user) is not + sourced into your script by the shell. +#!/bin/ksh93 Standard Korn shell 93 script (-p is not needed since ${ENV} is + only used for interactive shell sessions). + + +
+ + +
+ Harden the script against unexpected (user) input + Harden your script against unexpected (user) input, including + command line options, filenames with blanks (or other special + characters) in the name, or file input +
+ + +
+ &tag_kshonly;&tag_performance;Use builtin commands if the shell provides them + + Use builtin commands if the shell provides them. For example ksh93s+ + (ksh93, version 's+') delivered with Solaris (as defined by PSARC 2006/550) + supports the following builtins: + + basename + cat + chgrp + chmod + chown + cmp + comm + cp + cut + date + dirname + expr + fds + fmt + fold + getconf + head + id + join + ln + logname + mkdir + mkfifo + mv + paste + pathchk + rev + rm + rmdir + stty + tail + tee + tty + uname + uniq + wc + sync + + Those builtins can be enabled via $ builtin name_of_builtin # in shell + scripts (note that ksh93 builtins implement exact POSIX behaviour - some + commands in Solaris /usr/bin/ directory implement pre-POSIX behaviour. + Add /usr/xpg6/bin/:/usr/xpg4/bin before + /usr/bin/ in ${PATH} to test whether your script works with + the XPG6/POSIX versions) + +
+ + +
+ &tag_performance;Use blocks and not subshells if possible + Use blocks and not subshells if possible, e.g. use + $ { print "foo" ; print "bar" ; } instead of + $ (print "foo" ; print "bar") # - blocks are + faster since they do not require to save the subshell context (ksh93) or + trigger a shell child process (Bourne shell, bash, ksh88 etc.) + +
+ + +
+ &tag_kshonly; use long options for "<literal>set</literal>" + use long options for "set", for example instead of $ set -x # + use $ set -o xtrace # to make the code more readable. +
+ + +
+ &tag_kshonly; Use <literal>$(...)</literal> instead of <literal>`...`</literal> command substitutions + Use $(...) instead of `...` - `...` + is an obsolete construct in ksh+POSIX sh scripts and $(...).is a cleaner design, + requires no escaping rules, allows easy nesting etc. + + &tag_ksh93only; <literal>${ ...;}</literal>-style command substitutions + ksh93 has support for an alternative version of command substitutions with the + syntax ${ ...;} which do not run in a subshell. + +
+ + +
+ &tag_kshonly; Always put the result of a <literal>$(...)</literal> or + <literal>$( ...;)</literal> command substitution in quotes + Always put the result of $( ... ) or $( ...;) in + quotes (e.g. foo="$( ... )" or foo="$( ...;)") unless + there is a very good reason for not doing it +
+ + +
+ Scripts should always set their <envar>PATH</envar> + Scripts should always set their PATH to make sure they do not use + alternative commands by accident (unless the value of PATH is well-known + and guaranteed to be set by the caller) +
+ + +
+ Make sure that commands from other packages/applications are really installed on the machine + Scripts should make sure that commands in optional packages are really + there, e.g. add a "precheck" block in scipts to avoid later failure when + doing the main job +
+ + +
+ Check how boolean values are used/implemented in your application + Check how boolean values are used in your application. + For example: + +mybool=0 +# do something +if [ $mybool -eq 1 ] ; then do_something_1 ; fi + +could be rewritten like this: + +mybool=false # (valid values are "true" or "false", pointing +# to the builtin equivalents of /bin/true or /bin/false) +# do something +if ${mybool} ; then do_something_1 ; fi + +or + +integer mybool=0 # values are 0 or 1 +# do something +if (( mybool==1 )) ; then do_something_1 ; fi + + +
+ +
+ &tag_i18n;The shell always operates on <emphasis>characters</emphasis> not bytes + Shell scripts operate on characters and not bytes. + Some locales use multiple bytes (called "multibyte locales") to represent one character + + ksh93 has support for binary variables which explicitly + operate on bytes, not characters. This is the only allowed + exception. +
+ + +
+ &tag_i18n;Multibyte locales and input + Think about whether your application has to handle file names or + variables in multibyte locales and make sure all commands used in your + script can handle such characters (e.g. lots of commands in Solaris's + /usr/bin/ are not able to handle such values - either use ksh93 + builtin constructs (which are guaranteed to be multibyte-aware) or + commands from /usr/xpg4/bin/ and/or /usr/xpg6/bin) + +
+ + +
+ &tag_performance;Only use external filters like <literal>grep</literal>/<literal>sed</literal>/<literal>awk</literal>/etc. + if you want to process lots of data with them + Only use external filters like grep/sed/awk/etc. + if a significant amount of data is processed by the filter or if + benchmarking shows that the use of builtin commands is significantly slower + (otherwise the time and resources needed to start the filter are + far greater then the amount of data being processed, + creating a performance problem). + For example: + +if [ "$(echo "$x" | egrep '.*foo.*')" != "" ] ; then + do_something ; +done + +can be re-written using ksh93 builtin constructs, saving several +|fork()|+|exec()|'s: + +if [[ "${x}" == ~(E).*foo.* ]] ; then + do_something ; +done + + +
+ + +
+ If the first operand of a command is a variable, use <literal>--</literal> + If the first operand of a command is a variable, use -- + for any command that accepts this as end of argument to + avoid problems if the variable expands to a value starting with -. + + + At least + + print + /usr/bin/fgrep + /usr/bin/grep + /usr/bin/egrep + + support -- as "end of arguments"-terminator. + +
+ +
+ &tag_kshonly;&tag_performance;Use <literal>$ export FOOBAR=val #</literal> instead of + <literal>$ FOOBAR=val ; export FOOBAR #</literal> + Use $ export FOOBAR=val # instead of $ FOOBAR=val ; export FOOBAR # - + this is much faster. +
+ + +
+ Use a subshell (e.g. <literal>$ ( mycmd ) #</literal>) around places which use + <literal>set -- $(mycmd)</literal> and/or <literal>shift</literal> + Use a subshell (e.g. $ ( mycmd ) #) around places which use + set -- $(mycmd) and/or shift unless the variable + affected is either a local one or if it's guaranteed that this variable will no longer be used + (be careful for loadable functions, e.g. ksh/ksh93's autoload !!!!) + +
+ + +
+ Be careful with using TABS in script code, they are not portable + between editors or platforms + Be careful with using TABS in script code, they are not portable + between editors or platforms. + If you use ksh93 use $'\t' to include TABs in sources, not the TAB character itself. +
+ + +
+ If you have multiple points where your application exits with an error + message create a central function for this purpose + If you have multiple points where your application exits with an error + message create a central function for this, e.g. + +if [ -z "$tmpdir" ] ; then + print -u2 "mktemp failed to produce output; aborting." + exit 1 +fi +if [ ! -d $tmpdir ] ; then + print -u2 "mktemp failed to create a directory; aborting." + exit 1 +fi + +should be replaced with + +function fatal_error +{ + print -u2 "${progname}: $*" + exit 1 +} +# do something (and save ARGV[0] to variable "progname") +if [ -z "$tmpdir" ] ; then + fatal_error "mktemp failed to produce output; aborting." +fi +if [ ! -d "$tmpdir" ] ; then + fatal_error "mktemp failed to create a directory; aborting." +fi + + +
+ + +
+ &tag_kshonly; Think about using <literal>$ set -o nounset #</literal> by default + Think about using $ set -o nounset # by default (or at least during the + script's development phase) to catch errors where variables are used + when they are not set (yet), e.g. + +$ (set -o nounset ; print ${foonotset}) +/bin/ksh93: foonotset: parameter not set + + +
+ + +
+ Avoid using <literal>eval</literal> unless absolutely necessary + Avoid using eval unless absolutely necessary. Subtle things + can happen when a string is passed back through the shell + parser. You can use name references to avoid uses such as + eval $name="$value". + +
+ + +
+ &tag_ksh93only;Use the string/array concatenation operator <literal>+=</literal> + Use += instead of manually adding strings/array elements, e.g. + +foo="" +foo="${foo}a" +foo="${foo}b" +foo="${foo}c" + +should be replaced with + +foo="" +foo+="a" +foo+="b" +foo+="c" + + +
+ +
+ &tag_ksh93only;Use <literal>source</literal> instead of '<literal>.</literal> '(dot) + to include other shell script fragments + Use source instead of '.' + (dot) to include other shell script fragments - the new form is much + more readable than the tiny dot and a failure can be caught within the script. +
+ + +
+ &tag_ksh93only;&tag_performance;&tag_l10n;Use <literal>$"..."</literal> instead of + <literal>gettext ... "..."</literal> for strings that need to be localized for different locales + Use $"..." instead of gettext ... "..." for strings that need to be + localized for different locales. gettext will require a + fork()+exec() and + reads the whole catalog each time it's called, creating a huge overhead for localisation + (and the $"..." is easier to use, e.g. you only have to put a + $ in front of the catalog and the string will be localised). + +
+ + +
+ &tag_kshonly;&tag_performance;Use <literal>set -o noglob</literal> if you do not need to expand files + If you don't expect to expand files, you can do set -f + (set -o noglob) as well. This way the need to use "" is + greatly reduced. +
+ + +
+ &tag_ksh93only;Use <literal>IFS=</literal> to avoid problems with spaces in filenames + Unless you want to do word splitting, put IFS= + at the beginning of a command. This way spaces in + file names won't be a problem. You can do + IFS='delims' read -r line + to override IFS just for the read command. However, + you can't do this for the set builtin. +
+ + +
+ Set the message locale if you process output of tools which may be localised + Set the message locale (LC_MESSAGES) if you process output of tools which may be localised + Set <envar>LC_MESSAGES</envar> when testing for specific outout of the <filename>/usr/bin/file</filename> utility: + +# set french as default message locale +export LC_MESSAGES=fr_FR.UTF-8 + +... + +# test whether the file "/tmp" has the filetype "directory" or not +# we set LC_MESSAGES to "C" to ensure the returned message is in english +if [[ "$(LC_MESSAGES=C file /tmp)" = *directory ]] ; then + print "is a directory" +fi + + The environment variable LC_ALL always + overrides any other LC_* environment variables + (and LANG, too), + including LC_MESSAGES. + if there is the chance that LC_ALL may be set + replace LC_MESSAGES with LC_ALL + in the example above. + +
+ +
+ Cleanup after yourself. + Cleanup after yourself. For example ksh/ksh93 have an EXIT trap which + is very useful for this. + + + Note that the EXIT trap is executed for a subshell and each subshell + level can run it's own EXIT trap, for example + +$ (trap "print bam" EXIT ; (trap "print snap" EXIT ; print "foo")) +foo +snap +bam + + +
+ +
+ Use a proper <literal>exit</literal> code + Explicitly set the exit code of a script, otherwise the exit code + from the last command executed will be used which may trigger problems + if the value is unexpected. +
+ + +
+ &tag_ksh93only;Use <literal>shcomp -n scriptname.sh /dev/null</literal> to check for common errors + Use shcomp -n scriptname.sh /dev/null to + check for common problems (such as insecure, depreciated or ambiguous constructs) in shell scripts. +
+
+ + + + + +
+ Functions + +
+ Use functions to break up your code + Use functions to break up your code into smaller, logical blocks. +
+ +
+ Do not use function names which are reserved keywords in C/C++/JAVA or the POSIX shell standard + Do not use function names which are reserved keywords (or function names) in C/C++/JAVA or the POSIX shell standard + (to avoid confusion and/or future changes/updates to the shell language). + +
+ +
+ &tag_kshonly;&tag_performance;Use ksh-style <literal>function</literal> + It is highly recommended to use ksh style functions + (function foo { ... }) instead + of Bourne-style functions (foo() { ... }) if possible + (and local variables instead of spamming the global namespace). + + + The difference between old-style Bourne functions and ksh functions is one of the major differences + between ksh88 and ksh93 - ksh88 allowed variables to be local for Bourne-style functions while ksh93 + conforms to the POSIX standard and will use a function-local scope for variables declared in + Bourne-style functions. + Example (note that "integer" is an alias for "typeset -li"): + +# new style function with local variable +$ ksh93 -c 'integer x=2 ; function foo { integer x=5 ; } ; print "x=$x" +; foo ; print "x=$x" ;' +x=2 +x=2 +# old style function with an attempt to create a local variable +$ ksh93 -c 'integer x=2 ; foo() { integer x=5 ; } ; print "x=$x" ; foo ; +print "x=$x" ;' +x=2 +x=5 + + + usr/src/lib/libshell/common/COMPATIBILITY + says about this issue: +
+Functions, defined with name() with ksh-93 are compatible with +the POSIX standard, not with ksh-88. No local variables are +permitted, and there is no separate scope. Functions defined +with the function name syntax, maintain compatibility. +This also affects function traces. +
+(this issue also affects /usr/xpg4/bin/sh in Solaris 10 because it is based on ksh88. This is a bug.). +
+ +
+ + +
+ Use a proper <literal>return</literal> code + Explicitly set the return code of a function - otherwise the exit code + from the last command executed will be used which may trigger problems + if the value is unexpected. + The only allowed exception is if a function uses the shell's errexit mode to leave + a function, subshell or the script if a command returns a non-zero exit code. + +
+ +
+ &tag_kshonly;Use <envar>FPATH</envar> to load common functions, not <literal>source</literal> + + Use the ksh FPATH (function path) feature to load functions which are shared between scripts + and not source - this allows to load such a function on demand and not all at once. +
+ +
+ + + + +
+ <literal>if</literal>, <literal>for</literal> and <literal>while</literal> + +
+ Format + To match cstyle, the shell token equivalent to the C + "{" should appear on the same line, separated by a + ";", as in: + +if [ "$x" = "hello" ] ; then + echo $x +fi + +if [[ "$x" = "hello" ]] ; then + print $x +fi + +for i in 1 2 3; do + echo $i +done + +for ((i=0 ; i < 3 ; i++)); do + print $i +done + +while [ $# -gt 0 ]; do + echo $1 + shift +done + +while (( $# > 0 )); do + print $1 + shift +done + + +
+ + +
+ <literal>test</literal> Builtin + DO NOT use the test builtin. Sorry, executive decision. + In our Bourne shell, the test built-in is the same as the "[" + builtin (if you don't believe me, try "type test" or refer to usr/src/cmd/sh/msg.c). + + So please do not write: + +if test $# -gt 0 ; then + +instead use: + +if [ $# -gt 0 ] ; then + + +
+ + +
+ &tag_kshonly;&tag_performance;Use "<literal>[[ expr ]]</literal>" instead of "<literal>[ expr ]</literal>" + Use "[[ expr ]]" instead of "[ expr ]" if possible + since it avoids going through the whole pattern expansion/etc. machinery and + adds additional operators not available in the Bourne shell, such as short-circuit + && and ||. + +
+ + +
+ &tag_kshonly; Use "<literal>(( ... ))</literal>" for arithmetic expressions + Use "(( ... ))" instead of "[ expr ]" + or "[[ expr ]]" expressions. + + + Example: Replace + +i=5 +# do something +if [ $i -gt 5 ] ; then + +with + +i=5 +# do something +if (( i > 5 )) ; then + + +
+ + +
+ &tag_kshonly;&tag_performance;Compare exit code using arithmetic expressions expressions + Use POSIX arithmetic expressions to test for exit/return codes of commands and functions. + For example turn + +if [ $? -gt 0 ] ; then + +into + +if (( $? > 0 )) ; then + + +
+ + +
+ &tag_bourneonly; Use builtin commands in conditions for <literal>while</literal> endless loops + Make sure that your shell has a "true" builtin (like ksh93) when + executing endless loops like $ while true ; do do_something ; done # - + otherwise each loop cycle runs a |fork()|+|exec()|-cycle to run + /bin/true + +
+ + +
+ Single-line if-statements + It is permissible to use && and || to construct + shorthand for an "if" statement in the case where the if statement has a + single consequent line: + +[ $# -eq 0 ] && exit 0 + +instead of the longer: + +if [ $# -eq 0 ]; then + exit 0 +fi + + +
+ + +
+ Exit Status and <literal>if</literal>/<literal>while</literal> statements + Recall that "if" and "while" + operate on the exit status of the statement + to be executed. In the shell, zero (0) means true and non-zero means false. + The exit status of the last command which was executed is available in the $? + variable. When using "if" and "while", + it is typically not necessary to use + $? explicitly, as in: + +grep foo /etc/passwd >/dev/null 2>&1 +if [ $? -eq 0 ]; then + echo "found" +fi + +Instead, you can more concisely write: + +if grep foo /etc/passwd >/dev/null 2>&1; then + echo "found" +fi + +Or, when appropriate: + +grep foo /etc/passwd >/dev/null 2>&1 && echo "found" + + +
+ +
+ + + + + + +
+ Variable types, naming and usage + +
+ Names of local, non-environment, non-constant variables should be lowercase + Names of variables local to the current script which are not exported to the environment + should be lowercase while variable names which are exported to the + environment should be uppercase. + The only exception are global constants (=global readonly variables, + e.g. $ float -r M_PI=3.14159265358979323846 # (taken from <math.h>)) + which may be allowed to use uppercase names, too. + + + + Uppercase variable names should be avoided because there is a good chance + of naming collisions with either special variable names used by the shell + (e.g. PWD, SECONDS etc.). + +
+ +
+ Do not use variable names which are reserved keywords/variable names in C/C++/JAVA or the POSIX shell standard + Do not use variable names which are reserved keywords in C/C++/JAVA or the POSIX shell standard + (to avoid confusion and/or future changes/updates to the shell language). + + + The Korn Shell and the POSIX shell standard have many more + reserved variable names than the original Bourne shell. All + these reserved variable names are spelled uppercase. + + +
+ +
+ Always use <literal>'{'</literal>+<literal>'}'</literal> when using variable + names longer than one character + Always use '{'+'}' when using + variable names longer than one character unless a simple variable name is + followed by a blank, /, ;, or $ + character (to avoid problems with array, + compound variables or accidental misinterpretation by users/shell) + +print "$foo=info" + +should be rewritten to + +print "${foo}=info" + + +
+ + +
+ <emphasis>Always</emphasis> put variables into quotes when handling filenames or user input + Always put variables into quotes when handling filenames or user input, even if + the values are hardcoded or the values appear to be fixed. Otherwise at + least two things may go wrong: + + a malicious user may be able to exploit a script's inner working to + infect his/her own code + a script may (fatally) misbehave for unexpected input (e.g. file names + with blanks and/or special symbols which are interpreted by the shell) + + + + + As alternative a script may set IFS='' ; set -o noglob to turn off the + interpretation of any field seperators and the pattern globbing. + +
+ + + +
+ &tag_kshonly;&tag_performance;Use typed variables if possible. + For example the following is very + inefficient since it transforms the integer values to strings and back + several times: + +a=0 +b=1 +c=2 +# more code +if [ $a -lt 5 -o $b -gt c ] ; then do_something ; fi + +This could be rewritten using ksh constructs: + +integer a=0 +integer b=1 +integer c=2 +# more code +if (( a < 5 || b > c )) ; then do_something ; fi + + +
+ + +
+ &tag_ksh93only; Store lists in arrays or associative arrays + Store lists in arrays or associative arrays - this is usually easier + to manage. + + For example: + +x=" +/etc/foo +/etc/bar +/etc/baz +" +echo $x + +can be replaced with + +typeset -a mylist +mylist[0]="/etc/foo" +mylist[1]="/etc/bar" +mylist[2]="/etc/baz" +print "${mylist[@]}" + +or (ksh93-style append entries to a normal (non-associative) array) + +typeset -a mylist +mylist+=( "/etc/foo" ) +mylist+=( "/etc/bar" ) +mylist+=( "/etc/baz" ) +print "${mylist[@]}" + + + + Difference between expanding arrays with mylist[@] and mylist[*] subscript operators + + Arrays may be expanded using two similar subscript operators, @ and *. These subscripts + differ only when the variable expansion appears within double quotes. If the variable expansion + is between double-quotes, "${mylist[*]}" expands to a single string with the value of each array + member separated by the first character of the IFS variable, and "${mylist[@]}" + expands each element of name to a separate string. + + Difference between [@] and [*] when expanding arrays + +typeset -a mylist +mylist+=( "/etc/foo" ) +mylist+=( "/etc/bar" ) +mylist+=( "/etc/baz" ) +IFS="," +printf "mylist[*]={ 0=|%s| 1=|%s| 2=|%s| 3=|%s| }\n" "${mylist[*]}" +printf "mylist[@]={ 0=|%s| 1=|%s| 2=|%s| 3=|%s| }\n" "${mylist[@]}" + +will print: + +mylist[*]={ 0=|/etc/foo,/etc/bar,/etc/baz| 1=|| 2=|| 3=|| } +mylist[@]={ 0=|/etc/foo| 1=|/etc/bar| 2=|/etc/baz| 3=|| } + + + + +
+ + +
+ &tag_ksh93only; Use compound variables or associative arrays to group similar variables together + Use compound variables or associative arrays to group similar variables together. + + For example: + +box_width=56 +box_height=10 +box_depth=19 +echo "${box_width} ${box_height} ${box_depth}" + +could be rewritten to ("associative array"-style) + +typeset -A -E box=( [width]=56 [height]=10 [depth]=19 ) +print -- "${box[width]} ${box[height]} ${box[depth]}" + +or ("compound variable"-style + +box=( + float width=56 + float height=10 + float depth=19 + ) +print -- "${box.width} ${box.height} ${box.depth}" + + +
+
+ + + + + + + +
+ I/O + +
+ Avoid using the "<literal>echo</literal>" command for output + The behaviour of "echo" is not portable + (e.g. System V, BSD, UCB and ksh93/bash shell builtin versions all + slightly differ in functionality) and should be avoided if possible. + POSIX defines the "printf" command as replacement + which provides more flexible and portable behaviour. + + + &tag_kshonly;Use "<literal>print</literal>" and not "<literal>echo</literal>" in Korn Shell scripts + Korn shell scripts should prefer the "print" + builtin which was introduced as replacement for "echo". + + Use $ print -- ${varname}" # when there is the slightest chance that the + variable "varname" may contain symbols like "-". Or better use "printf" + instead, for example + +integer fx +# do something +print $fx + +may fail if "f" contains a negative value. A better way may be to use + +integer fx +# do something +printf "%d\n" fx + + + + +
+ +
+ &tag_ksh93only;Use <literal>redirect</literal> and not <literal>exec</literal> to open files + Use redirect and not exec to open files - exec + will terminate the current function or script if an error occurs while redirect + just returns a non-zero exit code which can be caught. +Example: + +if redirect 5</etc/profile ; then + print "file open ok" + head <&5 +else + print "could not open file" +fi + + +
+ +
+ &tag_performance;Avoid redirections per command when the output goes into the same file, + e.g. <literal>$ echo "foo" >xxx ; echo "bar" >>xxx ; echo "baz" >>xxx #</literal> + Each of the redirections above trigger an + |open()|,|write()|,|close()|-sequence. It is much + more efficient (and faster) to group the rediction into a block, + e.g. { echo "foo" ; echo "bar" ; echo "baz" } >xxx # +
+ + +
+ &tag_performance;Avoid the creation of temporary files and store the values in variables instead + Avoid the creation of temporary files and store the values in variables instead if possible + + Example: + +ls -1 >xxx +for i in $(cat xxx) ; do + do_something ; +done + +can be replaced with + +x="$(ls -1)" +for i in ${x} ; do + do_something ; +done + + + ksh93 supports binary variables (e.g. typeset -b varname) which can hold any value. +
+ + +
+ If you create more than one temporary file create an unique subdir + If you create more than one temporary file create an unique subdir for + these files and make sure the dir is writable. Make sure you cleanup + after yourself (unless you are debugging). + +
+ + +
+ &tag_ksh93only;Use {n}<file instead of fixed file descriptor numbers + When opening a file use {n}<file, where n is an + integer variable rather than specifying a fixed descriptor number. + This is highly recommended in functions to avoid that fixed file + descriptor numbers interfere with the calling script. +Open a network connection and store the file descriptor number in a variable + +function cat_http +{ + integer netfd + +... + + # open TCP channel + redirect {netfd}<>"/dev/tcp/${host}/${port}" + + # send HTTP request + request="GET /${path} HTTP/1.1\n" + request+="Host: ${host}\n" + request+="User-Agent: demo code/ksh93 (2007-08-30; $(uname -s -r -p))\n" + request+="Connection: close\n" + print "${request}\n" >&${netfd} + + # collect response and send it to stdout + cat <&${netfd} + + # close connection + exec {netfd}<&- + +... + +} + + +
+ + +
+ &tag_ksh93only;&tag_performance;Use inline here documents + instead of <literal>echo "$x" | command</literal> + Use inline here documents, for example + +command <<< $x + + rather than + +print -r -- "$x" | command + + +
+ + +
+ &tag_ksh93only;Use the <literal>-r</literal> option of <literal>read</literal> to read a line + Use the -r option of read to read a line. + You never know when a line will end in \ and without a + -r multiple + lines can be read. +
+ + +
+ &tag_ksh93only;Print compound variables using <literal>print -C varname</literal> or <literal>print -v varname</literal> + Print compound variables using print -C varname or + print -v varname to make sure that non-printable characters + are correctly encoded. +Print compound variable with non-printable characters + +compound x=( + a=5 + b="hello" + c=( + d=9 + e="$(printf "1\v3")" + ) +) +print -v x + +will print: + +( + a=5 + b=hello + c=( + d=9 + e=$'1\0133' + ) +) + + + + vertical tab, \v, octal=\013. + + + +
+ +
+ Put the command name and arguments before redirections + Put the command name and arguments before redirections. + You can legally do $ > file date instead of date > file + but don't do it. +
+ +
+ &tag_ksh93only;Enable the <literal>gmacs</literal> editor + mode when reading user input using the <literal>read</literal> builtin + Enable the gmacseditor mode before reading user + input using the read builtin to enable the use of + cursor+backspace+delete keys in the edit line +Prompt user for a string with gmacs editor mode enabled + +set -o gmacs +typeset inputstring="default value" +... +read -v inputstring?"Please enter a string: " +... +printf "The user entered the following string: '%s'\n" "${inputstring}" + +... + + + + Enable gmacs editor mode. + + + The value of the variable is displayed and used as a default value. + + + Variable used to store the result. + + + Prompt string which is displayed in stderr. + + + +
+
+ + + + + + +
+ Math + +
+ &tag_kshonly;&tag_performance;Use builtin arithmetic expressions instead of external applications + Use builtin (POSIX shell) arithmetic expressions instead of + expr, + bc, + dc, + awk, + nawk or + perl. + + + ksh93 supports C99-like floating-point arithmetic including special values + such as + + +Inf + -Inf + +NaN + -NaN + . + + +
+ + +
+ &tag_ksh93only; Use floating-point arithmetic expressions if + calculations may trigger a division by zero or other exceptions + Use floating-point arithmetic expressions if calculations may + trigger a division by zero or other exceptions - floating point arithmetic expressions in + ksh93 support special values such as +Inf/-Inf and + +NaN/-NaN which can greatly simplify testing for + error conditions, e.g. instead of a trap or explicit + if ... then... else checks for every sub-expression + you can check the results for such special values. + + Example: + +$ ksh93 -c 'integer i=0 j=5 ; print -- "x=$((j/i)) "' +ksh93: line 1: j/i: divide by zero +$ ksh93 -c 'float i=0 j=-5 ; print -- "x=$((j/i)) "' +x=-Inf + + +
+ + +
+ &tag_ksh93only; Use <literal>printf "%a"</literal> when passing floating-point values + Use printf "%a" when passing floating-point values between scripts or + as output of a function to avoid rounding errors when converting between + bases. + + Example: + +function xxx +{ + float val + + (( val=sin(5.) )) + printf "%a\n" val +} +float out +(( out=$(xxx) )) +xxx +print -- $out + +This will print: + +-0.9589242747 +-0x1.eaf81f5e09933226af13e5563bc6p-01 + + +
+ + +
+ &tag_kshonly;&tag_performance;Put constant values into readonly variables + Put constant values into readonly variables + For example: + +float -r M_PI=3.14159265358979323846 + +or + +float M_PI=3.14159265358979323846 +readonly M_PI + + +
+ + +
+ &tag_kshonly;&tag_performance;Avoid string to number + (and/or number to string) conversions in arithmetic expressions + expressions + Avoid string to number and/or number to string conversions in + arithmetic expressions expressions to avoid performance degradation + and rounding errors. + (( x=$x*2 )) vs. (( x=x*2 )) + +float x +... +(( x=$x*2 )) + + +will convert the variable "x" (stored in the machine's native +|long double| datatype) to a string value in base10 format, +apply pattern expansion (globbing), then insert this string into the +arithmetic expressions and parse the value which converts it into the internal |long double| datatype format again. +This is both slow and generates rounding errors when converting the floating-point value between +the internal base2 and the base10 representation of the string. + + +The correct usage would be: + + +float x +... +(( x=x*2 )) + + +e.g. omit the '$' because it's (at least) redundant within arithmetic expressions. + + + + + x=$(( y+5.5 )) vs. (( x=y+5.5 )) + +float x +float y=7.1 +... +x=$(( y+5.5 )) + + +will calculate the value of y+5.5, convert it to a +base-10 string value amd assign the value to the floating-point variable +x again which will convert the string value back to the +internal |long double| datatype format again. + + +The correct usage would be: + + +float x +float y=7.1 +... +(( x=y+5.5 )) + + +i.e. this will save the string conversions and avoid any base2-->base10-->base2-conversions. + + +
+ + +
+ &tag_ksh93only;Set <envar>LC_NUMERIC</envar> when using floating-point constants + Set LC_NUMERIC when using floating-point constants to avoid problems with radix-point + representations which differ from the representation used in the script, for example the de_DE.* locale + use ',' instead of '.' as default radix point symbol. + For example: + +# Make sure all math stuff runs in the "C" locale to avoid problems with alternative +# radix point representations (e.g. ',' instead of '.' in de_DE.*-locales). This +# needs to be set _before_ any floating-point constants are defined in this script) +if [[ "${LC_ALL}" != "" ]] ; then + export \ + LC_MONETARY="${LC_ALL}" \ + LC_MESSAGES="${LC_ALL}" \ + LC_COLLATE="${LC_ALL}" \ + LC_CTYPE="${LC_ALL}" + unset LC_ALL +fi +export LC_NUMERIC=C +... +float -r M_PI=3.14159265358979323846 + + + + The environment variable LC_ALL always overrides all other LC_* variables, + including LC_NUMERIC. The script should always protect itself against custom LC_NUMERIC and + LC_ALL values as shown in the example above. + +
+ + + +
+ + + + + + +
+ Misc + +
+ Put <literal>[${LINENO}]</literal> in your <envar>PS4</envar> + Put [${LINENO}] in your PS4 prompt so that you will get line + numbers with you run with -x. If you are looking at performance + issues put $SECONDS in the PS4 prompt as well. +
+ +
+ + + + +
+ + + + + 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 ok */ +#define _dat_acct 1 /* acct in default lib(s) */ +#define _lib_acct 1 /* acct() in default lib(s) */ +#define _sys_acct 1 /* #include 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 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 ok */ +#if SHOPT_DYNAMIC +#include +#endif +#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC +# define SHOPT_FS_3D 1 +#endif /* !SHOPT_FS_3D */ +#if SHOPT_FS_3D +# undef mount +# include +#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 ok */ +#endif diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/externs b/usr/src/cmd/ast/libshell/sparc/FEATURE/externs new file mode 100644 index 0000000000..8828c30ba8 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/externs @@ -0,0 +1,80 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_externs_ksh93 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_exec_attr 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _mem_name_exception 1 /* name is a member of struct exception */ +#define _lib_setreuid 1 /* setreuid() in default lib(s) */ +#define _lib_setregid 1 /* setregid() in default lib(s) */ +#define _lib_nice 1 /* nice() in default lib(s) */ +#define _lib_fork 1 /* fork() in default lib(s) */ +#define _lib_spawnveg 1 /* spawnveg() in default lib(s) */ +#define _lib_fchdir 1 /* fchdir() in default lib(s) */ +#define _sys_mman 1 /* #include ok */ +#define _lib_memcntl 1 /* memcntl() in default lib(s) */ +#define _LIB_secdb 1 /* -lsecdb is a library */ +#define _lib_getexecuser 1 /* getexecuser() in default lib(s) */ +#define _lib_free_execattr 1 /* free_execattr() in default lib(s) */ +#endif diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/locale b/usr/src/cmd/ast/libshell/sparc/FEATURE/locale new file mode 100644 index 0000000000..6b5aba0a08 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/locale @@ -0,0 +1,42 @@ +/* : : 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 ok */ +#define _hdr_locale 1 /* #include ok */ +#define _hdr_wchar 1 /* #include ok */ +#define _hdr_wctype 1 /* #include 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 ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _typ_wctrans_t 1 /* wctrans_t is a type */ +#if _PACKAGE_ast +# undef _hdr_locale +# define _hdr_locale 1 +#else +# ifdef _hdr_locale +# include +# ifndef LC_MESSAGES +# define LC_MESSAGES LC_ALL +# endif /* LC_MESSAGES */ +# endif /* _hdr_locale */ +#endif /* _PACKAGE_ast */ +#ifdef _hdr_locale +# ifdef _lib_localeconv + static struct lconv *lp; +# define GETDECIMAL(x) (((lp=localeconv()) && lp->decimal_point && *lp->decimal_point) ? *lp->decimal_point : '.' ) +# else +# define GETDECIMAL(x) ('.') +# endif /* _lib_localeconv */ +#else +# define GETDECIMAL(x) ('.') +#endif /* _hdr_locale */ + +#endif 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 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 +#include + +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 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/cmd/ast/libshell/sparc/FEATURE/poll b/usr/src/cmd/ast/libshell/sparc/FEATURE/poll new file mode 100644 index 0000000000..c76d76c633 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/poll @@ -0,0 +1,117 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_poll_ksh93 1 +#define _sys_types 1 /* #include ok */ +#define _LIB_nsl 1 /* -lnsl is a library */ +#define _LIB_socket 1 /* -lsocket is a library */ +#define _hdr_poll 1 /* #include ok */ +#define _hdr_netinet_in 1 /* #include ok */ +#define _sys_poll 1 /* #include ok */ +#define _sys_socket 1 /* #include ok */ +#define _lib_select 1 /* select() in default lib(s) */ +#define _lib_poll 1 /* poll() in default lib(s) */ +#define _lib_socket 1 /* socket() in default lib(s) */ +#define _lib_htons 1 /* htons() in default lib(s) */ +#define _lib_htonl 1 /* htonl() in default lib(s) */ +#define _hdr_netdb 1 /* #include ok */ +#define _lib_getaddrinfo 1 /* getaddrinfo() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _sys_select 1 /* #include ok */ +#define _typ_fd_set 1 /* fd_set is a type */ +#define _hdr_unistd 1 /* #include ok */ +#define _typ_socklen_t 1 /* socklen_t is a type */ + +#ifdef _lib_poll +# define poll _SYS_poll +#else +# undef _hdr_poll +# undef _sys_poll +#endif /* _lib_poll */ +#ifdef _hdr_poll +# include +#else +# ifdef _sys_poll +# include +# endif /* _sys_poll */ +#endif /* _hdr_poll */ +#ifdef _lib_poll +# undef poll + extern __MANGLE__ int poll __PROTO__((struct pollfd*,unsigned long,int)); +#endif /* _lib_poll */ +#ifdef _lib_select +# ifndef FD_ZERO +# define FD_ZERO(x) (*(x)=0) +# endif /* FD_ZERO */ +# ifndef FD_SET +# define FD_SET(n,x) (*(x)|=(1L<<(n))) +# endif /* FD_SET */ +# ifndef _typ_fd_set + typedef long fd_set; +# endif /*_typ_fd_set */ +#endif /* _lib_select */ + +#endif 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 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 ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_resource 1 /* #include 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 ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include 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 +# 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/cmd/ast/libshell/sparc/FEATURE/setjmp b/usr/src/cmd/ast/libshell/sparc/FEATURE/setjmp new file mode 100644 index 0000000000..2e57e9cd18 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/setjmp @@ -0,0 +1,30 @@ +/* : : 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 ok */ +#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) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_setjmp 1 /* #include ok */ +#define _typ_sigjmp_buf 1 /* sigjmp_buf is a type */ +#undef sigsetjmp +#undef siglongjmp +#undef sigjmp_buf +#define sigjmp_buf jmp_buf +#ifdef _lib__setjmp +# define sigsetjmp(a,b) _setjmp(a) +#else +# define sigsetjmp(a,b) setjmp(a) +#endif /* _lib__setjmp */ +#ifdef _lib__longjmp +# define siglongjmp(a,b) _longjmp(a,b) +#else +# define siglongjmp(a,b) longjmp(a,b) +#endif /* _lib__longjmp */ + +#endif diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/sigfeatures b/usr/src/cmd/ast/libshell/sparc/FEATURE/sigfeatures new file mode 100644 index 0000000000..39231bc866 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/sigfeatures @@ -0,0 +1,48 @@ +/* : : 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 ok */ +#define _lib_sigrelse 1 /* sigrelse() in default lib(s) */ +#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_signal 1 /* #include ok */ +#define _typ_sigset_t 1 /* sigset_t is a type */ +#ifndef _mem_sigvec_sv_mask +# undef _lib_sigvec +#endif +#ifdef _lib_sigprocmask +# define sh_sigaction(s,action) do { sigset_t ss;\ + sigemptyset(&ss); \ + if(s) sigaddset(&ss,(s)); \ + sigprocmask(action,&ss,0); \ + }while(0) +# define sigrelease(s) sh_sigaction(s,SIG_UNBLOCK) +# define sigblock(s) sh_sigaction(s,SIG_BLOCK) +# define sig_begin() sh_sigaction(0,SIG_SETMASK) +#else +# ifndef _lib_sigblock +# define sigblock(s) +# endif +# ifdef _lib_sigsetmask +# define sigrelease(s) sigsetmask(0) +# define sig_begin() sigsetmask(0) +# else +# ifdef _lib_sigrelse +# define sigrelease sigrelse +# define sig_begin() +# else +# define sig_begin() (0) +# define sigrelease(s) (0) +# endif /* _lib_sigrelse */ +# endif /* _lib_sigsetmask */ +#endif /* _lib_sigprocmask */ + +#undef _SIGRTMIN +#define _SIGRTMIN 42 +#undef _SIGRTMAX +#define _SIGRTMAX 73 +#endif diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/time b/usr/src/cmd/ast/libshell/sparc/FEATURE/time new file mode 100644 index 0000000000..0e1c2627b6 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/time @@ -0,0 +1,23 @@ +/* : : 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 ok */ +#define _hdr_utime 1 /* #include ok */ +#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */ +#define _lib_setitimer 1 /* setitimer() in default lib(s) */ +#define _sys_time 1 /* #include ok */ +#define _mem_tv_usec_timeval 1 /* tv_usec is a member of struct timeval */ +#define _lib_2_timeofday 1 /* 2 arg gettimeofday() */ +#undef _def_time +#include +#define _def_time 1 +#undef timeofday +#if _lib_2_timeofday +#define timeofday(p) gettimeofday(p,(struct timezone*)0) +#else +#if _lib_1_timeofday +#define timeofday(p) gettimeofday(p) +#endif +#endif + +#endif 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 ok */ +#define _hdr_termios 1 /* #include ok */ +#define _hdr_termio 1 /* #include ok */ +#define _hdr_sgtty 1 /* #include ok */ +#define _sys_termios 1 /* #include ok */ +#define _sys_termio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include ok */ +#define _sys_filio 1 /* #include 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/cmd/ast/libshell/sparc/Makefile b/usr/src/cmd/ast/libshell/sparc/Makefile new file mode 100644 index 0000000000..b858cee431 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparc/Makefile @@ -0,0 +1,33 @@ +# +# 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. +# + +include ../Makefile.com + +# Use -KPIC since libshell is too big for -Kpic on 64bit +# (and on 32bit it is close to the barrier) +sparc_C_PICFLAGS = $(C_BIGPICFLAGS) + +install: all $(ROOTLIBS) $(ROOTLINKS) 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 ok */ +#define _dat_acct 1 /* acct in default lib(s) */ +#define _lib_acct 1 /* acct() in default lib(s) */ +#define _sys_acct 1 /* #include 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 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 ok */ +#if SHOPT_DYNAMIC +#include +#endif +#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC +# define SHOPT_FS_3D 1 +#endif /* !SHOPT_FS_3D */ +#if SHOPT_FS_3D +# undef mount +# include +#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 ok */ +#endif diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/externs b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/externs new file mode 100644 index 0000000000..8828c30ba8 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/externs @@ -0,0 +1,80 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_externs_ksh93 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_exec_attr 1 /* #include ok */ +#define _hdr_math 1 /* #include ok */ +#define _mem_name_exception 1 /* name is a member of struct exception */ +#define _lib_setreuid 1 /* setreuid() in default lib(s) */ +#define _lib_setregid 1 /* setregid() in default lib(s) */ +#define _lib_nice 1 /* nice() in default lib(s) */ +#define _lib_fork 1 /* fork() in default lib(s) */ +#define _lib_spawnveg 1 /* spawnveg() in default lib(s) */ +#define _lib_fchdir 1 /* fchdir() in default lib(s) */ +#define _sys_mman 1 /* #include ok */ +#define _lib_memcntl 1 /* memcntl() in default lib(s) */ +#define _LIB_secdb 1 /* -lsecdb is a library */ +#define _lib_getexecuser 1 /* getexecuser() in default lib(s) */ +#define _lib_free_execattr 1 /* free_execattr() in default lib(s) */ +#endif diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/locale b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/locale new file mode 100644 index 0000000000..6b5aba0a08 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/locale @@ -0,0 +1,42 @@ +/* : : 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 ok */ +#define _hdr_locale 1 /* #include ok */ +#define _hdr_wchar 1 /* #include ok */ +#define _hdr_wctype 1 /* #include 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 ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _typ_wctrans_t 1 /* wctrans_t is a type */ +#if _PACKAGE_ast +# undef _hdr_locale +# define _hdr_locale 1 +#else +# ifdef _hdr_locale +# include +# ifndef LC_MESSAGES +# define LC_MESSAGES LC_ALL +# endif /* LC_MESSAGES */ +# endif /* _hdr_locale */ +#endif /* _PACKAGE_ast */ +#ifdef _hdr_locale +# ifdef _lib_localeconv + static struct lconv *lp; +# define GETDECIMAL(x) (((lp=localeconv()) && lp->decimal_point && *lp->decimal_point) ? *lp->decimal_point : '.' ) +# else +# define GETDECIMAL(x) ('.') +# endif /* _lib_localeconv */ +#else +# define GETDECIMAL(x) ('.') +#endif /* _hdr_locale */ + +#endif 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 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 +#include + +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 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/cmd/ast/libshell/sparcv9/FEATURE/poll b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/poll new file mode 100644 index 0000000000..c76d76c633 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/poll @@ -0,0 +1,117 @@ + +/* : : generated by proto : : */ +/* : : 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) +# 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_poll_ksh93 1 +#define _sys_types 1 /* #include ok */ +#define _LIB_nsl 1 /* -lnsl is a library */ +#define _LIB_socket 1 /* -lsocket is a library */ +#define _hdr_poll 1 /* #include ok */ +#define _hdr_netinet_in 1 /* #include ok */ +#define _sys_poll 1 /* #include ok */ +#define _sys_socket 1 /* #include ok */ +#define _lib_select 1 /* select() in default lib(s) */ +#define _lib_poll 1 /* poll() in default lib(s) */ +#define _lib_socket 1 /* socket() in default lib(s) */ +#define _lib_htons 1 /* htons() in default lib(s) */ +#define _lib_htonl 1 /* htonl() in default lib(s) */ +#define _hdr_netdb 1 /* #include ok */ +#define _lib_getaddrinfo 1 /* getaddrinfo() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _sys_select 1 /* #include ok */ +#define _typ_fd_set 1 /* fd_set is a type */ +#define _hdr_unistd 1 /* #include ok */ +#define _typ_socklen_t 1 /* socklen_t is a type */ + +#ifdef _lib_poll +# define poll _SYS_poll +#else +# undef _hdr_poll +# undef _sys_poll +#endif /* _lib_poll */ +#ifdef _hdr_poll +# include +#else +# ifdef _sys_poll +# include +# endif /* _sys_poll */ +#endif /* _hdr_poll */ +#ifdef _lib_poll +# undef poll + extern __MANGLE__ int poll __PROTO__((struct pollfd*,unsigned long,int)); +#endif /* _lib_poll */ +#ifdef _lib_select +# ifndef FD_ZERO +# define FD_ZERO(x) (*(x)=0) +# endif /* FD_ZERO */ +# ifndef FD_SET +# define FD_SET(n,x) (*(x)|=(1L<<(n))) +# endif /* FD_SET */ +# ifndef _typ_fd_set + typedef long fd_set; +# endif /*_typ_fd_set */ +#endif /* _lib_select */ + +#endif 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 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 ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_resource 1 /* #include ok */ +#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */ +#define _lib_ulimit 1 /* ulimit() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include 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 +# 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/cmd/ast/libshell/sparcv9/FEATURE/setjmp b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/setjmp new file mode 100644 index 0000000000..2e57e9cd18 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/setjmp @@ -0,0 +1,30 @@ +/* : : 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 ok */ +#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) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_setjmp 1 /* #include ok */ +#define _typ_sigjmp_buf 1 /* sigjmp_buf is a type */ +#undef sigsetjmp +#undef siglongjmp +#undef sigjmp_buf +#define sigjmp_buf jmp_buf +#ifdef _lib__setjmp +# define sigsetjmp(a,b) _setjmp(a) +#else +# define sigsetjmp(a,b) setjmp(a) +#endif /* _lib__setjmp */ +#ifdef _lib__longjmp +# define siglongjmp(a,b) _longjmp(a,b) +#else +# define siglongjmp(a,b) longjmp(a,b) +#endif /* _lib__longjmp */ + +#endif diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/sigfeatures b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/sigfeatures new file mode 100644 index 0000000000..39231bc866 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/sigfeatures @@ -0,0 +1,48 @@ +/* : : 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 ok */ +#define _lib_sigrelse 1 /* sigrelse() in default lib(s) */ +#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */ +#define _hdr_time 1 /* #include ok */ +#define _sys_time 1 /* #include ok */ +#define _sys_times 1 /* #include ok */ +#define _hdr_stddef 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_signal 1 /* #include ok */ +#define _typ_sigset_t 1 /* sigset_t is a type */ +#ifndef _mem_sigvec_sv_mask +# undef _lib_sigvec +#endif +#ifdef _lib_sigprocmask +# define sh_sigaction(s,action) do { sigset_t ss;\ + sigemptyset(&ss); \ + if(s) sigaddset(&ss,(s)); \ + sigprocmask(action,&ss,0); \ + }while(0) +# define sigrelease(s) sh_sigaction(s,SIG_UNBLOCK) +# define sigblock(s) sh_sigaction(s,SIG_BLOCK) +# define sig_begin() sh_sigaction(0,SIG_SETMASK) +#else +# ifndef _lib_sigblock +# define sigblock(s) +# endif +# ifdef _lib_sigsetmask +# define sigrelease(s) sigsetmask(0) +# define sig_begin() sigsetmask(0) +# else +# ifdef _lib_sigrelse +# define sigrelease sigrelse +# define sig_begin() +# else +# define sig_begin() (0) +# define sigrelease(s) (0) +# endif /* _lib_sigrelse */ +# endif /* _lib_sigsetmask */ +#endif /* _lib_sigprocmask */ + +#undef _SIGRTMIN +#define _SIGRTMIN 42 +#undef _SIGRTMAX +#define _SIGRTMAX 73 +#endif diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/time b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/time new file mode 100644 index 0000000000..0e1c2627b6 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/time @@ -0,0 +1,23 @@ +/* : : 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 ok */ +#define _hdr_utime 1 /* #include ok */ +#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */ +#define _lib_setitimer 1 /* setitimer() in default lib(s) */ +#define _sys_time 1 /* #include ok */ +#define _mem_tv_usec_timeval 1 /* tv_usec is a member of struct timeval */ +#define _lib_2_timeofday 1 /* 2 arg gettimeofday() */ +#undef _def_time +#include +#define _def_time 1 +#undef timeofday +#if _lib_2_timeofday +#define timeofday(p) gettimeofday(p,(struct timezone*)0) +#else +#if _lib_1_timeofday +#define timeofday(p) gettimeofday(p) +#endif +#endif + +#endif 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 ok */ +#define _hdr_termios 1 /* #include ok */ +#define _hdr_termio 1 /* #include ok */ +#define _hdr_sgtty 1 /* #include ok */ +#define _sys_termios 1 /* #include ok */ +#define _sys_termio 1 /* #include ok */ +#define _sys_ioctl 1 /* #include ok */ +#define _sys_filio 1 /* #include 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/cmd/ast/libshell/sparcv9/Makefile b/usr/src/cmd/ast/libshell/sparcv9/Makefile new file mode 100644 index 0000000000..8547cdf6f2 --- /dev/null +++ b/usr/src/cmd/ast/libshell/sparcv9/Makefile @@ -0,0 +1,34 @@ +# +# 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. +# + +include ../Makefile.com +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) +sparcv9_C_PICFLAGS = $(C_BIGPICFLAGS) + +install: all $(ROOTLIBS64) $(ROOTLINKS64) 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/cmd/ast/libsum/Makefile b/usr/src/cmd/ast/libsum/Makefile new file mode 100644 index 0000000000..aecfc268e9 --- /dev/null +++ b/usr/src/cmd/ast/libsum/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 2009 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/libsum/Makefile.com b/usr/src/cmd/ast/libsum/Makefile.com new file mode 100644 index 0000000000..0195c0d862 --- /dev/null +++ b/usr/src/cmd/ast/libsum/Makefile.com @@ -0,0 +1,98 @@ +# +# 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 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# Copyright (c) 2018, Joyent, Inc. +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. + +SHELL= /usr/bin/ksh93 + +LIBRARY= libsum.a +VERS= .1 + +include ../Makefile.defs + +OBJECTS += $(LIBOBJS) + +include $(SRC)/lib/Makefile.lib +include ../../Makefile.ast + +MAPFILES= ../mapfile-vers + +LIBS= $(DYNLIB) + +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 +# 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: +CPPFLAGS= \ + $(DTEXTDOM) $(DTS_ERRNO) \ + -Iast -I. \ + -I$(ROOT)/usr/include/ast \ + -I$(ROOT)/usr/include \ + -D_PACKAGE_ast \ + -D_BLD_DLL + +CFLAGS += $(ASTCFLAGS) +CFLAGS64 += $(ASTCFLAGS64) + +CERRWARN += -_gcc=-Wno-parentheses + +SMOFF += all_func_returns + +# This codepath is performance-critical +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 + +pics/%.o: $(ASTSRC)/%.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + $(POST_PROCESS_O) + +###################################################################### +# Header file generation + +$(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 + +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/cmd/ast/libsum/amd64/FEATURE/sum b/usr/src/cmd/ast/libsum/amd64/FEATURE/sum new file mode 100644 index 0000000000..7902fa3d5e --- /dev/null +++ b/usr/src/cmd/ast/libsum/amd64/FEATURE/sum @@ -0,0 +1,14 @@ +/* : : 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 ok */ +#define _hdr_md4 1 /* #include ok */ +#define _LIB_md 1 /* -lmd is a library */ +#define _lib_MD4Init 1 /* MD4Init() in default lib(s) */ +#define _hdr_md5 1 /* #include ok */ +#define _lib_MD5Init 1 /* MD5Init() in default lib(s) */ +#define _hdr_sha1 1 /* #include ok */ +#define _lib_SHA1Init 1 /* SHA1Init() in default lib(s) */ +#define _hdr_sha2 1 /* #include ok */ +#define _lib_SHA2Init 1 /* SHA2Init() in default lib(s) */ +#endif diff --git a/usr/src/cmd/ast/libsum/amd64/Makefile b/usr/src/cmd/ast/libsum/amd64/Makefile new file mode 100644 index 0000000000..d6a7d68d4f --- /dev/null +++ b/usr/src/cmd/ast/libsum/amd64/Makefile @@ -0,0 +1,30 @@ +# +# 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. +# + +include ../Makefile.com +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/cmd/ast/libsum/i386/FEATURE/sum b/usr/src/cmd/ast/libsum/i386/FEATURE/sum new file mode 100644 index 0000000000..7902fa3d5e --- /dev/null +++ b/usr/src/cmd/ast/libsum/i386/FEATURE/sum @@ -0,0 +1,14 @@ +/* : : 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 ok */ +#define _hdr_md4 1 /* #include ok */ +#define _LIB_md 1 /* -lmd is a library */ +#define _lib_MD4Init 1 /* MD4Init() in default lib(s) */ +#define _hdr_md5 1 /* #include ok */ +#define _lib_MD5Init 1 /* MD5Init() in default lib(s) */ +#define _hdr_sha1 1 /* #include ok */ +#define _lib_SHA1Init 1 /* SHA1Init() in default lib(s) */ +#define _hdr_sha2 1 /* #include ok */ +#define _lib_SHA2Init 1 /* SHA2Init() in default lib(s) */ +#endif diff --git a/usr/src/cmd/ast/libsum/i386/Makefile b/usr/src/cmd/ast/libsum/i386/Makefile new file mode 100644 index 0000000000..6c35d1fc88 --- /dev/null +++ b/usr/src/cmd/ast/libsum/i386/Makefile @@ -0,0 +1,29 @@ +# +# 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. +# + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) 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/cmd/ast/libsum/mapfile-vers b/usr/src/cmd/ast/libsum/mapfile-vers new file mode 100644 index 0000000000..1f8f6486bf --- /dev/null +++ b/usr/src/cmd/ast/libsum/mapfile-vers @@ -0,0 +1,55 @@ +# +# 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) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object versioning must comply with the rules detailed in +# +# usr/src/lib/README.mapfiles +# +# You should not be making modifications here until you've read the most current +# copy of that file. If you need help, contact a gatekeeper for guidance. +# +# MAPFILE HEADER END +# + +$mapfile_version 2 + +SYMBOL_VERSION SUNWprivate_1.1 { + global: + sumopen; + suminit; + sumblock; + sumdone; + sumdata; + sumprint; + sumusage; + sumclose; + local: + *; +}; diff --git a/usr/src/cmd/ast/libsum/sparc/FEATURE/sum b/usr/src/cmd/ast/libsum/sparc/FEATURE/sum new file mode 100644 index 0000000000..7902fa3d5e --- /dev/null +++ b/usr/src/cmd/ast/libsum/sparc/FEATURE/sum @@ -0,0 +1,14 @@ +/* : : 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 ok */ +#define _hdr_md4 1 /* #include ok */ +#define _LIB_md 1 /* -lmd is a library */ +#define _lib_MD4Init 1 /* MD4Init() in default lib(s) */ +#define _hdr_md5 1 /* #include ok */ +#define _lib_MD5Init 1 /* MD5Init() in default lib(s) */ +#define _hdr_sha1 1 /* #include ok */ +#define _lib_SHA1Init 1 /* SHA1Init() in default lib(s) */ +#define _hdr_sha2 1 /* #include ok */ +#define _lib_SHA2Init 1 /* SHA2Init() in default lib(s) */ +#endif diff --git a/usr/src/cmd/ast/libsum/sparc/Makefile b/usr/src/cmd/ast/libsum/sparc/Makefile new file mode 100644 index 0000000000..6c35d1fc88 --- /dev/null +++ b/usr/src/cmd/ast/libsum/sparc/Makefile @@ -0,0 +1,29 @@ +# +# 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. +# + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) 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/cmd/ast/libsum/sparcv9/FEATURE/sum b/usr/src/cmd/ast/libsum/sparcv9/FEATURE/sum new file mode 100644 index 0000000000..7902fa3d5e --- /dev/null +++ b/usr/src/cmd/ast/libsum/sparcv9/FEATURE/sum @@ -0,0 +1,14 @@ +/* : : 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 ok */ +#define _hdr_md4 1 /* #include ok */ +#define _LIB_md 1 /* -lmd is a library */ +#define _lib_MD4Init 1 /* MD4Init() in default lib(s) */ +#define _hdr_md5 1 /* #include ok */ +#define _lib_MD5Init 1 /* MD5Init() in default lib(s) */ +#define _hdr_sha1 1 /* #include ok */ +#define _lib_SHA1Init 1 /* SHA1Init() in default lib(s) */ +#define _hdr_sha2 1 /* #include ok */ +#define _lib_SHA2Init 1 /* SHA2Init() in default lib(s) */ +#endif diff --git a/usr/src/cmd/ast/libsum/sparcv9/Makefile b/usr/src/cmd/ast/libsum/sparcv9/Makefile new file mode 100644 index 0000000000..d6a7d68d4f --- /dev/null +++ b/usr/src/cmd/ast/libsum/sparcv9/Makefile @@ -0,0 +1,30 @@ +# +# 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. +# + +include ../Makefile.com +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 ]"\ - "[-copyright?Copyright (c) 1986-2009 AT&T Intellectual Property]"\ - "[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\ - "[--catalog?msgcc]"' + "[-author?Glenn Fowler ]"\ + "[-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/ast/msgcc/NOTES b/usr/src/cmd/ast/msgcc/NOTES deleted file mode 100644 index 864a3a206c..0000000000 --- a/usr/src/cmd/ast/msgcc/NOTES +++ /dev/null @@ -1,65 +0,0 @@ -2000-04-01 ast message catalog plan - -(1) error_info.dictionary should be error_info.catalog - to match xopen and the internal naming in our implementation - and also to more closely match the webster definition - (catalog == enumerated list) - - DONE - -(2) nmake by default will - CATALOG = $(ID:N=+([A-Za-z0-9_]):?$(PWD:N=*/lib/*:Y,lib,,)$(ID)?$(PWD:B)?) - ERROR_CATALOG == "$(CATALOG)" - e.g., commands in src/cmd/std will use the "std" catalog; all of the - commands in src/lib/libcmd will use the "libcmd" catalog - - nmake will add "[--catalog?$(CATALOG)]" to USAGE_LICENSE - optget() will set error_info.catalog if not defined on the first call - commands that don't emit messages before optget() need not change - otherwise the command should - - error_info.id = "foo"; - error_info.catalog = ERROR_CATALOG; - - undefined references to { USAGE_LICENSE ERROR_CATALOG } are hard - compile time errors - - DONE - -(3) add catalog argument to libcmd cmdinit(argv, context, catalog) - - DONE - -(4) msgcat global target build msgs/*.mso and $(CATALOG).msg - each Makefile will generate one catalog $(CATALOG).msg where - - the *.msg files are weird -- we need to build them viewed over an - architecture specific tree, even though they will be eventually used - as architecture independent source - - $(CATALOG).msg will be the "C" locale - - debug will be a debugging locale that will translate each message to - (CATALOG-NAME:MESSAGE-INDEX)\n - this will make it easy to locate text that escaped translation (in what - should be translated output); it will also be a way for us to do - regression tests in the face of typo fixes -- presumably typos can be - fixed without changing the message index - - see msgadmin(1) - - DONE - -(5) once all this is working I'll do catopen(3) and msggen(1) - - DONE - -(6) the makerules "all" action will - catgen $(CATALOG).cat - catgen $(CATALOG)-*.cat - and the makerules "install" action will copy the catgen output to - $(LOCALEDIR)/$(LOCALE)/LC_MESSAGES/$(CATALOG)* - where - LOCALEDIR = $(INSTALLROOT)/lib/locale - - NOTE: still under consideration diff --git a/usr/src/cmd/ast/msgcc/PROMO.mm b/usr/src/cmd/ast/msgcc/PROMO.mm deleted file mode 100644 index d39264185e..0000000000 --- a/usr/src/cmd/ast/msgcc/PROMO.mm +++ /dev/null @@ -1,22 +0,0 @@ -.H 1 msgcc -.B msgcc -and -.B msgcpp -extract message text from C source for -.BR gencat (1) -message catalogs. -.BR msggen (1) -is a -.BR gencat (1) -replacement that generates machine independent binary message -catalogs that are compatible with the -.B ast -.BR catgets (3) -implementation. -.B catgets -also supports native message catalogs where available. -.BR msgcvt (1) -and -.BR msgadmin (1) -are administrative commands that support machine translation -of C locale message catalogs. diff --git a/usr/src/cmd/ast/msgcc/msgcc.sh b/usr/src/cmd/ast/msgcc/msgcc.sh deleted file mode 100644 index 209cbda167..0000000000 --- a/usr/src/cmd/ast/msgcc/msgcc.sh +++ /dev/null @@ -1,405 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 2000-2009 AT&T Intellectual Property # -# and is licensed under the # -# Common Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.opensource.org/licenses/cpl1.0.txt # -# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -: C language message catalog compiler - -# NOTE: all variable names match __*__ to avoid clash with msgcpp def vars - -__command__=msgcc -integer __similar__=30 - -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 $ -] -'$USAGE_LICENSE$' -[+NAME?msgcc - C language message catalog compiler] -[+DESCRIPTION?\bmsgcc\b is a C language message catalog compiler. It accepts - \bcc\b(1) style options and arguments. A \bmsgcpp\b(1) \b.mso\b file - is generated for each input \b.c\b file. If the \b-c\b option is not - specified then a \bgencat\b(1) format \b.msg\b file is generated from - the input \b.mso\b and \b.msg\b files. If \b-c\b is not specified then - a \b.msg\b suffix is appended to the \b-o\b \afile\a if it doesn\'t - already have a suffix. The default output is \ba.out.msg\b if \b-c\b - and \b-o\b are not specified.] -[+?If \b-M-new\b is not specified then messages are merged with those in the - pre-existing \b-o\b file.] -[M?Set a \bmsgcc\b specific \aoption\a. \aoption\a may be:]:[-option]{ - [+mkmsgs?The \b-o\b file is assumed to be in \bmkmsgs\b(1) format.] - [+new?Create a new \b-o\b file.] - [+preserve?Messages in the \b-o\b file that are not in new - \b.msg\b file arguments are preserved. The default is to - either reuse the message numbers with new message text that - is similar to the old or to delete the message text, leaving - 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. - 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 - old messages are still deleted. Use \b-M-preserve\b to preserve - all old messages.] - [+verbose?Trace similar message replacements on the standard error.] -} - -file ... - -[+SEE ALSO?\bcc\b(1), \bcpp\b(1), \bgencat\b(1), \bmsggen\b(1), - \bmsgcpp\b(1), \bmsgcvt\b(1)] -' - ;; -*) ARGV0="" - USAGE="M:[-option] [ cc-options ] file ..." - ;; -esac - -usage() -{ - OPTIND=0 - getopts $ARGV0 "$USAGE" OPT '-?' - exit 2 -} - -keys() -{ - $1 --??keys -- 2>&1 | grep '^".*"$' -} - -typeset -A __index__ -typeset __keep__ __text__ __drop__ __oz__ __nz__ __z__ __hit__ __hit_i__ -typeset __compile__ __debug__ __mkmsgs__ __preprocess__ -typeset __merge__=1 __preserve__ __verbose__ -integer __i__=0 __args__=0 __code__=0 __files__=0 __max__=0 __num__=0 __skip__=0 -integer __set__=1 __sources__=0 __cmds__=0 __ndrop__=0 __new__=0 __old__=0 -__out__=a.out.msg -__OUT__= - -case " $* " in -*" --"*|*" -?"*) - while getopts $ARGV0 "$USAGE" OPT - do case $OPT in - *) break ;; - esac - done - ;; -esac -while : -do case $# in - 0) break ;; - esac - __arg__=$1 - case $__arg__ in - -c) __compile__=1 - ;; - -[DIU]*)__argv__[__args__]=$__arg__ - (( __args__++ )) - ;; - -E) __preprocess__=1 - ;; - -M-debug) - __debug__=1 - ;; - -M-mkmsgs) - __mkmsgs__=1 - ;; - -M-new) __merge__= - ;; - -M-perserve) - __preserve__=1 - ;; - -M-set=*) - __set__=$(msggen -s ${__arg__#*=}.1) - ;; - -M-similar=*) - __similar__=${__arg__#*=} - ;; - -M-verbose) - __verbose__=1 - ;; - -o) case $# in - 1) print -u2 $"$__command__: output argument expected" - exit 1 - ;; - esac - shift - __out__=${1%.*}.msg - __OUT__=$1 - ;; - [-+]*|*.[aAlLsS]*) - ;; - *.[cCiI]*|*.[oO]*) - case $__arg__ in - *.[oO]*);; - *) __srcv__[__files__]=$__arg__ - (( __sources__++ )) - ;; - esac - __arg__=${__arg__##*/} - __arg__=${__arg__%.*}.mso - __objv__[__files__]=$__arg__ - (( __files__++ )) - ;; - *.ms[go]) - __objv__[__files__]=$__arg__ - (( __files__++ )) - ;; - *) __cmdv__[__cmds__]=$__arg__ - (( __cmds__++ )) - ;; - esac - shift -done -__cmdv__[__cmds__]=${__out__%.msg} -(( __cmds__++ )) - -# generate the .mso files - -if [[ $__OUT__ && $__compile__ ]] -then __objv__[0]=$__OUT__ -fi - -if (( __sources__ )) -then for (( __i__=0; __i__<=__files__; __i__++ )) - do if [[ ${__srcv__[__i__]} ]] - then if (( __sources__ > 1 )) - then print "${__srcv__[__i__]}:" - fi - if [[ $__preprocess__ ]] - then msgcpp "${__argv__[@]}" "${__srcv__[__i__]}" - else msgcpp "${__argv__[@]}" "${__srcv__[__i__]}" > "${__objv__[__i__]}" - fi - fi - done -fi - -# combine the .mso and .msg files - -if [[ ! $__compile__ && ! $__preprocess__ ]] -then if [[ $__merge__ && -r $__out__ ]] - then __tmp__=$__out__.tmp - trap '__code__=$?; rm -f ${__tmp__}*; exit $__code__' 0 1 2 - while read -r __line__ - do if (( $__skip__ )) - then if [[ $__line__ == '%}'* ]] - then __skip__=0 - fi - continue - fi - if [[ $__mkmsgs__ && $__line__ == '%{'* ]] - then __skip__=1 - continue - fi - if [[ $__mkmsgs__ ]] - then if [[ $__line__ == '%#'*';;'* ]] - then __line__=${__line__#'%#'} - __num__=${__line__%';;'*} - read -r __line__ - elif [[ $__line__ == %* ]] - then continue - else print -u2 $"$__command__: unrecognized line=$__line__" - __code__=1 - fi - else case $__line__ in - +([0-9])' '*) - __num__=${__line__%%' '*} - __line__=${__line__#*'"'} - __line__=${__line__%'"'} - ;; - *) continue - ;; - esac - fi - __index__["$__line__"]=$__num__ - __text__[$__num__]=$__line__ - if (( __max__ < __num__ )) - then (( __max__=__num__ )) - fi - done < $__out__ - (( __new__=__max__+1 )) - else __tmp__=$__out__ - (( __new__=1 )) - fi - if (( __code__ )) - then exit $__code__ - fi - exec 1>$__tmp__ 9>&1 - print -r -- '$'" ${__out__%.msg} message catalog" - print -r -- '$translation'" $__command__ $(date +%Y-%m-%d)" - print -r -- '$set'" $__set__" - print -r -- '$quote "' - sort -u "${__objv__[@]}" | { - while read -r __line__ - do __op__=${__line__%% *} - __line__=${__line__#* } - case $__op__ in - cmd) __a1__=${__line__%% *} - case $__a1__ in - dot_cmd) __a1__=. ;; - esac - keys $__a1__ - ;; - def) __a1__=${__line__%% *} - __a2__=${__line__#* } - eval $__a1__='$'__a2__ - ;; - str) print -r -- "$__line__" - ;; - var) __a1__=${__line__%% *} - __a2__=${__line__#* } - case $__a1__ in - [[:digit:]]*) - eval __v__='$'$__a2__ - __v__='"'${__v__:__a1__+1} - ;; - *) eval __v__='$'$__a1__ - ;; - esac - if [[ $__v__ == '"'*'"' ]] - then print -r -- "$__v__" - fi - ;; - [[:digit:]]*) - [[ $__preserve__ ]] && print -r -- "$__line__" - ;; - '$') print -r -u9 $__op__ include $__line__ - ;; - esac - done - for (( __i__=0; __i__ < __cmds__; __i__++ )) - do keys ${__cmdv__[__i__]} - done - } | { - __num__=1 - while read -r __line__ - do case $__line__ in - '$'[\ \ ]*) - print -r -- "$__line__" - continue - ;; - '$'*|*"@(#)"*|*"<"*([[:word:] .-])"@"*([[:word:] .-])">"*([ ])'"'|"http://"*) - 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 - ;; - esac - done - if (( __max__ < __num__ )) - then (( __max__=__num__ )) - fi - if [[ $__debug__ ]] - then for (( __num__=1; __num__<=__max__; __num__++ )) - do if [[ ${__text__[$__num__]} ]] - then if (( __num__ > __new__ )) - then if [[ ! ${__keep__[$__num__]} ]] - then print -r -u2 -- $__num__ HUH '"'"${__text__[$__num__]}"'"' - else print -r -u2 -- $__num__ NEW '"'"${__text__[$__num__]}"'"' - fi - elif [[ ${__keep__[$__num__]} ]] - then print -r -u2 -- $__num__ OLD '"'"${__text__[$__num__]}"'"' - else print -r -u2 -- $__num__ XXX '"'"${__text__[$__num__]}"'"' - fi - fi - done - exit 0 - fi - # check for replacements - if [[ ! $__preserve__ ]] - then for (( __num__=1; __num__<__new__; __num__++ )) - do if [[ ${__text__[$__num__]} && ! ${__keep__[$__num__]} ]] - then (( __ndrop__++ )) - __drop__[__ndrop__]=$__num__ - fi - done - [[ $__verbose__ ]] && print -u2 $__command__: old:1-$((__new__-1)) new:$__new__-$__max__ drop $__ndrop__ add $((__max__-__new__+1)) - if (( __ndrop__ )) - then for (( __i__=1; __i__<=__ndrop__; __i__++ )) - do (( __old__=${__drop__[$__i__]} )) - __oz__[__i__]=$(print -r -- "\"${__text__[$__old__]}\"" | gzip | wc -c) - done - for (( __num__=__new__; __num__<=__max__; __num__++ )) - do [[ ${__text__[$__num__]} ]] || continue - __nz__=$(print -r -- "\"${__text__[$__num__]}\"" | gzip | wc -c) - __hit__=0 - (( __bz__=__similar__ )) - for (( __i__=1; __i__<=__ndrop__; __i__++ )) - do if (( __old__=${__drop__[$__i__]} )) - then __z__=$(print -r -- "\"${__text__[$__old__]}\"""\"${__text__[$__num__]}\"" | gzip | wc -c) - (( __z__ = (__z__ * 200 / (${__oz__[__i__]} + $__nz__)) - 100 )) - if (( __z__ < __bz__ )) - then (( __bz__=__z__ )) - (( __hit__=__old__ )) - (( __hit_i__=__i__ )) - fi - fi - done - if (( __hit__ )) - then [[ $__verbose__ ]] && print -u2 $__command__: $__hit__ $__num__ $__bz__ - __text__[$__hit__]=${__text__[$__num__]} - __keep__[$__hit__]=1 - __drop__[$__hit_i__]=0 - __text__[$__num__]= - __keep__[$__num__]= - fi - done - fi - fi - # final output - for (( __num__=1; __num__<=__max__; __num__++ )) - do if [[ ${__text__[$__num__]} && ( $__preserve__ || ${__keep__[$__num__]} ) ]] - then print -r -- $__num__ "\"${__text__[$__num__]}\"" - fi - done - } - if [[ $__tmp__ != $__out__ ]] - then grep -v '^\$' $__tmp__ > ${__tmp__}n - [[ -f $__out__ ]] && grep -v '^\$' $__out__ > ${__tmp__}o - cmp -s ${__tmp__}n ${__tmp__}o || { - [[ -f $__out__ ]] && mv $__out__ $__out__.old - mv $__tmp__ $__out__ - } - fi -fi -exit $__code__ diff --git a/usr/src/cmd/ast/msgcc/msgcc.tst b/usr/src/cmd/ast/msgcc/msgcc.tst deleted file mode 100644 index 101b05de5b..0000000000 --- a/usr/src/cmd/ast/msgcc/msgcc.tst +++ /dev/null @@ -1,28 +0,0 @@ -# regression tests for the msgcc utility - -TEST 01 'basics' - EXEC -c t.c - NOTE 'pp:allpossible' - INPUT t.c $' - #include - void f(void) - { - #if 0 - error(1, "foo bar"); - #else - errormsg(locale, 2, "%s: bar foo"); - #endif - } - ' - OUTPUT t.mso $'str "foo bar"\nstr "%s: bar foo"' - OUTPUT - - EXEC -Dfprintf=_STDIO_ -c t.c - NOTE 'ignore readonly redefinitions' - INPUT t.c $' - #define stderr foo - void f(void) - { - fprintf(stderr, "foo bar"); - } - ' - OUTPUT t.mso $'str "foo bar"' diff --git a/usr/src/cmd/ast/msgcc/msgcpp.c b/usr/src/cmd/ast/msgcc/msgcpp.c deleted file mode 100644 index a9ac00b52f..0000000000 --- a/usr/src/cmd/ast/msgcc/msgcpp.c +++ /dev/null @@ -1,289 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 2000-2009 AT&T Intellectual Property * -* and is licensed under the * -* Common Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.opensource.org/licenses/cpl1.0.txt * -* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -#pragma prototyped -/* - * Glenn Fowler - * AT&T Research - * - * C message catalog preprocessor - */ - -static const char usage[] = -"[-?\n@(#)$Id: msgcpp (AT&T Research) 2002-03-11 $\n]" -USAGE_LICENSE -"[+NAME?msgcpp - C language message catalog preprocessor]" -"[+DESCRIPTION?\bmsgcpp\b is a C language message catalog preprocessor." -" It accepts \bcpp\b(1) style options and arguments. \bmsgcpp\b" -" preprocesses an input C source file and emits keyed lines to the" -" output, usually for further processing by \bmsgcc\b(1). \bmsgcc\b" -" output is in the \bgencat\b(1) syntax. Candidate message text is" -" determined by arguments to the \bast\b \b\b and" -" \b\b functions. The \bmsgcpp\b keyed output lines are:]{" -" [+cmd \acommand\a?\acommand\a is a candidate for \b--??keys\b" -" option string generation. Triggered by" -" \bb_\b\acommand\a\b(int argc,\b in the input.]" -" [+def \aname\a \astring\a?\aname\a is a candidate variable with" -" string value \astring\a.]" -" [+str \astring\a?\astring\a should be entered into the catalog.]" -" [+var \aname\a?If \bdef\b \aname\a occurs then its \astring\a value" -" should be entered into the catalog.]" -" }" -"[+?The input source file is preprocessed with the \bpp:allpossible\b" -" option on. This enables non-C semantics; all source should first" -" be compiled error-free with a real compiler before running \bmsgcpp\b." -" The following changes are enabled for the top level files (i.e.," -" included file behavior is not affected):]{" -" [+(1)?All \b#if\b, \b#ifdef\b and \b#ifndef\b branches" -" are enabled.]" -" [+(2)?The first definition for a macro is retained, even when" -" subsequent \b#define\b statements would normally" -" redefine the macro. \b#undef\b must be used to" -" redefine a macro.]" -" [+(3)?Macro calls with an improper number of arguments are" -" silently ignored.]" -" [+(4)?\b#include\b on non-existent headers are silently" -" ignored.]" -" [+(5)?Invalid C source characters are silently ignored.]" -" }" -"[+?\b\"msgcat.h\"\b is included if it exists. This file may contain macro" -" definitions for functions that translate string arguments. If \afoo\a" -" is a function that translates its string arguments then include the" -" line \b#define \b\afoo\a\b _TRANSLATE_\b in \bmsgcat.h\b or specify" -" the option \b-D\b\afoo\a\b=_TRANSLATE_\b. If \abar\a is a function" -" that translates string arguments if the first argument is \bstderr\b" -" then use either \b#define \b\abar\a\b _STDIO_\b or" -" \b-D\b\abar\a\b=_STDIO_\b.]" -"[+?The macro \b_BLD_msgcat\b is defined to be \b1\b. As an alternative to" -" \bmsgcat.h\b, \b_TRANSLATE_\b definitions could be placed inside" -" \b#ifdef _BLD_msgcat\b ... \b#endif\b.]" - -"\n" -"\n[ input [ output ] ]\n" -"\n" - -"[+SEE ALSO?\bcc\b(1), \bcpp\b(1), \bgencat\b(1), \bmsggen\b(1)," -" \bmsgcc\b(1), \bmsgcvt\b(1)]" -; - -#include -#include - -#include "pp.h" -#include "ppkey.h" - -#define T_STDERR (T_KEYWORD+1) -#define T_STDIO (T_KEYWORD+2) -#define T_TRANSLATE (T_KEYWORD+3) - -#define OMIT "*@(\\[[-+]*\\?*\\]|\\@\\(#\\)|Copyright \\(c\\)|\\\\000|\\\\00[!0-9]|\\\\0[!0-9])*" - -static struct ppkeyword keys[] = -{ - "char", T_CHAR, - "int", T_INT, - "sfstderr", T_STDERR, - "stderr", T_STDERR, - "_STDIO_", T_STDIO, - "_TRANSLATE_", T_TRANSLATE, - 0, 0 -}; - -static int -msgppargs(char** argv, int last) -{ - for (;;) - { - switch (optget(argv, usage)) - { - case 0: - break; - case '?': - if (!last) - { - opt_info.again = 1; - return 1; - } - error(ERROR_USAGE|4, "%s", opt_info.arg); - break; - case ':': - if (!last) - { - opt_info.again = 1; - return 1; - } - error(2, "%s", opt_info.arg); - continue; - default: - if (!last) - { - opt_info.again = 1; - return 1; - } - continue; - } - break; - } - return argv[opt_info.index] != 0; -} - -int -main(int argc, char** argv) -{ - register char* s; - register int x; - register int c; - Sfio_t* tmp; - - NoP(argc); - if (s = strrchr(*argv, '/')) - s++; - else - s = *argv; - error_info.id = s; - ppop(PP_DEFAULT, PPDEFAULT); - optjoin(argv, msgppargs, ppargs, NiL); - if (strlen(s) >= 5 && *(s + 3) != 'c') - { - ppop(PP_PLUSPLUS, 1); - ppop(PP_NOHASH, 1); - ppop(PP_PROBE, "CC"); - } - ppop(PP_SPACEOUT, 0); - ppop(PP_COMPILE, keys); - ppop(PP_OPTION, "allpossible"); - ppop(PP_OPTION, "catliteral"); - ppop(PP_OPTION, "modern"); - ppop(PP_OPTION, "readonly"); - ppop(PP_DEFINE, "_BLD_msgcat=1"); - ppop(PP_DEFINE, "const="); - ppop(PP_DEFINE, "errorf=_TRANSLATE_"); - ppop(PP_DEFINE, "register="); - ppop(PP_DEFINE, "sfstderr=sfstderr"); - ppop(PP_DEFINE, "stderr=stderr"); - ppop(PP_DEFINE, "_(m)=_TRANSLATE_(m)"); - ppop(PP_DEFINE, "__(m)=_TRANSLATE_(m)"); - ppop(PP_DEFINE, "gettxt(i,m)=_TRANSLATE_(m)"); - ppop(PP_DEFINE, "gettext(m)=_TRANSLATE_(m)"); - ppop(PP_DEFINE, "dgettext(d,m)=_TRANSLATE_(m)"); - ppop(PP_DEFINE, "dcgettext(d,m,c)=_TRANSLATE_(m)"); - ppop(PP_DEFINE, "ERROR_catalog(m)=_TRANSLATE_(m)"); - ppop(PP_DEFINE, "ERROR_dictionary(m)=_TRANSLATE_(m)"); - ppop(PP_DEFINE, "ERROR_translate(l,i,c,m)=_TRANSLATE_(m)"); - ppop(PP_DEFINE, "error(l,f,...)=_TRANSLATE_(f)"); - ppop(PP_DEFINE, "errormsg(t,l,f,...)=_TRANSLATE_(f)"); - ppop(PP_DIRECTIVE, "include \"msgcat.h\""); - ppop(PP_OPTION, "noreadonly"); - ppop(PP_INIT); - if (!(tmp = sfstropen())) - error(ERROR_SYSTEM|3, "out of space"); - x = 0; - for (;;) - { - c = pplex(); - again: - switch (c) - { - case 0: - break; - case T_TRANSLATE: - switch (c = pplex()) - { - case '(': - x = 1; - break; - case ')': - if ((c = pplex()) != '(') - { - x = 0; - goto again; - } - x = 1; - break; - default: - x = 0; - goto again; - } - continue; - case '(': - if (x > 0) - x++; - continue; - case ')': - if (x > 0) - x--; - continue; - case T_STDIO: - if ((c = pplex()) != '(' || (c = pplex()) != T_STDERR || (c = pplex()) != ',') - { - x = 0; - goto again; - } - x = 1; - continue; - case T_STRING: - if (x > 0 && !strmatch(pp.token, OMIT)) - sfprintf(sfstdout, "str \"%s\"\n", pp.token); - continue; - case T_ID: - s = pp.symbol->name; - if (x > 0) - { - if ((c = pplex()) == '+' && ppisinteger(c = pplex())) - sfprintf(sfstdout, "var %s %s\n", pp.token, s); - else - sfprintf(sfstdout, "var %s\n", s); - } - else if (s[0] == 'b' && s[1] == '_' && s[2]) - { - if ((c = pplex()) == '(' && (c = pplex()) == T_INT && (c = pplex()) == T_ID && (c = pplex()) == ',' && (c = pplex()) == T_CHAR && (c = pplex()) == '*') - sfprintf(sfstdout, "cmd %s\n", s + 2); - else - goto again; - } - else - { - if ((c = pplex()) == '[') - { - if (ppisinteger(c = pplex())) - c = pplex(); - if (c != ']') - goto again; - c = pplex(); - } - if (c == '=' && (c = pplex()) == T_STRING && !strmatch(pp.token, OMIT)) - { - sfprintf(sfstdout, "def %s \"%s\"\n", s, pp.token); - sfprintf(tmp, "#define %s \"%s\"\n", s, pp.token); - if (!(s = sfstruse(tmp))) - error(ERROR_SYSTEM|3, "out of space"); - ppinput(s, "string", 0); - } - else - goto again; - } - continue; - default: - continue; - } - break; - } - ppop(PP_DONE); - return error_info.errors != 0; -} diff --git a/usr/src/cmd/ast/msgcc/msgcvt.c b/usr/src/cmd/ast/msgcc/msgcvt.c deleted file mode 100644 index 329fce0d83..0000000000 --- a/usr/src/cmd/ast/msgcc/msgcvt.c +++ /dev/null @@ -1,691 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 2000-2009 AT&T Intellectual Property * -* and is licensed under the * -* Common Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.opensource.org/licenses/cpl1.0.txt * -* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -#pragma prototyped -/* - * Glenn Fowler - * AT&T Research - */ - -static const char usage[] = -"[-?\n@(#)$Id: msgcvt (AT&T Research) 2000-05-01 $\n]" -USAGE_LICENSE -"[+NAME?msgcvt - convert message file to/from html]" -"[+DESCRIPTION?\bmsgcvt\b reads a \bgencat\b(1) format file on the standard" -" input and converts it to \bhtml\b on the standard output. The input" -" file must contain the control statement \b$quote \"\b and use the \"" -" character to quote message text. The output is in a form suitable for" -" automatic translation by web sites like" -" \bhttp://babelfish.altavista.com/\b or filters like" -" \btranslate\b(1).]" -"[h:html?Generate \bhtml\b from \bgencat\b(1) input. This is the default.]" -"[m:msg?Generate a \bgencat\b(1) message file from (presumably translated)" -" \bhtml\b. Wide characters are UTF-8 encoded.]" -"[r:raw?The message file is raw message text, one message per line, with no" -" quoting or line numbering.]" -"[+SEE ALSO?\bgencat\b(1), \bmsgcc\b(1), \bmsggen\b(1), \btranslate\b(1)]" -; - -#include -#include -#include - -#define MSG_RAW (1<<0) -#define MSG_SPLICE (1<<1) - -#define SPACE(s) (isspace(*s)&&(s+=1)||*s=='\\'&&(*(s+1)=='n'||*(s+1)=='t')&&(s+=2)) - -typedef void (*Convert_f)(Sfio_t*, Sfio_t*, int); - -typedef struct -{ - const char* name; - int code; -} Code_t; - -static const Code_t codes[] = -{ - "aacute", 225, - "Aacute", 193, - "acirc", 226, - "Acirc", 194, - "aelig", 230, - "AElig", 198, - "agrave", 224, - "Agrave", 192, - "amp", '&', - "aring", 229, - "Aring", 197, - "atilde", 227, - "Atilde", 195, - "auml", 228, - "Auml", 196, - "ccedil", 231, - "Ccedil", 199, - "copy", 169, - "eacute", 233, - "Eacute", 201, - "ecirc", 234, - "Ecirc", 202, - "egrave", 232, - "Egrave", 200, - "euml", 235, - "Euml", 203, - "gt", '>', - "iacute", 237, - "Iacute", 205, - "icirc", 238, - "Icirc", 206, - "igrave", 236, - "Igrave", 204, - "iuml", 239, - "Iuml", 207, - "lt", '<', - "nbsp", ' ', - "ntilde", 241, - "Ntilde", 209, - "oacute", 243, - "Oacute", 211, - "ocirc", 244, - "Ocirc", 212, - "ograve", 242, - "Ograve", 210, - "oslash", 248, - "Oslash", 216, - "otilde", 245, - "Otilde", 213, - "ouml", 246, - "Ouml", 214, - "quot", '"', - "reg", 174, - "szlig", 223, - "uacute", 250, - "Uacute", 218, - "ucirc", 251, - "Ucirc", 219, - "ugrave", 249, - "Ugrave", 217, - "uuml", 252, - "Uuml", 220, - "yuml", 255, -}; - -static int -decode(Sfio_t* ip) -{ - register int c; - register int i; - char name[32]; - - if ((c = sfgetc(ip)) == EOF) - return '&'; - name[0] = c; - i = 1; - if (c != '#' && !isalpha(c)) - goto bad; - while ((c = sfgetc(ip)) != EOF && c != ';') - { - if (c == '&') - i = 0; - else - { - name[i++] = c; - if (!isalnum(c) && (i > 1 || c != '#') || i >= (elementsof(name) - 1)) - goto bad; - } - } - name[i] = 0; - if (name[0] == '#') - { - switch (c = strtol(name + 1, NiL, 10)) - { - case 91: - c = '['; - break; - case 93: - c = ']'; - break; - } - } - else - { - for (i = 0; i < elementsof(codes); i++) - if (streq(codes[i].name, name)) - { - c = codes[i].code; - break; - } - if (i >= elementsof(codes)) - goto bad; - } - return c; - bad: - name[i] = 0; - if (c == ';') - error(1, "&%s: unknown HTML special character -- & assumed", name); - else - error(1, "&%s: invalid HTML special character -- & assumed", name); - while (i--) - sfungetc(ip, name[i]); - return '&'; -} - -static int -sfpututf(Sfio_t* op, register int w) -{ - if (!(w & ~0x7F)) - return sfputc(op, w); - else if (!(w & ~0x7FF)) - sfputc(op, 0xC0 + (w >> 6)); - else if (!(w & ~0xFFFF)) - { - sfputc(op, 0xE0 + (w >> 12)); - sfputc(op, 0x80 + (w >> 6 ) & 0x3F); - } - else - return sfputc(op, '?'); - return sfputc(op, 0x80 + (w & 0x3F)); -} - -static int -sfnext(Sfio_t* ip) -{ - register int c; - - while (isspace(c = sfgetc(ip))); - return c; -} - -static void -html2msg(register Sfio_t* ip, register Sfio_t* op, int flags) -{ - register int c; - register int q; - - again: - while ((c = sfgetc(ip)) != EOF) - if (c == '<') - { - if ((c = sfnext(ip)) == 'O' && - (c = sfnext(ip)) == 'L' && - isspace(c = sfgetc(ip)) && - (c = sfnext(ip)) == 'S' && - (c = sfnext(ip)) == 'T' && - (c = sfnext(ip)) == 'A' && - (c = sfnext(ip)) == 'R' && - (c = sfnext(ip)) == 'T' && - (c = sfnext(ip)) == '=' && - (c = sfnext(ip)) == '"' && - (c = sfnext(ip)) == '5' && - (c = sfnext(ip)) == '5' && - (c = sfnext(ip)) == '0' && - (c = sfnext(ip)) == '7' && - (c = sfnext(ip)) == '1' && - (c = sfnext(ip)) == '7' && - (c = sfnext(ip)) == '"' && - (c = sfnext(ip)) == '>') - break; - while (c != EOF && c != '>') - c = sfgetc(ip); - } - if ((c = sfnext(ip)) != EOF) - sfungetc(ip, c); - q = 0; - for (;;) - { - switch (c = sfgetc(ip)) - { - case EOF: - break; - case '&': - c = decode(ip); - sfpututf(op, c); - if (isspace(c)) - { - while (isspace(c = sfgetc(ip))); - if (c == EOF) - break; - sfungetc(ip, c); - } - continue; - case '<': - switch (c = sfnext(ip)) - { - case '/': - if ((c = sfnext(ip)) == 'O' && - (c = sfgetc(ip)) == 'L' && - (c = sfnext(ip)) == '>') - { - if (q) - { - sfputc(op, q); - q = '"'; - } - goto again; - } - break; - case 'B': - if ((c = sfgetc(ip)) == 'R' && - (c = sfnext(ip)) == '>') - sfputc(op, ' '); - break; - case 'L': - if ((c = sfgetc(ip)) == 'I' && - (c = sfnext(ip)) == '>' && - isdigit(c = sfnext(ip))) - { - if (q) - sfputc(op, q); - else - q = '"'; - sfputc(op, '\n'); - do - { - sfputc(op, c); - } while (isdigit(c = sfgetc(ip))); - if (c == EOF) - break; - sfputc(op, ' '); - sfputc(op, '"'); - if (isspace(c)) - c = sfnext(ip); - if (c == '<' && - (c = sfnext(ip)) == 'L' && - (c = sfgetc(ip)) == 'I' && - (c = sfnext(ip)) == '>') - /* great */; - continue; - } - break; - case 'P': - if ((c = sfnext(ip)) == '>') - sfputc(op, '\n'); - else if (c == 'C' && - (c = sfgetc(ip)) == 'L' && - (c = sfgetc(ip)) == 'A' && - (c = sfgetc(ip)) == 'S' && - (c = sfgetc(ip)) == 'S' && - (c = sfnext(ip)) == '=' && - (c = sfnext(ip)) == '"') - for (;;) - { - switch (c = sfgetc(ip)) - { - case EOF: - case '"': - break; - case '&': - c = decode(ip); - sfpututf(op, c); - continue; - default: - sfpututf(op, c); - continue; - } - break; - } - break; - } - while (c != EOF && c != '>') - c = sfgetc(ip); - if (c == EOF || (c = sfgetc(ip)) == EOF) - break; - sfungetc(ip, c); - continue; - case '"': - if (!flags) - sfputc(op, '\\'); - sfputc(op, c); - continue; - case '\n': - if (flags) - { - sfputc(op, c); - continue; - } - /*FALLTHROUGH*/ - case ' ': - case '\t': - while ((c = sfgetc(ip)) != EOF) - if (c == '&') - { - c = decode(ip); - if (!isspace(c)) - sfputc(op, ' '); - sfpututf(op, c); - break; - } - else if (!isspace(c)) - { - if (c == '<') - { - c = sfgetc(ip); - if (c == EOF) - break; - sfungetc(ip, c); - sfungetc(ip, '<'); - if (c != 'L' && c != '/') - sfputc(op, ' '); - } - else - { - if (c != EOF) - sfungetc(ip, c); - sfputc(op, ' '); - } - break; - } - continue; - case '\r': - case '[': - case ']': - continue; - default: - sfpututf(op, c); - continue; - } - break; - } - if (q) - sfputc(op, q); - sfputc(op, '\n'); -} - -static void -encode(Sfio_t* op, register int c) -{ - if (c == '<') - sfprintf(op, "<"); - else if (c == '>') - sfprintf(op, ">"); - else if (c == '"') - sfprintf(op, """); - else if (c == '&') - sfprintf(op, "&"); - else if (c == '[') - sfprintf(op, "["); - else if (c == ']') - sfprintf(op, "]"); - else - sfputc(op, c); -} - -static void -msg2html(register Sfio_t* ip, register Sfio_t* op, register int flags) -{ - register char* s; - register int c; - register int q; - register int p; - - sfprintf(op, "\n"); - sfprintf(op, "
    \n"); - p = q = 0; - while (s = sfgetr(ip, '\n', 1)) - { - error_info.line++; - if (flags) - sfprintf(op, "

    "); - else - { - if (*s == '$') - { - if (p) - sfprintf(op, "

    "); - else - p = 1; - sfprintf(op, "

    \n"); - continue; - } - p = 0; - if (!isdigit(*s)) - continue; - sfprintf(op, "

  1. "); - while (isdigit(c = *s++)) - sfputc(op, c); - sfprintf(op, "
  2. "); - while (c && c != '"') - c = *s++; - if (!c) - s--; - else if (isspace(*s)) - { - s++; - sfprintf(op, "
    "); - } - } - for (;;) - { - switch (c = *s++) - { - case 0: - flags &= ~MSG_SPLICE; - if (q) - { - q = 0; - sfprintf(op, "\">"); - } - sfputc(op, '\n'); - break; - case '<': - sfprintf(op, "<"); - continue; - case '>': - sfprintf(op, ">"); - continue; - case '&': - sfprintf(op, "&"); - continue; - case '[': - sfprintf(op, "["); - continue; - case ']': - sfprintf(op, "]"); - continue; - case '$': - if (!q) - { - q = 1; - sfprintf(op, "

    "); - } - else - sfprintf(op, "
    "); - continue; - } - c = ' '; - /*FALLTHROUGH*/ - default: - if (q) - { - q = 0; - sfprintf(op, "\">"); - } - sfputc(op, c); - continue; - } - break; - } - } - sfprintf(op, "

\n"); - sfprintf(op, "\n"); - error_info.line = 0; -} - -int -main(int argc, char** argv) -{ - int flags = 0; - Convert_f convert = msg2html; - - NoP(argc); - error_info.id = "msgcvt"; - for (;;) - { - switch (optget(argv, usage)) - { - case 'h': - convert = msg2html; - continue; - case 'm': - convert = html2msg; - continue; - case 'r': - flags |= MSG_RAW; - continue; - case '?': - error(ERROR_USAGE|4, "%s", opt_info.arg); - continue; - case ':': - error(2, "%s", opt_info.arg); - continue; - } - break; - } - argv += opt_info.index; - if (error_info.errors) - error(ERROR_USAGE|4, "%s", optusage(NiL)); - (*convert)(sfstdin, sfstdout, flags); - return error_info.errors != 0; -} diff --git a/usr/src/cmd/ast/msgcc/msggen.c b/usr/src/cmd/ast/msgcc/msggen.c deleted file mode 100644 index d6999c8b2c..0000000000 --- a/usr/src/cmd/ast/msgcc/msggen.c +++ /dev/null @@ -1,522 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 2000-2009 AT&T Intellectual Property * -* and is licensed under the * -* Common Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.opensource.org/licenses/cpl1.0.txt * -* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -#pragma prototyped -/* - * Glenn Fowler - * AT&T Research - */ - -static const char usage[] = -"[-?\n@(#)$Id: msggen (AT&T Research) 2002-03-11 $\n]" -USAGE_LICENSE -"[+NAME?msggen - generate a machine independent formatted message catalog]" -"[+DESCRIPTION?\bmsggen\b merges the message text source files \amsgfile\a" -" into a machine independent formatted message catalog \acatfile\a." -" The file \acatfile\a will be created if it does not already exist." -" If \acatfile\a does exist, its messages will be included in the new" -" \acatfile\a. If set and message numbers collide, the new message" -" text defined in \amsgfile\a will replace the old message text" -" currently contained in \acatfile\a. Non-ASCII characters must be" -" UTF-8 encoded. \biconv\b(1) can be used to convert to/from UTF-8.]" -"[f:format?List the \bprintf\b(3) format signature for each message in" -" \acatfile\a. A format signature is one line containing one character" -" per format specification:]{" -" [c?char]" -" [d?double]" -" [D?long double]" -" [f?float]" -" [h?short]" -" [i?int]" -" [j?long long]" -" [l?long]" -" [p?void*]" -" [s?string]" -" [t?ptrdiff_t]" -" [z?size_t]" -" [???unknown]" -"}" -"[l:list?List \acatfile\a in UTF-8 \amsgfile\a form.]" -"[s:set?Convert the \acatfile\a operand to a message set number and" -" print the number on the standard output.]" -"[+EXTENDED DESCRIPTION?Message text source files are in \bgencat\b(1)" -" format, defined as follows. Note that the fields of a message text" -" source line are separated by a single blank character. Any other" -" blank characters are considered as being part of the subsequent" -" field. The \bNL_*\b constants are defined in one or both of" -" \b\b and \b\b.]{" -" [+$ \acomment\a?A line beginning with \b$\b followed by a" -" blank character is treated as a comment.]" -" [+$delset \an\a \acomment\a?This line deletes message set" -" \an\a from an existing message catalog. \an\a" -" denotes the set number [1, \bNL_SETMAX\b]]. Any" -" text following the set number is treated as a" -" comment.]" -" [+$quote \ac\a?This line specifies an optional quote" -" character \ac\a, which can be used to surround" -" \amessage-text\a so that trailing spaces or" -" empty messages are visible in a message source" -" line. By default, or if an empty \b$quote\b" -" directive is supplied, no quoting of \amessage-text\a" -" will be recognized.]" -" [+$set \an\a \acomment\a?This line specifies the set" -" identifier of the following messages until the next" -" \b$set\b or end-of-file appears. \an\a denotes the set" -" identifier, which is defined as a number in the range" -" [1, \bNL_SETMAX\b]]. Set numbers need not be" -" contiguous. Any text following the set identifier is" -" treated as a comment. If no \b$set\b directive is" -" specified in a message text source file, all messages" -" will be located in message set \b1\b.]" -" [+$translation \aidentification\a \aYYYY-MM-DD\a[,...]]?Append" -" translation info to the message catalog header. Only" -" the newest date for a given \aidentification\a" -" is retained in the catalog. Multiple translation lines" -" are combined into a single \b,\b separated list.]" -" [+\am\a \amessage-text\a?\am\a denotes the message identifier," -" which is defined as a number in the range" -" [1, \bNL_MSGMAX\b]]. The message-text is stored in the" -" message catalogue with the set identifier specified by" -" the last \b$set\b directive, and with message" -" identifier \am\a. If the \amessage-text\a is empty," -" and a blank character field separator is present, an" -" empty string is stored in the message catalogue. If a" -" message source line has a message number, but neither" -" a field separator nor \amessage-text\a, the existing" -" message with that number (if any) is deleted from the" -" catalogue. Message identifiers need not be contiguous." -" There are no \amessage-text\a length restrictions.]" -"}" - -"\n" -"\ncatfile [ msgfile ]\n" -"\n" - -"[+SEE ALSO?\bgencat\b(1), \biconv\b(1), \bmsgcc\b(1), \btranslate\b(1)," -" \bfmtfmt\b(3)]" -; - -#include -#include -#include -#include -#include - -typedef struct Xl_s -{ - struct Xl_s* next; - char* date; - char name[1]; -} Xl_t; - -/* - * append s to the translation list - */ - -static Xl_t* -translation(Xl_t* xp, register char* s) -{ - register Xl_t* px; - register char* t; - char* d; - char* e; - - do - { - for (; isspace(*s); s++); - for (d = e = 0, t = s; *t; t++) - if (*t == ',') - { - e = t; - *e++ = 0; - break; - } - else if (isspace(*t)) - d = t; - if (d) - { - *d++ = 0; - for (px = xp; px; px = px->next) - if (streq(px->name, s)) - { - if (strcoll(px->date, d) < 0) - { - free(px->date); - if (!(px->date = strdup(d))) - error(ERROR_SYSTEM|3, "out of space [translation]"); - } - break; - } - if (!px) - { - if (!(px = newof(0, Xl_t, 1, strlen(s))) || !(px->date = strdup(d))) - error(ERROR_SYSTEM|3, "out of space [translation]"); - strcpy(px->name, s); - px->next = xp; - xp = px; - } - } - } while (s = e); - return xp; -} - -/* - * sfprintf() with ccmaps(from,to) - */ - -static int -ccsfprintf(int from, int to, Sfio_t* sp, const char* format, ...) -{ - va_list ap; - Sfio_t* tp; - char* s; - int n; - - va_start(ap, format); - if (from == to) - n = sfvprintf(sp, format, ap); - else if (tp = sfstropen()) - { - n = sfvprintf(tp, format, ap); - s = sfstrbase(tp); - ccmaps(s, n, from, to); - n = sfwrite(sp, s, n); - sfstrclose(tp); - } - else - n = -1; - return n; -} - -int -main(int argc, char** argv) -{ - register Mc_t* mc; - register char* s; - register char* t; - register int c; - register int q; - register int i; - int num; - char* b; - char* e; - char* catfile; - char* msgfile; - Sfio_t* sp; - Sfio_t* mp; - Sfio_t* tp; - Xl_t* px; - Xl_t* bp; - - Xl_t* xp = 0; - int format = 0; - int list = 0; - int set = 0; - - NoP(argc); - error_info.id = "msggen"; - for (;;) - { - switch (optget(argv, usage)) - { - case 'f': - format = list = 1; - continue; - case 'l': - list = 1; - continue; - case 's': - set = 1; - continue; - case '?': - error(ERROR_USAGE|4, "%s", opt_info.arg); - continue; - case ':': - error(2, "%s", opt_info.arg); - continue; - } - break; - } - argv += opt_info.index; - if (error_info.errors || !(catfile = *argv++)) - error(ERROR_USAGE|4, "%s", optusage(NiL)); - - /* - * set and list only need catfile - */ - - if (set) - { - sfprintf(sfstdout, "%d\n", mcindex(catfile, NiL, NiL, NiL)); - return error_info.errors != 0; - } - else if (list) - { - if (!(sp = sfopen(NiL, catfile, "r"))) - error(ERROR_SYSTEM|3, "%s: cannot read catalog", catfile); - if (!(mc = mcopen(sp))) - error(ERROR_SYSTEM|3, "%s: catalog content error", catfile); - sfclose(sp); - if (format) - { - for (set = 1; set <= mc->num; set++) - if (mc->set[set].num) - { - sfprintf(sfstdout, "$set %d\n", set); - for (num = 1; num <= mc->set[set].num; num++) - if (s = mc->set[set].msg[num]) - sfprintf(sfstdout, "%d \"%s\"\n", num, fmtfmt(s)); - } - } - else - { - if (*mc->translation) - { - ccsfprintf(CC_NATIVE, CC_ASCII, sfstdout, "$translation "); - sfprintf(sfstdout, "%s", mc->translation); - ccsfprintf(CC_NATIVE, CC_ASCII, sfstdout, "\n"); - } - ccsfprintf(CC_NATIVE, CC_ASCII, sfstdout, "$quote \"\n"); - for (set = 1; set <= mc->num; set++) - if (mc->set[set].num) - { - ccsfprintf(CC_NATIVE, CC_ASCII, sfstdout, "$set %d\n", set); - for (num = 1; num <= mc->set[set].num; num++) - if (s = mc->set[set].msg[num]) - { - ccsfprintf(CC_NATIVE, CC_ASCII, sfstdout, "%d \"", num); - while (c = *s++) - { - /*INDENT...*/ - - switch (c) - { - case 0x22: /* " */ - case 0x5C: /* \ */ - sfputc(sfstdout, 0x5C); - break; - case 0x07: /* \a */ - c = 0x61; - sfputc(sfstdout, 0x5C); - break; - case 0x08: /* \b */ - c = 0x62; - sfputc(sfstdout, 0x5C); - break; - case 0x0A: /* \n */ - c = 0x6E; - sfputc(sfstdout, 0x5C); - break; - case 0x0B: /* \v */ - c = 0x76; - sfputc(sfstdout, 0x5C); - break; - case 0x0C: /* \f */ - c = 0x66; - sfputc(sfstdout, 0x5C); - break; - case 0x0D: /* \r */ - c = 0x72; - sfputc(sfstdout, 0x5C); - break; - } - - /*...UNDENT*/ - sfputc(sfstdout, c); - } - ccsfprintf(CC_NATIVE, CC_ASCII, sfstdout, "\"\n"); - } - } - } - mcclose(mc); - return error_info.errors != 0; - } - else if (!(msgfile = *argv++) || *argv) - error(3, "exactly one message file must be specified"); - - /* - * open the files and handles - */ - - if (!(tp = sfstropen())) - error(ERROR_SYSTEM|3, "out of space [string stream]"); - if (!(mp = sfopen(NiL, msgfile, "r"))) - error(ERROR_SYSTEM|3, "%s: cannot read message file", msgfile); - sp = sfopen(NiL, catfile, "r"); - if (!(mc = mcopen(sp))) - error(ERROR_SYSTEM|3, "%s: catalog content error", catfile); - if (sp) - sfclose(sp); - xp = translation(xp, mc->translation); - - /* - * read the message file - */ - - q = 0; - set = 1; - error_info.file = msgfile; - while (s = sfgetr(mp, '\n', 1)) - { - error_info.line++; - if (!*s) - continue; - if (*s == '$') - { - if (!*++s || isspace(*s)) - continue; - for (t = s; *s && !isspace(*s); s++); - if (*s) - *s++ = 0; - if (streq(t, "delset")) - { - while (isspace(*s)) - s++; - num = (int)strtol(s, NiL, 0); - if (num < mc->num && mc->set[num].num) - for (i = 1; i <= mc->set[num].num; i++) - mcput(mc, num, i, NiL); - } - else if (streq(t, "quote")) - q = *s ? *s : 0; - else if (streq(t, "set")) - { - while (isspace(*s)) - s++; - num = (int)strtol(s, &e, 0); - if (e != s) - set = num; - else - error(2, "set number expected"); - } - else if (streq(t, "translation")) - xp = translation(xp, s); - } - else - { - t = s + sfvalue(mp); - num = (int)strtol(s, &e, 0); - if (e != s) - { - s = e; - if (!*s) - { - if (mcput(mc, set, num, NiL)) - error(2, "(%d,%d): cannot delete message", set, num); - } - else if (isspace(*s++)) - { - if (t > (s + 1) && *(t -= 2) == '\\') - { - sfwrite(tp, s, t - s); - while (s = sfgetr(mp, '\n', 0)) - { - error_info.line++; - t = s + sfvalue(mp); - if (t <= (s + 1) || *(t -= 2) != '\\') - break; - sfwrite(tp, s, t - s); - } - if (!(s = sfstruse(tp))) - error(ERROR_SYSTEM|3, "out of space"); - } - if (q) - { - if (*s++ != q) - { - error(2, "(%d,%d): %c quote expected", set, num, q); - continue; - } - b = t = s; - while (c = *s++) - { - if (c == '\\') - { - c = chresc(s - 1, &e); - s = e; - if (c) - *t++ = c; - else - error(1, "nul character ignored"); - } - else if (c == q) - break; - else - *t++ = c; - } - if (*s) - { - error(2, "(%d,%d): characters after quote not expected", set, num); - continue; - } - *t = 0; - s = b; - } - if (mcput(mc, set, num, s)) - error(2, "(%d,%d): cannot add message", set, num); - } - else - error(2, "message text expected"); - } - else - error(2, "message number expected"); - } - } - error_info.file = 0; - error_info.line = 0; - - /* - * fix up the translation record - */ - - if (xp) - { - t = ""; - for (;;) - { - for (bp = 0, px = xp; px; px = px->next) - if (px->date && (!bp || strcoll(bp->date, px->date) < 0)) - bp = px; - if (!bp) - break; - sfprintf(tp, "%s%s %s", t, bp->name, bp->date); - t = ", "; - bp->date = 0; - } - if (!(mc->translation = sfstruse(tp))) - error(ERROR_SYSTEM|3, "out of space"); - } - - /* - * dump the catalog to a local temporary - * rename if no errors - */ - - if (!(s = pathtemp(NiL, 0, "", error_info.id, NiL)) || !(sp = sfopen(NiL, s, "w"))) - error(ERROR_SYSTEM|3, "%s: cannot write catalog file", catfile); - if (mcdump(mc, sp) || mcclose(mc) || sfclose(sp)) - { - remove(s); - error(ERROR_SYSTEM|3, "%s: temporary catalog file write error", s); - } - remove(catfile); - if (rename(s, catfile)) - error(ERROR_SYSTEM|3, "%s: cannot rename from temporary catalog file %s", catfile, s); - return error_info.errors != 0; -} diff --git a/usr/src/cmd/ast/msgcc/msgget.c b/usr/src/cmd/ast/msgcc/msgget.c deleted file mode 100644 index d4c8798fa2..0000000000 --- a/usr/src/cmd/ast/msgcc/msgget.c +++ /dev/null @@ -1,109 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 2000-2009 AT&T Intellectual Property * -* and is licensed under the * -* Common Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.opensource.org/licenses/cpl1.0.txt * -* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -#pragma prototyped -/* - * Glenn Fowler - * AT&T Research - */ - -static const char usage[] = -"[-?\n@(#)$Id: msgget (AT&T Research) 2001-04-21 $\n]" -USAGE_LICENSE -"[+NAME?msgget - get a message from a message catalog]" -"[+DESCRIPTION?\bmsgget\b gets the message corresponding to the parameters." -" If \alocale\a is \b-\b then the current locale is used. \acommand\a" -" may be specified for command specific messages. \acatalog\a specifies" -" the message catalog name. [\aset\a.]]\anumber\a identifies the message" -" by message \anumber\a and an optional message \aset\a; if specified as" -" \b-\b then the message set and number are determined by looking up" -" \atext\a in the corresponding \bC\b locale message catalog.]" - -"\n" -"\nlocale [command:]catalog [set.]number [ text ]\n" -"\n" - -"[+SEE ALSO?\biconv\b(1), \bmsgcc\b(1), \bmsggen\b(1)]" -; - -#include -#include -#include - -int -main(int argc, char** argv) -{ - register Mc_t* mc; - register char* s; - char* loc; - char* cmd; - char* cat; - char* msg; - int set; - int num; - Sfio_t* sp; - char path[PATH_MAX]; - - NoP(argc); - error_info.id = "msgget"; - for (;;) - { - switch (optget(argv, usage)) - { - case '?': - error(ERROR_USAGE|4, "%s", opt_info.arg); - continue; - case ':': - error(2, "%s", opt_info.arg); - continue; - } - break; - } - argv += opt_info.index; - if (error_info.errors || !(loc = *argv++) || !(cmd = *argv++) || !(s = *argv++)) - error(ERROR_USAGE|4, "%s", optusage(NiL)); - if (streq(s, "-")) - set = num = 0; - else - mcindex(s, NiL, &set, &num); - if (!(msg = *argv++)) - msg = ""; - else if (*argv) - error(ERROR_USAGE|4, "%s", optusage(NiL)); - if (streq(loc, "-")) - 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 (cat) - *--cat = ':'; - error(3, "%s: cannot locate message catalog", cmd); - } - if (!(sp = sfopen(NiL, path, "r"))) - error(ERROR_SYSTEM|3, "%s: cannot read message catalog", path); - if (!(mc = mcopen(sp))) - error(3, "%s: invalid message catalog", path); - if (set) - s = mcget(mc, set, num, msg); - else - s = errorx(loc, cmd, cat, msg); - sfputr(sfstdout, s, '\n'); - return error_info.errors != 0; -} diff --git a/usr/src/cmd/ast/shcomp/Makefile b/usr/src/cmd/ast/shcomp/Makefile new file mode 100644 index 0000000000..b941f59d09 --- /dev/null +++ b/usr/src/cmd/ast/shcomp/Makefile @@ -0,0 +1,94 @@ +# +# 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 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# Copyright (c) 2018, Joyent, Inc. +# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. + +SHELL= /usr/bin/ksh93 + +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 + +OBJECTS= shcomp.o + +ASTSRC= $(C_AST)/src/cmd/ksh93 +LIBSHELLMACH= $(MACH) +LIBSHELLBASE= ../libshell +LIBSHELLSRC= $(ASTSRC)/sh + +SRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c) + +LDLIBS += -lshell -last + +# 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 + +SMOFF += all_func_returns + +ROOTCMDDIR=$(ROOT)/usr/bin + +PROG= shcomp + +%.o: $(LIBSHELLSRC)/%.c + $(COMPILE.c) -c -o $@ $< + $(POST_PROCESS_O) + +all: $(PROG) + +# dummy file since AST/ksh/shcomp doesn't use *.po files +# (and "shcomp" is just a frontend which calls directly into libshell, +# 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 + $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS) + $(POST_PROCESS) + +clean: + $(RM) $(OBJECTS) + +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/cmd/ksh/Makefile b/usr/src/cmd/ksh/Makefile deleted file mode 100644 index a2eb19cde9..0000000000 --- a/usr/src/cmd/ksh/Makefile +++ /dev/null @@ -1,93 +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. -# - -SHELL=/usr/bin/ksh93 - -PROG= ksh - -USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93 - -include ../Makefile.cmd - -SUBDIRS= $(MACH) -$(BUILD64)SUBDIRS += $(MACH64) - -SUBDIRS += builtins - -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 -lint := TARGET = lint -testshell := TARGET = testshell - -.KEEP_STATE: - -all clean clobber lint testshell: $(SUBDIRS) - -# 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) -$(PROG).po: - $(RM) ksh.po ksh93.po ; \ - $(TOUCH) $(PROG).po - -install: $(ISAEXEC) $(SUBDIRS) - @(set -o xtrace ; \ - builtin ln ; \ - builtin rm ; \ - rm -f $(ROOTPROG) ; \ - ln $(ISAEXEC) $(ROOTPROG) ; \ - for i in $(USRKSH_ALIAS_LIST) ; do \ - [[ "$$i" == "$(PROG)" ]] && continue ; \ - rm -f "$(ROOTBIN)/$$i" ; \ - ln "$(ROOTBIN)/$(PROG)" "$(ROOTBIN)/$$i" ; \ - done \ - ) - $(RM) $(ROOTSBIN)/sh - $(SYMLINK) ../usr/bin/$(ARCH32)/ksh93 $(ROOTSBIN)/sh - $(RM) $(ROOTSBIN)/jsh - $(SYMLINK) ../usr/bin/ksh93 $(ROOTSBIN)/jsh - $(RM) $(ROOTBIN)/jsh - $(SYMLINK) ksh93 $(ROOTBIN)/jsh - $(RM) $(ROOTBIN)/sh - $(SYMLINK) $(ARCH32)/ksh93 $(ROOTBIN)/sh - $(RM) $(ROOTLIB)/rsh - $(SYMLINK) ../bin/ksh93 $(ROOTLIB)/rsh - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - -include ../Makefile.targ diff --git a/usr/src/cmd/ksh/Makefile.com b/usr/src/cmd/ksh/Makefile.com deleted file mode 100644 index 9f6b431e1f..0000000000 --- a/usr/src/cmd/ksh/Makefile.com +++ /dev/null @@ -1,131 +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) 2018, Joyent, Inc. - -SHELL=/usr/bin/ksh93 - -PROG= ksh - -USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93 - -OBJECTS= \ - pmain.o - -LIBSHELLBASE=../../../lib/libshell -LIBSHELLSRC=$(LIBSHELLBASE)/common/sh - -SRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c) - -LDLIBS += -lshell - -# Set common AST build flags (e.g., needed to support the math stuff). -include ../../../Makefile.ast - -# 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 -# 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) - -# 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 - -.KEEP_STATE: - -%.o: $(LIBSHELLSRC)/%.c - $(COMPILE.c) -c -o $@ $< - $(POST_PROCESS_O) - -all: $(PROG) - -# We explicitly delete "ksh" and "ksh93" to catch changes in -# BUILD_KSH93_AS_BINKSH (see Makefile.ksh93switch) -# and soft-link $(PROG) to ksh/ksh93 below because ksh93 test -# suite seems to require that ksh93 is available as "ksh" in -# ${PATH} (see comment about "io.sh" in Makefile.testshell). -$(PROG): $(OBJECTS) - $(RM) ksh ksh93 - $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS) - $(POST_PROCESS) - (set +o errexit ; \ - [[ ! -x ksh93 ]] && ln $(PROG) ksh93 ; \ - [[ ! -x ksh ]] && ln $(PROG) ksh ; \ - true \ - ) - -clean: - $(RM) $(OBJECTS) - -# We explicitly delete "ksh" and "ksh93" to catch changes in -# BUILD_KSH93_AS_BINKSH (see Makefile.ksh93switch) -CLOBBERFILES += \ - ksh \ - ksh93 - -# Install rule for $(MACH)/Makefile (32bit) -INSTALL.ksh.32bit=@ \ - (print "$(POUND_SIGN) Installing 32bit $(PROG) aliases $(USRKSH_ALIAS_LIST)" ; \ - set -o xtrace ; \ - for i in $(USRKSH_ALIAS_LIST) ; do \ - [[ "$$i" == "$(PROG)" ]] && continue ; \ - $(RM) "$(ROOTBIN32)/$$i" ; \ - $(LN) "$(ROOTBIN32)/$(PROG)" "$(ROOTBIN32)/$$i" ; \ - done \ - ) - -# Install rule for $(MACH64)/Makefile (64bit) -INSTALL.ksh.64bit=@ \ - (print "$(POUND_SIGN) Installing 64bit $(PROG) aliases $(USRKSH_ALIAS_LIST)" ; \ - set -o xtrace ; \ - for i in $(USRKSH_ALIAS_LIST) ; do \ - [[ "$$i" == "$(PROG)" ]] && continue ; \ - $(RM) "$(ROOTBIN64)/$$i" ; \ - $(LN) "$(ROOTBIN64)/$(PROG)" "$(ROOTBIN64)/$$i" ; \ - 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/ksh/Makefile.testshell deleted file mode 100644 index 7c1c6d0492..0000000000 --- a/usr/src/cmd/ksh/Makefile.testshell +++ /dev/null @@ -1,173 +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. -# - -# -# Run the ksh93 minimum set of tests -# - -# -# Notes: -# - "builtins.sh" may fail in some locales like this: -# -- snip -- -# ## Running ksh test: LANG='zh_TW.EUC' script='builtins.sh' -# builtins.sh[274]: printf "%T" now -# -- snip -- -# -# - "options.sh" may currently fail in some locales with: -# -- snip -- -# options.sh[145]: -G ** failed -- expected 'bam.c bar bar.c bar/bam.c bar/foo.c foo foo/bam.c', got 'bam.c bar bar/bam.c bar.c bar/foo.c foo foo/bam.c' -# options.sh[149]: -G **/*.c failed -- expected 'bam.c bar.c bar/bam.c bar/foo.c foo/bam.c', got 'bam.c bar/bam.c bar.c bar/foo.c foo/bam.c' -# -- snip -- -# This may be simply a different sort order or a bug in the test suite. -# Currently under investigation. -# -# - "glob.sh" may currently fail in some locales (e.g. en_US.UTF-8) with: -# -- snip -- -# glob.sh[157] glob -- expected '
', got '
' -# glob.sh[277] glob -- expected ' ', got ' ' -# -- snip -- -# This may be simply a different sort order or a bug in the test suite. -# Currently under investigation. -# -# - These tests need a working system clock, otherwise they'll bite you. -# -# - The current list of locales was mainly composed to cover various encodings -# 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", -# "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 -# being integrated into OS/Net and then change the test sequence to -# 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 -# be run on a quiet system with no other activity. -# - -TESTSRC= $(LIBSHELLBASE)/common/tests - -# ON_KSH_TEST_LOCALES can be overridden via -# $ export ON_KSH_TEST_LOCALES= # before $ make install # -ON_KSH_TEST_LOCALES = \ - C \ - en_US.UTF-8 en_US en_US.ISO8859-15@euro \ - he_IL.UTF-8 \ - hi_IN.UTF-8 \ - ja ja_JP.PCK ja_JP.UTF-8 ja_JP.eucJP \ - ko_KR.UTF-8 ko_KR.EUC \ - th_TH.TIS620 \ - zh_CN.EUC zh_CN.GBK \ - zh_CN.GB18030 zh_CN.GB18030@pinyin zh_CN.GB18030@radical zh_CN.GB18030@stroke \ - zh_CN.UTF-8 zh_CN.UTF-8@pinyin zh_CN.UTF-8@radical zh_CN.UTF-8@stroke \ - zh_HK.BIG5HK \ - zh_TW.BIG5 zh_TW.EUC zh_TW.UTF-8 - -# ON_KSH_TEST_LIST can be overridden via -# $ export ON_KSH_TEST_LIST= # before $ make install # -ON_KSH_TEST_LIST = $(TESTSRC)/*.sh - -# Boolean (true/false) flag to control whether we should make test -# failures non-fatal -ON_KSH_TEST_IGNORE_TESTFAILURE=false - -# We must wait for other things in this subdir to finish before running -# the test suite, otherwise we may run into trouble that this activity -# may disturb the test suite run (resulting in weird "heisenbug"-like -# test failures). -testshell: $(PROG) - @ \ - builtin basename ; \ - print '# NOTE: Make sure your binaries in ROOT match your kernel!' ; \ - ( \ - set +o errexit ; \ - export PATH="$(SRC)/cmd/ksh/$(LIBSHELLMACH):/bin:/usr/bin" ; \ - printf "# which ksh='%s', ksh93='%s'\n" \ - "$$(which ksh)" "$$(which ksh93)" ; \ - ) ; \ - if [[ "$$(isalist)" != ~(F)$(LIBSHELLMACH) ]] ; then \ - printf \ - "# ISA='%s' not available on this system, skipping tests...\n" \ - "$(LIBSHELLMACH)" ; \ - exit 0 ; \ - fi ; \ - print "# Libraries used:" ; \ - LD_LIBRARY_PATH_64="$(ROOTLIB64)/" \ - LD_LIBRARY_PATH_32="$(ROOTLIB)/" \ - LD_LIBRARY_PATH="$(ROOTLIB64)/:$(ROOTLIB)/" \ - /usr/bin/ldd "$(SRC)/cmd/ksh/$(LIBSHELLMACH)/ksh" ; \ - print "# Running tests:" ; \ - redirect 2>&1 ; \ - (supported_locales="$$(/usr/bin/locale -a)" ; \ - for test_lang in $(ON_KSH_TEST_LOCALES) ; do \ - if [[ "$$(egrep "^$${test_lang}\$$" <<< "$${supported_locales}")" == "" ]] ; then \ - printf \ - "# Locale '%s' not supported, skipping tests...\n" \ - "$${test_lang}" ; \ - 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" ]] || \ - $(ON_KSH_TEST_IGNORE_TESTFAILURE) && \ - set +o errexit ; \ - for mode in 'plain_script:-s' 'compiled_script:-c' ; do \ - printf \ - "## Running %s test: LANG='%s' script='%s', mode='%s'\n" \ - "$(LIBSHELLMACH)/ksh" \ - "$${test_lang}" \ - "$$(basename "$${test_item}")" \ - "$${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}" \ - VMALLOC_OPTIONS=abort \ - SHCOMP="$(ROOTBIN)/shcomp" \ - "$${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) \ - ) ; \ - done ; \ - set -o errexit ; \ - done) ; \ - done) diff --git a/usr/src/cmd/ksh/amd64/Makefile b/usr/src/cmd/ksh/amd64/Makefile deleted file mode 100644 index c6a3da7fe7..0000000000 --- a/usr/src/cmd/ksh/amd64/Makefile +++ /dev/null @@ -1,38 +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. -# - -# Specify the MACH we currently use to build and test ksh -LIBSHELLMACH= $(MACH64) - -include ../../Makefile.cmd -include ../../Makefile.cmd.64 - -include ../Makefile.com - -install: all $(ROOTPROG64) - $(INSTALL.ksh.64bit) - -include ../../Makefile.targ diff --git a/usr/src/cmd/ksh/builtins/Makefile b/usr/src/cmd/ksh/builtins/Makefile deleted file mode 100644 index 2a3977c94c..0000000000 --- a/usr/src/cmd/ksh/builtins/Makefile +++ /dev/null @@ -1,151 +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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright 2010 Nexenta Systems, Inc. All rights reserved. -# -# Copyright (c) 2018, Joyent, Inc. -# - -PROG= alias -ALIASPROG= \ - bg \ - cd \ - cksum \ - cmp \ - comm \ - command \ - cut \ - fc \ - fg \ - getopts \ - hash \ - jobs \ - join \ - kill \ - logname \ - paste \ - print \ - read \ - rev \ - sum \ - tee \ - test \ - type \ - ulimit \ - umask \ - unalias \ - uniq \ - wait \ - wc - -XPG4ALIASPROG= \ - alias \ - bg \ - cd \ - command \ - fc \ - fg \ - getopts \ - hash \ - jobs \ - kill \ - read \ - test \ - type \ - ulimit \ - umask \ - unalias \ - wait - -XPG4SH= \ - sh - -ROOTXPG4ALIAS= \ - $(XPG4SH:%=$(ROOTXPG4BIN)/%) $(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%) -ROOTALIASPROG= $(ALIASPROG:%=$(ROOTBIN)/%) - -include ../../Makefile.cmd -$(SPARC_BLD)include ../../Makefile.cmd.64 - -FILEMODE= 555 -CERRWARN += -_gcc=-Wno-parentheses - -# not linted -SMATCH=off - -.KEEP_STATE: - -all: $(PROG) - -$(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%): - $(RM) $@; $(SYMLINK) ../../bin/alias $@ - -$(XPG4SH:%=$(ROOTXPG4BIN)/%): - $(RM) $@; $(SYMLINK) ../../bin/ksh93 $@ - -$(ALIASPROG:%=$(ROOTBIN)/%): $(ROOTPROG) - $(RM) $@; $(LN) $(ROOTPROG) $@ - -.KEEP_STATE: - -# Set common AST build flags (e.g., needed to support the math stuff). -include ../../../Makefile.ast - -OBJECTS= \ - alias.o - -SRCS= $(OBJECTS:%.o=%.c) - -LDLIBS += -lshell -lcmd -last - -CPPFLAGS = \ - $(DTEXTDOM) $(DTS_ERRNO) \ - -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) - -ROOTCMDDIR=$(ROOT)/usr/bin - -install: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTALIASPROG) $(ROOTXPG4ALIAS) - -$(PROG): $(OBJECTS) - $(RM) alias - $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS) - $(POST_PROCESS) - -clean clobber: - rm -f $(PROG) $(OBJECTS) - -lint _msg: diff --git a/usr/src/cmd/ksh/builtins/alias.c b/usr/src/cmd/ksh/builtins/alias.c deleted file mode 100644 index 88edbc1e9b..0000000000 --- a/usr/src/cmd/ksh/builtins/alias.c +++ /dev/null @@ -1,259 +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 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * alias.c is a C version of the alias.sh wrapper (which links ksh - * builtins to commands in /usr/bin/, e.g. calling this wrapper as - * /usr/bin/alias will call the ksh "alias" builtin, running it as - * /usr/bin/cut will call the ksh "cut" builtin etc. - */ - -#include -#include -#include -#include - -typedef struct { - const char *name; - int (* func)(int, char **, void *); -} bfastpathrec; - -/* - * We've disabled the "fastpath" codepath for some commands below - * because it causes a paradoxon for large input files (as used by - * ON PerfPIT for testing). For /usr/bin/rev (where the issue was - * first discovered) it looks like this: - * - for small files like /etc/profile the fastpath is faster in a loop - * with 1000 iterations (8 seconds with fastpath, 14 seconds without - * fastpath) - * - for large files (/usr/pub/UTF-8 replicated until the test file - * reaches 24884706 bytes) the benchmark reverses: The fastpath now - * needs 40 seconds and without fastpath it needs 30 seconds (for 100 - * iterations). - */ -#if 0 -#define ENABLE_PERFORMANCE_PARADOXON 1 -#endif - -/* - * List of libcmd builtins which do not require a |Shell_t| context. - * This list was automatically generated from - */ -static const -bfastpathrec fastpath_builtins[] = -{ - /* This list must be alphabetically sorted for |strcmp()| usage */ - { "basename", b_basename }, - { "cat", b_cat }, - { "chmod", b_chmod }, -#ifdef ENABLE_PERFORMANCE_PARADOXON - { "cksum", b_cksum }, -#endif /* ENABLE_PERFORMANCE_PARADOXON */ - { "cmp", b_cmp }, - { "comm", b_comm }, - { "cp", b_cp }, - { "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 }, - { "ln", b_ln }, - { "logname", b_logname }, - { "md5sum", b_md5sum }, - { "mkdir", b_mkdir }, - { "mkfifo", b_mkfifo }, - { "mktemp", b_mktemp }, - { "mv", b_mv }, - { "paste", b_paste }, - { "pathchk", b_pathchk }, - { "pids", b_pids }, - { "readlink", b_readlink }, -#ifdef ENABLE_PERFORMANCE_PARADOXON - { "rev", b_rev }, -#endif /* ENABLE_PERFORMANCE_PARADOXON */ - { "rm", b_rm }, - { "rmdir", b_rmdir }, - { "stty", b_stty }, -#ifdef ENABLE_PERFORMANCE_PARADOXON - { "sum", b_sum }, -#endif /* ENABLE_PERFORMANCE_PARADOXON */ - { "sync", b_sync }, - { "tail", b_tail }, - { "tee", b_tee }, - { "tty", b_tty }, - { "uname", b_uname }, - { "uniq", b_uniq }, - { "wc", b_wc }, - { "xgrep", b_xgrep }, - { NULL, (int (*)(int, char **, void *))NULL } -}; - -static inline -const bfastpathrec * -find_bfastpathrec(const char *name) -{ - unsigned int i; - signed int cmpres; - for (i = 0; fastpath_builtins[i].name != NULL; i++) { - cmpres = strcmp(fastpath_builtins[i].name, name); - if (cmpres == 0) - return (&fastpath_builtins[i]); - else if (cmpres > 0) - return (NULL); - - } - return (NULL); -} - -static inline -int -fastpath_builtin_main(const bfastpathrec *brec, int argc, char *argv[]) -{ - setlocale(LC_ALL, ""); /* calls |_ast_setlocale()| */ - - return ((*brec->func)(argc, argv, NULL)); -} - - -/* Builtin script, original 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 - * 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 - * PATH element) - otherwise we may execute the wrong command - * if an executable with the same name sits in a PATH element - * before /usr/bin (e.g. /usr/xpg4/bin/ls would be executed - * before /usr/bin/ls if the path was something like - * PATH=/usr/xpg4/bin:/usr/bin). - */ -"if [[ \"${cmd}\" != ~(Elr)(alias|unalias|command) ]] && " - "! alias \"${cmd}\" >/dev/null 2>&1 ; then\n" - "PATH='' builtin \"${cmd}\"\n" -"fi\n" -/* command is a keyword and needs to be handled separately */ -"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[]) -{ - int i; - Shell_t *shp; - Namval_t *np; - int exitval; - - /* - * Create copy of |argv| array shifted by one position to - * emulate $ /usr/bin/sh ... #. - * First position is set to "/usr/bin/sh" since other - * values may trigger special shell modes (e.g. *rsh* will - * trigger "restricted" shell mode etc.). - */ - char *xargv[argc+2]; - xargv[0] = "/usr/bin/sh"; - xargv[1] = "scriptname"; - for (i = 0; i < argc; i++) { - xargv[i+1] = argv[i]; - } - xargv[i+1] = NULL; - - shp = sh_init(argc+1, xargv, 0); - if (!shp) - error(ERROR_exit(1), "shell initialisation failed."); - (void) sh_trap(script, 0); - - np = nv_open("exitval", shp->var_tree, 0); - if (!np) - error(ERROR_exit(1), "variable %s not found.", "exitval"); - exitval = (int)nv_getnum(np); - nv_close(np); - - return (exitval); -} - -int -main(int argc, char *argv[]) -{ - const char *progname; - const bfastpathrec *brec; - 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) { - 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 - { - /* ... or from within a full shell. */ - return (script_builtin_main(argc, argv)); - } -} diff --git a/usr/src/cmd/ksh/i386/Makefile b/usr/src/cmd/ksh/i386/Makefile deleted file mode 100644 index 5ce68f9ef3..0000000000 --- a/usr/src/cmd/ksh/i386/Makefile +++ /dev/null @@ -1,37 +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. -# - -# Specify the MACH we currently use to build and test ksh -LIBSHELLMACH= $(MACH) - -include ../../Makefile.cmd - -include ../Makefile.com - -install: all $(ROOTPROG32) - $(INSTALL.ksh.32bit) - -include ../../Makefile.targ diff --git a/usr/src/cmd/ksh/sparc/Makefile b/usr/src/cmd/ksh/sparc/Makefile deleted file mode 100644 index 5ce68f9ef3..0000000000 --- a/usr/src/cmd/ksh/sparc/Makefile +++ /dev/null @@ -1,37 +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. -# - -# Specify the MACH we currently use to build and test ksh -LIBSHELLMACH= $(MACH) - -include ../../Makefile.cmd - -include ../Makefile.com - -install: all $(ROOTPROG32) - $(INSTALL.ksh.32bit) - -include ../../Makefile.targ diff --git a/usr/src/cmd/ksh/sparcv9/Makefile b/usr/src/cmd/ksh/sparcv9/Makefile deleted file mode 100644 index c6a3da7fe7..0000000000 --- a/usr/src/cmd/ksh/sparcv9/Makefile +++ /dev/null @@ -1,38 +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. -# - -# Specify the MACH we currently use to build and test ksh -LIBSHELLMACH= $(MACH64) - -include ../../Makefile.cmd -include ../../Makefile.cmd.64 - -include ../Makefile.com - -install: all $(ROOTPROG64) - $(INSTALL.ksh.64bit) - -include ../../Makefile.targ diff --git a/usr/src/cmd/shcomp/Makefile b/usr/src/cmd/shcomp/Makefile deleted file mode 100644 index 568d9c70f1..0000000000 --- a/usr/src/cmd/shcomp/Makefile +++ /dev/null @@ -1,99 +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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright (c) 2018, Joyent, Inc. - -SHELL=/usr/bin/ksh93 - -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 - -OBJECTS= \ - shcomp.o - -LIBSHELLMACH=$(MACH) -LIBSHELLBASE=../../lib/libshell -LIBSHELLSRC=$(LIBSHELLBASE)/common/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 -# 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 - -SMOFF += all_func_returns - -ROOTCMDDIR=$(ROOT)/usr/bin - -PROG= shcomp - -%.o: $(LIBSHELLSRC)/%.c - $(COMPILE.c) -c -o $@ $< - $(POST_PROCESS_O) - -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) -$(PROG).po: - $(RM) $(PROG).po ; \ - $(TOUCH) $(PROG).po - - -install: all $(ROOTCMD) - -$(PROG): $(OBJECTS) - $(RM) shcomp - $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS) - $(POST_PROCESS) - -clean: - $(RM) $(OBJECTS) - -lint: - -include ../Makefile.targ 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 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 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 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 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 " + [dgk]="David Korn " + [kpv]="Phong Vo " + + [aedgar]="Adam Edgar " + [alb]="Adam Buchsbaum " + [ashaikh]="Aman Shaikh " + [bala]="Bala Krishnamurthy " + [brussell]="Brian Russell " + [chen]="Robin Chen " + [dfwc]="Don Caldwell " + [ek]="Lefty Koutsofios " + [gruber]="Bob Gruber " + [jiawang]="Jia Wang " + [jkf]="Jeff Fellin " + [jlk]="Jeff Korn <@google.com>" + [kfisher]="Kathleen Fisher " + [kwc]="Ken Church <@microsoft.com>" + + [bwk]="Brian Kernigham " + [dmr]="Dennis Ritchie " + [doug]="Doug McIlroy " + [ekrell]="Eduardo Krell " + [jjs]="John Snyder " + [rao]="Herman Rao " + + [ast-users]="AST users mailgroup " + [ast-developers]="AST developers mailgroup " +) + +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/ + $() + where 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 [] + $() + 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 <<'!' + /^$/,/^$/s/ changes$/,/^$/m// + 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 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 +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 " > 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 " > 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 <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 , instead supplies + * which provides K&R prototypes *and* it requires -lgdbm + * some 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 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 ][-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 ][-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 ][-author?Phong Vo ][-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 ][-author?Phong Vo ][-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 ][-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 ][-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 ][-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 ][-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 ][-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 ][-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 ][-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 ][-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 ][-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 ][-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 ][-author?Lefty Koutsofios ][-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 ][-author?Lefty Koutsofios ][-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 ][-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 ][-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 ][-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 ][-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 ][-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 ][-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 + * + * :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 /**/ test code comment to disable default #include +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 +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 (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 if | (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 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 and +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 +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 +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_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 <) + 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 # +# # +######################################################################## +: 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; code=\$?; rm -f $cmd; echo $command: exit \$code >&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 * +* * +***********************************************************************/ +/* + * small test for sleepycat dbm compatibility + */ + +#define DB_DBM_HSEARCH 1 + +#if DB_DBM_HSEARCH +#include +#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 # +# # +######################################################################## +: 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 * +* * +***********************************************************************/ +/* + * small test for -ldl + */ + +#ifndef dlopen +#include +#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 # +# # +######################################################################## +: 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 # +# # +######################################################################## +: 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 * +* * +***********************************************************************/ +/* + * small test for -lgdbm + */ + +#define _hdr_gdbm_ndbm 1 + +#if _hdr_gdbm_ndbm +#include +#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 * +* * +***********************************************************************/ +/* + * small test for -lgdbm + */ + +#define _hdr_gdbm_ndbm 1 + +#if _hdr_gdbm_ndbm +#include +#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 * +* * +***********************************************************************/ +/* + * small test for -lgdbm + */ + +#define _hdr_ndbm 1 + +#if _hdr_ndbm +#include +#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 * +* * +***********************************************************************/ +#ifndef printf +#include +#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 # +# # +######################################################################## +: 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 * +* * +***********************************************************************/ +#ifndef iconv +#include +#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 # +# # +######################################################################## +# 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 <&$stderr + ;; + esac + sh -c "cat <&$stderr + ;; + esac + sh -c "cat < "$1" + ;; + *) if cat > "$1" <&$stderr + ;; + esac + sh -c "cat > \"$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 <= 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 ] + } +[+?= \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, , + , \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\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, , , \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 $stdout>&1 $stderr>&2" +case " $* " in +*" set debug "[3456789]*) + ;; +*) eval "exec 2>&$nullout" + ;; +esac + +# prompt complications + +case `print -n aha /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 " +noext='*[<"][Ss][Tt][Dd][Ii][Oo].[Hh][">]*|**|**|*/[*][*]/*' + +# 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,^[ ]*#,#,' <&$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 +$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 + *""*) + 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 # + 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 ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _hdr_limits 1 /* #include 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 ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _hdr_limits 1 /* #include 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 ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define _hdr_limits 1 /* #include 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 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 ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define _sys_stat 1 /* #include 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 ok */ +#define _sys_stat 1 /* #include 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 ok */ +#define _sys_stat 1 /* #include 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 ok */ +#define _sys_stat 1 /* #include 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 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 ok */ +#define HAVE_STDIO 1 /* #include 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 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 ok */ +#define HAVE_STDIO 1 /* #include 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 ok */ +#define HAVE_STDIO 1 /* #include 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 ok */ +#define HAVE_STDIO 1 /* #include 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 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 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 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 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 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 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 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 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 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 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 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 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 ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define HAVE_STDLIB_H 1 /* #include ok */ +#define HAVE_UNISTD_H 1 /* #include ok */ +#define HAVE_STDIO_H 1 /* #include 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 ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_stdio 1 /* #include 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 ok */ +#define HAVE_STDLIB_H 1 /* #include ok */ +#define HAVE_UNISTD_H 1 /* #include ok */ +#define HAVE_STDIO_H 1 /* #include 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 < 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 < 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 < 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 < 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 < 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 < 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 < 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 < 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 < 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 < 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 < 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 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 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 =
+_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 ok */ +#define _str "string" +#define _hdr
+#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 ok */ +#define _hdr_t 1 /* #include 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 ok */ +#define _hdr_t 1 /* #include 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 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 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 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 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 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 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 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 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 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 ok */ +#include +#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 ok */ +#include +#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 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 # +# # +######################################################################## +# 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 * +* * +***********************************************************************/ +#ifndef gettext +#include +#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 * +* * +***********************************************************************/ +/* + * -lm test #1 + */ + +#ifndef sin +#include +#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 * +* * +***********************************************************************/ +/* + * -lm test #2 + */ + +#include + +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 * +* * +***********************************************************************/ +/* + * -lm test #3 + */ + +#include + +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 * +* * +***********************************************************************/ +/* + * -lm test #4 + */ + +#include + +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 * +* * +***********************************************************************/ +/* + * -lm test #5 + */ + +#include + +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 * +* * +***********************************************************************/ +/* + * -lm test #6 + */ + +#define _ISOC99_SOURCE 1 + +#include + +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 ' > 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 void f(T){}' > implc_x.$src +echo 'template void f(T);' > implc_x.h +echo 'extern int NotalL(){return(0);}' > notall.$src +echo '#include +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 int gt(T a, T b); +template 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 +int i; +int main(){int j;j = i * 10;return j;}' > strip.$src +echo 'template 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 in dir' + elif $cc -c $1 -Iim imstd.$src + then : "$1 -Idir should find in dir" + elif $cc -c -Iim $1 imstd.$src + then include_local=$1 + break + else : "-Idir $1 should skip 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 + 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 +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 +#include +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 < * +* * +***********************************************************************/ +#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 +#include + +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 +#include +#include +#include +#include +#include + +#if !_PACKAGE_ast && defined(__STDC__) +#include +#include +#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 # +# # +######################################################################## +### this script contains archaic constructs that work with all sh variants ### +# mamprobe - generate MAM cc probe info +# Glenn Fowler + +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 < /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 # +# # +######################################################################## +: 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 # +# # +######################################################################## +: 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 <&2 <&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 # +# # +######################################################################## +: 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 * +* * +***********************************************************************/ +/* + * 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 * +* * +***********************************************************************/ +/* + * 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/ + $() + where 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 [] + $() + 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 <<'!' + /^$/,/^$/s/ changes$/,/^$/m// + 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 # +# # +######################################################################## +### this script contains archaic constructs that work with all sh variants ### +# package - source and binary package control +# Glenn Fowler + +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=" + +$2 package installation instructions + +" + eO=' +' + bH="

" + eH='

' + bP='

' + bL='

' + bL2='

' + eL='

' + 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)' + ;; + *) 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 || 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 +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 +#if TD || TZ +#include +#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 < $tmp.b.c </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 </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 +#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 '^

Authorization Required

' 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 '^

Authorization Required

' 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 &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 <&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 * +* * +***********************************************************************/ + +/* : : 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 +# include +# include +# if 1 +# include +# else +# include +# 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 +# include +# include +# include + +# 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, ¬ice->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, ¬ice->item[15]); + } + if (notice->item[5].data) + { + ((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1))); + expand(notice, b, ¬ice->item[5]); + if (notice->item[8].data) + { + ((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1))); + expand(notice, b, ¬ice->item[8]); + } + } + else if (notice->item[2].data) + { + ((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1))); + expand(notice, b, ¬ice->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 = ""; + 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(¬ice, &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(¬ice, &buf, ¬ice.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(¬ice, &buf, &item); + } + else + expand(¬ice, &buf, ¬ice.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(¬ice, &buf, ((char*)0), 1, 0); + comment(¬ice, &buf, ((char*)0), 0, 0); + if (notice.item[14].data) + { + copy(&tmp, "This software is part of the ", -1); + expand(¬ice, &tmp, ¬ice.item[14]); + copy(&tmp, " package", -1); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + } + if (notice.type >= 5) + { + copyright(¬ice, &tmp); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + if (notice.type >= 12) + comment( ¬ice, &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(¬ice, &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(¬ice, &tmp, ¬ice.item[23]); + } + comment(¬ice, &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(¬ice, &tmp, ¬ice.item[15]); + copy(&tmp, " ", -1); + } + if (notice.item[5].data) + { + expand(¬ice, &tmp, ¬ice.item[5]); + if (notice.item[8].data) + { + copy(&tmp, " ", -1); + expand(¬ice, &tmp, ¬ice.item[8]); + } + } + else if (notice.item[2].data) + expand(¬ice, &tmp, ¬ice.item[2]); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + } + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &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(¬ice, &tmp, ¬ice.item[21]); + comment(¬ice, &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(¬ice, &tmp, ¬ice.item[22]); + copy(&tmp, ")", -1); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + } + } + else if (notice.type == 7) + comment( ¬ice, &buf, "http://www.eclipse.org/org/documents/epl-v10.html",sizeof( "http://www.eclipse.org/org/documents/epl-v10.html")-1, 0); + else + comment( ¬ice, &buf, "http://www.opensource.org/licenses/cpl",sizeof( "http://www.opensource.org/licenses/cpl")-1, 0); + comment(¬ice, &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(¬ice, &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(¬ice, &tmp, ¬ice.item[i = 15]); + copy(&tmp, " ", -1); + } + expand(¬ice, &tmp, ¬ice.item[5]); + comment(¬ice, &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(¬ice, &tmp, ¬ice.item[i = 15]); + copy(&tmp, " ", -1); + } + expand(¬ice, &tmp, ¬ice.item[2]); + comment(¬ice, &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( ¬ice, &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(¬ice, &tmp, ¬ice.item[i]); + copy(&tmp, " Internet web site URL", -1); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + comment(¬ice, &buf, ((char*)0), 0, 0); + expand(¬ice, &tmp, ¬ice.item[21]); + comment(¬ice, &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(¬ice, &tmp, ¬ice.item[22]); + copy(&tmp, ")", -1); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + } + comment(¬ice, &buf, ((char*)0), 0, 0); + } + comment( ¬ice, &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( ¬ice, &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( ¬ice, &buf, "the license and copyright and are violating",sizeof( "the license and copyright and are violating")-1, 0); + if (i >= 0) + expand(¬ice, &tmp, ¬ice.item[i]); + copy(&tmp, "'s", -1); + if (n >= (70-32)) + comment(¬ice, &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(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + comment(¬ice, &buf, ((char*)0), 0, 0); + } + else if (notice.type == 11) + { + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &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( ¬ice, &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( ¬ice, &buf, "as published by the Free Software Foundation;",sizeof( "as published by the Free Software Foundation;")-1, 0); + comment( ¬ice, &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(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &buf, "This software is distributed in the hope that it",sizeof( "This software is distributed in the hope that it")-1, 0); + comment( ¬ice, &buf, "will be useful, but WITHOUT ANY WARRANTY;",sizeof( "will be useful, but WITHOUT ANY WARRANTY;")-1, 0); + comment( ¬ice, &buf, "without even the implied warranty of MERCHANTABILITY",sizeof( "without even the implied warranty of MERCHANTABILITY")-1, 0); + comment( ¬ice, &buf, "or FITNESS FOR A PARTICULAR PURPOSE.",sizeof( "or FITNESS FOR A PARTICULAR PURPOSE.")-1, 0); + comment( ¬ice, &buf, "See the GNU General Public License for more details.",sizeof( "See the GNU General Public License for more details.")-1, 0); + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &buf, "You should have received a copy of the",sizeof( "You should have received a copy of the")-1, 0); + comment( ¬ice, &buf, "GNU General Public License",sizeof( "GNU General Public License")-1, 0); + comment( ¬ice, &buf, "along with this software (see the file COPYING.)",sizeof( "along with this software (see the file COPYING.)")-1, 0); + comment( ¬ice, &buf, "If not, a copy is available at",sizeof( "If not, a copy is available at")-1, 0); + comment( ¬ice, &buf, "http://www.gnu.org/copyleft/gpl.html",sizeof( "http://www.gnu.org/copyleft/gpl.html")-1, 0); + comment(¬ice, &buf, ((char*)0), 0, 0); + } + else if (notice.type == 8) + { + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &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( ¬ice, &buf, "without modification, are permitted provided that the following",sizeof( "without modification, are permitted provided that the following")-1, -1); + comment( ¬ice, &buf, "conditions are met:",sizeof( "conditions are met:")-1, -1); + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &buf, " 1. Redistributions of source code must retain the above",sizeof( " 1. Redistributions of source code must retain the above")-1, -1); + comment( ¬ice, &buf, " copyright notice, this list of conditions and the",sizeof( " copyright notice, this list of conditions and the")-1, -1); + comment( ¬ice, &buf, " following disclaimer.",sizeof( " following disclaimer.")-1, -1); + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &buf, " 2. Redistributions in binary form must reproduce the above",sizeof( " 2. Redistributions in binary form must reproduce the above")-1, -1); + comment( ¬ice, &buf, " copyright notice, this list of conditions and the",sizeof( " copyright notice, this list of conditions and the")-1, -1); + comment( ¬ice, &buf, " following disclaimer in the documentation and/or other",sizeof( " following disclaimer in the documentation and/or other")-1, -1); + comment( ¬ice, &buf, " materials provided with the distribution.",sizeof( " materials provided with the distribution.")-1, -1); + comment(¬ice, &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(¬ice, &tmp, ¬ice.item[i]); + else + copy(&tmp, "the copyright holder", -1); + copy(&tmp, " nor the", -1); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), -1); + comment( ¬ice, &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( ¬ice, &buf, " promote products derived from this software without",sizeof( " promote products derived from this software without")-1, -1); + comment( ¬ice, &buf, " specific prior written permission.",sizeof( " specific prior written permission.")-1, -1); + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &buf, "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND",sizeof( "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND")-1, -1); + comment( ¬ice, &buf, "CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,",sizeof( "CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,")-1, -1); + comment( ¬ice, &buf, "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF",sizeof( "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF")-1, -1); + comment( ¬ice, &buf, "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE",sizeof( "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE")-1, -1); + comment( ¬ice, &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( ¬ice, &buf, "BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,",sizeof( "BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,")-1, -1); + comment( ¬ice, &buf, "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED",sizeof( "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED")-1, -1); + comment( ¬ice, &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( ¬ice, &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( ¬ice, &buf, "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,",sizeof( "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,")-1, -1); + comment( ¬ice, &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( ¬ice, &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( ¬ice, &buf, "POSSIBILITY OF SUCH DAMAGE.",sizeof( "POSSIBILITY OF SUCH DAMAGE.")-1, -1); + comment(¬ice, &buf, ((char*)0), 0, 0); + } + else if (notice.type == 9) + { + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &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( ¬ice, &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( ¬ice, &buf, "damages arising from the use of this software.",sizeof( "damages arising from the use of this software.")-1, -1); + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &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( ¬ice, &buf, "purpose, including commercial applications, and to alter it and",sizeof( "purpose, including commercial applications, and to alter it and")-1, -1); + comment( ¬ice, &buf, "redistribute it freely, subject to the following restrictions:",sizeof( "redistribute it freely, subject to the following restrictions:")-1, -1); + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &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( ¬ice, &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( ¬ice, &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( ¬ice, &buf, " product documentation would be appreciated but is not",sizeof( " product documentation would be appreciated but is not")-1, -1); + comment( ¬ice, &buf, " required.",sizeof( " required.")-1, -1); + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &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( ¬ice, &buf, " and must not be misrepresented as being the original",sizeof( " and must not be misrepresented as being the original")-1, -1); + comment( ¬ice, &buf, " software.",sizeof( " software.")-1, -1); + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &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( ¬ice, &buf, " distribution.",sizeof( " distribution.")-1, -1); + comment(¬ice, &buf, ((char*)0), 0, 0); + } + else if (notice.type == 10) + { + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &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( ¬ice, &buf, "obtaining a copy of this software and associated",sizeof( "obtaining a copy of this software and associated")-1, 0); + comment( ¬ice, &buf, "documentation files (the \"Software\"), to deal in the",sizeof( "documentation files (the \"Software\"), to deal in the")-1, 0); + comment( ¬ice, &buf, "Software without restriction, including without limitation",sizeof( "Software without restriction, including without limitation")-1, 0); + comment( ¬ice, &buf, "the rights to use, copy, modify, merge, publish, distribute,",sizeof( "the rights to use, copy, modify, merge, publish, distribute,")-1, 0); + comment( ¬ice, &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( ¬ice, &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( ¬ice, &buf, "subject to the following conditions:",sizeof( "subject to the following conditions:")-1, 0); + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &buf, "The above copyright notice and this permission notice shall",sizeof( "The above copyright notice and this permission notice shall")-1, 0); + comment( ¬ice, &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( ¬ice, &buf, "Software.",sizeof( "Software.")-1, 0); + comment(¬ice, &buf, ((char*)0), 0, 0); + comment( ¬ice, &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( ¬ice, &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( ¬ice, &buf, "WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR",sizeof( "WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR")-1, 0); + comment( ¬ice, &buf, "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS",sizeof( "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS")-1, 0); + comment( ¬ice, &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( ¬ice, &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( ¬ice, &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( ¬ice, &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(¬ice, &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(¬ice, &tmp, ¬ice.item[i]); + copy(&tmp, " - ", -1); + } + else + i = -1; + copy(&tmp, "Proprietary", -1); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1); + comment(¬ice, &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(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1); + if (notice.item[15].data) + { + expand(¬ice, &tmp, ¬ice.item[15]); + copy(&tmp, " ", -1); + } + if (notice.item[5].data) + { + expand(¬ice, &tmp, ¬ice.item[5]); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1); + } + else if (notice.item[2].data) + { + expand(¬ice, &tmp, ¬ice.item[2]); + comment(¬ice, &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(¬ice, &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(¬ice, &tmp, ¬ice.item[i]); + if (notice.item[2].data) + { + if ((( &tmp)->nxt-( &tmp)->buf)) + ((( &tmp)->nxt<( &tmp)->end)?(*( &tmp)->nxt++=( ' ')):(( ' '),(-1))); + expand(¬ice, &tmp, ¬ice.item[2]); + } + if ((( &tmp)->nxt-( &tmp)->buf)) + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1); + comment( ¬ice, &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( ¬ice, &buf, "accordance with applicable agreements",sizeof( "accordance with applicable agreements")-1, 1); + } + comment(¬ice, &buf, ((char*)0), 0, 0); + } + else if (notice.type == 13) + { + comment( ¬ice, &buf, "For nonexclusive individual use",sizeof( "For nonexclusive individual use")-1, 1); + comment(¬ice, &buf, ((char*)0), 0, 0); + } + else if (notice.type == 14) + { + comment( ¬ice, &buf, "For noncommercial use",sizeof( "For noncommercial use")-1, 1); + comment(¬ice, &buf, ((char*)0), 0, 0); + } + if (notice.type >= 15 && !notice.item[21].data) + { + comment( ¬ice, &buf, "Unpublished & Not for Publication",sizeof( "Unpublished & Not for Publication")-1, 0); + comment(¬ice, &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(¬ice, &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(¬ice, &tmp, ¬ice.item[15]); + copy(&tmp, " ", -1); + } + if (notice.item[5].data) + { + expand(¬ice, &tmp, ¬ice.item[5]); + if (notice.item[8].data) + { + copy(&tmp, " ", -1); + expand(¬ice, &tmp, ¬ice.item[8]); + } + } + else if (notice.item[2].data) + expand(¬ice, &tmp, ¬ice.item[2]); + } + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + comment( ¬ice, &buf, "under the terms and conditions of the license in",sizeof( "under the terms and conditions of the license in")-1, 0); + expand(¬ice, &tmp, ¬ice.item[21]); + comment(¬ice, &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(¬ice, &tmp, ¬ice.item[22]); + copy(&tmp, ")", -1); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + } + comment(¬ice, &buf, ((char*)0), 0, 0); + } + else if (notice.type == 15) + { + comment( ¬ice, &buf, "The copyright notice above does not evidence any",sizeof( "The copyright notice above does not evidence any")-1, 0); + comment( ¬ice, &buf, "actual or intended publication of such source code",sizeof( "actual or intended publication of such source code")-1, 0); + comment(¬ice, &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(¬ice, &tmp, &item); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), h); + } while (v++ < x); + if (item.size) + comment(¬ice, &buf, ((char*)0), 0, 0); + } + if (notice.item[13].data) + { + expand(¬ice, &tmp, ¬ice.item[13]); + comment(¬ice, &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(¬ice, &tmp, ¬ice.item[i]); + if (notice.item[2].data) + { + if ((( &tmp)->nxt-( &tmp)->buf)) + ((( &tmp)->nxt<( &tmp)->end)?(*( &tmp)->nxt++=( ' ')):(( ' '),(-1))); + expand(¬ice, &tmp, ¬ice.item[2]); + } + if ((( &tmp)->nxt-( &tmp)->buf)) + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + if (notice.item[10].data) + { + expand(¬ice, &tmp, ¬ice.item[10]); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + } + comment(¬ice, &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(¬ice, &buf, ¬ice.id[i].value); + ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1))); + } + else + { + if (k < 0) + { + comment( ¬ice, &buf, "CONTRIBUTORS",sizeof( "CONTRIBUTORS")-1, 0); + comment(¬ice, &buf, ((char*)0), 0, 0); + } + k = 1; + expand(¬ice, &tmp, ¬ice.id[i].value); + comment(¬ice, &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(¬ice, &buf, &item); + ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1))); + } + else + { + if (k < 0) + { + comment( ¬ice, &buf, "CONTRIBUTORS",sizeof( "CONTRIBUTORS")-1, 0); + comment(¬ice, &buf, ((char*)0), 0, 0); + } + k = 1; + expand(¬ice, &tmp, &item); + comment(¬ice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0); + } + } + } + if (k > 0) + comment(¬ice, &buf, ((char*)0), 0, 0); + } + if (notice.type == 4) + { + copy(&buf, "[-copyright?", -1); + copyright(¬ice, &buf); + ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1))); + if (notice.item[21].data) + { + copy(&buf, "[-license?", -1); + expand(¬ice, &buf, ¬ice.item[21]); + ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1))); + } + ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\n')):(( '\n'),(-1))); + } + else + comment(¬ice, &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 \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 \n\ +#else\n\ +#include \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 +#include + +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 ]" +"[-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 +#include + +#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 +#include +#include +#include + +#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 +#include + +#ifndef setmode +#define setmode(d,m) +#endif + +#endif + +#if defined(__STDC__) + +#include +#include + +#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 /* 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 + /* 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 /* for off_t */ +# include /* for SEEK_* and off_t */ +# ifdef VMS +# include /* 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 +#endif +# include +# include +#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 +# endif +# else /* MSC or DJGPP */ +# include +# 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 +# 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 /* 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 + 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 */ +#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, "", 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 + +#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 # +# # +######################################################################## +: 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/} "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 * +* * +***********************************************************************/ +#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 +#include + +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 +#include +#include +#include + +#if !_PACKAGE_ast && defined(__STDC__) +#include +#include +#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 # +# # +######################################################################## +: 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 # +# # +######################################################################## +# 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 * +* * +***********************************************************************/ +/* + * small test for -lnsl + */ + +#ifndef socket +#include +#include +#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 * +* * +***********************************************************************/ +#ifndef DONTCARE +#include +#include +#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 * +* * +***********************************************************************/ +#include + +int +main() +{ + wchar_t w = ' '; + return iswspace(w) == 0; +} diff --git a/usr/src/contrib/ast/src/cmd/ksh93/COMPATIBILITY b/usr/src/contrib/ast/src/cmd/ksh93/COMPATIBILITY new file mode 100644 index 0000000000..cf260763e8 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/COMPATIBILITY @@ -0,0 +1,136 @@ + + KSH-93 VS. KSH-88 + + +The following is a list of known incompatibilities between ksh-93 and ksh-88. +I have not include cases that are clearly bugs in ksh-88. I also have +omitted features that are completely upward compatible. + +1. Functions, defined with name() with ksh-93 are compatible with + the POSIX standard, not with ksh-88. No local variables are + permitted, and there is no separate scope. Functions defined + with the function name syntax, maintain compatibility. + This also affects function traces. + +2. ! is now a reserved word. As a result, any command by that + name will no longer work with ksh-93. + +3. The -x attribute of alias and typeset -f is no longer + effective and the ENV file is only read for interactive + shells. You need to use FPATH to make function definitions + visible to scripts. + +4. A built-in command named command has been added which is + always found before the PATH search. Any script which uses + this name as the name of a command (or function) will not + be compatible. + +5. The output format for some built-ins has changed. In particular + the output format for set, typeset and alias now have single + quotes around values that have special characters. The output + for trap without arguments has a format that can be used as input. + +6. With ksh-88, a dollar sign ($') followed by a single quote was + interpreted literally. Now it is an ANSI-C string. You + must quote the dollar sign to get the previous behavior. + Also, a $ in front of a " indicates that the string needs + to be translated for locales other than C or POSIX. The $ + is ignored in the C and POSIX locale. + +7. With ksh-88, tilde expansion did not take place inside ${...}. + with ksh-93, ${foo-~} will cause tilde expansion if foo is + not set. You need to escape the ~ for the previous behavior. + +8. Some changes in the tokenizing rules where made that might + cause some scripts with previously ambiguous use of quoting + to produce syntax errors. + +9. Programs that rely on specific exit values for the shell, + (rather than 0 or non-zero) may not be compatible. The + exit status for many shell failures has been changed. + +10. Built-ins in ksh-88 were always executed before looking for + the command in the PATH variable. This is no longer true. + Thus, with ksh-93, if you have the current directory first + in your PATH, and you have a program named test in your + directory, it will be executed when you type test; the + built-in version will be run at the point /bin is found + in your PATH. + +11. Some undocumented combinations of argument passing to ksh + builtins no longer works since ksh-93 is getopts conforming + with respect to its built-ins. For example, typeset -8i + previously would work as a synonym for typeset -i8. + +12. Command substitution and arithmetic expansion are now performed + on PS1, PS3, and ENV when they are expanded. Thus, ` and $( + as part of the value of these variables must be preceded by a \ + to preserve their previous behavior. + +13. The ERRNO variable has been dropped. + +14. If the file name following a redirection symbol contain pattern + characters they will only be expanded for interactive shells. + +15. The arguments to a dot script will be restored when it completes. + +16. The list of tracked aliases is not displayed with alias unless + the -t option is specified. + +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, 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 + way it does in gnu-emacs. + +19. ksh-88 allowed unbalanced parenthes within ${name op val} whereas + ksh-93 does not. Thus, ${foo-(} needs to be written as ${foo-\(} + which works with both versions. + +20. kill -l in ksh-93 lists only the signal names, not their numerical + values. + +21. Local variables defined by typeset are statically scoped in + 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 + the end-of-options is reached to conform to the POSIX standard. + +23. Since the POSIX standard requires that octal constants be + recongnized, doing arithmetic on typeset -Z variables can + 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 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 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 ksh-93p. + +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 ksh-88, DEBUG traps were executed. after each command. In ksh-93 + DEBUG traps are exeucted before each command. + +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/contrib/ast/src/cmd/ksh93/DESIGN b/usr/src/contrib/ast/src/cmd/ksh93/DESIGN new file mode 100644 index 0000000000..151957524e --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/DESIGN @@ -0,0 +1,180 @@ +Here is an overview of the source code organization for ksh93. + +Directory layout: + + The directory include contains header files for ksh93. + The files nval.h and shell.h are intended to be public + headers and can be used to add runtime builtin command. + The remainder are private. + + The directory data contains readonly data files for ksh93. + The man pages for built-ins are in builtins.c rather + than included as statics with the implementations in the + bltins directory because some systems don't make static const + data readonly and we want these to be shared by all running + shells. + + The directory edit contains the code for command line + editing and history. + + The fun directory contains some shell function such as + pushd, popd, and dirs. + + The directory features contains files that are used to generate + header files in the FEATURE directory. Most of these files + are in a format that is processed by iffe. + + The directory bltins contains code for most of the built-in + commands. Additional built-in commands are part of libcmd. + + The directory sh contains most of the code for ksh93. + + The directory tests contains a number of regression tests. + In most cases, when a bug gets fixed, a test is added to + one of these files. The regression tests can be run by + going to this directory and running + SHELL=shell_path shell_path shtests + where shell_path is an absolute pathname for the shell to + be tested. + + 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 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. + +Include directory: + 1. argnod.h contains the type definitions for command + nodes, io nodes, argument nodes, and for positional + parameters.a It defines the prototypes for + all the positional parameters functions. + 2. builtins.h contains prototypes for builtins as well + as symbolic constants that refer to the name-pairs + that are associated with some of the built-ins. + 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 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 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 + reading from a file or string. + 8. history.h contains macros and functions definitions + related to history file processing. + 9. jobs.h contains the definitions relating to job + processing and control. + 10. lexstates.h contains the states associated with + lexical processing. + 11. name.h contains the internal definitions related + to name-value pair processing. + 12. national.h contains a few I18N definitions, mostly + obsolete. + 13. nval.h is the public interface to the name-value + pair library that is documented with nval.3. + 14. path.h contains the interface for pathname processing + and pathname searching. + 15. shell.h is the public interface for shell functions + that are documented int shell.3. + 16. shlex.h contains the lexical token definitions and + interfaces for lexical analysis. + 17. shnodes.h contains the definition of the structures + for each of the parse nodes and flags for the attributes. + 18. shtable.h contains some interfaces and functions for + table lookup. + 19. streval.h contains the interface to the arithmetic + functions. + 20. terminal.h is a header file that includes the appropriate + terminal include. + 21. test.h contains the definitions for the test and [[...]] + commands. + 22. timeout.h contains the define constant for the maximum + shell timeout. + 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 + and for processing positional parameters. + 2. arith.c contains callback functions for the streval.c + library and the interface to shell arithmetic. + 3. array.c contains the code for indexed and associative + arrays. + 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 + a parse tree. + 7. env.c contains code to add and delete environment variables + to an environment list. + 8. expand.c contains code for file name expansion and + file name generation. + 9. fault.c contains code for signal processing, trap + handling and termination. + 10. fcin.c contains code for reading and writing a character + at a time from a file or string. + 11. init.c contains initialization code and callbacks + for get and set functions for built-in variables. + 12. io.o contains code for redirections and managing file + descriptors and file streams. + 13. jobs.c contains the code for job management. + 14. lex.c contains the code for the lexical analyzer. + 15. macro.c contains code for the $ macro expansions, including + here-documents. + 16. main.c contains the calls to initialization, profile + processing and the main evaluation loop as well as + mail processing. + 17. name.c contains the name-value pair routines that are + built on the hash library in libast. + 18. nvdisc.c contains code related to name-value pair disciplines. + 19. nvtree.c contains code for compound variables and for + walking the namespace. + 20. nvtype.c contains most of the code related to types that + are created with typeset -T. + 21. parse.c contains the code for the shell parser. + 22. path.c contains the code for pathname lookup and + some path functions. It also contains the code + that executes commands and scripts. + 23. pmain.c is just a calls sh_main() so that all of the + rest of the shell can be in a shared library. + 24. shcomp.c contains the main program to the shell + compiler. This program parses a script and creates + a file that the shell can read containing the parse tree. + 25. streval.c is an C arithmetic evaluator. + 26. string.c contains some string related functions. + 27. subshell.c contains the code to save and restore + environments so that subshells can run without creating + a new process. + 28. suid_exec.c contains the program from running execute + only and/or setuid/setgid scripts. + 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 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 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 () */ +SHOPT_CMDLIB_DIR == /* SHOPT_CMDLIB_HDR directory prefix (default "/opt/ast/bin") */ +SHOPT_COSHELL == 1 /* build with connection to coshell */ +SHOPT_CRNL == /* accept for */ +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 == + 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 /* is eqivalent to */ +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 ][-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 ][-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 ][-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 ][-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 ][-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 ][-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/contrib/ast/src/cmd/ksh93/OBSOLETE b/usr/src/contrib/ast/src/cmd/ksh93/OBSOLETE new file mode 100644 index 0000000000..c29cb8bb63 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/OBSOLETE @@ -0,0 +1,152 @@ +.sp 3 +.tl ''Ksh Features That Are Obsolete in Ksh93'' +.sp 2 +.AL 1 +.LI +Using a pair of grave accents \^\fB\(ga\fR ... \fB\(ga\fR\^ +for command substition. Use \fB$(\fR ... \fB)\fR instead. +.LI +.B FCEDIT +is an obsolete name for +the default editor name for the +.B hist +command. +.B FCEDIT +is not used when +.B HISTEDIT +is set. Use +.B HISTEDIT +instead. +.LI +The newtest (\fB[[\fR ... \fB]]\fR) operator +\fB\-a\fP \fIfile\fP +is obsolete. Use +\fB\-e\fP instead. +.LI +The newtest (\fB[[\fR ... \fB]]\fR) operator +.BR = , +as used in +\fIstring\fP \fB=\fP \fIpattern\fP +is obsolete. Use +\fB==\fP instead. +.LI +The following obsolete arithmetic comparisons are also permitted: +.in +5 +.VL 20 +.LI "\fIexp1\fP \fB\-eq\fP \fIexp2\fP" +True, if +.I exp1 +is equal to +.IR exp2 . +.LI "\fIexp1\fP \fB\-ne\fP \fIexp2\fP" +True, if +.I exp1 +is not equal to +.IR exp2 . +.LI "\fIexp1\fP \fB\-lt\fP \fIexp2\fP" +True, if +.I exp1 +is less than +.IR exp2 . +.LI "\fIexp1\fP \fB\-gt\fP \fIexp2\fP" +True, if +.I exp1 +is greater than +.IR exp2 . +.LI "\fIexp1\fP \fB\-le\fP \fIexp2\fP" +True, if +.I exp1 +is less than or equal to +.IR exp2 . +.LI "\fIexp1\fP \fB\-ge\fP \fIexp2\fP" +True, if +.I exp1 +is greater than or equal to +.IR exp2 . +.LE \" End .VL +.in -5 +.LI +Using test -t or [ -t ] without specifying the file unit number. +.LI +The +.B \-k +option to the \fBset\fR builtin is obsolete. It causes +.I all\^ +variable assignment arguments are placed in the environment, +even if they occur after the command name. +The following +first prints +.B "a=b c" +and then +.BR c : +There is no alternative. +.LI +The obsolete +.B \-xf +option of the +.B typeset +command allows a function to be exported +to scripts that are executed without a separate +invocation of the shell. +Functions that need to be defined across separate +invocations of the shell should +be placed in a directory and the +.B FPATH +variable should contains the name of this directory. +They may also +be specified in the +.B ENV +file with the +.B \-xf +option of +.BR typeset . +.LI +The shell environment variable +.B FCEDIT +is obsolete. Use +.B HISTEDIT +instead. +.LI +In the +.B \-s +option +(to \fBfc\fR or \fBhist\fR command???) +( +and in obsolete versions, the editor name +.B \- +) +is used to skip the editing phase and +to re-execute the command. +.LI +The +.B \-t +option to \fBalias\fR builtin is is obsolete. It +is used to set and list tracked aliases. +There is no replacement. +.LI +The shell command line option +.B \-t +is obsolete. This option cause the shell to exit after reading +and executing one command. The is no replacement (although ending +\&"command" with the exit builtin should have the same effect). +.LI +As an obsolete feature of the "set" builtin, +if the first +.I arg\^ +is +.B \- +then the +.B \-x +and +.B \-v +options are turned off and the next +.I arg +is treated as the first argument. +Using +.B \+ +rather than +.B \- +causes these options to be turned off. +These options can also be used upon invocation of the shell. +.LE + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/PROMO.mm b/usr/src/contrib/ast/src/cmd/ksh93/PROMO.mm new file mode 100644 index 0000000000..def4552243 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/PROMO.mm @@ -0,0 +1,141 @@ +.H 1 ksh93 +KSH-93 is the most recent version of the KornShell Language +described in +"The KornShell Command and Programming Language," +by Morris Bolsky and David Korn of AT&T Bell Laboratories, ISBN 0-13-182700-6. +The KornShell is a shell programming language, +which is upward compatible with "sh" (the Bourne Shell), +and is intended to conform to the IEEE P1003.2/ISO 9945.2 Shell and +Utilities standard. +KSH-93 provides an enhanced programming environment in +addition to the major command-entry features of the BSD +shell "csh". With KSH-93, medium-sized programming tasks can be +performed at shell-level without a significant loss in performance. +In addition, "sh" scripts can be run on KSH-93 without modification. +.P +The code should conform to the IEEE POSIX 1003.1 standard and to the +proposed ANSI-C standard so that it should be portable to all +such systems. Like the previous version, KSH-88, +it is designed to accept eight bit character sets +transparently, thereby making it internationally compatible. +It can support multi-byte characters sets with some characteristics +of the character set given at run time. +.P +KSH-93 provides the following features, many of which were also inherent +in KSH-88: +.BL +.LI +Enhanced Command Re-entry Capability: The KSH-93 history +function records commands entered at any shell level and stores +them, up to a user-specified limit, even after you log off. +This allows you to re-enter long commands with a few keystrokes +- even those commands you entered yesterday. +The history file allows for eight bit characters in +commands and supports essentially unlimited size histories. +.LI +In-line Editing: In "sh", the only way to fix mistyped +commands is to backspace or retype the line. KSH-93 allows you +to edit a command line using a choice of EMACS-TC or "vi" +functions. +You can use the in-line editors to complete filenames as +you type them. +You may also use this editing feature when entering +command lines from your history file. +A user can capture keystrokes and rebind keys to customize the +editing interface. +.LI +Extended I/O Capabilities: KSH-93 provides several I/O +capabilities not available in "sh", including the ability to: +.BL +.LI +specify a file descriptor for input and output +.LI +start up and run co-processes +.LI +produce a prompt at the terminal before a read +.LI +easily format and interpret responses to a menu +.LI +echo lines exactly as output without escape processing +.LI +format output using printf formats. +.LI +read and echo lines ending in "\e". +.LE +.LI +Improved performance: KSH-93 executes many scripts faster +than the System V Bourne shell. A major reason for this is +that many of the standard utilities are built-in. +To reduce the time to initiate a command, KSH-93 allows +commands to be added as built-ins at run time +on systems that support dynamic loading such as System V Release 4. +.LI +Arithmetic: KSH-93 allows you to do integer arithmetic in any +base from two to sixty-four. You can also do double +precision floating point arithmetic. +Almost the complete set of C language operators are available +with the same syntax and precedence. +Arithmetic expressions can be used to as an argument expansion +or as a separate command. +In addition there is an arithmetic for command that works +like the for statement in C. +.LI +Arrays: KSH-93 supports both indexed and associative arrays. +The subscript for an indexed array is an arithmetic expression, +whereas, the subscript for an associative array is a string. +.LI +Shell Functions and Aliases: Two mechanisms - functions and +aliases - can be used to assign a user-selected identifier to +an existing command or shell script. +Functions allow local variables and provide scoping +for exception handling. +Functions can be searched for and loaded on first reference the +way scripts are. +.LI +Substring Capabilities: KSH-93 allows you to create a +substring of any given string either by specifying the starting +offset and length, or by stripping off leading +or trailing substrings during parameter substitution. +You can also specify attributes, such as upper and lower case, +field width, and justification to shell variables. +.LI +More pattern matching capabilities: KSH-93 allows you to specify +extended regular expressions for file and string matches. +.LI +KSH-93 uses a hierarchal name space for variables. +Compound variables can be defined and variables can +be passed by reference. In addition, each variable +can have one or more disciplines associated with +it to intercept assignments and references. +.LI +Improved debugging: KSH-93 can generate line numbers on execution +traces. Also, I/O redirections are now traced. +There is a DEBUG trap that gets evaluated before each command +so that errors can be localized. +.LI +Job Control: On systems that support job control, including +System V Release 4, KSH-93 +provides a job-control mechanism almost identical to that of +the BSD "csh", version 4.1. +This feature allows you +to stop and restart programs, and to move programs between the +foreground and the background. +.LI +Added security: +KSH-93 can execute scripts which do not have read permission +and scripts which have the setuid and/or setgid set when +invoked by name, rather than as an argument to the shell. +It is possible to log or control the execution of setuid and/or +setgid scripts. +The noclobber option prevents you from accidentally erasing +a file by redirecting to an existing file. +.LI +KSH-93 can be extended by adding built-in commands at run time. +In addition, KSH-93 can be used as a library that can +be embedded into an application to allow scripting. +.LE +Documentation for KSH-93 consists of an "Introduction to KSH-93", +"Compatibility with the Bourne Shell" and a manual page and a +README file. In addition, the "New KornShell Command and Programming +Language," book is available from Prentice Hall. + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/README b/usr/src/contrib/ast/src/cmd/ksh93/README new file mode 100644 index 0000000000..1feeec8a90 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/README @@ -0,0 +1,232 @@ +This directory, and its subdirectories contain the source code +for ksh-93; the language described in the second addition of +the book, "The KornShell Command and Programming Language," by +Morris Bolsky and David Korn which is published by Prentice Hall. +ksh-93 has been compiled and run on several machines with several +operating systems. The end of this file contains a partial list of +operating systems and machines that ksh-93 has been known to run on. + +The layout of files for ksh-93 has changed somewhat since ksh-88, +the last major release. Most of the source code for ksh remains in +the sh directory. However, the shell editing and history routines +are in the edit sub-directory. The code for shell built-ins is +in the bltins directory. The data directory contains read-only +data tables and messages that are used by the shell. The include +files remain in the include directory and the shlib directory +is gone. The features directory replaces the older install +directory. The method for generating systems specific feature +information has changed substantially. + +The Makefile file contains several compilation options that can be set +before compiling ksh. Options are of the form SHOPT_option and become +#define inside the code. These options are set to their recommended +value and some of these may disappear as options in future releases. +A value of 0, or no value represents off, 1 represents on. +Note that == is needed, not =, because these are nmake state variables +and changing their value will cause all modules that could be affected +by this change to be recompiled. +The options have the following defaults and meanings: + ACCT off Shell accounting. + ACCTFILE off Enable per user accounting info. + AUDIT off For auditing specific users + AUDITFILE "/etc/ksh_audit" + APPEND on Allows var+=val string and array append. + BASH off Bash compatibility mode. It is not fully implemented + and is experimental. + BRACEPAT on C-shell type abc{d,e}f style file generation + CMDLIB_BLTIN off Makes all commands in libcmd.a builtins. The + SH_CMDLIB_DIR nmake state variable can be used to + specify a directory. + CMDLIB_DIR off Sets CMDLIB_BLTIN=1 and provides a default value + of "/opt/ast/bin" for SH_CMDLIB_DIR. + COMPOUND_ARRAY + on Allows all components of compound variables except the + first to be any string by enclosing in [...]. It also + allows components other than the last to be arrays. + This is experimental and only partially complete. + CRNL off treated as in shell grammar. + DYNAMIC on Dynamic loading of builtins. (Requires dlopen() interface.) + ECHOPRINT off Make echo equivalent to print. + ESH on Compile with emacs command line editing. The original + emacs line editor code was provided by Mike Veach at IH. + FILESCAN on Experimental option that allows fast reading of files + 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 + sytems with dynamic linking. + KIA off Allow generation of shell cross reference database with -I. + MULTIBYTE on Multibyte character handling. Requires mblen() and + mbctowc(). + NAMESPACE on Allows namespaces. This is experimental, incomplete + and undocumented. + OLDTERMIO off Use either termios or termio at runtime. + OO on Experimental object oriented extension. This option + should disappear soon. + OPTIMIZE on Optimize loop invariants for with for and while loops. + P_SUID off If set, all real uids, greater than or equal to this + value will require the -p flag to run suid/sgid scripts. + PFSH off Compile with support for profile shell. + RAWONLY off Turn on if the vi line mode doesn't work right unless + you do a set -o viraw. + SEVENBIT off Strip the eigth bit from characters. + SPAWN off Use spawn as combined fork/exec. May improve speed on + some systems. + STATS on Add .sh.stats compound variable. + SUID_EXEC on Execute /etc/suid_exec for setuid, setgid script. + TIMEOUT off Set this to the number of seconds for timing out and + exiting the shell when you don't enter a command. If + non-zero, TMOUT can not be set larger than this value. + TYPEDEF on Enable typeset type definitions. + VSH on Compile with vi command line editing. The original vi + line editor code was provided by Pat Sullivan at CB. + +The following compile options are set automatically by the feature testing: + DEVFD Set when /dev/fd is a directory that names open files. + SHELLMAGIC + Set on systems that recognize script beginning with #! specially. + VPIX Set on systems the have /usr/bin/vpix program for running MS-DOS. + + +In most instances, you will generate ksh from a higher level directory +which also generates libcmd and libast libraries on which ksh depends. +However, it is possible to generate ksh, with by running make -f ksh.mk +in this directory. The ksh.mk file was generated from the nmake Makefile. +If you do not have make or nmake, but do have a Version 7 UNIX compatible +shell, then you can run the script mamexec < Mamfile to build ksh. +If you have nmake, version 2.3 or later, you can use it without the -f ksh.mk. +In either case, ksh relies on libraries libast and libcmd which must be +built first. The binary for ksh becomes the file named ./ksh which can +be copied to where ever you install it. + +If you use old make or the Mamfile, and you system has dynamic shared +libraries, then you should define the variables mam_cc_static and +mam_cc_dynanamic as the compiler options that request static linking +and dynamic linking respectively. This will decrease the number of +shared libraries that ksh need and cut startup time substantially. + +The makefile should also generate shcomp, a program that will precompile +a script. ksh93 is able to recognize files in this format and process +them as scripts. You can use shcomp to send out scripts when you +don't want to give away the original script source. + +It is advisable that you put the line PWD=$HOME;export PWD into the +/etc/profile file to reduce initialization time for ksh. + +To be able to run setuid/setgid shell scripts, or scripts without read +permission, the SUID_EXEC compile option must be on, and ksh must be installed +in the /bin directory, the /usr/bin directory, the /usr/lbin directory, +or the /usr/local/bin directory and the name must end in sh. The program +suid_exec must be installed in the /etc directory, must be owned by root, +and must be a suid program. If you must install ksh in some other directory +and want to be able to run setuid/setgid and execute only scripts, then +you will have to change the source code file sh/suid_exec.c explicitly. +If you do not have ksh in one of these secure locations, /bin/sh will +be invoked with the -p options and will fail when you execute a setuid/setgid +and/or execute only script. Note, that ksh does not read the .profile +or $ENV file when it the real and effective user/group id's are not +equal. + +The tests sub-directory contains a number of regression tests for ksh. +To run all these tests with the shell you just built, go to the tests +directory and run the command + SHELL=$dir/ksh $dir/ksh shtests +where dir is the directory of the ksh you want to test. + +The file PROMO.mm is an advertisement that extolls the virtues of ksh. +The file sh.1 contains the troff (man) description of this Shell. +The file nval.3 contains the troff (man) description of the name-value +pair library that is needed for writing built-ins that need to +access shell variables. + +The file sh.memo contains a draft troff (mm) memo describing ksh. The +file RELEASE88 contains the changes made for ksh88. The file RELEASE93 +contains the changes made in this release since ksh-88. The file +RELEASE contains bug fixes made in this release since ksh-88. The file +COMPATIBILITY contains a list of incompatibilities with ksh-88. The +file bltins.mm is a draft troff (mm) memo describing how to write +built-in commands that can be loaded at run time. + +Most of the work for internationalization has been done with ksh93. +The file ksh.msg is a generated file that contains error messages +that need to be translated. In addition, the function translate() +in sh/init.c has to be completed to interface with the dictionary +lookup. The translate function takes two argument, the string +that is to be translated and a type which is + 0 when a library string needs translation. + 1 when one of the error messages in ksh.msg needs translation. + 2 when a string in a script needs translation. You use a $ in front + of a double quoted string in a script to indicate that it + needs translation. The -D option for ksh builds the dictionary. +The translate routine needs to return the translated message. +For dictionaries that need to use a numeric key, it should be +possible to use the strhash() function to generate numbers to +go along with each of the messages and to use this number both +when generating the dictionary and when converting strings. +If you encounter error messages of type 1 that are not be translated via +this translate() function send mail to the address below. + +Please report any problems or suggestions to: + +dgk@research.att.com + + +ksh93 has been compiled and alpha tested on the following. An asterisk +signifies that ksh has been installed as /bin/sh on this machine. + +* Sun OS 4.1.[123] on sparc. + Sun OS 4.1.1 on sun. + Solaris 2.[1-9] on sparc. + Solaris 2.[4-8] on X86. + HP/UX 8 on HP-9000/730. + HP/UX 9 on HP-9000/730. + HP/UX 10 on HP-9000/857. + HP/UX 11 on pa-risc. + System V Release 3 on Counterpoint C19 + System V Release 4 on AT&T Intel 486. + System V Release 4 on NCR 4850 Intel 486. + IRIX Release 4.0.? System V on SGI-MIPS. + IRIX Release 5.1 System V on SGI-MIPS. + IRIX Release 6.[1-5] System V on SGI-MIPS. + System V Release 3.2 on 3B2. + UTS 5.2.6 on Amdahl 3090,5990,580. + System V Release 3.2 on i386. + SMP_DC.OSx olivetti dcosx MIServer-S 2/128. + SMP_DC.OSx Pyramid dcosx MIServer-S 2/160 r3000. + 4.3BSD on Vax 8650. + AIX release 2 on RS6000. + AIX 3.2 on RS6000. + Linux 1.X on Intel + Linux 2.X on Intel + Linux 2.X on Alpha + Linux 2.X on Alpha + Linux 2.X on OS/390 + Linux 2.X on sparc + Linux 2.4 on intel itanium 64 + Linux Slackware on sparc64 +* Linux ARM on i-PAQ + OSF1 on DEC alpha. + OSF4 on DEC alpha. + UMIPS 4.52 on mips. + BSD-i [2-4] on X86. + OpenBSD on X86 + NetBSD on X86 + FreeBSD on X86 + NeXT on Intel X86. + NeXT on HP. +* Windows NT using UWIN on X86 +* Windows NT using UWIN on alpha + Windows NT using Cygwin on X86 + Windows NT with NutCracker libraries. + Windows NT with Portage libraries. + Windows 3.1 using custom C library. + OpenEdition on MVS + Darwin OS X on PPC + MVS on OS 390 + SCO Openserver 3.2 on X86 + Unixware 7 on X86 + +Good luck!! + +David Korn +dgk@research.att.com + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/RELEASE b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE new file mode 100644 index 0000000000..691f9b4a18 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE @@ -0,0 +1,3110 @@ +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 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 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; 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 <<< $(^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 bar0il 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 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 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 <&- 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 . +10-10-26 Fix bug where $((undefined_function(1))) dumped core. +10-10-22 Provide user defined iszero() if not in . +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 { 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 nTAB + to make this the current line (n defaults to 1 of omitted) or + n 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 variable unset memory leak has been fixed and tests/leaks.sh + has been added to verify the fix. +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. +10-02-12 A bug which could occur if the last line of a script was an eval + that executed multiple commands has been fixed. +10-02-02 A buffer overflow in read and another in binary type base64 + encoding were fixed. +10-01-20 A bug in the evaluation of arithmetic expression in which the + subscript was evaluated twice for $((foo[x++]++)) has been fixed. +10-01-19 A workaround for a double-free of a trap in both a subshell and its + parent has been added. +10-01-18 A bug in type handling of typeset -H has been fixed. +10-01-15 The "adding empty subscript" warning now only emitted with -x set. +10-01-01 A bug in the parser in which '$((case i in i):;esac);:))' was not + parsed correctly was fixed. +10-01-01 A bug in the parser in which '$(( 2 , 3.6 ))' dumped core for locales + with radix char , and thousands separator . has been fixed. +09-12-28 A bug in the handling of SIGCLD on systems that generated SIGCLD + while blocked waiting for process to complete has been fixed. +09-12-24 ast setlocale() reworked to differentiate env var changes from user + override. +09-12-18 A bug with the SHOPT_BGX option set which disabled traps for signals + < SIGCHLD when a trap for a signal > SIGCHLD was set has been fixed. +09-12-18 A bug where [[ -v var ]] was incorrect for some variables (including + LC_* vars) has been fixed. +09-12-15 A bug that produced a syntax error when a multibyte character + straddled a buffer boundary has been fixed. +09-12-11 A bug where the subscript of an unset variable was not evaluated has + been fixed. +09-12-09 A bug where shcomp dumped core on certain syntax errors has been fixed. +09-12-07 A bug where a parent shell environment var reset in a subshell removed + the value in subsequent children of the parent shell has been fixed. +09-12-04 A bug in which in some cases a trap in a function executed in + a subshell could trigger twice has been fixed. +09-12-03 A bug in which SHLVL exported with some attributes could cause + the shell to abort at startup has been fixed. +09-12-02 A bug with pipefail in which the shell could hang waiting for the + writer to complete before the last reader command has been fixed. +09-11-30 A bug in which a trap could be inherited by the first element of + a pipeline when the command had more than 63 arguments that did + not contain any macro expansions has been fixed. +09-11-19 When read from a terminal was called from with a while or 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 Inside a function, typeset foo.bar will bind foo to global variable + foo if local variable foo does not exist, instead of creating a + local variable. +09-11-17 "read -n1" from the terminal has been fixed to read exactly one character. +09-11-11 Job control now works for subshell commands, (...). +09-11-11 If set -e is on for an interactive shell errors in special builtins + now cause the shell to exit. +09-11-11 A bug in which an interrupt handler processed during the read builtin + when IFS did not contain a new line has been fixed. +09-11-09 A bug in which a variable that has been unset in a subshell and then + exported from that subshell does not show up in the environment + has been fixed. +09-11-02 ``,2'' is now a valid numeric constant for locales with + decimal_point=','. +09-11-02 A bug where "return" in .profile did not restore the shell state + has been fixed. +09-10-31 A bug that corrupted saved exit status when pids wrapped around has + been fixed. +09-10-26 A bug in { LANG LC_ALL LC_category } ordering has been fixed in -last. +09-10-16 A bug where notification to libast that the environment has changed + has been fixed. +09-10-12 A bug in which a function loaded in a subshell could leave side + effects in the parent shell has been fixed. +09-10-12 A bug in converting a printf %d operand to a number when the operand + contains multiple subscripts for the same variable has been fixed. +09-10-09 A bug in the handling of the escape character \ in directory prefixes + in command completion has been fixed. +09-10-09 $PATH processing has been changed to delay dir stat() and .paths + lookup until the directory is needed in the path search. +09-09-28 Call the ast setlocale() intercept on unset too. +09-09-24 A bug in which LANG=foo; LC_ALL=foo; unset LC_ALL; did not revert + LC_CTYPE etc. to the LANG value has been fixed. +09-09-17 A bug in which unsetting SVLVL could cause a script invoked by + name without #! to core dump has been fixed. +09-09-16 A bug in which a pipeline in a here-document could hang when the + 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 has been fixed. +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. +09-09-04 A bug in handing ${var[sub]}, where var is a nameref has been fixed. +09-09-03 A bug which caused an index array to have the wrong number of elements + when it was converted from a compound variable by adding an another + element has been fixed. +09-09-03 Specifying export for a compound variable now generates an error. +09-09-02 $"..." localizations strings are no longer recognized inside `...`. +09-09-01 A bug in the for loop optimizer in the handling of type static + variables has been fixed. +09-09-01 An error message is not displayed when * and @ are used as subscripts. +09-09-01 Several bugs in the processing for types that included an associative + array of another type has been fixed. +09-09-01 A bug in the tracing of [[ a < b ]] and [[ a > b ]] has been fixed. +09-08-26 The .sh.file variable was not being set for a script that was run + 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 + 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. +09-08-21 A bug in the handling of the comma operator in arithmetic expressions + that could cause a core dump on some systems has been fixed. +09-08-20 A bug in which a compound variable containing an array of a type + that doesn't have any elements now expands correctly. +09-08-19 A bug which disabled function tracing inside a function after + a call to another function has been fixed. +09-08-19 A bug in which initializing a compound variable instance to another + compound variable by name has been fixed. +09-08-18 A bug in which compound variable instances could be lost after + an instance that invoked a type method discipline has been fixed. +09-08-18 A bug in which a discipline function for a type applied to an + array instance when invoked in a function ignored the subscript + has been fixed. +09-08-18 A scoping error with variables in arithmetic expression with + type variables when reference with a name reference has been fixed. +09-08-10 Several memory leaks were fixed primarily related to subshells. +09-08-06 A bug in which setting the trap on CHLD to ignore could cause + 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 + 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. +09-06-19 A bug which caused a core dump with trap DEBUG set with an array + assignment with no elements has been fixed. +09-06-19 A bug with read with typeset -b -Z has been fixed. +09-06-19 Two bugs related to read -b for array variables has been fixed. +09-06-19 A bug with typeset for compound variables containing arrays of + compound variables has been fixed. +09-06-18 A bug in appending a compound variable to a an indexed array of + compound variables has been fixed. +09-06-18 A bug which occurs when appending a compound variable to an indexed + array element has been fixed. +09-06-18 Setting VISUAL to a value other than one ending in vi or emacs will + no longer unset the edit mode. +09-06-17 A bug in typeset -m when moving a local compound variable to a + global compound variable via a name reference has been fixed. +09-06-17 A bug in appending to nodes of an array of compound variables when + addressing them via nameref has been fixed. +09-06-17 A bug in typeset -p var, when var is an array of compound variables + in which the output only contained on array element has been fixed. +09-06-17 The prefix expansion ${!y.@} now works when y is a name + reference to an element of an array. +09-06-16 Traps on signals that are ignored when the shell is invoked + no longer display. Previously they were ignored as required but + would be listed with trap -p. +09-06-12 A bug in vi edit mode in which hitting the up arrow key at the + end of a line longer than 40 characters which caused a core dump + has been fixed. +09-06-11 A bug in which "eval non-builtin &" would create two processes, + 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 + 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 + fixed. +09-05-12 To conform with POSIX, the -u option only checks for unset variables + and subscript elements rather than checking for all parameters. +09-05-12 A bug which could cause a core dump when a variable whose name + begins with a . was referenced as part of a name reference inside + 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-15 A bug that caused ${...;} to hang for large files has been fixed. +09-04-08 A change was made in the -n option which printed out an incorrect + warning with <>. +09-04-07 The emacs edit command M-_ and M_. and the vi command _ was fixed + to handle the case there there is no history file. +09-04-05 A bug in handling new-lines with read -n has been fixed. +09-04-05 The ENV variable defaults the the file named by $HOME/.kshrc rather + 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 + 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 + compiled without SHOPT_P_UID or ruid=SHOPT_P_UID then euid is set + to ruid. A bug that did the wrong test (ruid&1 inside a command substitution wasn't working + correctly has been fixed. +09-02-02 A bug in the call stack of arithmetic function with 2 args + returning int has been fixed. +09-01-30 A bug in which 'eval print \$0' inside a function was giving the + wrong value for $0 has been fixed. +09-01-28 A bug in which a command substitution could return an exit status + 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 <> + 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. +09-01-20 A bug in which the exit status specified in an exit trap was + not used when a process terminated with a signal has been fixed. +09-01-19 A bug in which a signal whose default action is to terminate + a process could be ignored when the process is running a sub-shell + 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 + a variable is a name reference. +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 + standard. +09-01-14 The unset built-in was modified to continue to unset variables + after encountering a variable that it could not unset to + conform to the POSIX standard. +09-01-14 The parameter expansion ${x+value} no longer expands the value of + the variable x when determining whether x is set or not. +09-01-13 A bug in which background jobs and pipelines that were not waited + for could, in rare instances, cause the shell to go into an infinite + loop or fail has been fixed. +09-01-06 A bug in indexed arrays of compound variables in which referencing + non-existent sub-variable in an arithmetic expression could cause + the sub-variable to be created has been fixed. +09-01-05 A bug in which the \ character did not escape extended regular + expression pattern characters has been fixed. +08-12-24 A bug in which killing the last element of a pipe did not cause + a write to the pipe to generate a SIGPIPE has been fixed. +08-12-19 A bug which could cause command substitution to hang when the + last element of a pipeline in a command substitution was a built-in + and the output was more that PIPE_BUFF. +08-12-18 A bug which occurs when a here documented marker embedded in a + command substitution occurs on a buffer boundary has been fixed. +08-12-17 A bug in the output of typeset -p for variables that had attributes + but did not have a value has been fixed. +08-12-16 A bug in which a name reference to a name reference variable that + references an array element has been fixed. +08-12-16 A bug in which a variable given both the -A and -C attribute along + with an initial assignment didn't work correctly has been fixed. +08-12-10 The [[ -t fd ]] test was fixed to handle fd>9. +08-12-10 A bug where function stack misalignment could cause a bus error + has been fixed. +08-12-09 Command completion was changed to use \ to quote special characters + instead of quoting the argument in single quotes. +08-12-07 A bug in typeset -m which occurred when the target node was an + associative array element has been fixed. +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 + 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 + so that each completing background job gets its own trap; $! is + set to the job pid and $? is set to the job exit status at the + beginning of the trap. (3) sleep -s added to sleep until the time + expires or until a signal is delivered. +08-12-04 The sign of floating point zero is preserved across arithmetic + function calls. +08-12-04 A bug that caused print(1) to produce garbled stdout/stderr + output has been fixed. +08-12-04 A bug in which printf "%d\n" "''" 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 + 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 + shcomp was found has been fixed. +08-11-20 A bug in which jobs were not cleared from the jobs table for + interactive shells when the pipefail option is on has been fixed. +08-11-11 A bug in which a field that was unset in a type definition and later + set for an instance could appear twice when displaying the variable + 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 + 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. +08-11-06 A bug which could cause a core dump when the _ reference variable was + used as an embedded type with a compound assignment has been fixed. + +08-10-31 --- Release ksh93t --- +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-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 + 'Version') denoting compile time features: + A SHOPT_AUDIT + B SHOPT_BASH + L SHOPT_ACCT + M SHOPT_MULTIBYTE +08-10-09 A bug that caused subshell command substitution with redirection + to hang has been fixed. +08-10-08 Output errors, other than to stderr, now result in a diagnostic. +08-10-08 ksh93 now supports types that contain arrays of other types as + members. Earlier versions core dumped in this case. +08-10-05 A bug which caused the shell to emit a syntax error for an arithmetic + statement of the form (( var.name[sub] = value)) has been fixed. +08-10-01 A bug that caused subshell command substitution to hang has + been fixed. +08-09-29 When the -p export option of typeset is used with other options, + only those variables matching the specified options are displayed. +08-09-29 When the shell reads the environment and finds variables that are + not valid shell assignments, it now passes these on to subsequent + commands rather than deleting them. +08-09-29 A bug in the display of compound variables containing an indexed + array of compound variables has been fixed. +08-09-29 A bug in the display of compound variables containing an associative + array with a subscript containing a . in the name has been fixed. +08-09-26 A core dump in the subshell environment restore has been fixed. +08-09-24 $(...) has been fixed to properly set the exit status in $?. +08-09-23 $(<...) with IFS=$'\n\n' has been fixed to retain all but the last + of multiple trailing newlines. +08-09-23 The -p option to typeset when used with other attributes, restricts + the output to variables with the specified attributes. +08-09-22 A bug that sometimes lost the exit status of a job has been fixed. +08-09-21 A bug that retained trailing command substitution newlines in + cases where the command caused the shell to fork has been fixed. +08-09-19 type, whence -v, and command -v were fixed to comply with POSIX + 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 + 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 + 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. +08-09-10 A bug in which a subshell that spawned a background process could + loose output that was produced after the foreground completed + has been fixed. +08-09-10 A timing bug on some systems that could cause coprocesses started by a + subshell to not clean up and prevent other coprocesses has been fixed. +08-09-09 The typeset -m option is now able to rename array elements from + the same array. +08-09-09 The exit status of 2 from the DEBUG trap causes the next command + to be skipped. An exit value of 255 from a DEBUG trap called from + a function causes the function to return. +08-09-08 A bug in which a coprocess created in a subshell that did not + complete when the subshell terminated could prevent a coprocess + from being created in the parent shell has been fixed. +08-09-05 An assignment of the form name1=name2 where name1 and name2 + are both compound variables causes name1 to get a copy of name2. + name1+=name2 causes name2 sub-variables to be appended to name1. +08-09-05 A bug in which unsetting a compound variable did not unset all + 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 + and zsh that gets incremented when the shell starts. +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-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 + 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. +08-08-01 A bug with the pipefail option in which a nested pipeline could + cause an asynchronous command to block has been fixed. +08-08-01 A for loop optimizer bug that treats .sh.lineno as an invariant + has been fixed. +08-07-30 A bug in which expanding compound variable that had a get discipline + from with a here document could cause a syntax error has been fixed. +08-07-18 A bug in which a nameref caused a local variable to be created + rather than binding to an existing variable in the global scope + 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 + 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. + 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 + each element should default to a compound variable. +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. +08-07-01 A bug in the handling of shared variables when inside an embedded + type has been fixed. +08-06-29 A bug in multiline edit mode which occurred when the prompt length + 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-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 + a syntax error in the next subsequent command has been fixed. +08-06-17 Reduced the maximum function call depth to 2048 to avoid exceptions + 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 + 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. +08-06-13 A bug in which a compound variable defined in a subshell could + 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 + 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 + definitions from a file. +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 + 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. +08-06-09 A bug in which the return value for an assignment command containing + a command substitution with that failed was zero when the assignment + contained redirections has been fixed. +08-06-09 A bug in the quoting of $ inside a ERE pattern ~(E)(pattern) + 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 + 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-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]} + 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 + result from an expansion. +08-05-15 The trap on SIGCLD is no longer triggered by the completion of + the foreground job as with ksh88. +08-05-14 A bug in the implementation of the editing feature added on + 07-09-19 in emacs mode has been fixed. +08-05-12 A bug in processing the test built-in with parenthesis has been + 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 + 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. +08-05-08 A parser bug in which reserved words and labels were recognized + inside compound indexed array assignment after a new-line has + 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 + 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 + the specified variable so be unset before the assignment and + before the remaining attributes are supplied. +08-05-07 A bug that affected the cursor movement in multiline mode when + a character was deleted from near the beginning of the any + line other than the first. +08-05-01 In multiline edit mode, the refresh operation will now clear + the remaining portion of the last line. +08-05-01 A bug in computing prompt widths for the edit modes for prompts + with multibyte characters has been fixed. +08-05-01 A bug in the multiline edit mode which could cause the current + line to be displayed incorrectly when moving backwards from third + or higher line to the previous line has been fixed. +08-05-01 A bug in which options set in functions declared with the function + name syntax were carried across into functions invoked by these + 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 + 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 + fixed. +08-04-27 A bug in which the assignment x=(typeset -a foo=([0]=abc)) created + x.foo as an associative array has been fixed. +08-04-25 A bug in which $# did not report correctly when there were more + than 32K positional parameters has been fixed. +08-04-04 Choose the name _ as the sub-variable that holds type or instance + specific data used by discipline functions. +08-03-27 A bug in which the terminal group was not given back to the parent + shell when the last part of a pipeline was handled by the parent shell + and the other parts of the pipeline complete has been fixed. + The symptom was that the pipeline became uninterruptable. +08-03-25 A bug in restricted mode introduced in ksh93s that caused scripts + that did not use #! to executed in restricted mode has been fixed. +08-03-25 A bug in which the pipefail option did not work for a pipeline + within a pipeline has been fixed. +08-03-24 A bug in which OPTIND was not set correctly in subshells has + been fixed. +08-03-24 A bug which could cause a memory exception when a compound variable + containing an indexed array with only element 0 defined was expanded. +08-03-20 A bug in which ${!var[sub].*} was treated as an error has been fixed. +08-03-20 Associative array assignments of the form ([name]=value ...) + now allow ; as well as space tab and new line to separate elements. +08-03-18 A buffering problem in which standard error was sometimes + 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 + 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. +08-03-10 The new ${...} command substitution will treat the trailing } + as a reserved word even if it is not at the beginning of a command, + for example, ${ date }. +08-03-10 If the name of the ENV begins with /./ or ././ then the + /etc/ksh.kshrc file will not be executed on systems that support + this interactive initialization file. +08-03-07 A bug in which ksh -i did not run the ENV file has been fixed. +08-03-07 A bug in which ulimit did not always produce the same output as + ulimit -fS has been fixed. +08-03-04 A bug in multiline mode in emacs and vi mode which could cause the + cursor to be on the wrong line when interrupt was hit has been fixed. +08-03-03 The change made in ksh93s+ on 07-06-18 in which braces became + optional for ${a[i]} inside [[...]] was restored in the case + where the argument can be a pattern. +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 + 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 + 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-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 + format. It can be used along with -l for long double. +08-01-31 The -T option to typeset has been added for creating typed + variables. Also the -h and -S options have been added to + typeset that are only applicable when defining a type. +08-01-31 The prefix expansion operator @ has been added. ${@name} + expands to the type of name or yields the attributes. +07-11-15 A bug in the macro expander for multibyte characters in which + part of the character contains a file pattern byte has been fixed. +07-10-03 A bug in which : was not allowed as part of an alias name has been + fixed. +07-09-26 A bug in which appending a compound variable to a compound variable + or to an index array didn't work has been fixed. +07-09-19 In both emacs and vi edit mode, the escape sequence \E[A (usually + cursor up, when the cursor is at the end of the line will fetch + the most recent line starting with the current line. +07-09-18 The value of ${!var} was correct when var was a reference to an + array instance. +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. + 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 + 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 + like $(command) except that command is executed in the current + shell environment. The ${ must be followed by a blank or an + operator. + +08-04-17 --- Release ksh93s+ --- +08-04-17 A bug in which umask was not being restored correctly after a + subshell has been fixed. +08-04-15 A bug in which sending a STOP signal to a job control shell started + from within a shell function caused cause the invoking shell to + terminate has been fixed. +08-04-11 A bug which caused $(exec > /dev/null) to go into an infinite loop + has been fixed. +08-03-27 A bug in which typeset -LZ was being treated as -RZ has been fixed. +08-03-06 A bug with ksh -P on systems that support the the profile shell, + in which it would exit after running a non-builtin has been fixed. +08-01-31 A bug in which command substitution inside ((...)) could cause + syntax errors or lead to core dumps has been fixed. +08-01-17 A bug in which discipline functions could be deleted when invoked + from a subshell has been fixed. +08-01-17 A bug in which a command substitution consisting only of + assignments was treated as a noop has been fixed. +08-01-17 A bug in which discipline functions invoked from withing a + compound assignment could fail has been fixed. +08-01-16 Incomplete arithmetic assignments, for example ((x += )), now + generate an error message. +08-01-16 A bug in which a set discipline defined for a variable before + an array assignment could cause a core dump has been fixed. +08-01-03 A bug in on some systems in which exit status 0 is incorrectly + returned by a process that catches the SIGCONT signal is stopped + and then continued. +07-12-13 A race condition in which a program that has been stopped and then + continued could loose the exit status has been fixed. +07-12-12 Code to check for file system out of space write errors for all + writes has been added. +07-12-11 A bug in the macro expander for multibyte characters in which + part of the character contains a file pattern byte has been fixed. +07-12-06 A bug in the emacs edit mode when multiline was set that output + a backspace before the newline to the screen has been fixed. +07-12-04 A bug in which using TAB after a variable name listing expansion + in the edit modes would cause the $ to disappear has been fixed. +07-11-28 A bug in which setting IFS to readonly could cause a subsequent + command substitution to fail has been fixed. +07-11-27 A work around for a gcc 4.* C99 "feature" that could cause a job + control shell to go into an infinite loop by adding the volatile + attribute to some auto vars in functions that call setjmp(). +07-11-27 A bug in which the shell could read ahead on a pipe causing the + standard input to be incorrectly positioned has been fixed. +07-11-27 A bug in which compound variable UTF-8 multibyte values were not + expanded or traced properly has been fixed. +07-11-21 A bug where an unbalanced '[' in a command argument was not treated + properly has been fixed. +07-11-15 A bug in which compatibility mode (no long option names) getopts(1) + incorrectly set the value of OPTARG for flag options has been fixed. +07-11-15 A bug in which "hash -- name" treated "--" as an invalid name operand + has been fixed. +07-11-15 typeset now handles "-t -- [-r] [--]" for s5r4 hash(1) compatibility. +07-11-15 A bug in which the umask builtin mis-handled symbolic mode operands + 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 + 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. +07-11-14 A bug in which appending to an indexed array using the form + name+=([sub]=value) could cause the array to become an associative + array has been fixed. +07-11-14 A bug in which typeset without arguments could coredump if a + variable is declared as in indexed array and has no elements has + been fixed. +07-11-14 A bug in which creating a local SECONDS variable with typeset in + a function could corrupt memory has been fixed. +07-11-14 A bug which could cause a core dump when a script invoked by name + from a function used compound variables has been fixed. +07-11-05 A bug in which printf %d "'AB" did not diagnose unconverted characters + has been fixed. +07-11-05 printf %g "'A" support added for all floating point formats. +07-11-01 A bug in which typeset -f fun did not display the function definition + when invoked in a subshell has been fixed. +07-10-29 The sleep builtin was fixed so that all floating point constants + are valid operands. +07-10-10 A bug in which the locale was not being restored after + LANG=value command has been fixed. +07-09-20 A bug in which a nameref to a compound variable that was local + to the calling function would not expand correctly when displaying + is value has been fixed. +07-09-19 A bug which cause cause a core dump if .sh.edchar returned + 80 characters or more from a keyboard trap has been fixed. +07-09-14 A bug in which could cause a core dump when more than 8 file + descriptors were in use has been fixed. +07-09-10 A bug in which creating a name reference to an instance of + an array when the array name is itself a reference has been fixed. +07-09-10 The file completion code has been modified so that after an = in + any word, each : will be considered a path delimiter. +07-09-06 A bug in which subprocess cleanup could corrupt the malloc() heap + has been fixed. +07-08-26 A bug in which a name reference to an associative array instance + could cause the subscript to be evaluated as an arithmetic expression + has been fixed. +07-08-22 A bug in which the value of an array instance was of a compound + variable was not expanded correctly has been fixed. +07-08-14 A bug which could cause a core dump when a compound assignment was + made to a compound variable element with a typeset -a attribute + has been fixed. +07-08-08 A bug in which a trap ignored in a subshell caused it to be + ignored by the parent has been fixed. +07-08-07 A bug in which the set command would generated erroneous output + for a variable with the -RZ attribute if the variable name had been + passed to a function has been fixed. +07-08-02 A bug in which read x[1] could core dump has been fixed. +07-08-02 A second bug in which after read x[sub] into an associative array + of an element that hasn't been assigned could lead to a core dump + 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-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 + when the pipeline was the last command and the failure happened + on a component other than the last has been fixed. +07-06-25 A bug in the expansion of ${var/pattern/rep} when pattern or rep + contained a left parenthesis in single quotes has been fixed. +07-06-18 The braces for a subscripted variable with ${var[sub]} are now + optional when inside [[...]], ((...)) or as a subscript. +07-05-28 A bug in brace expansion in which single and double quotes did + not treat the comma as a literal character has been fixed. +07-05-24 The -p option of whence now disables -v. +07-05-23 Several bug fixes in compound variables and arrays of arrays + have been made. +07-05-15 A bug in which the %B format of printf was affected by the + locale has been fixed. +07-05-14 A bug in which \ was not removed in the replacement pattern with + ${var/pattern/rep} when it was not followed by \ or a digit has + been fixed. +07-05-10 A bug in which ksh -R file core dumped if no script was specified + has been fixed. it not displays an error message. +07-05-07 Added additional Solaris signals to signal table. +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-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. +07-03-08 A bug in which an error in read (for example, an invalid variable + name), could leave the terminal in raw mode has been fixed. +07-03-06 A bug in which read could core dump when specified with an array + variable with a subscript that is an arithmetic expression has + been fixed. +07-03-06 Several serious bugs with the restricted shell were reported and + fixed. +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 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 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 + definitions inside functions to exit with "no parent" has been fixed. +07-02-19 A bug in which using compound commands in process redirection + arguments would give syntax errors <(...) and >(...) has been fixed. +07-01-29 A bug which caused the shell to core dump which can occur when a + built-in exits without closing files that it opens has been fixed. +07-01-26 A bug in which ~(E) in patterns containing \ that are not inside () + has been fixed. + +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 + systems that provide getaddrinfo(3). +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 + no argument), when foo[0] is not empty has been fixed. +06-11-16 The discipline functions have been modified to allow each subscript + to act independently. Currently the discipline function will not + 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. + 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 + 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 + 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 + into the background with the bg command as required by POSIX. +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 + that supports them. +06-10-13 The klockwork.com software detected a few coding errors that + have been fixed. +06-10-12 A bug when skipping over `...` with ${x:=`...`} when x is set + has been fixed. +06-10-11 A bug in process floating constants produced by the %a format + of printf has been fixed. +06-10-06 A bug in which IFS was not being restored correctly in some + cases after a subshell has been fixed. +06-10-06 A bug in which pipefail was not detecting some failures in + pipelines with 3 or more states has been fixed. +06-10-03 A bug in the processing of >(...) with builtins which could + 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 + is only needed when using the ([subscript]=value ...) form. +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 + 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 + 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 # + 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 + history event !$ was not processed has been fixed. +06-07-21 A bug on some systems in which assigning PATH on a command line + would not take effect has been fixed. +06-07-20 Add ksh93 and rksh93 as allowable names for ksh binaries. +06-07-20 Removed the SHOPT_OO compilation option which was only partially + implemented. +06-07-20 The ability to use egrep, grep, and fgrep expressions within + 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 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 + and floating functions with invalid arguments yield NaN. +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 + arithmetic expressions. +06-06-13 Internal change to use ordering for variables instead of hashing + to speed up prefix matching. +06-06-13 A window between fork/exec in which a signal could get lost + and cause a program to hang has been eliminated +06-06-13 A bug in edit completion with quoted strings has been fixed. +06-06-07 The restricted options can now be enabled by set as well as on + the command line. Once set, it can not be disabled. +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. + 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 + 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 + 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 ]] + is equivalent to [[ string == ~(E)ERE ]]. +06-04-25 A bug in the vi edit mode which could cause the shell to core dump + when switching from emacs mode. +06-04-17 A bug in which using LANG or LC_ in assignment lists with builtins + 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 + integers. +06-03-28 A bug in which variables assignment lists before functions + defined with function name were not passed on the functions + invoked by this function has been fixed. +06-03-28 A bug in which name references defined within a function defined + with function name could not be used with compound variables has + been fixed. +06-03-27 A bug in which read <&p (print >&p) would cause the coprocess input + (output) pipe to close before reading from (after writing to) + it has been fixed. +06-02-28 A bug in which stopping a job created with the hist builtin command + would create a job that could not be restarted has been fixed. + +06-01-24 --- Release ksh93r --- +06-01-24 A bug in which running commands with standard output closed would + not work as expected has been fixed. +06-01-23 A bug in which print -u could fail when file descriptor was + open for writing has been fixed. +06-01-19 The ?: arithmetic operator fixed to work when the operation after + the colon was an assignment. +05-12-24 A bug which could lead to a core dump when elements of a compound + variable were array elements, i.e. foo=(bar=(1 2)), has been fixed. +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 + -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 + style history expansions using the history character !. +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 + command is found in the current directory. +05-11-29 A bug which caused ksh -c '[[ ! ((' to core dump rather than + 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 + 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 [[ ... ]] + 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 + the directory of the executable has been fixed. +05-09-15 A for/while loop optimizer bug in which $OPTIND was not + 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 + 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 + 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 + working within for and while loops has been fixed. +05-07-24 A bug in which the pattern ~(E)(foo|bar) was treated as a syntax + error has been fixed. +05-07-24 A bug in completion with =, where n was the one of the + previous selection choices has been fixed. +05-07-21 A bug with multibyte input when no edit mode was specified which + caused the input line to shift left/right has been fixed. +05-06-24 A race condition which could cause the exit status to get lost + on some fast systems has been fixed. +05-06-21 A bug in which nested patterns of the form {m,n}(pat) would cause + syntax errors has been fixed. +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, + 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 + 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} + 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 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 + 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 + a socket (presumably part of a remote shell invocation.) +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 + when braceexpand is enabled. +05-03-03 A bug where a SIGCHLD interrupt could cause a fifo open to fail has + been fixed. +05-02-25 A bug in which a builtin command run in the background could + keep a file descriptor open which could cause a foreground + 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 + to IFS -- both treat IFS as field delimiters. +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. +05-02-12 A bug in which the lib_init() function for .paths BUILTIN_LIB + libraries was not called has been fixed. +05-02-06 A bug on some systems in which moving the write end of a co-process + to a numbered file descriptor could cause it to close has been fixed. +05-02-06 A bug in the vi-edit mode in which the character under the cursor + was not deleted in some cases with the d% directive has been fixed. +05-02-06 A bug where external builtin stdout/stderr redirection corrupted + stdout has been fixed. +05-02-04 A bug where times formatting assumed CLK_TCK==60 has been fixed. + +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 + $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 + 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 + by the 'builtin' command) then the built-in version of the command + is used. When ksh is built with SHOPT_CMDLIB_DIR=1 then all libcmd + functions become builtins with the '/opt/ast/bin/' directory prefix. +05-01-10 A bug in which a nameref to a compound name caused a core dump has + been fixed. +05-01-09 A bug in which some SIGCHLD interrupts (from child processes exiting) + caused a fatal print/echo error diagnostic has been fixed. +04-12-24 A bug in which some SIGCHLD interrupts (from child processes exiting) + corrupted the internal process/job list, sometimes causing the shell + to hang, has been fixed. +04-12-01 A bug in which typeset -Fn truncated less than n digits for large + numbers has been fixed. +04-11-25 A bug in which standard error could be closed after a redirection + 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'. + `--foo' equivalent to `-o foo', `--nofoo' equivalent to `+o foo' +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 + 4095 to 32M. +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 + 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 + under some conditions. +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 + from the current number of 20. +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. +04-06-16 Two small memory leak problems were fixed. +04-06-15 A bug in ${var/pattern/"string"} which occurred when string + contained pattern matching characters has been fixed. +04-05-08 printf $'%d\n' produced an erroneous error message and has + been fixed. +04-05-24 A bug in which an associative array without any elements could + cause a core dump when a script with an associative array with + the same name was declared in a script invoked by name has + been fixed. +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, + 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 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. +04-03-29 A bug introduced in ksh93p in which a HUP signal received by + a shell that is a session group leader was not passed down to + its children has been fixed. + +04-02-28 --- Release ksh93p --- +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. +04-02-02 A bug in which an exported array would pass more than + the first element to a script invoked by name has been fixed. +04-02-02 A bug on some systems in which name=value pairs preceding a script + invoked by name was not getting passed to the script has been fixed. +04-01-20 A bug in which an unset discipline function could cause a core + dump on some systems has been fixed. +04-01-12 A bug in which a continue or break called outside a loop from + inside a function defined with name() syntax could affect + the invoking function has been fixed. +04-01-08 If a command name begins with ~, only filename completion will be + attempted rather than pathname completion using the builtin editors. +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 + 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. +03-12-15 A bug in which a quoted string ending with an unescaped $ would + delete the ending $ in certain cases has been fixed. +03-12-05 A bug in which the shell could hang when set -x tracing a command + when an invalid multibyte character is encountered has been fixed. +03-12-05 On some systems, if the KEYBD trap is set, then commands that use + the meta key were not processed until return was hit. This + has been fixed. +03-12-05 A problem which occurred when the login shell was not a group + leader that could cause it to fail has been fixed. +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 + 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. +03-11-04 A bug in which using arithmetic prefix operators ++ or -- on a + non-lvalue could cause a core dump has been fixed. +03-11-04 A bug in which leading zeros were stripped from variable + expansions within arithmetic computation to avoid being treated + as octal constants when they should not have, has been fixed. +03-10-08 A bug introduced in ksh93o in which a large here document inside + a function definition could get corrupted has been fixed. +03-09-22 A bug in which the .get discipline function was not being + called when a string variable was implicitly referenced from + within a numerical expression has been fixed. +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 + 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 + 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 + 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. +03-08-02 A parser bug introduced in ksh93o which caused the character + after () in a Posix function definition to be skipped + 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 + 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. + +03-07-20 --- Release ksh93o+ --- +03-07-20 A bug in which could cause memory corruption when a posix + function invoked another one has been fixed. +03-07-15 A bug in which a file descriptor>2 could be closed before + executing a script has been fixed. +03-07-15 A parsing error for <() and >() process substitutions inside + command substitution has been fixed. +03-07-15 A parsing error for patterns of the form {...}(...) when + used inside ${...} has been fixed. +03-07-15 An error in which expanding an indexed array inside a compound + variable could cause a core dump has been fixed. +03-07-15 A bug in which on rare occasions a job completion interrupt + could cause to core dump has been fixed. +03-06-26 A bug in which process substitution embedded within command + substitution would generate a syntax error has been fixed. +03-96-23 A bug in which ${@:offset:len} could core dump when there + 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 + 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, + any number of arguments can be specified. +03-06-14 A bug in which could cause a core dump on some systems with + vi and emacs editors with the MULTIBYTE option has been fixed. +03-06-06 A bug in which the shell could core dump when a script was + run from its directory, and the script name a symlink to a file + beginning with .., has been fixed. +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, + 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 + 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 + can be completed. +03-05-20 A bug in which read -N could hang on some systems when reading + from a terminal or a pipe has been fixed. +03-05-19 A bug in which the output of uname from a command substitution + would go to the standard output of the invoking command when + uname was invoked with a non-standard option has been fixed. +03-05-19 A job control bug which would cause the shell to exit because + it hadn't take back the terminal has been fixed. The bug + could occur when running a function that contained a pipeline + whose last element was a function. +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 + 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 + with .sh. has been fixed. +03-05-13 A bug in the expansion of $var for compound variables in which + some elements would not be output when the name was a prefix + of another name in the compound variable has been fixed. +03-05-08 The last item in the ksh93o release on 03-01-02 has been + altered slightly to preserve the leading 0's when the + preceding character is a digit. Thus, with typeset -LZ3 x=10, + $(( 1$x)) will be 1010 whereas $(( $x) will be 10. +03-04-25 A bug in which if x is a name reference, then nameref y=x.foo + 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 + 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 + 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 + 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 + 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 + 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 + that set -o nolog no longer has any meaning. +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 + 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 + 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 + on the signal names as documented. +03-02-05 A bug in the expansion of ${var/$pattern}, when pattern contained + \[ has been fixed. +03-02-05 A bug in which .sh.match[n], n>0, was not being set for substring + matches with % and %% has been fixed. +03-01-15 A bug in which getopts did not work for numerical arguments specified + as n#var in the getopts string has been fixed. +03-01-09 A bug in which using ${.sh.match} multiple times could lead to + 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 + 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 + variable, $x will not be treated as an octal constant. + +02-12-05 --- Release ksh93n+ --- +02-11-30 A bug that can show up in evaluating arithmetic statements that + are in an autoloaded function when the function is autoload from + another function has been fixed. +02-11-30 An optimization bug in which an expansion of the form ${!name.@}, + which occurred inside a for or a while loop, when name is a name + reference, has been fixed. +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 + it easier for runtime extensions to reuse this code. +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, + 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 + for which traps were set was not handled correctly has been fixed. +02-10-31 A bug in which a file opened with exec inside a subshell could + be closed before the subshell completed has been fixed. +02-10-21 A bug in which setting PATH or FPATH inside a function might not + take effect has been fixed. +02-10-21 A bug which could cause a core dump when a local SECONDS variable + is defined in a function has been fixed. +02-10-15 A bug in which the associate array name operator ${!array[@]} + could return the same name multiple times has been fixed. +02-10-15 A bug in which the zero'th element of an associative array was + not getting set when an assignment was made without a subscript + specified has been fixed. + +02-09-30 --- Release ksh93n --- +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 + 0-th element has been fixed. +02-09-30 A bug in which an array assignment of the form a=($a ...) would unset + 'a' before the right hand side was evaluated has been fixed. +02-09-27 A bug in which the error message for ${var?message} when var was + null or unset did not contain the variable name var has been fixed. +02-09-27 A bug in which closing file descriptors 0 through 2 could + cause a subsequent here document to fail has been fixed. +02-09-14 A bug in whence which occurs when the specified name contained + a / has been fixed. +02-09-14 A bug in the parser for strings of the form name$((expr))=value + has been fixed. +02-09-14 A for loop optimization bug in which the number of elements in + an array was treated as an invariant has been fixed. +02-09-09 A bug in which redirection or closing of a file descriptor between + 3 and 9 could cause a subsequent here document to fail has been + fixed. +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 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. +02-08-19 A bug which could lead to an exception on some systems (for + example FREEBSD) which occurred when setting PATH has been fixed. +02-08-11 A bug in arithmetic rounding in which a value input as a decimal + string would output as a rounded version of the string has + been fixed. +02-08-11 A bug in which the last character could be deleted from shell + traces and from whence when called from a multibyte locale + has been fixed. +02-08-01 A bug which could cause a core dump to occur when a shell script + is executed while a coprocess is running that has closed the + output pipe has been fixed. +02-08-01 A bug in which command completion in multibyte mode could + corrupt memory for long command lines has been fixed. + +02-06-17 --- Release ksh93n- --- +02-06-17 A bug in which user defined macros could cause a core dump in + with MULTIBYTE mode has been fixed. +02-06-17 A bug in which printf format specifiers of the form %2$s were causing + a core dump has been fixed. +02-06-17 A bug in which setting stty to noecho mode did not prevent the + echoing of characters by ksh when emacs or viraw mode + was enabled has been fixed. +02-06-17 A bug in which background job completion could cause the sleep + 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 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. +02-06-10 A bug in which the trap on ERR was not being processed when + set inside a function has been fixed. +02-06-07 A bug in which function definitions could cause the history count + to be decremented by one (and even become negative) has been fixed. +02-06-05 A bug in read in which share mode could be enabled has been fixed. +02-05-28 A bug which could occur when the last command of a script was + a case statement and the action selected ended in ;& instead of ;; + has been fixed. +02-05-23 A bug with unary + introduced in ksh93k has been fixed. +02-05-07 A bug in substitutions of the form ${var/pattern/string} in which + a backslash was inserted in the replacement string when it contained + a special pattern character has been fixed. +02-05-01 A bug in the emacs edit mode which occurred in versions compiled + 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 + disabled when invoked from the read built-in. + +02-03-26 --- Release ksh93m+ --- +02-03-26 A bug in which \ was not handled correctly when used in file + expansion has been fixed. +02-02-18 A bug in which lines beginning with a # were deleted from here + documents when the here-document delimiter was followed by + a comment has been fixed. +02-12-06 An optimization bug in which ${!x[@]) was treated as invariant in + a for loop has been fixed. +02-02-06 A bug in which the ERR trap is not cleared for a script invoked + by name from within a function has been fixed. +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 + 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 + 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 + would result in the builtin foo getting removed has been fixed. +02-01-07 A bug which the shell executed a command found in the current + directory when PATH have no valid directories has been fixed. +01-11-28 The value of $? was not being set when called with exit. +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 + the base was not 10. +01-11-26 +The default has compilation mode has been changes so that + viraw mode will always be on. + +01-10-31 --- Release ksh93m --- +01-10-31 A for loop optimizer bug for subshells contained withing for + loops has been fixed. +01-10-16 typeset without arguments no longer outputs variable names + that do not have any attributes that are set. +01-10-16 A bug introduced in ksh93l in which assignments specified with + the exec built-in were not being expanded properly has been + fixed. +01-10-11 An optimization bug in which ${!x) was treated as invariant in + a for loop has been fixed. +01-10-11 Unsigned integer variables in bases other than 10 are printed now + expand in that base with the base prefix. +01-10-10 A number of typos in the self generating man pages for shell + built-ins have been fixed. +01-10-04 The self generated man pages for hist and fc were not working + correctly and have been fixed. +01-10-03 Yet another optimizer bug in which shell patterns were + treated as invariants has been fixed. +01-09-27 Two bugs relating to multibyte history searches and to find + have been fixed. +01-09-27 A bug introduced in ksh93k in which the PATH searching was + not restored after running a command with an assignment list + has been fixed. +01-09-26 A bug in which a zero filled field was treated as octal when + 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 + 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 + 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 + the ports to be specified by service name. +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 + 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 + 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 + the position on the list. +01-09-16 A bug in ksh93l caused command completion not to find aliases + and functions. Command listing from the edit mode was presented + in reverse order. This has been fixed. +01-09-13 Another bug in the optimization of for loops related to subshells + when traps were set has been fixed. +01-09-07 A change in ksh93l caused brace expansion to stop working + and this has been fixed. +01-09-04 A bug introduced in ksh93k in which an arithmetic statement + within a function that used name references did not follow the + reference has been fixed. +01-09-04 A bug introduced in ksh93l in which export -p did not prefix + each export with the word export has been fixed. +01-08-29 A bug in multibyte input which occurred when a partial multibyte + character was received has been fixed. +01-08-29 A bug introduced in ksh93l which could cause a core dump + when an assignment list containing PATH is specified inside + command substitution has been fixed. +01-08-09 Another bug in the optimization of for loops in ksh93l caused + errors in recursive functions using local variables that + contained for loops has been fixed. +01-07-27 A bug in which IFS would be unset after a command substitution + inside a here document has been fixed. +01-07-26 To conform to the POSIX standard, if you invoked ksh name, + and name does not contain a /, it will first try to run + one in the current directory whether it is executable or not + before doing a path search for an executable script. Earlier + versions first checked for an executable script using the + PATH variable. +01-07-23 A bug in which unset -f invoked in a subshell could unset a + function defined in the parent has been fixed. +01-07-16 A bug in the optimization of for loops in ksh93l caused + name references to be treated as invariants has been fixed. +01-07-09 A bug in which a discipline function applied to a local variable + could cause a shell exception has been fixed. Discipline + functions can only be specified for global variables. + +01-06-18 --- Release ksh93l --- +01-06-18 A bug in assigning integers larger than can be represented as + long integers to floating point variables has been fixed. +01-06-18 A bug in the handling of unsigned integers (typeset -ui) has + been fixed. +01-06-04 The evaluation of the PS1 prompt no longer effects the value + of the $? variable. +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 + an extended regular expression. +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 + 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), + {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. + The word class is the union of [:alnum:] and the character _. +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 + ~(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) + are used to cause maximal matching and to cause case + insensitive matching respectively. If :pattern is also + specified, these options are only in effect while this + pattern is being processed. Otherwise, these options remain + in effect until the end of the pattern group that they are contained + in or until another ~(...) is encountered. These pattern groups + are not counted with respect to group numbering. +01-05-14 When edit completion, expansion, or listing occurs in the + middle of a quoted string, the leading quote is ignored when + performing the completion, expansion, or listing. +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-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 + 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 + earlier releases. +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 /) + 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, + 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 + 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. +01-04-30 A bug in which the builtin version of a command would get invoked + even though the full pathname for the command was specified + has been fixed. +01-04-30 A bug in which read would loose the last character when + reading the last line of a file that did not contain a new-line + character has been fixed. +01-04-23 A bug on some systems in which in vi mode the end of file + character and end of line character could be swapped has + been fixed. +01-04-23 A bug on some systems in which invoking a shell script that + did not have execute permission could set the exit value to + 127 rather than 126 has been fixed. +01-04-20 A bug in which read -n from a pipe would block if fewer than + n characters was received has been fixed. +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 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. +01-04-02 A bug on some systems, in which characters above 127 were + not displayed correctly in vi or emacs edit mode has been fixed. +01-04-02 A bug on some systems, introduced in the 'k' point release, in + which the erase character in viraw mode was moving the cursor + to the left without erasing the character has been fixed. +01-04-02 On some systems the wcwith() function was returning a wrong + value for characters and caused characters to be displayed + incorrectly from the shell edit modes. A work around for + this problem has been added. +01-03-26 A bug in which valid scripts could produce syntax errors + when run with locales that considered characters such as "'" + to be space characters has been fixed. +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 + 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 + has been fixed. Use of { and } for in and esac is obsolete. +01-03-06 A bug in which an argument of the form foo=bar was not + being passed correctly to a traced function whose name + was foo has been fixed. +01-03-02 Using $(trap -p name) did not print the name of the current + trap setting for trap name. +01-02-26 Exported floating point variables gave incorrect results + when passing them to ksh88. This has been fixed. +01-02-25 A race condition in which a coprocess which completed too quickly + would not allow subsequent coprocesses to start has been fixed. +01-02-25 The 'g' format specifier is now handled by printf. It had + inadvertently been omitted. +01-02-20 The + was not being displayed during an execution trace + with the += assignment operator. +01-02-19 The error message which occurs when the interpreter name + defined on the #! line does not exist is more informative. +01-02-19 A bug in which $0 would not be set correctly when a + script with #! was invoked by full pathname from the + directory of the script has been fixed. +01-02-19 A shell script did not always pick up tty mode changes + made by external commands such as stty which could + effect the behavior of read. +01-02-19 The -u, -g, and -k unary tests did not give the correct + results when used with negation and this has been fixed. + +01-02-05 --- Release ksh93k+ --- +01-02-05 The sequence \ 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 + 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 + 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 + 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 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 + bug only occurs when ksh93 is compiled without MULTIBYTE enabled. +00-11-29 A bug in which jobs -p would yield 0 for background + jobs run in a script has been fixed. +00-11-21 A bug in integer arrays in which the number of elements is + incorrect when the ++ operator is applied to a non-existing + element has been fixed. For example, integer x; ((x[3]++)). +00-11-20 A timing bug in which the shell could reset the terminal + group to the wrong value in the case that the a new process + changes the terminal group during startup has been fixed. + +00-10-27 --- Release ksh93k --- +00-10-27 Using tab for completion now works only when applied + after a non-blank character at the end of the current line. + In other case a tab is inserted. +00-10-27 A bug in the emacs edit mode for ^X^E has been fixed. + The ^X^E sequence is supposed to invoke the full editor + on the current command. +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 + 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. +00-10-17 A bug the += append operator when a single array element + 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 + 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 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 + 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 + 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 + is not an alpha character. Previous versions core dumped with this. +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 + 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 + for all assignments, strings, arrays, and compound variables. +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 + been fixed. +00-03-27 A bug in which the library path variable was not updated + correctly on some systems as described in the 'g' point + release has been fixed. +00-03-07 printf now returns a non-zero exit status when one of + its arguments cannot be converted to the given type. +00-03-05 The return value and error message for a command that + was found on the path but was not executable was set + incorrectly. +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 + 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 + 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 + has been fixed. +00-01-28 When a symbolic link was specified as the name of + the script to invoke by name, the value of $0 was + set to the real file name rather than the link name + in some cases and this has been fixed. +00-01-28 A bug in which the precision given as an argument + 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 + 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 + 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 + 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 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 [[...]] + has been fixed. +99-03-31 A bug in which the value of $? was changed when executing + a keyboard trap has been fixed. +99-03-31 The handling of SIGCHLD has been changed so that the + trap is not triggered while executing trap commands + to avoid recursive trap calls. +99-03-31 A bug in which a local variable in a function declared readonly + would generated an error when the function went out of + scope has been fixed. +99-03-31 A bug in which \ entered from the keyboard + with the KEYBD trap enabled has been fixed. +99-03-31 The error message for a misplaced ((, for example print ((3), + was often garbled and has been fixed. +99-03-31 A bug in the KEYBD trap in which escape sequences of the form + [#~ were not being handled as a unit has been fixed. +99-03-31 A bug in which ksh would consider expressions like [[ (a) ]] + as syntax errors has been fixed. +99-03-31 A function defined as foo() without a function body + was not reported as a syntax error. +99-03-31 A bug in which ksh could run out of file descriptors when + a stream was repeatedly opened with exec and read from + has been fixed. + +98-04-30 --- Release ksh93g --- +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 + 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, + 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, + 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 + itself and later cause the shell to get into an infinite + loop has been fixed. +98-04-30 A bug in shcomp relating to compound variables was fixed. +98-04-30 A bug introduced in ksh93e in which leading 0's in -Z + fields caused the value to be treated as octal for arithmetic + evaluation has been fixed. +98-04-30 A bug when a name reference with a shorter name than + the variable it references was the subject of a compound + assignment has been fixed. +98-04-30 A bug which in which assignment to array variables in + a subshell could effect the parent shell has been + fixed. +98-04-30 read name?prompt was putting a 0 byte at the end of the + prompt on standard error. +98-04-30 A bug in [[ string1 > string2 ]] when ksh was run with -x + has been fixed. +98-04-30 A bug in which the escape character was not processed + correctly inside {...} when brace expansion is enabled + has been fixed, for example {\$foo}. +98-04-30 A bug in line continuation in here-documents has been + fixed. +98-04-30 The default base when not specified with typeset -i is + 10 in accordance with the documentation. Previously, + the value was determined by the first assignment. +98-04-30 A parsing bug in which a # preceded alphanumeric + characters inside a command substitution caused + a syntax error to be reported has been fixed. +98-04-30 A bug in which a decimal constant represented as 10#ddd + where ddd was more than five digits generated a syntax + 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 + is an argument list for the invoked discipline function + or built-in. +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 + /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 A bug which would cause the secondary prompt to be + displayed when a user entered a literal carriage + return has been fixed. +97-06-30 A bug which caused ksh read -s name to core dump was + fixed. +97-06-30 A bug with the expansion of \} and \] inside double + quoted strings that also contained variable expansions + has been fixed +97-06-30 Changes in the ksh93e point release caused autoload + functions invoked from within command substitution + to fail. This has been fixed. +97-06-30 A bug in the processing of here-documents that could + prevent variable substitution to occur after $(...) command + substitution for long here documents has been fixed. +97-06-30 A bug caused by a race condition that could cause SIGTERM + to be ignored by a child process has been fixed. +97-06-30 A bug which prevented the startup of a coprocess immediately + after killing a running coprocess has been fixed. +97-06-30 ulimit foobar, where foobar is not an arithmetic + expression, now gives an error message as it did with ksh88 + instead of setting the file size limit to 0. +97-06-30 A bug which could cause an interactive shell to terminate when + the last process of a pipeline was a POSIX function was fixed. +97-06-30 A bug which could cause command substitution of a shell script + to core dump has been fixed. +97-06-30 A security hole was fixed in suid_exec. +97-06-30 Arithmetic functions such as pow() that take more than + one argument, did not work if arguments other than the + first contained parenthesized sub-expression. +97-06-30 The error message from a script containing an incomplete + arithmetic expression has been corrected. +97-06-30 A bug which caused a core dump on some machines when + the value of a name reference contained a positional + parameter and the name reference was not defined inside + a function has been fixed. +97-06-30 Arithmetic expressions now correctly handle hexadecimal + constants. +97-06-30 A bug in which integer variables could be expanded + with a leading 10# when declared with typeset -i + multiple times has been corrected. +97-06-30 A bug in which IFS wasn't correctly restored when + set within command substitution has been fixed. +97-06-30 The _ character is now considered as part of a word + with the M-f and M-b emacs directives as it was in ksh88. +97-06-30 A bug in brace pattern expansions that caused expressions + such as {foo\,bar,bam} to expand incorrectly have been fixed. + + +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() + 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, + has been revamped. +96-07-31 Empty command substitutions of the form $() now work. + whence -v foo now gives the correct result after calling + builtin -d foo. +96-07-31 A bug in right to left arithmetic assignment for which + the arithmetic expression (( y = x = 1.5 )) did not + yield 1 for y when x was declared typeset -i was fixed. +96-07-31 printf has been fixed to handle format containing \0 + and/or \0145 correctly. In addition, characters following + %b in the format string are no longer displayed when + the operand contains \c. +96-07-31 A bug in printf that could cause the %E format to + produce unnormalized results has been fixed. +96-07-31 A bug which causes some arithmetic expressions to be + incorrectly evaluated as integer expressions rather + that floating point has been fixed. +96-07-31 Functions defined inside a subshell no longer remain + defined when the subshell completes. +96-07-31 The error message from sh -c ';echo foo' has been + corrected. +96-07-31 The format for umask -S has been changed to agree + with the specification in the POSIX standard. +96-07-31 A bug that caused side effects in subscript evaluation + when tracing was enabled for subscripts using ++ or -- + has been fixed. +96-07-31 To conform to the Posix standard getopts has been changed + so that the option char is set to ? when it returns with + a non-zero exit status. +96-07-31 The handling of \} inside ${name...} has been fixed so + that the \ quotes the }. +96-07-31 A bug that caused the read builtin to resume execution + after processing a trap has been fixed. +96-07-31 [[ -s file ]] has been fixed so that if file is open + by ksh, it is flushed first. +96-07-31 In some cases attributes and sizes for non exported + variables weren't being reset before running a script. +96-07-31 The value of TMOUT was affected by changes make to + it in a subshell. +96-07-31 The jobs command did not reflect changes make by + sending the CONT signal to a command. +96-07-31 The error message for ksh -o unknown was incorrect. +96-07-31 Functions invoked as name=value name, did not use + values from the calling scope when evaluating value. +96-07-31 A bug in which the shell would reexecute previously + executed code when a shell script or coprocess was + run in the background has been fixed. +96-07-31 A bug in which an empty here-document would leave + a file descriptor open has been fixed. +96-07-31 A bug in which $(set -A array ...) would leave a + side effect has been fixed. +96-07-31 A discipline function for a global variable defined + within a function defined with the function keyword, + incorrectly created a local variable of the same name + and applied the discipline to it. + +95-08-28 --- Release ksh93d --- +95-08-28 The \ character was not handled correctly in replacement + patterns with ${x/pattern/replace}. +95-08-28 A bug with read in which the line did not end with + a new-line has been fixed. +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 + been returned by a previous wait, wait now + returns 127. +95-08-28 A bug with hist (fc) -e which prevented a command + to re-executed after it had been edited has been fixed. +95-08-28 A bug which prevented quoting from removing the meaning + 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 + a void*. +95-08-28 The nv_scan() function can restrict the scope of a walk + to the top scope. + +95-04-31 --- Release ksh93c --- +95-04-31 The expansion of "$@" was incorrect when $1 was the null + string. +95-04-31 A bug which could incorrectly report a syntax error in + a backquoted expression when a $ was preceded by \\ + has been fixed. +95-04-31 A bug which prevented the shell from exiting after + reporting an error when failing to open a script + has been fixed. +95-04-31 A bug that could lead to memory corruption when a + large here document that required parameter or command + substitution was expanded has been fixed. +95-04-31 A bug that could cause a core dump on some systems + after ksh detected an error when reading a function + has been fixed. +95-04-31 A bug which could cause a coprocess to hang when + reading from a process that has terminated has been fixed. +95-04-31 A bug which caused a script to terminate when set -e + was on and the first command of and && or || list + failed has been fixed. +95-04-31 A bug with here documents inside $(...) when the delimiter + word is an identifier has been fixed. +95-04-31 A bug which caused $0 to display the wrong value when + a script was invoked as an argument to the . command + and the eval command has been fixed. +95-04-31 A bug that could cause the built-in sleep to hang + has been fixed. +95-04-31 A bug introduces in 12/28/93b which caused the backslash + to be removed when it was followed by digit inside double + quotes in some instances has been fixed. +95-04-31 A bug which could cause a core dump if ksh was invoked with + standard input closed has been fixed. +95-04-31 A bug which could cause a core dump if typeset -A was + specified for an existing variable has been fixed. +95-04-31 Variables that were unset but had attributes such as readonly + and export were not listed with readonly, export and typeset. +95-04-31 Several problems with signals have been fixed. +95-04-31 A bug which prevented ulimit -t from working has been fixed. + Also, a bug in which failed ulimits could cause a core dump + has also been fixed. +95-04-31 A bug in expansion of the form ${name/#pattern/string} and + ${name/%pattern/string} has been fixed. +95-04-31 A bug which caused read -r on a line that contained only + blanks to get a non-null value has been fixed. +95-04-31 A bug introduced in the 'a' point release in which + ${x='\\'} expanded to \ when x was unset has been fixed. +95-04-31 A bug which prevented a trap on EXIT from being executed + when the last command in a script was a function invocation + has been fixed. +95-04-31 A bug which caused an interactive shell ignore input when + standard error was redirected to a file with exec, + and then restored with exec 2>&1 has been fixed. +95-04-31 An interactive shell turns on monitor mode even when + standard error has been redirected to a file. +95-04-31 A bug which could cause standard input to be incorrectly + positioned for the last command of a script has been fixed. +95-04-31 A bug in the edit modes which allowed walking back in + the history file for more than HISTSIZE commands has + been fixed. +95-04-31 A bug which could cause a core dump if variable TMPDIR was + changed between two command substitutions has been fixed. +95-04-31. A bug which prevented a trap on EXIT from being cleared + has been fixed. +95-04-31 A bug fixed for the v directive in vi MULTIBYTE has been + fixed. +95-04-31 Code to for IFS handling of multibyte characters has + been added. +95-04-31 The displaying of multibyte strings in export, readonly, + typeset, and execution traces has been fixed. +95-04-31 Variables inside functions are now statically scoped. + The previous behavior was never documented. +95-04-31 Variables inside functions are now statically scoped. + The previous behavior was never documented. +95-04-31 A few changes have been made to the name-value library + that affect built-ins that use disciplines. The + 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 + 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. + The previous behavior was never documented. +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 + name that will be used for usage messages. +94-12-31 A bug which caused unset RANDOM to dump core has been + fixed. +94-12-31 A bug which prevented return for terminating a profile + or ENV file has been fixed. +94-12-31 A bug which prevented standard input from being + directed to /dev/null for background jobs when + monitor mode was turned off has been fixed. +94-12-31 Statements of the form typeset -options var[expr]=value + did not perform substitutions on expr as expected. +94-12-31 A bug which prevented the shell from sending a HUP + signal to some background jobs that were not disowned + has been fixed. +94-12-31 A bug which allowed a script to trap signals that are + ignored at the time that the shell was invoked by exec + has been fixed. +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. +94-12-31 For compatibility with ksh88, the results of expansions + of command arguments will treat the extended character + match characters ()|& as ordinary characters. +94-12-31 A bug which caused read to fail on a file that was + open for read/write with <> when the first operation + was print or printf has been fixed. +94-12-31 When a job is suspended, it is put on the top of + the job list as required by the POSIX standard. +94-12-31 The value of OPTARG when an option that required + an argument but didn't have one was incorrect in the + case the the option string began with a :. +94-12-31 A bug which caused the terminal to get into a bad + state with some KEYBD traps in vi-mode has been fixed. +94-12-31 A bug which caused an invalid trap to cause a script + to terminate, rather than just return an error, has + been fixed. +94-12-31 Backreferencing sub-expressions in patterns and replacement + 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-06-30 --- Release ksh93a --- +94-06-30 An expansion bug which causes portions of a word after + a $((...)) expansion that contains a nested $var expansion + to be lost has been fixed. +94-06-30 A bug that caused a core dump when a script that did not + have PWD set and did a cd inside command substitution + has been fixed. +94-06-30 A bug which caused a core dump on some machines when + the LANG variable was assigned to has been fixed. +94-06-30 A bug which incorrectly handled set disciplines that + performed arithmetic evaluation when the discipline + was called from the arithmetic evaluator has been fixed. +94-06-30 A bug caused by an EXIT trap inside a function that + was executed in a subshell was fixed. +94-06-30 If foo is a function, and not a program, then command foo + now reports that foo isn't found rather than invoking foo. +94-06-30 The previous version incorrectly listed -A as an + invocation option. The -A option is only for set. +94-06-30 A bug was fixed which caused ksh to loop when execution trace + was enabled and the PS4 prompt required command substitution. +94-06-30 A bug which could cause the job control switch character + to be disabled when a script that enabled monitor mode + terminated was fixed. +94-06-30 A bug in the macro expansion global replacement operator //, + when the pattern began with a [ or +( has been fixed. +94-06-30 A bug which prevented ~ expansion from occurring when + it was terminated with a colon inside an assignment + has been fixed. +94-06-30 A bug in the dot command which prevented autoload functions + from working has been fixed. +94-06-30 A bug which caused a variable to be unset if the + its value were expanded inside a set discipline has + been fixed. +94-06-30 Whence -a now longer reports that a defined function + is undefined. +94-06-30 A bug on some systems in which $0 would be incorrect + in scripts invoked by name has been fixed. +94-06-30 Here documents with an empty body now work. +94-06-30 A bug which disabled argument passing and resetting + of options for a script invoked by name inside a + function has been fixed. +94-06-30 A bug in which an EXIT trap set the caller of a function + would be executed if a command called inside a function + was not found has been fixed. +94-06-30 A bug which allowed a script to trap signals that are + ignored at the time that the shell was invoked has + been fixed. +94-06-30 A bug which caused 2<&1- when applied to a shell built-in + to leave standard input closed has been fixed. +94-06-30 A bug which caused the shell to incorrectly parse + $() command substitutions with nested case statements + has been fixed. + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/RELEASE88 b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE88 new file mode 100644 index 0000000000..2466e39781 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE88 @@ -0,0 +1,422 @@ +This is a list of changes that have been made since the 11/16/88 version +of ksh. + +1. New features in 12/28/93 + a. Associative arrays. The new version of ksh supports both + associate arrays and the older indexed arrays with the same + array syntax. A new -A option of typeset is used to declare + an array to be associative. As with indexed arrays, $name is + equivalent to ${name[0]}. The prefix operator ! was added + to the parameter expansion syntax to expand to the list of + indices. For example, ${!name[@]} expands to the list of array + indices for variable name. + + b. Several additions have been made to shell arithmetic: + 1. The shell now performs floating point arithmetic. The + typeset options -F and -E have been added for floating + point and scientific notation respectively. + 2. The prefix and postfix ++ and -- operators. + 3. The comma and ?: operators. + 4. The math library functions. + 5. An arithmetic for statement of the form + for ((expr1; expr2; expr3)) + do ... + done + 6. Integer arithmetic extended up to base 64. + + c. Some additions to the macro expansion syntax have been made + to specify substrings and sub-arrays: + 1. ${name:expr} expands to the substring of ${name} starting at + the character position defined by arithmetic expression expr. + 2. ${name:expr1:expr2} expands to the substring of ${name} starting + at expr1 and consisting of at most expr2 characters. + 3. ${name[@]:expr} expands to the values of ${name[@]} starting at + the element defined by arithmetic expression expr. + 4. ${name[@]:expr1:expr2} expands to at most expr2 values of + ${name} starting at expr1. + 5. ${@:expr} expands the positional parameters starting at expr. + 6. ${@:expr1:expr2} expands to at most expr2 positional parameters + starting at expr1. + 7. ${!name} expands to the name of the variable named by name. + It will expand to name unless name is reference variable. + 8. ${!name[sub]} expands to the name of the subscript of the + given variable. If sub is @ or * the list of subscripts + is generated. + 9. ${!prefix*} and ${!prefix@} expand to the list of variable + names beginning with prefix. + 10. The substring operators, # and % can be now be applied + with aggregates (@ or *) and are applied to each. + 11. ${name/pattern/string} expands to the value of name with + the first occurrence of pattern replaced by string. + With aggregates (@ or *) this operation is applied to each. + 12. ${name/#pattern/string} Same as above but the pattern + to be replaced must match at the beginning. + 13. ${name/%pattern/string} Same as above but the pattern + to be replaced must match at the end. + 14. ${name//pattern/string} expands to the value of name with + the each occurrence of pattern replaced by string. + With aggregates (@ or *) this operation is applied to each. + + d. The name space for variables has been extended. The character '.' + can be used at the beginning of a name, and to separate identifiers + within a name. However, to create a name of the form, foo.bar, + the variable foo must exist. The namespace starting with .sh + is reserved for shell implementation variables. Exported + variable cannot contain a '.'. + + e. Compound assignments. The assignment syntax, varname=value, + has been extended to allow assignments of the form + varname=(assignment_list). As elsewhere in the shell + spaces or tabs are optional around the parentheses, and + no space is permitted between the varname and the =. The + assignment_list can be one of the following: + 1. A list of words. In this case each word is expanded as + in a for list and the resulting items become elements + of the indexed array varname. + 2. A list of subscript assignments in the form + [subscript]=value. In this, these elements become + elements of the associative array varname. + 3. A list of assignments; simple or compound. In this + case, each assignment is made to varname.name, where + name is the name of the enclosed assignment. + 4. Assignments in the form of readonly or typeset + statements. In this case each assignment is made as + in 3 above, and the attributes are given to the + corresponding variable. + In case 3 and 4 above, the value of "$varname" after + the above assignment is (assignment_list), where the + assignment_list produced would reproduce all of the + variables under varname.*. + + f. Function names of the form variable.action (called discipline + functions) can be defined where variable is any valid variable + name and action is get, set, or unset. The function variable.get + is invoked each time the variable is referenced. The set + discipline is invoked each time the variable is assigned to. + The unset discipline is invoked when a variable is unset. + The new variables .sh.name, .sh.subscript, and .sh.value are + defined inside the function body. Other shell extensions + may have their own set of discipline functions. + + g. The compound command !, which negates the return value of the + following pipeline, has been added. + + h. On systems that support dynamic loading with dlopen(), it is + now possible to add built-in commands at runtime with the + a builtin command named builtin. + + i. The following builtins have been added: + 1. command name [ ... ] + 2. sleep [decimal-seconds] + 3. builtin [-ds] [-f file] [name...] + 4. getconf name [pathname] + 5. disown [job...] + + j. An addition format for literal strings, $'....' can + be used where ever literal strings are valid. The string + inside the single quotes will be converted using the ANSI-C + escape conventions. Additionally, the escape sequence \E + expands to the escape character (default \033) whenever ANSI-C + escape sequences are recognized. + + k. A typeset -n option has been added which causes the value of a + variable to be treated as a reference to another variable so that + variables can be indirectly named. For example, if $1 contains + the name of a variable, then typeset -n foo=$1 causes the variable + foo to be synonymous with the variable whose name is $1. A builtin + alias, nameref='typeset -n' has been added to aid mnemonics. + Reference names cannot contain a '.'. Whenever that portion of + a variable up to the first '.' matches a reference name, the + reference value is substituted. For example, with nameref foo=.top, + then ${foo.bar} is equivalent to ${.top.bar}. When used as the + index of a for or select loop, each assignment causes a + new name reference to occur. + + l. The KEYBD trap has been added which is triggered when a key + or escape sequence is typed while reading from the keyboard + in an edit mode. This, combined with some new variables + makes it possible to program your key bindings in ksh. + + m. New variables have been added: + 1. FIGNORE defines a set of file names to be ignored in each + directory when performing pathname expansion, replacing + the rule that requires that a leading . be matched explicitly. + 2. Variable sh.edchar contains the value of the keyboard character + that has been entered when processing a KEYBD trap. If the value + is changed as part of the trap action, then the new value replaces + the key or keys that caused the trap. + 3. Variable sh.edcol is set to the character position of the cursor + within the input buffer during a KEYBD trap. + 4. Variable sh.edmode is set to the escape character when in vi + insert mode. + 5. Variable sh.edtext is set to the contents of the input buffer + during a KEYBD trap. + 6. HISTEDIT is checked before FCEDIT. FCEDIT is obsolete. + 7. HISTCMD is the number of the current command in the history + file. + 8. Variable .sh.version is set to the version string for + this shell. + 9. Variable .sh.name is set to the name of the variable + that that was referenced or assigned to when executing a get + or set discipline function. + 10. Variable .sh.subscript is set to the subscript for the variable + that was referenced or assign to when executing a get or + set discipline function. + 11. Variable .sh.value is set to the new value for the variable + that was assigned to when executing the set discipline function. + + n. New invocation and set -o options have been added: + 1. set -o notify (or set -b) causes background completion messages + to be displayed as soon as the job completes. + 2. There is a compile time option named KIA which enables + creation of a relational database for commands, variables + and functions defined and referenced by a script. The + option -I , causes the database to be generated + in . The database format can be queried via + the cql command. + o. ksh93 can read and evaluate pre-compiled scripts generated by + a separate program called shcomp. + p. More work on internationalization has been added: + 1. The decimal point character is processed per locale + 2. A $ can be placed in front of each string to indicate + that the string needs translation but is otherwise ignored. + This means that if a message catalog of all $"..." strings + is generated, then a program such as print $"hello world" + could display "bonjour monde" in the french locale. + q. Backreferences have been added to pattern matching. The sequence + \d, where d is a digit from 1-9, matches the same string as + the d-th previous parenthesis group. Backreferences + can be used within patterns, and within replacement strings + with any of the ${name/...} operators. + +2. Changes made in 12/28/93 + a. The output format of many commands has changed as follows: + 1. System error messages are displayed whenever a failure + is caused by a system call. + 2. The exit status has changed in many cases: + a. USAGE messages cause an exit status of 2. + b. Commands not found cause exit - 127. + c. Command found, but not executable - 126. + d. Terminated because of signal - 256+sig + 3. The output of values from built-ins that contain special + characters are quoted in a manner that then can be re-input. + 4. The trace output puts quotes around the output so that it + can be reused as input. + 5. The output for trap is in a format that can be reinput the + the shell to restore the traps. + 6. kill -l lists the signal names without numbers as + required by the POSIX standard. + + b. The following changes have been made to shell functions: + 1. The semantics of functions declared with name() has changed + to conform with the IEEE-POSIX 1003.2 standard. In particular, + these functions are executed in a dot script environment rather + than a separated function environment so that there are no + local variables and no scoping for traps. + 2. Functions declared as function name, preserve the old ksh + semantics can be also used as the first argument to the dot (.) + command to have them executed in a dot script environment. + + c. The command search rules have changed as follows: + 1. Special built-ins (those with a dagger in front of them) are + executed first. + 2. Functions are executed next. + 3. Other built-ins that do not require an executable version + (for example cd and read) come next. + 4. If the command name contains a slash, the pathname corresponding + to the command name is executed. + 5. If name corresponds to a previously encountered pathname + on the PATH variable, the corresponding command is executed. + 6. If the command name does not contain a slash, then the PATH + variable is used to find an executable by that name. If + the directory that the command is found is also contained in + the FPATH variable, then the command treated as a function. + If the shell has a built-in version of the command corresponding + to this command, then the built-in version of this command + is executed. Otherwise, the shell remembers that pathname + corresponding to this command name and executes this pathname. + 7. If the name is not found on PATH, then the directories in + FPATH are searched. If found, then the command is executed + as a function. + + d. Built-in commands options now conform to the IEEE-POSIX 1003.2 + conventions with some additions. In particular, + name -? + will now print a Usage line for name, except for true, false, + colon, login, newgrp, echo, [, and command. + + e. Tilde expansion is now performed as part of the word expansions. + The effect of this is that if word begins with ~ in ${name op word}, + it will be expanded unless escaped. + + f. Pathname expansion is no longer performed on redirection words + unless the shell is interactive. + + g. Changes to shell and options: + 1. The -n option has been enhanced to produce more warning and + portability messages. + 2. The -C option is equivalent to -o noclobber. Files are + created with O_EXCL when -C is on. + + h. The following changes have been made to [[...]]: + 1. A string by itself is equivalent to -n string. + 2. -e has been added as equivalent to -a. + 3. == has been added as equivalent =. + 4. -a and = are now considered obsolete. + 5. Arithmetic comparisons are now considered obsolete. + + i. kill has been changed as follows: + 1. Signal names can be upper case or lower case. + 2. Numerical arguments to kill -l cause the given signal names to + be displayed. + 3. String arguments to kill -l cause the given signal numbers to + be displayed. + 4. Synopsis changed for getopts conformance. + + j. print has a -f format option which is equivalent to + the IEEE POSIX printf. Both print -f format, and + printf have the following extensions from IEEE POSIX: + 1. Floating point formats are supported. + 2. Size and precision specifications can be *. + 3. The %d option can take an argument after precision to + specify the base that the number will be displayed. + 4. A %q format can be used to output a string quoted so + that it can be re-input to the shell. + 5. A %P format can be used to output the shell pattern which + corresponds to the give extended regular expression. + 6. For numerical fields, the arguments can be arithmetic + expressions which will be evaluated. + 7. The %n format works as described in ANSI-C. + + k. The following changes have been made to fc: + 1. It has been renamed hist. fc is now a predefined alias. + 2. hist uses ${HISTEDIT:-$FCEDIT}. FCEDIT is obsolete. + 3. A new -s option is equivalent to the obsolete -e -. + 4. If the first argument refers to a command earlier than the + first accessible command, it now implies the first accessible + command, so that hist -l 1 lists all accessible history commands. + + l. The dot command (.) has changed as follows: + 1. The argument can be the name of a function declared as + function name. The function will execute without creating a + new scope. + 2. If there are arguments to the given script or function, + the positional parameters are restored to their original + value when . completes. + + m. The read built-in has been changed as follows: + 1. A -A option to read has been added to allow the fields to be + read into an indexed array. + 2. A -t n option has been added which causes read to + timeout after n seconds when reading from a slow device. + 3. A -d char option has been added which causes the read + to terminate at char rather than at new-line. + + n. The trap command has been changed as follows: + 1. Trap names can be either upper case or lower case. + 2. Trap -p cause only the specified trap values to be displayed. + 3. The value of trap in a subshell will be the value in the parent + shell until a call to trap which changes the trap settings has + been made. Thus, savetraps=$(trap) works as required by the + POSIX standard. + + o. The exec command has been extended as follows: + 1. The -c option clears the environment first. + 2. The -a name option sets argv[0] to name for the program. + + p. true and false are built-ins, not aliases to built-ins. + + q. test has been modified to conform to the IEEE-POSIX 1003.2 + standard when there are three or less arguments. + + r. umask -S option displays the mask in a symbolic format. + + s. wait now returns the correct exit status of any previous + background job that has not been waited for, not just + the most recent one. + + t. The whence built-in has an option -a which causes all + uses for the given command name to be reported. + + u. unalias has -a option to clear all the aliases. + + v. The times built-in command has been removed. The time + reserved word, without a command, gives time cumulative + time for the shell and its children. A built-in alias + for times should enable scripts using times to continue + to run. + + w. Command substitution and arithmetic substitution will now be + performed for PS1, ENV, and PS4 evaluation in addition to + parameter expansion. + + x. The SECONDS variable now displays elapsed time in floating + point seconds with 3 places after the decimal point by + default. + + y. The getopts built-in now handles the complete libast optget + functionality. If any errors have occurred with getopts + when it has reached the end of arguments, then the Usage + message will be generated from the option string and the + exit status from getopts will be 2 rather than 1. The + usage message will be stored in the OPTARG variable if + the option string contains a leading colon; otherwise + it will be printed on standard error automatically. + + z. THE ENV file is only processed for interactive shell + invocations. In addition, the -x attributes for + aliases and functions is ignored. + + aa. The built-in edit modes have been changed as follows: + 1. The pathname completion and pathname listing options + now perform command completion and command listing + when applied to a word in the command position. + 2. In emacs mode ^N as the first related command after + the prompt will move to the next command relative to the + last known history position. + 3. In emacs mode, successive kill and delete commands will + accumulate their data in the kill buffer, by appending or + prepending as appropriate. This mode will be reset by any + command not adding something to the kill buffer. + 4. The control-T of emacs mode has been changed to behave like + control-T in gnu-emacs. + bb. The TMOUT variable also sets a limit for select timeouts + and default timeouts for read. + + +4. The source code has undergone significant modification. + a. Much of the code has been rewritten, In many cases this has + resulted in significant performance improvement. + + b. The code is organized differently. See the README files + for more details. + + c. Most configuration parameters now get generated using + the FEATURE mechanism of nmake. Other options are set + in the OPTIONS file. + + c. The are several new compile time options. See the README + file for details. Some of the old ones have been removed. + + d. The install script is a Mamfile that is generated by + nmake and processed by a script that comes with the + distribution. + + e. There are far fewer global names. This should make it + must easier to add built-in commands without worrying + about conflicts. + + f. The code uses the sfio library which makes it possible + to mix with stdio. + + g. The code is written in ANSI C with full prototypes. + The code is based on the IEEE POSIX 1003.1 standard. + The code can be compiled with K&R C and with C++ by + using the ANSI cpp that comes with nmake or running + the code through the proto filter before pre-processing. + This happens automatically with our shipping system. + + h. There is a programming interface for capturing references + and assignment to shell variables. It is also possible + to intercept variable creation and supply the array processing + function for that variable. See nval.3 for a description. diff --git a/usr/src/contrib/ast/src/cmd/ksh93/RELEASE93 b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE93 new file mode 100644 index 0000000000..e99c8781c6 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE93 @@ -0,0 +1,455 @@ +This is a list of changes that have been made since the 12/28/93 version +of ksh. + +1. New features in 12/28/93b + a. 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. + b. The getopts command has a -a name option that specifies a + name that will be used for usage messages. + +2. New features in 12/28/93e + a. The math functions, atan2, hypot, fmod, and pow were added. + b. 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. + +3. New features in 12/28/93f + a. Hostnames in addition to host addresses can be given in + /dev/tcp/host/port virtual file names. + b. File name completion and expansion now quotes special + characters in file names from both emacs and vi edit modes. + +4. New features in 12/28/93g + a. 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. + b. When an executable is found on a given path, + the appropriate library path variable is prepended + with a corresponding library directory. +5. New features in 12/28/93h + a. 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. + b. When performing pathname expansion, the shell checks + to see whether each directory it reads is case sensitive + or not, and performs the matching accordingly. + c. The %T format for printing formatted date/time. +6. New features in 12/28/93i + a. 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. + b. The getopts builtin can process command description + strings to produce man pages. + +7. Bugs fixed in 12/28/93a for default OPTIONS + a. An expansion bug which causes portions of a word after + a $((...)) expansion that contains a nested $var expansion + to be lost has been fixed. + b. A bug that caused a core dump when a script that did not + have PWD set and did a cd inside command substitution + has been fixed. + c. A bug which caused a core dump on some machines when + the LANG variable was assigned to has been fixed. + d. A bug which incorrectly handled set disciplines that + performed arithmetic evaluation when the discipline + was called from the arithmetic evaluator has been fixed. + e. A bug caused by an EXIT trap inside a function that + was executed in a subshell was fixed. + f. If foo is a function, and not a program, then command foo + now reports that foo isn't found rather than invoking foo. + g. The previous version incorrectly listed -A as an + invocation option. The -A option is only for set. + h. A bug was fixed which caused ksh to loop when execution trace + was enabled and the PS4 prompt required command substitution. + i. A bug which could cause the job control switch character + to be disabled when a script that enabled monitor mode + terminated was fixed. + j. A bug in the macro expansion global replacement operator //, + when the pattern began with a [ or +( has been fixed. + k. A bug which prevented ~ expansion from occurring when + it was terminated with a colon inside an assignment + has been fixed. + l. A bug in the dot command which prevented autoload functions + from working has been fixed. + m. A bug which caused a variable to be unset if the + its value were expanded inside a set discipline has + been fixed. + n. Whence -a now longer reports that a defined function + is undefined. + o. A bug on some systems in which $0 would be incorrect + in scripts invoked by name has been fixed. + p. Here documents with an empty body now work. + 1. A bug which disabled argument passing and resetting + of options for a script invoked by name inside a + function has been fixed. + r. A bug in which an EXIT trap set the caller of a function + would be executed if a command called inside a function + was not found has been fixed. + s. A bug which allowed a script to trap signals that are + ignored at the time that the shell was invoked has + been fixed. + t. A bug which caused 2<&1- when applied to a shell built-in + to leave standard input closed has been fixed. + u. A bug which caused the shell to incorrectly parse + $() command substitutions with nested case statements + has been fixed. + +8. Bugs fixed in 12/28/93b for default OPTIONS + a. A bug which caused unset RANDOM to dump core has been + fixed. + b. A bug which prevented return for terminating a profile + or ENV file has been fixed. + c. A bug which prevented standard input from being + directed to /dev/null for background jobs when + monitor mode was turned off has been fixed. + d. Statements of the form typeset -options var[expr]=value + did not perform substitutions on expr as expected. + e. A bug which prevented the shell from sending a HUP + signal to some background jobs that were not disowned + has been fixed. + f. A bug which allowed a script to trap signals that are + ignored at the time that the shell was invoked by exec + has been fixed. + g. A bug which could cause a core dump when a discipline + function was unset within a discipline was fixed. + h. The typeset builtin now accepts a first argument of + + or - for compatibility with ksh88. + i. For compatibility with ksh88, the results of expansions + of command arguments will treat the extended character + match characters ()|& as ordinary characters. + j. A bug which caused read to fail on a file that was + open for read/write with <> when the first operation + was print or printf has been fixed. + k. When a job is suspended, it is put on the top of + the job list as required by the POSIX standard. + l. The value of OPTARG when an option that required + an argument but didn't have one was incorrect in the + case the the option string began with a :. + m. A bug which caused the terminal to get into a bad + state with some KEYBD traps in vi-mode has been fixed. + n. A bug which caused an invalid trap to cause a script + to terminate, rather than just return an error, has + been fixed. + o. Backreferencing sub-expressions in patterns and replacement + strings now works. + p. A bug in chmod which caused the -R option to fail has + been fixed. + +9. Bugs fixed in 12/28/93c for default OPTIONS + a. The expansion of "$@" was incorrect when $1 was the null + string. + b. A bug which could incorrectly report a syntax error in + a backquoted expression when a $ was preceded by \\ + has been fixed. + c. A bug which prevented the shell from exiting after + reporting an error when failing to open a script + has been fixed. + d. A bug that could lead to memory corruption when a + large here document that required parameter or command + substitution was expanded has been fixed. + e. A bug that could cause a core dump on some systems + after ksh detected an error when reading a function + has been fixed. + f. A bug which could cause a coprocess to hang when + reading from a process that has terminated has been fixed. + g. A bug which caused a script to terminate when set -e + was on and the first command of and && or || list + failed has been fixed. + h. A bug with here documents inside $(...) when the delimiter + word is an identifier has been fixed. + i. A bug which caused $0 to display the wrong value when + a script was invoked as an argument to the . command + and the eval command has been fixed. + j. A bug that could cause the built-in sleep to hang + has been fixed. + k. A bug introduces in 12/28/93b which caused the backslash + to be removed when it was followed by digit inside double + quotes in some instances has been fixed. + l. A bug which could cause a core dump if ksh was invoked with + standard input closed has been fixed. + m. A bug which could cause a core dump if typeset -A was + specified for an existing variable has been fixed. + n. Variables that were unset but had attributes such as readonly + and export were not listed with readonly, export and typeset. + o. Several problems with signals have been fixed. + p. A bug which prevented ulimit -t from working has been fixed. + Also, a bug in which failed ulimits could cause a core dump + has also been fixed. + q. A bug in expansion of the form ${name/#pattern/string} and + ${name/%pattern/string} has been fixed. + r. A bug which caused read -r on a line that contained only + blanks to get a non-null value has been fixed. + s. A bug introduced in the 'a' point release in which + ${x='\\'} expanded to \ when x was unset has been fixed. + t. A bug which prevented a trap on EXIT from being executed + when the last command in a script was a function invocation + has been fixed. + u. A bug which caused an interactive shell ignore input when + standard error was redirected to a file with exec, + and then restored with exec 2>&1 has been fixed. + v. An interactive shell turns on monitor mode even when + standard error has been redirected to a file. + w. A bug which could cause standard input to be incorrectly + positioned for the last command of a script has been fixed. + y. A bug in the edit modes which allowed walking back in + the history file for more than HISTSIZE commands has + beed fixed. + z. A bug which could cause a core dump if variable TMPDIR was + changed between two command substitutions has been fixed. + aa. A bug which prevented a trap on EXIT from being cleared + has been fixed. + +10. Bugs fixed in 12/28/93d for default OPTIONS + a. The \ character was not handled correctly in replacement + patterns with ${x/pattern/replace}. + b. A bug with read in which the line did not end with + a new-line has been fixed. + c. A bug in file name generation which sometimes + appended a . for filenames that ended in / has + been fixed. + d. If a process is waited for after a status has + been returned by a previous wait, wait now + returns 127. + e. A bug with hist (fc) -e which prevented a command + to re-executed after it had been edited has been fixed. + f. A bug which prevented quoting from removing the meaning + of unary test operators has been fixed. + +11. Bugs fixed in 12/28/93e for default OPTIONS + a. Empty command substitutions of the form $() now work. + b. whence -v foo now gives the correct result after calling + builtin -d foo. + c. A bug in right to left arithmetic assignment for which + the arithmetic expression (( y = x = 1.5 )) did not + yield 1 for y when x was declared typeset -i was fixed. + d. printf has been fixed to handle format containing \0 + and/or \0145 correctly. In addition, characters following + %b in the format string are no longer displayed when + the operand contains \c. + e. A bug in printf that could cause the %E format to + produce unnormalized results has been fixed. + f. A bug which causes some arithmetic expressions to be + incorrectly evaluated as integer expressions rather + that floating point has been fixed. + g. Functions defined inside a subshell no longer remain + defined when the subshell completes. + h. The error message from sh -c ';echo foo' has been + corrected. + i. The format for umask -S has been changed to agree + with the specification in the POSIX standard. + j. A bug that caused side effects in subscript evaluation + when tracing was enabled for subscripts using ++ or -- + has been fixed. + k. To conform to the Posix standard getopts has been changed + so that the option char is set to ? when it returns with + a non-zero exit status. + l. The handling of \} inside ${name...} has been fixed so + that the \ quotes the }. + m. A bug that caused the read builtin to resume execution + after processing a trap has been fixed. + n. [[ -s file ]] has been fixed so that if file is open + by ksh, it is flushed first. + o. In some cases attributes and sizes for non exported + variables weren't being reset before running a script. + p. The value of TMOUT was affected by changes make to + it in a subshell. + q. The jobs command did not reflect changes make by + sending the CONT signal to a command. + r. The error message for ksh -o unknown was incorrect. + s. Functions invoked as name=value name, did not use + values from the calling scope when evaluating value. + t. A bug in which the shell would reexecute previously + executed code when a shell script or coprocess was + run in the background has been fixed. + u. A bug in which an empty here-document would leave + a file descriptor open has been fixed. + v. A bug in which $(set -A array ...) would leave a + side effect has been fixed. + w. A discipline function for a global variable defined + within a function defined with the function keyword, + incorrectly created a local variable of the same name + and applied the discipline to it. + +12. Bugs fixed in 12/28/93f for default OPTIONS + a. A bug which would cause the secondary prompt to be + displayed when a user entered a literal carriage + return has been fixed. + b. I bug which caused ksh read -s name to core dump was + fixed. + c. I bug with the expansion of \} and \] inside double + quoted strings that also contained variable expansions + has been fixed + d. Changes in the 'e' point release caused autoload + functions invoked from within command substitution + to fail. This has been fixed. + e. A bug in the processing of here-documents that could + prevent variable substitution to occur after $(...) command + substitution for long here documents has been fixed. + f. A bug caused by a race condition that could cause SIGTERM + to be ignored by a child process has been fixed. + g. A bug which prevented the startup of a coprocess immediately + after killing a running coprocess has been fixed. + h. ulimit foobar, where foobar is not an arithmetic + expression, now gives an error message as it did with ksh88 + instead of setting the file size limit to 0. + i. A bug which could cause an interactive shell to terminate when + the last process of a pipeline was a POSIX function was fixed. + j. A bug which could cause command substitution of a shell script + to core dump has been fixed. + k. A security hole was fixed in suid_exec. + l. Arithmetic functions such as pow() that take more than + one argument, did not work if arguments other than the + first contained parenthesized sub-expression. + m. The error message from a script containing an incomplete + arithmetic expression has been corrected. + n. A bug which caused a core dump on some machines when + the value of a name reference contained a positional + parameter and the name reference was not defined inside + a function has been fixed. + o. Arithmetic expressions now correctly handle hexidecimal + constants. + p. A bug in which integer variables could be expanded + with a leading 10# when declared with typeset -i + multiple times has been corrected. + q. A bug in which IFS wasn't correctly restored when + set within command substitution has been fixed. + r. The _ character is now considered as part of a word + with the M-f and M-b emacs directives as it was in ksh88. + +13. Bugs fixed in 12/28/93g for default OPTIONS + a. A bug in which a name reference could be created to + itself and later cause the shell to get into an infinite + loop has been fixed. + b. A bug in shcomp relating to compound variables was fixed. + c. A bug introduced in 'e' in which leading 0's in -Z + fields caused the value to be treated as octal for arithmetic + evaluation has been fixed. + d. A bug when a name reference with a shorter name than + the variable it references was the subject of a compound + assignment has been fixed. + e. A bug which in which assignment to array variables in + a subshell could effect the parent shell has been + fixed. + f. read name?prompt was putting a 0 byte at the end of the + prompt on standard error. + g. A bug in [[ string1 > string2 ]] when ksh was run with -x + has been fixed. + k. A bug in which the escape character was not processed + correctly inside {...} when brace expansion is enabled + has been fixed, for example {\$foo}. + l. A bug in line continuation in here-documents has been + fixed. + m. The default base when not specified with typeset -i is + 10 in accordance with the documentation. Previously, + the value was determined by the first assignment. + n. A parsing bug in which a # preceded alphanumeric + characters inside a command substitution caused + a syntax error to be reported has been fixed. + o. A bug in which a decimal constant represented as 10#ddd + where ddd was more than five digits generated a syntax + error has been fixed. + p. A bug in here document expansion in which ${...} expansions + were split across buffer boundaries has been fixed. + +14. Bugs fixed in 12/28/93h for default OPTIONS + a. I bug in shcomp for compilation of unary operators with [[...]] + has been fixed. + b. A bug in which the value of $? was changed when executing + a keyboard trap has been fixed. + c. The handling of SIGCHLD has been changed so that the + trap is not triggered while executing trap commands + to avoid recursive trap calls. + d. I bug in which a local variable in a function declared readonly + would generated an error when the function went out of + scope has been fixed. + e. I bug in which \ entered from the keyboard + with the KEYBD trap enabled has been fixed. + f. The error message for a misplaced ((, for example print ((3), + was often garbled and has been fixed. + g. I bug in the KEYBD trap in which escape sequences of the form + [#~ were not being handled as a unit has been fixed. + h. A bug in which ksh would consider expressions like [[ (a) ]] + as syntax errors has been fixed. + i. A function defined as foo() without a function body + was not reported as a syntax error. + j. A bug in which ksh could run out of file descriptors when + a stream was repeatedly opened with exec and read from + has been fixed. + k. A bug introduced when fixing item n from the 'g' point + release has been fixed. + +15. Bugs fixed in 12/28/93i for default OPTIONS + a. A bug in which a script could terminate when getopts + encountered an error when invoked inside a function + has been fixed. + b. When a symbolic link was specified as the name of + the script to invoke by name, the value of $0 was + set to the real file name rather than the link name + in some cases and this has been fixed. + +16. Bug fixes for specific non-default option combinations. + a. More signal names have been added for Solaris + b. A bug fixed for the v directive in vi MULTIBYTE has been + fixed. + c. Code to for IFS handling of multibyte characters has + been added. + d. The displaying of multibyte strings in export, readonly, + typeset, and execution traces has been fixed. + e. A bug with type ahead and KEYBOARD traps with the + MULTIBYTE option set has been fixed. + f. The k-shell information abstraction database option, KIA, + has been revamped for the 'e' point release. + g. A bug in brace pattern expansions that caused expressions + such as {foo\,bar,bam} to expand incorrectly have been fixed. + h. 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. + i. There was a bug in the compile option that does not + use fork() in which the current option settings where + not propagated to sub-shells. + j. A bug in setting .sh.editchar during the KEYBD trap + for the MULTIBYTE option was fixed in release 'h'. + k. A bug in which the precision given as an argument + to printf was not working has been fixed. + +17. Other changes to 12/28/93[abcdefghi] + a. A couple of minor changes to make adding built-ins easier. + b. Variables inside functions are now statically scoped. + The previous behavior was never documented. + c. A few changes have been made to the name-value library + that affect built-ins that use disciplines. The + changes allow disciplines to be shared by variables + and should make it possible to add new disciplines + without recompilation. + d. The name-value library interface has undergone significant + change for this revision. See the new nval.3 man page. + e. Builtin functions can take a third argument which is + a void*. + f. The nv_scan() function can restrict the scope of a walk + to the top scope. Starting in 'f', nv_scan() has an + additional pointer argument that is passed to each invoked + function. + g. Starting with release 'f', an empty for list behave like + a for list with null expansions. It produces a warning + message with sh -n. + h. Starting with release 'f' the code has been modified to + work with EBCDIC as well as ASCII. + i. Starting with the release 'g', the name-value pair library + uses the cdt library rather than the hash library. + j. The sh_fun() function now takes third argument which + is an argument list for the invoked discipline function + or built-in. + k. A callback function can be installed which will give + notification of file duplications and file closes. + +18. Incompatibilities with 12/28/93 version. + None intentional. + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/TYPES b/usr/src/contrib/ast/src/cmd/ksh93/TYPES new file mode 100644 index 0000000000..6eb6f41b5e --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/TYPES @@ -0,0 +1,182 @@ + +The ability for users to define types has been added to ksh93t. +Here is a quick summary of how types are defined and used in ksh93t. +This is still a work in progress so some changes and additions +are likely. + +A type can be defined either by a shared library or by using the new +typeset -T option to the shell. The method for defining types via +a shared library is not described here. However, the source file +bltins/enum.c is an example of a builtin that creates enumeration types. + +By convention, typenames begin with a capitol letter and end in _t. +To define a type, use + typeset -T Type_t=( + definition + ) +where definition contains assignment commands, declaration commands, +and function definitions. A declaration command (for example typeset, +readonly, and export), is a built-in that differs from other builtins in +that tilde substitution is performed on arguments after an =, assignments +do not have to precede the command name, and field splitting and pathname +expansion is not performed on the arguments. +For example, + typeset -T Pt_t=( + float -h 'length in inches' x=1 + float -h 'width in inches' y=0 + integer -S count=0 + len() + { + print -r $((sqrt(_.x*_.x + _.y*_.y))) + } + set() + { + (( _.count++)) + } + ) + +defines a type Pt_t that has three variables x, y, and count defined as well +as the discipline functions len and set. The variable x has an initial value +of 1 and the variable y has an initial value of 0. The new -h option argument, +is used for documentations purposes as described later and is ignored outside +of a type definition. + + +The variable count has the new -S attribute which means that it is shared +between all instances of the type. The -S option to typeset is ignored +outside of a type definition. Note the variable named _ that is used inside +the function definition for len and set. It will be a reference to the +instance of Pt_t that invoked the function. The functions len and set +could also have been defined with function len and function set, but +since there are no local variables, the len() and set() form are more +efficient since they don't need to set up a context for local variables +and for saving and restoring traps. + +If the discipline function named create is defined it will be +invoked when creating each instance for that type. A function named +create cannot be defined by any instance. + +When a type is defined, a declaration built-in command by this name +is added to ksh. As with other shell builtins, you can get the man page +for this newly added command by invoking Pt_t --man. The information from +the -h options will be embedded in this man page. Any functions that +use getopts to process arguments will be cross referenced on the generated +man page. + +Since Pt_t is now a declaration command it can be used in the definition +of other types, for example + typeset -T Rect_t=( Pt_t ur ll) + +Because a type definition is a command, it can be loaded on first reference +by putting the definition into a file that is found on FPATH. +Thus, if this definition is in a file named Pt_t on FPATH, then +a program can create instances of Pt_t without first including +the definition. + +A type definition is readonly and cannot be unset. Unsetting non-shared +elements of a type restores them to their default value. Unsetting a +shared element has no effect. + +The Pt_t command is used to create an instance of Pt_t. + Pt_t p1 +creates an instance named p1 with the initial value for p1.x set to 1 +and the initial value of p1.y set to 0. + Pt_t p2=(x=3 y=4) +creates an instance with the specified initial values. The len function +gives the distance of the point to the origin. Thus, p1.len will output +1 and p2.len will output 5. + +ksh93t also introduces a more efficient command substitution mechanism. +Instead of $(command), the new command substitution ${ command;} +can be used. Unlike (and ) which are always special, the { and } are +reserved words and require the space after { and a newline or ; before }. +Unlike $(), the ${ ;} command substitution executes the command in +the current shell context saving the need to save and restore +changes, therefore also allowing side effects. + +When trying to expand an element of a type, if the element does not exist, +ksh will look for a discipline function with that name and treat this as if +it were the ${ ;} command substitution. Thus, ${p1.len} is equivalent to +${ p1.len;} and within an arithmetic expression, p1.len will be expanded +via the new command substitution method. + +The type of any variable can be obtained from the new prefix +operator @. Thus, ${@p1} will output Pt_t. + +By default, each instance inherits all the discipline functions defined +by the type definition other than create. However, each instance can define +a function by the same name that will override this definition. +However, only discipline functions with the same name as those defined +by the type or the standard get, set, append, and unset disciplines +can be defined by each instance. + +Each instance of the type Pt_t behaves like a compound variable except +that only the variables defined by the type can be referenced or set. +Thus, p2.x=9 is valid, but p2.z=9 is not. Unless a set discipline function +does otherwise, the value of $p1 will be expanded to the form of a compound +variable that can be used for reinput into ksh. + +If the variables var1 and var2 are of the same type, then the assignment + var2=var1 +will create a copy of the variable var1 into var2. This is equivalent to + eval var2="$var1" +but is faster since the variable does not need to get expanded or reparsed. + +The type Pt_t can be referenced as if it were a variable using the name +.sh.type.Pt_t. To change the default point location for subsequent +instances of Pt_t, you can do + .sh.type.Pt_t=(x=5 y=12) +so that + Pt_t p3 + p3.len +would be 13. + +Types can be defined for simple variables as well as for compound +objects such as Pt_t. In this case, the variable named . inside +the definition refers to the real value for the variable. For example, +the type definition + typeset -T Time_t=( + integer .=0 + _='%H:%M:%S' + get() + { + .sh.value=$(printf "%(${_._})T" "#$((_))" ) + } + set() + { + .sh.value=$(printf "%(%#)T" "${.sh.value}") + + } + ) + +The sub-variable name _ is reserved for data used by discipline functions +and will not be included with data written with the %B option to printf. +In this case it is used to specify a date format. + +In this case + Time_t t1 t2=now +will define t1 as the time at the beginning of the epoch and t2 +as the current time. Unlike the previous case, $t2 will output +the current time in the date format specified by the value t2._. +However, the value of ${t2.} will expand the instance to a form +that can be used as input to the shell. + +Finally, types can be derived from an existing type. If the first +element in a type definition is named _, then the new type +consists of all the elements and discipline functions from the +type of _ extended by elements and discipline functions defined +by new type definition. For example, + + typeset -T Pq_t=( + Pt_t _ + float z=0. + len() + { + print -r $((sqrt(_.x*_.x + _.y*_.y + _.z*_.z))) + } + ) + +defines a new type Pq_t which is based on Pq_t and contains an additional +field z and a different len discipline function. It is also possible +to create a new type Pt_t based on the original Pt_t. In this case +the original Pt_t is no longer accessible. diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/alarm.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/alarm.c new file mode 100644 index 0000000000..1960fc3517 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/alarm.c @@ -0,0 +1,276 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * alarm [-r] [varname [+]when] + * + * David Korn + * AT&T Labs + * + */ + +#include "defs.h" +#include +#include +#include "builtins.h" +#include "FEATURE/time" + +#define R_FLAG 1 +#define L_FLAG 2 + +struct tevent +{ + Namfun_t fun; + Namval_t *node; + Namval_t *action; + struct tevent *next; + long milli; + int flags; + void *timeout; + Shell_t *sh; +}; + +static const char ALARM[] = "alarm"; + +static void trap_timeout(void*); + +/* + * insert timeout item on current given list in sorted order + */ +static void *time_add(struct tevent *item, void *list) +{ + register struct tevent *tp = (struct tevent*)list; + if(!tp || item->milli < tp->milli) + { + item->next = tp; + list = (void*)item; + } + else + { + while(tp->next && item->milli > tp->next->milli) + tp = tp->next; + item->next = tp->next; + tp->next = item; + } + tp = item; + tp->timeout = (void*)sh_timeradd(tp->milli,tp->flags&R_FLAG,trap_timeout,(void*)tp); + return(list); +} + +/* + * delete timeout item from current given list, delete timer + */ +static void *time_delete(register struct tevent *item, void *list) +{ + register struct tevent *tp = (struct tevent*)list; + if(item==tp) + list = (void*)tp->next; + else + { + while(tp && tp->next != item) + tp = tp->next; + if(tp) + tp->next = item->next; + } + if(item->timeout) + timerdel((void*)item->timeout); + return(list); +} + +static void print_alarms(void *list) +{ + register struct tevent *tp = (struct tevent*)list; + while(tp) + { + if(tp->timeout) + { + register char *name = nv_name(tp->node); + if(tp->flags&R_FLAG) + { + double d = tp->milli; + sfprintf(sfstdout,e_alrm1,name,d/1000.); + } + else + sfprintf(sfstdout,e_alrm2,name,nv_getnum(tp->node)); + } + tp = tp->next; + } +} + +static void trap_timeout(void* handle) +{ + register struct tevent *tp = (struct tevent*)handle; + tp->sh->trapnote |= SH_SIGALRM; + if(!(tp->flags&R_FLAG)) + tp->timeout = 0; + tp->flags |= L_FLAG; + tp->sh->sigflag[SIGALRM] |= SH_SIGALRM; + if(sh_isstate(SH_TTYWAIT) && !tp->sh->bltinfun) + sh_timetraps(tp->sh); +} + +void sh_timetraps(Shell_t *shp) +{ + register struct tevent *tp, *tpnext; + register struct tevent *tptop; + while(1) + { + shp->sigflag[SIGALRM] &= ~SH_SIGALRM; + tptop= (struct tevent*)shp->st.timetrap; + for(tp=tptop;tp;tp=tpnext) + { + tpnext = tp->next; + if(tp->flags&L_FLAG) + { + tp->flags &= ~L_FLAG; + if(tp->action) + sh_fun(tp->action,tp->node,(char**)0); + tp->flags &= ~L_FLAG; + if(!tp->flags) + { + nv_unset(tp->node); + nv_close(tp->node); + } + } + } + if(!(shp->sigflag[SIGALRM]&SH_SIGALRM)) + break; + } +} + + +/* + * This trap function catches "alarm" actions only + */ +static char *setdisc(Namval_t *np, const char *event, Namval_t* action, Namfun_t + *fp) +{ + register struct tevent *tp = (struct tevent*)fp; + if(!event) + return(action?"":(char*)ALARM); + if(strcmp(event,ALARM)!=0) + { + /* try the next level */ + return(nv_setdisc(np, event, action, fp)); + } + if(action==np) + action = tp->action; + else + tp->action = action; + return(action?(char*)action:""); +} + +/* + * catch assignments and set alarm traps + */ +static void putval(Namval_t* np, const char* val, int flag, Namfun_t* fp) +{ + register struct tevent *tp = (struct tevent*)fp; + register double d; + Shell_t *shp = tp->sh; + if(val) + { + double now; +#ifdef timeofday + struct timeval tmp; + timeofday(&tmp); + now = tmp.tv_sec + 1.e-6*tmp.tv_usec; +#else + now = (double)time(NIL(time_t*)); +#endif /* timeofday */ + nv_putv(np,val,flag,fp); + d = nv_getnum(np); + if(*val=='+') + { + double x = d + now; + nv_putv(np,(char*)&x,NV_INTEGER|NV_DOUBLE,fp); + } + else + d -= now; + tp->milli = 1000*(d+.0005); + if(tp->timeout) + shp->st.timetrap = time_delete(tp,shp->st.timetrap); + if(tp->milli > 0) + shp->st.timetrap = time_add(tp,shp->st.timetrap); + } + else + { + tp = (struct tevent*)nv_stack(np, (Namfun_t*)0); + shp->st.timetrap = time_delete(tp,shp->st.timetrap); + if(tp->action) + nv_close(tp->action); + nv_unset(np); + free((void*)fp); + } +} + +static const Namdisc_t alarmdisc = +{ + sizeof(struct tevent), + putval, + 0, + 0, + setdisc, +}; + +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 = context->shp; + while (n = optget(argv, sh_optalarm)) switch (n) + { + case 'r': + rflag = R_FLAG; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + break; + } + argc -= opt_info.index; + argv += opt_info.index; + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),optusage((char*)0)); + if(argc==0) + { + print_alarms(shp->st.timetrap); + return(0); + } + if(argc!=2) + errormsg(SH_DICT,ERROR_usage(2),optusage((char*)0)); + np = nv_open(argv[0],shp->var_tree,NV_NOARRAY|NV_VARNAME|NV_NOASSIGN); + if(!nv_isnull(np)) + nv_unset(np); + nv_setattr(np, NV_DOUBLE); + if(!(tp = newof(NIL(struct tevent*),struct tevent,1,0))) + errormsg(SH_DICT,ERROR_exit(1),e_nospace); + tp->fun.disc = &alarmdisc; + tp->flags = rflag; + tp->node = np; + tp->sh = shp; + nv_stack(np,(Namfun_t*)tp); + nv_putval(np, argv[1], 0); + return(0); +} + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/cd_pwd.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/cd_pwd.c new file mode 100644 index 0000000000..04e6296e5b --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/cd_pwd.c @@ -0,0 +1,258 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * cd [-LP] [dirname] + * cd [-LP] [old] [new] + * pwd [-LP] + * + * David Korn + * AT&T Labs + * research!dgk + * + */ + +#include "defs.h" +#include +#include +#include "variables.h" +#include "path.h" +#include "name.h" +#include "builtins.h" +#include + +/* + * Invalidate path name bindings to relative paths + */ +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,0); +} + +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 = context->shp; + int saverrno=0; + int rval,flag=0; + char *oldpwd; + Namval_t *opwdnod, *pwdnod; + if(sh_isoption(SH_RESTRICTED)) + errormsg(SH_DICT,ERROR_exit(1),e_restricted+4); + while((rval = optget(argv,sh_optcd))) switch(rval) + { + case 'L': + flag = 0; + break; + case 'P': + flag = 1; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + break; + } + argv += opt_info.index; + argc -= opt_info.index; + dir = argv[0]; + if(error_info.errors>0 || argc >2) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + 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 = nv_getval(HOME); + else if(*dir == '-' && dir[1]==0) + dir = nv_getval(opwdnod); + if(!dir || *dir==0) + errormsg(SH_DICT,ERROR_exit(1),argc==2?e_subst+4:e_direct); +#if _WINIX + if(*dir != '/' && (dir[1]!=':')) +#else + if(*dir != '/') +#endif /* _WINIX */ + { + if(!(cdpath = (Pathcomp_t*)shp->cdpathlist) && (dp=sh_scoped(shp,CDPNOD)->nvalue.cp)) + { + if(cdpath=path_addpath(shp,(Pathcomp_t*)0,dp,PATH_CDPATH)) + { + shp->cdpathlist = (void*)cdpath; + cdpath->shp = shp; + } + } + if(!oldpwd) + oldpwd = path_pwd(shp,1); + } + if(*dir!='/') + { + /* 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(shp,cdpath,dir,0); +#if _WINIX + if(*stakptr(PATH_OFFSET+1)==':' && isalpha(*stakptr(PATH_OFFSET))) + { + *stakptr(PATH_OFFSET+1) = *stakptr(PATH_OFFSET); + *stakptr(PATH_OFFSET)='/'; + } +#endif /* _WINIX */ + if(*stakptr(PATH_OFFSET)!='/') + + { + char *last=(char*)stakfreeze(1); + stakseek(PATH_OFFSET); + stakputs(oldpwd); + /* don't add '/' of oldpwd is / itself */ + if(*oldpwd!='/' || oldpwd[1]) + stakputc('/'); + stakputs(last+PATH_OFFSET); + stakputc(0); + } + if(!flag) + { + register char *cp; + stakseek(PATH_MAX+PATH_OFFSET); +#if SHOPT_FS_3D + if(!(cp = pathcanon(stakptr(PATH_OFFSET),PATH_DOTDOT))) + continue; + /* eliminate trailing '/' */ + while(*--cp == '/' && cp>stakptr(PATH_OFFSET)) + *cp = 0; +#else + if(*(cp=stakptr(PATH_OFFSET))=='/') + if(!pathcanon(cp,PATH_DOTDOT)) + continue; +#endif /* SHOPT_FS_3D */ + } + 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(shp,stakptr(PATH_OFFSET)))!='/') + rval = chdir(dir); + /* use absolute chdir() if relative chdir() fails */ + if(rval<0) + { + if(saverrno) + errno = saverrno; + errormsg(SH_DICT,ERROR_system(1),"%s:",dir); + } +success: + if(dir == nv_getval(opwdnod) || argc==2) + dp = dir; /* print out directory for cd - */ + if(flag) + { + dir = stakptr(PATH_OFFSET); + if (!(dir=pathcanon(dir,PATH_PHYSICAL))) + { + dir = stakptr(PATH_OFFSET); + errormsg(SH_DICT,ERROR_system(1),"%s:",dir); + } + stakseek(dir-stakptr(0)); + } + dir = (char*)stakfreeze(1)+PATH_OFFSET; + if(*dp && (*dp!='.'||dp[1]) && strchr(dir,'/')) + sfputr(sfstdout,dir,'\n'); + if(*dir != '/') + return(0); + nv_putval(opwdnod,oldpwd,NV_RDONLY); + flag = strlen(dir); + /* delete trailing '/' */ + while(--flag>0 && dir[flag]=='/') + dir[flag] = 0; + nv_putval(pwdnod,dir,NV_RDONLY); + 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,shp->pathlist); + path_newdir(shp,shp->cdpathlist); + if(oldpwd && (oldpwd!=e_dot)) + free(oldpwd); + return(0); +} + +int b_pwd(int argc, char *argv[],Shbltin_t *context) +{ + register int n, flag = 0; + register char *cp; + register Shell_t *shp = context->shp; + NOT_USED(argc); + while((n = optget(argv,sh_optpwd))) switch(n) + { + case 'L': + flag = 0; + break; + case 'P': + flag = 1; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + break; + } + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + if(*(cp = path_pwd(shp,0)) != '/') + errormsg(SH_DICT,ERROR_system(1), e_pwd); + if(flag) + { +#if SHOPT_FS_3D + 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); + } + else +#endif /* SHOPT_FS_3D */ + cp = strcpy(stakseek(strlen(cp)+PATH_MAX),cp); + pathcanon(cp,PATH_PHYSICAL); + } + sfputr(sfstdout,cp,'\n'); + return(0); +} + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/cflow.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/cflow.c new file mode 100644 index 0000000000..d76f98532c --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/cflow.c @@ -0,0 +1,119 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * break [n] + * continue [n] + * return [n] + * exit [n] + * + * David Korn + * AT&T Labs + * dgk@research.att.com + * + */ + +#include "defs.h" +#include +#include +#include "shnodes.h" +#include "builtins.h" + +/* + * return and exit + */ +#if 0 + /* for the dictionary generator */ + int b_exit(int n, register char *argv[],Shbltin_t *context){} +#endif +int b_return(register int n, register char *argv[],Shbltin_t *context) +{ + register char *arg; + 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) + { + case ':': + if(!strmatch(argv[opt_info.index],"[+-]+([0-9])")) + errormsg(SH_DICT,2, "%s", opt_info.arg); + goto done; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); + return(2); + } +done: + if(error_info.errors) + 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):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; + sh_exit(shp->savexit=n); + return(1); +} + + +/* + * break and continue + */ +#if 0 + /* for the dictionary generator */ + int b_continue(int n, register char *argv[],Shbltin_t *context){} +#endif +int b_break(register int n, register char *argv[],Shbltin_t *context) +{ + char *arg; + register int cont= **argv=='c'; + register Shell_t *shp = context->shp; + while((n = optget(argv,cont?sh_optcont:sh_optbreak))) switch(n) + { + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); + return(2); + } + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + argv += opt_info.index; + n=1; + if(arg= *argv) + { + n = (int)strtol(arg,&arg,10); + if(n<=0 || *arg) + errormsg(SH_DICT,ERROR_exit(1),e_nolabels,*argv); + } + if(shp->st.loopcnt) + { + shp->st.execbrk = shp->st.breakcnt = n; + if(shp->st.breakcnt > shp->st.loopcnt) + shp->st.breakcnt = shp->st.loopcnt; + if(cont) + shp->st.breakcnt = -shp->st.breakcnt; + } + return(0); +} + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/enum.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/enum.c new file mode 100644 index 0000000000..5cc749cc15 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/enum.c @@ -0,0 +1,284 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +#include + +static const char enum_usage[] = +"[-?@(#)$Id: enum (AT&T Research) 2008-01-08 $\n]" +USAGE_LICENSE +"[+NAME?enum - create an enumeration type]" +"[+DESCRIPTION?\benum\b is a declaration command that creates an enumeration " + "type \atypename\a that can only store any one of the values in the indexed " + "array variable \atypename\a.]" +"[+?If the list of \avalue\as is omitted, then \atypename\a must name an " + "indexed array variable with at least two elements.]" +"[i:ignorecase?The values are case insensitive.]" +"\n" +"\n\atypename\a[\b=(\b \avalue\a ... \b)\b]\n" +"\n" +"[+EXIT STATUS]" + "{" + "[+0?Successful completion.]" + "[+>0?An error occurred.]" + "}" +"[+SEE ALSO?\bksh\b(1), \btypeset\b(1).]" +; + +static const char enum_type[] = +"[-1c?\n@(#)$Id: type (AT&T Labs Research) 2008-01-08 $\n]" +USAGE_LICENSE +"[+NAME?\f?\f - create an instance of type \b\f?\f\b]" +"[+DESCRIPTION?\b\f?\f\b creates a variable for each \aname\a with " + "enumeration type \b\f?\f\b where \b\f?\f\b is a type that has been " + "created with the \benum\b(1) command.]" +"[+?The variable can have one of the following values\fvalues\f. " + "The the values are \fcase\fcase sensitive.]" +"[+?If \b=\b\avalue\a is omitted, the default is \fdefault\f.]" +"[+?If no \aname\as are specified then the names and values of all " + "variables of this type are written to standard output.]" +"[+?\b\f?\f\b is built-in to the shell as a declaration command so that " + "field splitting and pathname expansion are not performed on " + "the arguments. Tilde expansion occurs on \avalue\a.]" +"[r?Enables readonly. Once enabled, the value cannot be changed or unset.]" +"[a?index array. Each \aname\a will converted to an index " + "array of type \b\f?\f\b. If a variable already exists, the current " + "value will become index \b0\b.]" +"[A?Associative array. Each \aname\a will converted to an associate " + "array of type \b\f?\f\b. If a variable already exists, the current " + "value will become subscript \b0\b.]" +"[h]:[string?Used within a type definition to provide a help string " + "for variable \aname\a. Otherwise, it is ignored.]" +"[S?Used with a type definition to indicate that the variable is shared by " + "each instance of the type. When used inside a function defined " + "with the \bfunction\b reserved word, the specified variables " + "will have function static scope. Otherwise, the variable is " + "unset prior to processing the assignment list.]" +#if 0 +"[p?Causes the output to be in a form of \b\f?\f\b commands that can be " + "used as input to the shell to recreate the current type of " + "these variables.]" +#endif +"\n" +"\n[name[=value]...]\n" +"\n" +"[+EXIT STATUS?]{" + "[+0?Successful completion.]" + "[+>0?An error occurred.]" +"}" + +"[+SEE ALSO?\benum\b(1), \btypeset\b(1)]" +; + +struct Enum +{ + Namfun_t hdr; + short nelem; + short iflag; + const char *values[1]; +}; + +static int enuminfo(Opt_t* op, Sfio_t *out, const char *str, Optdisc_t *fp) +{ + Namval_t *np; + struct Enum *ep; + int n=0; + const char *v; + np = *(Namval_t**)(fp+1); + ep = (struct Enum*)np->nvfun; + if(strcmp(str,"default")==0) +#if 0 + sfprintf(out,"\b%s\b%c",ep->values[0],0); +#else + sfprintf(out,"\b%s\b",ep->values[0]); +#endif + else if(strcmp(str,"case")==0) + { + if(ep->iflag) + sfprintf(out,"not "); + } + else while(v=ep->values[n++]) + { + sfprintf(out,", \b%s\b",v); + } + return(0); +} + +static Namfun_t *clone_enum(Namval_t* np, Namval_t *mp, int flags, Namfun_t *fp) +{ + struct Enum *ep, *pp=(struct Enum*)fp; + ep = newof(0,struct Enum,1,pp->nelem*sizeof(char*)); + memcpy((void*)ep,(void*)pp,sizeof(struct Enum)+pp->nelem*sizeof(char*)); + return(&ep->hdr); +} + +static void put_enum(Namval_t* np,const char *val,int flags,Namfun_t *fp) +{ + struct Enum *ep = (struct Enum*)fp; + register const char *v; + 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); + return; + } + if(flags&NV_INTEGER) + { + nv_putv(np,val,flags,fp); + return; + } + while(v=ep->values[i]) + { + if(ep->iflag) + n = strcasecmp(v,val); + else + n = strcmp(v,val); + if(n==0) + { + nv_putv(np, (char*)&i, NV_UINT16, fp); + return; + } + i++; + } + 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) +{ + static char buff[6]; + struct Enum *ep = (struct Enum*)fp; + long n = nv_getn(np,fp); + if(n < ep->nelem) + return((char*)ep->values[n]); + sfsprintf(buff,sizeof(buff),"%u%c",n,0); + return(buff); +} + +static Sfdouble_t get_nenum(register Namval_t* np, Namfun_t *fp) +{ + return(nv_getn(np,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, Shbltin_t *context) +#else +int b_enum(int argc, char** argv, Shbltin_t *context) +#endif +{ + int sz,i,n,iflag = 0; + Namval_t *np, *tp; + Namarr_t *ap; + char *cp,*sp; + struct Enum *ep; + Shell_t *shp = context->shp; + struct { + Optdisc_t opt; + Namval_t *np; + } optdisc; + + cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_NOTIFY); + for (;;) + { + switch (optget(argv, enum_usage)) + { + case 'i': + iflag = 'i'; + continue; + case '?': + error(ERROR_USAGE|4, "%s", opt_info.arg); + break; + case ':': + error(2, "%s", opt_info.arg); + break; + } + break; + } + argv += opt_info.index; + if (error_info.errors || !*argv || *(argv + 1)) + { + error(ERROR_USAGE|2, "%s", optusage(NiL)); + return 1; + } + while(cp = *argv++) + { + if(!(np = nv_open(cp, (void*)0, NV_VARNAME|NV_NOADD)) || !(ap=nv_arrayptr(np)) || ap->fun || (sz=ap->nelem&(((1L<nvname,0); + tp = nv_open(stakptr(n), shp->var_tree, NV_VARNAME); + stakseek(n); + n = sz; + i = 0; + nv_onattr(tp, NV_UINT16); + nv_putval(tp, (char*)&i, NV_INTEGER); + nv_putsub(np, (char*)0, ARRAY_SCAN); + do + { + sz += strlen(nv_getval(np)); + } + while(nv_nextsub(np)); + sz += n*sizeof(char*); + if(!(ep = newof(0,struct Enum,1,sz))) + error(ERROR_system(1), "out of space"); + ep->iflag = iflag; + ep->nelem = n; + cp = (char*)&ep->values[n+1]; + nv_putsub(np, (char*)0, ARRAY_SCAN); + ep->values[n] = 0; + i = 0; + do + { + ep->values[i++] = cp; + sp = nv_getval(np); + n = strlen(sp); + memcpy(cp,sp,n+1); + cp += n+1; + } + while(nv_nextsub(np)); + ep->hdr.dsize = sizeof(struct Enum)+sz; + ep->hdr.disc = &ENUM_disc; + ep->hdr.type = tp; + nv_onattr(tp, NV_RDONLY); + nv_disc(tp, &ep->hdr,NV_FIRST); + memset(&optdisc,0,sizeof(optdisc)); + optdisc.opt.infof = enuminfo; + optdisc.np = tp; + nv_addtype(tp, enum_type, &optdisc.opt, sizeof(optdisc)); + } + return error_info.errors != 0; +} + +#ifdef STANDALONE +void lib_init(int flag, void* context) +{ + Shell_t *shp = ((Shbltin_t*)context)->shp; + Namval_t *mp,*bp; + if(flag) + return; + bp = sh_addbuiltin("Enum", enum_create, (void*)0); + mp = nv_search("typeset",shp->bltin_tree,0); + nv_onattr(bp,nv_isattr(mp,NV_PUBLIC)); +} +#endif diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/getopts.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/getopts.c new file mode 100644 index 0000000000..46e4797363 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/getopts.c @@ -0,0 +1,203 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * getopts optstring name [arg...] + * + * David Korn + * AT&T Labs + * research!dgk + * + */ + +#include "defs.h" +#include "variables.h" +#include +#include +#include "builtins.h" + +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 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); + sfputc(stkp,'$'); + sfputc(stkp,'('); + sfputr(stkp,s,')'); + sfputr(sp,sh_mactry(shp,stkfreeze(stkp,1)),-1); + stkset(stkp,savptr,savtop); + } + return(1); +} + +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; + register Shell_t *shp = context->shp; + char value[2], key[2]; + int jmpval; + volatile int extended, r= -1; + struct checkpt buff, *pp; + struct { + Optdisc_t hdr; + Shell_t *sh; + } disc; + memset(&disc, 0, sizeof(disc)); + disc.hdr.version = OPT_VERSION; + disc.hdr.infof = infof; + disc.sh = shp; + value[1] = 0; + key[1] = 0; + while((flag = optget(argv,sh_optgetopts))) switch(flag) + { + case 'a': + options = opt_info.arg; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + break; + } + argv += opt_info.index; + argc -= opt_info.index; + if(error_info.errors || argc<2) + errormsg(SH_DICT,ERROR_usage(2), "%s", optusage((char*)0)); + error_info.context->flags |= ERROR_SILENT; + error_info.id = options; + options = argv[0]; + np = nv_open(argv[1],shp->var_tree,NV_NOASSIGN|NV_VARNAME); + if(argc>2) + { + argv +=1; + argc -=1; + } + else + { + argv = shp->st.dolv; + argc = shp->st.dolc; + } + opt_info.index = shp->st.optindex; + opt_info.offset = shp->st.optchar; + if(mode= (*options==':')) + options++; + extended = *options=='\n' && *(options+1)=='[' || *options=='[' && *(options+1)=='-'; + sh_pushcontext(shp,&buff,1); + jmpval = sigsetjmp(buff.buff,0); + if(jmpval) + { + 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); + } + opt_info.disc = &disc.hdr; + switch(opt_info.index>=0 && opt_info.index<=argc?(opt_info.num= LONG_MIN,flag=optget(argv,options)):0) + { + case '?': + if(mode==0) + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + opt_info.option[1] = '?'; + /* FALL THRU */ + case ':': + key[0] = opt_info.option[1]; + if(strmatch(opt_info.arg,"*unknown*")) + flag = '?'; + if(mode) + opt_info.arg = key; + else + { + errormsg(SH_DICT,2, "%s", opt_info.arg); + opt_info.arg = 0; + flag = '?'; + } + *(options = value) = flag; + shp->st.opterror = 1; + if (opt_info.offset != 0 && !argv[opt_info.index][opt_info.offset]) + { + opt_info.offset = 0; + opt_info.index++; + } + break; + case 0: + if(shp->st.opterror) + { + char *com[2]; + com[0] = "-?"; + com[1] = 0; + flag = opt_info.index; + opt_info.index = 0; + optget(com,options); + opt_info.index = flag; + if(!mode && strchr(options,' ')) + errormsg(SH_DICT,ERROR_usage(2), "%s", optusage((char*)0)); + } + opt_info.arg = 0; + options = value; + *options = '?'; + r=1; + opt_info.offset = 0; + break; + 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,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] != '+') + { + key[0] = (char)opt_info.num; + key[1] = 0; + nv_putval(np, key, NV_RDONLY); + } + else if(extended) + { + Sfdouble_t d; + d = opt_info.number; + nv_putval(np, (char*)&d, NV_LDOUBLE|NV_RDONLY); + } + else + nv_putval(np, opt_info.arg, NV_RDONLY); + nv_close(np); + sh_popcontext(shp,&buff); + opt_info.disc = 0; + return(r); +} + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/hist.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/hist.c new file mode 100644 index 0000000000..1fa60260fe --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/hist.c @@ -0,0 +1,313 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +#include "defs.h" +#include +#include +#include +#include "variables.h" +#include "io.h" +#include "name.h" +#include "history.h" +#include "builtins.h" +#if SHOPT_HISTEXPAND +# include "edit.h" +#endif + +#define HIST_RECURSE 5 + +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[], Shbltin_t *context){} +#endif +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 = context->shp; + Sfio_t *outfile; + char *fname; + int range[2], incr, index2, indx= -1; + char *edit = 0; /* name of editor */ + char *replace = 0; /* replace old=new */ + int lflag = 0, nflag = 0, rflag = 0; +#if SHOPT_HISTEXPAND + int pflag = 0; +#endif + Histloc_t location; + NOT_USED(argc); + if(!sh_histinit((void*)shp)) + errormsg(SH_DICT,ERROR_system(1),e_histopen); + hp = shp->gd->hist_ptr; + while((flag = optget(argv,sh_opthist))) switch(flag) + { + case 'e': + edit = opt_info.arg; + break; + case 'n': + nflag++; + break; + case 'l': + lflag++; + break; + case 'r': + rflag++; + break; + case 's': + edit = "-"; + break; +#if SHOPT_HISTEXPAND + case 'p': + pflag++; + break; +#endif + case 'N': + if(indx<=0) + { + if((flag = hist_max(hp) - opt_info.num-1) < 0) + flag = 1; + range[++indx] = flag; + break; + } + /* FALLTHROUGH */ + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + break; + } + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + argv += (opt_info.index-1); +#if SHOPT_HISTEXPAND + if(pflag) + { + hist_cancel(hp); + pflag = 0; + while(arg=argv[1]) + { + flag = hist_expand(arg,&replace); + if(!(flag & HIST_ERROR)) + sfputr(sfstdout, replace, '\n'); + else + pflag = 1; + if(replace) + free(replace); + argv++; + } + return pflag; + } +#endif + flag = indx; + while(flag<1 && (arg=argv[1])) + { + /* look for old=new argument */ + if(!replace && strchr(arg+1,'=')) + { + replace = arg; + argv++; + continue; + } + else if(isdigit(*arg) || *arg == '-') + { + /* see if completely numeric */ + do arg++; + while(isdigit(*arg)); + if(*arg==0) + { + arg = argv[1]; + range[++flag] = (int)strtol(arg, (char**)0, 10); + if(*arg == '-') + range[flag] += (hist_max(hp)-1); + argv++; + continue; + } + } + /* search for last line starting with string */ + location = hist_find(hp,argv[1],hist_max(hp)-1,0,-1); + if((range[++flag] = location.hist_command) < 0) + errormsg(SH_DICT,ERROR_exit(1),e_found,argv[1]); + argv++; + } + if(flag <0) + { + /* set default starting range */ + if(lflag) + { + flag = hist_max(hp)-16; + if(flag<1) + flag = 1; + } + else + flag = hist_max(hp)-2; + range[0] = flag; + flag = 0; + } + index2 = hist_min(hp); + if(range[0]=(flag=(hist_max(hp) - !lflag))) + range[1] = flag; + /* check for valid ranges */ + if(range[1]=flag) + errormsg(SH_DICT,ERROR_exit(1),e_badrange,range[0],range[1]); + if(edit && *edit=='-' && range[0]!=range[1]) + errormsg(SH_DICT,ERROR_exit(1),e_eneedsarg); + /* now list commands from range[rflag] to range[1-rflag] */ + incr = 1; + flag = rflag>0; + if(range[1-flag] < range[flag]) + incr = -1; + if(lflag) + { + outfile = sfstdout; + arg = "\n\t"; + } + else + { + if(!(fname=pathtmp(NIL(char*),0,0,NIL(int*)))) + errormsg(SH_DICT,ERROR_exit(1),e_create,""); + if((fdo=open(fname,O_CREAT|O_RDWR,S_IRUSR|S_IWUSR)) < 0) + errormsg(SH_DICT,ERROR_system(1),e_create,fname); + outfile= sfnew(NIL(Sfio_t*),shp->outbuff,IOBSIZE,fdo,SF_WRITE); + arg = "\n"; + nflag++; + } + while(1) + { + if(nflag==0) + sfprintf(outfile,"%d\t",range[flag]); + else if(lflag) + sfputc(outfile,'\t'); + hist_list(shp->gd->hist_ptr,outfile,hist_tell(shp->gd->hist_ptr,range[flag]),0,arg); + if(lflag) + sh_sigcheck(shp); + if(range[flag] == range[1-flag]) + break; + range[flag] += incr; + } + if(lflag) + return(0); + sfclose(outfile); + 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. + * Exampled of how to use: HISTEDIT=pad + */ + if (strcmp (arg, "pad") == 0) + { + extern int pad_create(char*); + sh_close(fdo); + fdo = pad_create(fname); + pad_wait(fdo); + unlink(fname); + strcat(fname, ".bak"); + unlink(fname); + lseek(fdo,(off_t)0,SEEK_SET); + } + else + { +#endif /* apollo */ + if(*arg != '-') + { + char *com[3]; + com[0] = arg; + com[1] = fname; + com[2] = 0; + error_info.errors = sh_eval(sh_sfeval(com),0); + } + fdo = sh_chkopen(fname); + unlink(fname); + free((void*)fname); +#ifdef apollo + } +#endif /* apollo */ + /* don't history fc itself unless forked */ + error_info.flags |= ERROR_SILENT; + if(!sh_isstate(SH_FORKED)) + hist_cancel(hp); + sh_onstate(SH_HISTORY); + sh_onstate(SH_VERBOSE); /* echo lines as read */ + if(replace) + hist_subst(error_info.id,fdo,replace); + else if(error_info.errors == 0) + { + char buff[IOBSIZE+1]; + Sfio_t *iop = sfnew(NIL(Sfio_t*),buff,IOBSIZE,fdo,SF_READ); + /* read in and run the command */ + if(shp->hist_depth++ > HIST_RECURSE) + errormsg(SH_DICT,ERROR_exit(1),e_toodeep,"history"); + sh_eval(iop,1); + shp->hist_depth--; + } + else + { + sh_close(fdo); + if(!sh_isoption(SH_VERBOSE)) + sh_offstate(SH_VERBOSE); + sh_offstate(SH_HISTORY); + } + return(shp->exitval); +} + + +/* + * given a file containing a command and a string of the form old=new, + * execute the command with the string old replaced by new + */ + +static void hist_subst(const char *command,int fd,char *replace) +{ + register char *newp=replace; + register char *sp; + register int c; + off_t size; + char *string; + while(*++newp != '='); /* skip to '=' */ + if((size = lseek(fd,(off_t)0,SEEK_END)) < 0) + return; + lseek(fd,(off_t)0,SEEK_SET); + c = (int)size; + string = stakalloc(c+1); + if(read(fd,string,c)!=c) + return; + string[c] = 0; + *newp++ = 0; + if((sp=sh_substitute(string,replace,newp))==0) + errormsg(SH_DICT,ERROR_exit(1),e_subst,command); + *(newp-1) = '='; + sh_eval(sfopen(NIL(Sfio_t*),sp,"s"),1); +} + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/lib.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/lib.c new file mode 100644 index 0000000000..f4627f0ca4 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/lib.c @@ -0,0 +1,25 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1992-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 * +* David Korn * +* * +***********************************************************************/ +#pragma prototyped + +#include + +SHLIB(shell) diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/misc.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/misc.c new file mode 100644 index 0000000000..886f8fab52 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/misc.c @@ -0,0 +1,593 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * exec [arg...] + * eval [arg...] + * jobs [-lnp] [job...] + * login [arg...] + * let expr... + * . file [arg...] + * :, true, false + * vpath [top] [base] + * vmap [top] [base] + * wait [job...] + * shift [n] + * + * David Korn + * AT&T Labs + * + */ + +#include "defs.h" +#include "variables.h" +#include "shnodes.h" +#include "path.h" +#include "io.h" +#include "name.h" +#include "history.h" +#include "builtins.h" +#include "jobs.h" + +#define DOTMAX MAXDEPTH /* maximum level of . nesting */ + +static void noexport(Namval_t*,void*); + +struct login +{ + Shell_t *sh; + int clear; + char *arg0; +}; + +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 = context->shp; + logdata.sh->st.ioset = 0; + while (n = optget(argv, sh_optexec)) switch (n) + { + case 'a': + logdata.arg0 = opt_info.arg; + argc = 0; + break; + case 'c': + logdata.clear=1; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); + return(2); + } + argv += opt_info.index; + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + if(*argv) + B_login(0,argv,(Shbltin_t*)&logdata); + return(0); +} + +static void noexport(register Namval_t* np, void *data) +{ + NOT_USED(data); + nv_offattr(np,NV_EXPORT); +} + +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 = context->shp; + else + { + logp = (struct login*)context; + shp = logp->sh; + } + pp = (struct checkpt*)shp->jmplist; + if(sh_isoption(SH_RESTRICTED)) + errormsg(SH_DICT,ERROR_exit(1),e_restricted,argv[0]); + else + { + register struct argnod *arg=shp->envlist; + register Namval_t* np; + register char *cp; + if(shp->subshell && !shp->subshare) + sh_subfork(); + if(logp && logp->clear) + { +#ifdef _ENV_H + env_close(shp->env); + shp->env = env_open((char**)0,3); +#else + nv_scan(shp->var_tree,noexport,0,NV_EXPORT,NV_EXPORT); +#endif + } + while(arg) + { + if((cp=strchr(arg->argval,'=')) && + (*cp=0,np=nv_search(arg->argval,shp->var_tree,0))) + { + nv_onattr(np,NV_EXPORT); + sh_envput(shp->env,np); + } + if(cp) + *cp = '='; + arg=arg->argnxt.ap; + } + pname = argv[0]; + if(logp && logp->arg0) + argv[0] = logp->arg0; +#ifdef JOBS + if(job_close(shp) < 0) + return(1); +#endif /* JOBS */ + /* force bad exec to terminate shell */ + pp->mode = SH_JMPEXIT; + sh_sigreset(2); + sh_freeup(shp); + path_exec(shp,pname,argv,NIL(struct argnod*)); + sh_done(shp,0); + } + return(1); +} + +int b_let(int argc,char *argv[],Shbltin_t *context) +{ + register int r; + register char *arg; + Shell_t *shp = context->shp; + NOT_USED(argc); + while (r = optget(argv,sh_optlet)) switch (r) + { + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + break; + } + argv += opt_info.index; + if(error_info.errors || !*argv) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + while(arg= *argv++) + r = !sh_arith(shp,arg); + return(r); +} + +int b_eval(int argc,char *argv[], Shbltin_t *context) +{ + register int r; + register Shell_t *shp = context->shp; + NOT_USED(argc); + while (r = optget(argv,sh_opteval)) switch (r) + { + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s",opt_info.arg); + return(2); + } + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + argv += opt_info.index; + if(*argv && **argv) + { + sh_offstate(SH_MONITOR); + sh_eval(sh_sfeval(argv),0); + } + return(shp->exitval); +} + +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 = context->shp; + struct sh_scoped savst, *prevscope = shp->st.self; + char *filename=0, *buffer=0; + int fd; + struct dolnod *saveargfor; + volatile struct dolnod *argsave=0; + struct checkpt buff; + Sfio_t *iop=0; + short level; + while (n = optget(argv,sh_optdot)) switch (n) + { + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s",opt_info.arg); + return(2); + } + argv += opt_info.index; + script = *argv; + if(error_info.errors || !script) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + if(shp->dot_depth+1 > DOTMAX) + errormsg(SH_DICT,ERROR_exit(1),e_toodeep,script); + if(!(np=shp->posix_fun)) + { + /* check for KornShell style function first */ + np = nv_search(script,shp->fun_tree,0); + if(np && is_afunction(np) && !nv_isattr(np,NV_FPOSIX)) + { + if(!np->nvalue.ip) + { + path_search(shp,script,NIL(Pathcomp_t**),0); + if(np->nvalue.ip) + { + if(nv_isattr(np,NV_FPOSIX)) + np = 0; + } + else + errormsg(SH_DICT,ERROR_exit(1),e_found,script); + } + } + else + np = 0; + if(!np) + { + if((fd=path_open(shp,script,path_get(shp,script))) < 0) + errormsg(SH_DICT,ERROR_system(1),e_open,script); + filename = path_fullname(shp,stkptr(shp->stk,PATH_OFFSET)); + } + } + *prevscope = shp->st; + shp->st.lineno = np?((struct functnod*)nv_funtree(np))->functline:1; + shp->st.var_local = shp->st.save_tree = shp->var_tree; + if(filename) + { + shp->st.filename = filename; + shp->st.lineno = 1; + } + level = shp->fn_depth+shp->dot_depth+1; + nv_putval(SH_LEVELNOD,(char*)&level,NV_INT16); + shp->st.prevst = prevscope; + shp->st.self = &savst; + shp->topscope = (Shscope_t*)shp->st.self; + prevscope->save_tree = shp->var_tree; + 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(shp,&buff,SH_JMPDOT); + jmpval = sigsetjmp(buff.buff,0); + if(jmpval == 0) + { + shp->dot_depth++; + if(np) + sh_exec((Shnode_t*)(nv_funtree(np)),sh_isstate(SH_ERREXIT)); + else + { + 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(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,(struct dolnod*)argsave,saveargfor); + else + { + prevscope->dolc = shp->st.dolc; + prevscope->dolv = shp->st.dolv; + } + if (shp->st.self != &savst) + *shp->st.self = shp->st; + /* only restore the top Shscope_t portion for posix functions */ + memcpy((void*)&shp->st, (void*)prevscope, sizeof(Shscope_t)); + shp->topscope = (Shscope_t*)prevscope; + nv_putval(SH_PATHNAMENOD, shp->st.filename ,NV_NOFREE); + if(jmpval && jmpval!=SH_JMPFUN) + siglongjmp(*shp->jmplist,jmpval); + return(shp->exitval); +} + +/* + * null, true command + */ +int b_true(int argc,register char *argv[],Shbltin_t *context) +{ + NOT_USED(argc); + NOT_USED(argv[0]); + NOT_USED(context); + return(0); +} + +/* + * false command + */ +int b_false(int argc,register char *argv[], Shbltin_t *context) +{ + NOT_USED(argc); + NOT_USED(argv[0]); + NOT_USED(context); + return(1); +} + +int b_shift(register int n, register char *argv[], Shbltin_t *context) +{ + register char *arg; + register Shell_t *shp = context->shp; + while((n = optget(argv,sh_optshift))) switch(n) + { + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s",opt_info.arg); + return(2); + } + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + argv += opt_info.index; + n = ((arg= *argv)?(int)sh_arith(shp,arg):1); + if(n<0 || shp->st.dolcst.dolv += n; + shp->st.dolc -= n; + } + return(0); +} + +int b_wait(int n,register char *argv[],Shbltin_t *context) +{ + register Shell_t *shp = context->shp; + while((n = optget(argv,sh_optwait))) switch(n) + { + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s",opt_info.arg); + break; + } + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + argv += opt_info.index; + job_bwait(argv); + return(shp->exitval); +} + +#ifdef JOBS +# if 0 + /* for the dictionary generator */ + 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[],Shbltin_t *context) +{ + register int flag = **argv; + register Shell_t *shp = context->shp; + register const char *optstr = sh_optbg; + if(*argv[0]=='f') + optstr = sh_optfg; + else if(*argv[0]=='d') + optstr = sh_optdisown; + while((n = optget(argv,optstr))) switch(n) + { + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s",opt_info.arg); + break; + } + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + argv += opt_info.index; + if(!sh_isoption(SH_MONITOR) || !job.jobcontrol) + { + if(sh_isstate(SH_INTERACTIVE)) + errormsg(SH_DICT,ERROR_exit(1),e_no_jctl); + return(1); + } + if(flag=='d' && *argv==0) + argv = (char**)0; + if(job_walk(sfstdout,job_switch,flag,argv)) + errormsg(SH_DICT,ERROR_exit(1),e_no_job); + return(shp->exitval); +} + +int b_jobs(register int n,char *argv[],Shbltin_t *context) +{ + register int flag = 0; + register Shell_t *shp = context->shp; + while((n = optget(argv,sh_optjobs))) switch(n) + { + case 'l': + flag = JOB_LFLAG; + break; + case 'n': + flag = JOB_NFLAG; + break; + case 'p': + flag = JOB_PFLAG; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s",opt_info.arg); + break; + } + argv += opt_info.index; + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + if(*argv==0) + argv = (char**)0; + if(job_walk(sfstdout,job_list,flag,argv)) + errormsg(SH_DICT,ERROR_exit(1),e_no_job); + job_wait((pid_t)0); + return(shp->exitval); +} +#endif + +#ifdef _cmd_universe +/* + * There are several universe styles that are masked by the getuniv(), + * setuniv() calls. + */ +int b_universe(int argc, char *argv[],Shbltin_t *context) +{ + register char *arg; + register int n; + NOT_USED(context); + while((n = optget(argv,sh_optuniverse))) switch(n) + { + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s",opt_info.arg); + break; + } + argv += opt_info.index; + argc -= opt_info.index; + if(error_info.errors || argc>1) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + if(arg = argv[0]) + { + if(!astconf("UNIVERSE",0,arg)) + errormsg(SH_DICT,ERROR_exit(1), e_badname,arg); + } + else + { + if(!(arg=astconf("UNIVERSE",0,0))) + errormsg(SH_DICT,ERROR_exit(1),e_nouniverse); + else + sfputr(sfstdout,arg,'\n'); + } + return(0); +} +#endif /* cmd_universe */ + +#if SHOPT_FS_3D +#if _UWIN +#include +#endif +# if 0 + /* for the dictionary generator */ + int b_vmap(int argc,char *argv[], Shbltin_t *context){} +# endif + 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 = context->shp; + if(argv[0][1]=='p') + { + optstr = sh_optvpath; + flag = FS3D_VIEW; + } + else + { + optstr = sh_optvmap; + flag = FS3D_VERSION; + } + while(n = optget(argv, optstr)) switch(n) + { + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s",opt_info.arg); + break; + } + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); +#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) + { + case 0: + case 1: + flag |= FS3D_GET; + if((n = mount(*argv,(char*)0,flag,0)) >= 0) + { + vend = stkalloc(shp->stk,++n); + n = mount(*argv,vend,flag|FS3D_SIZE(n),0); + } + if(n < 0) + goto failed; + if(argc==1) + { + sfprintf(sfstdout,"%s\n",vend); + break; + } + n = 0; + while(flag = *vend++) + { + if(flag==' ') + { + flag = e_sptbnl[n+1]; + n = !n; + } + sfputc(sfstdout,flag); + } + if(n) + sfputc(sfstdout,'\n'); + break; + default: + if((argc&1)) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + /*FALLTHROUGH*/ + case 2: + if(shp->subshell && !shp->subshare) + sh_subfork(); + for(n=0;n1)?e_cantset:e_cantget,(flag&FS3D_VIEW)?e_mapping:e_versions); + return(1); + } +#endif /* SHOPT_FS_3D */ + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/mkservice.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/mkservice.c new file mode 100644 index 0000000000..0cbba25eb2 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/mkservice.c @@ -0,0 +1,494 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * mkservice varname pathname + * eloop [-t timeout] + * Written by David Korn + * AT&T Labs + */ + +static const char mkservice_usage[] = +"[-?\n@(#)$Id: mkservice (AT&T Research) 2001-06-13 $\n]" +USAGE_LICENSE +"[+NAME? mkservice - create a shell server ]" +"[+DESCRIPTION?\bmkservice\b creates a tcp or udp server that is " + "implemented by shell functions.]" +"[+?The \aservice_path\a must be of the form \b/dev/tcp/localhost/\b\aportno\a " + "or \b/dev/udp/localhost/\b\aportno\a depending on whether the " + "\btcp\b or \budp\b protocol is used. \aportno\a is the port " + "number that the service will use.]" +"[+?The shell variable \avarname\a is associated with the service. This " + "variable can have subvariables that keeps the state of all " + "active connections. The functions \avarname\a\b.accept\b, " + "\avarname\a\b.action\b and \avarname\a\b.close\b implement the " + "service as follows:]{" + "[+accept?This function is invoked when a client tries to connect " + "to the service. It is called with an argument which " + "is the file descriptor number associated with the " + "accepted connection. If the function returns a non-zero " + "value, this connection will be closed.]" + "[+action?This function is invoked when there is data waiting " + "to be read from one of the active connections. It is " + "called with the file descriptor number that has data " + "to be read. If the function returns a non-zero " + "value, this connection will be closed.]" + "[+close?This function is invoked when the connection is closed.]" + "}" +"[+?If \avarname\a is unset, then all active connection, and the service " + "itself will be closed.]" +"" +"\n" +"\nvarname service_path\n" +"\n" +"[+EXIT STATUS?]{" + "[+0?Success.]" + "[+>0?An error occurred.]" +"}" +"[+SEE ALSO?\beloop\b(1)]" +; + + +static const char eloop_usage[] = +"[-?\n@(#)$Id: eloop (AT&T Research) 2001-06-13 $\n]" +USAGE_LICENSE +"[+NAME? eloop - process event loop]" +"[+DESCRIPTION?\beloop\b causes the shell to block waiting for events " + "to process. By default, \beloop\b does not return.]" +"[t]#[timeout?\atimeout\a is the number of milliseconds to wait " + "without receiving any events to process.]" +"\n" +"\n\n" +"\n" +"[+EXIT STATUS?If no timeout is specified, \beloop\b will not return " + "unless interrupted. Otherwise]{" + "[+0?The specified timeout interval occurred.]" + "[+>0?An error occurred.]" +"}" +"[+SEE ALSO?\bmkservice\b(1)]" +; + + +#include "defs.h" + +#include +#include +#include +#include +#include + +#define ACCEPT 0 +#define ACTION 1 +#define CLOSE 2 + +#ifndef O_SERVICE +# define O_SERVICE O_NOCTTY +#endif + +static const char* disctab[] = +{ + "accept", + "action", + "close", + 0 +}; + +typedef struct Service_s Service_t; + +struct Service_s +{ + Namfun_t fun; + short fd; + int refcount; + int (*acceptf)(Service_t*,int); + int (*actionf)(Service_t*,int,int); + int (*errorf)(Service_t*,int,const char*, ...); + void *context; + Namval_t* node; + Namval_t* disc[elementsof(disctab)-1]; +}; + +static short *file_list; +static Sfio_t **poll_list; +static Service_t **service_list; +static int npoll; +static int nready; +static int ready; +static int (*covered_fdnotify)(int, int); + +static int fdclose(Service_t *sp, register int fd) +{ + register int i; + service_list[fd] = 0; + if(sp->fd==fd) + sp->fd = -1; + for(i=0; i < npoll; i++) + { + if(file_list[i]==fd) + { + file_list[i] = file_list[npoll--]; + if(sp->actionf) + (*sp->actionf)(sp, fd, 1); + return(1); + } + } + return(0); +} + +static int fdnotify(int fd1, int fd2) +{ + Service_t *sp; + if (covered_fdnotify) + (*covered_fdnotify)(fd1, fd2); + if(fd2!=SH_FDCLOSE) + { + register int i; + service_list[fd2] = service_list[fd1]; + service_list[fd1] = 0; + for(i=0; i < npoll; i++) + { + if(file_list[i]==fd1) + { + file_list[i] = fd2; + return(0); + } + } + } + else if(sp = service_list[fd1]) + { + fdclose(sp,fd1); + if(--sp->refcount==0) + nv_unset(sp->node); + } + return(0); +} + +static void process_stream(Sfio_t* iop) +{ + int r=0, fd = sffileno(iop); + Service_t * sp = service_list[fd]; + if(fd==sp->fd) /* connection socket */ + { + struct sockaddr addr; + socklen_t addrlen = sizeof(addr); + fd = accept(fd, &addr, &addrlen); + service_list[fd] = sp; + sp->refcount++; + file_list[npoll++] = fd; + if(fd>=0) + { + if(sp->acceptf) + r = (*sp->acceptf)(sp,fd); + } + } + else if(sp->actionf) + { + service_list[fd] = 0; + r = (*sp->actionf)(sp, fd, 0); + service_list[fd] = sp; + if(r<0) + close(fd); + } +} + +static int waitnotify(int fd, long timeout, int rw) +{ + Sfio_t *special=0, **pstream; + register int i; + + if (fd >= 0) + special = sh_fd2sfio(fd); + while(1) + { + pstream = poll_list; + while(ready < nready) + process_stream(pstream[ready++]); + if(special) + *pstream++ = special; + for(i=0; i < npoll; i++) + { + if(service_list[file_list[i]]) + *pstream++ = sh_fd2sfio(file_list[i]); + } +#if 1 + for(i=0; i < pstream-poll_list; i++) + sfset(poll_list[i],SF_WRITE,0); +#endif + nready = ready = 0; + errno = 0; +#ifdef DEBUG + sfprintf(sfstderr,"before poll npoll=%d",pstream-poll_list); + for(i=0; i < pstream-poll_list; i++) + sfprintf(sfstderr," %d",sffileno(poll_list[i])); + sfputc(sfstderr,'\n'); +#endif + nready = sfpoll(poll_list,pstream-poll_list,timeout); +#ifdef DEBUG + sfprintf(sfstderr,"after poll nready=%d",nready); + for(i=0; i < nready; i++) + sfprintf(sfstderr," %d",sffileno(poll_list[i])); + sfputc(sfstderr,'\n'); +#endif +#if 1 + for(i=0; i < pstream-poll_list; i++) + sfset(poll_list[i],SF_WRITE,1); +#endif + if(nready<=0) + return(errno? -1: 0); + if(special && poll_list[0]==special) + { + ready = 1; + return(fd); + } + } +} + +static int service_init(void) +{ + file_list = newof(NULL,short,n,0); + poll_list = newof(NULL,Sfio_t*,n,0); + service_list = newof(NULL,Service_t*,n,0); + covered_fdnotify = sh_fdnotify(fdnotify); + sh_waitnotify(waitnotify); + return(1); +} + +void service_add(Service_t *sp) +{ + static int init; + if (!init) + init = service_init(); + service_list[sp->fd] = sp; + file_list[npoll++] = sp->fd; +} + +static int Accept(register Service_t *sp, int accept_fd) +{ + register Namval_t* nq = sp->disc[ACCEPT]; + int fd; + + fd = fcntl(accept_fd, F_DUPFD, 10); + if (fd >= 0) + { + close(accept_fd); + if (nq) + { + char* av[3]; + char buff[20]; + + av[1] = buff; + av[2] = 0; + sfsprintf(buff, sizeof(buff), "%d", fd); + if (sh_fun(nq, sp->node, av)) + { + close(fd); + return -1; + } + } + } + sfsync(NiL); + return fd; +} + +static int Action(Service_t *sp, int fd, int close) +{ + register Namval_t* nq; + int r=0; + + if(close) + nq = sp->disc[CLOSE]; + else + nq = sp->disc[ACTION]; + if (nq) + { + char* av[3]; + char buff[20]; + + av[1] = buff; + av[2] = 0; + sfsprintf(buff, sizeof(buff), "%d", fd); + r=sh_fun(nq, sp->node, av); + } + sfsync(NiL); + return r > 0 ? -1 : 1; +} + +static int Error(Service_t *sp, int level, const char* arg, ...) +{ + va_list ap; + + va_start(ap, arg); + if(sp->node) + nv_unset(sp->node); + free((void*)sp); + errorv(NiL, ERROR_exit(1), ap); + va_end(ap); + return 0; +} + +static char* setdisc(Namval_t* np, const char* event, Namval_t* action, Namfun_t* fp) +{ + register Service_t* sp = (Service_t*)fp; + register const char* cp; + register int i; + register int n = strlen(event) - 1; + register Namval_t* nq; + + for (i = 0; cp = disctab[i]; i++) + { + if (memcmp(event, cp, n)) + continue; + if (action == np) + action = sp->disc[i]; + else + { + if (nq = sp->disc[i]) + free((void*)nq); + if (action) + sp->disc[i] = action; + else + sp->disc[i] = 0; + } + return action ? (char*)action : ""; + } + /* try the next level */ + return nv_setdisc(np, event, action, fp); +} + +static void putval(Namval_t* np, const char* val, int flag, Namfun_t* fp) +{ + register Service_t* sp = (Service_t*)fp; + if (!val) + fp = nv_stack(np, NiL); + nv_putv(np, val, flag, fp); + if (!val) + { + register int i; + for(i=0; i< sh.lim.open_max; i++) + { + if(service_list[i]==sp) + { + close(i); + if(--sp->refcount<=0) + break; + } + } + free((void*)fp); + return; + } +} + +static const Namdisc_t servdisc = +{ + sizeof(Service_t), + putval, + 0, + 0, + setdisc +}; + +int b_mkservice(int argc, char** argv, Shbltin_t *context) +{ + register char* var; + register char* path; + register Namval_t* np; + register Service_t* sp; + register int fd; + + NOT_USED(argc); + NOT_USED(context); + for (;;) + { + switch (optget(argv, mkservice_usage)) + { + case 0: + break; + case ':': + error(2, opt_info.arg); + continue; + case '?': + error(ERROR_usage(2), opt_info.arg); + continue; + } + break; + } + argv += opt_info.index; + if (error_info.errors || !(var = *argv++) || !(path = *argv++) || *argv) + error(ERROR_usage(2), optusage(NiL)); + if (!(sp = newof(0, Service_t, 1, 0))) + error(ERROR_exit(1), "out of space"); + sp->acceptf = Accept; + sp->actionf = Action; + sp->errorf = Error; + sp->refcount = 1; + sp->context = context; + sp->node = 0; + sp->fun.disc = &servdisc; + if((fd = sh_open(path, O_SERVICE|O_RDWR))<=0) + { + free((void*)sp); + error(ERROR_exit(1), "%s: cannot start service", path); + } + if((sp->fd = fcntl(fd, F_DUPFD, 10))>=10) + close(fd); + else + sp->fd = fd; + np = nv_open(var,sh.var_tree,NV_ARRAY|NV_VARNAME|NV_NOASSIGN); + sp->node = np; + nv_putval(np, path, 0); + nv_stack(np, (Namfun_t*)sp); + service_add(sp); + return(0); +} + +int b_eloop(int argc, char** argv, Shbltin_t *context) +{ + register long timeout = -1; + NOT_USED(argc); + NOT_USED(context); + for (;;) + { + switch (optget(argv, eloop_usage)) + { + case 0: + break; + case 't': + timeout = opt_info.num; + continue; + case ':': + error(2, opt_info.arg); + continue; + case '?': + error(ERROR_usage(2), opt_info.arg); + continue; + } + break; + } + argv += opt_info.index; + if (error_info.errors || *argv) + error(ERROR_usage(2), optusage(NiL)); + while(1) + { + if(waitnotify(-1, timeout, 0)==0) + break; + sfprintf(sfstderr,"interrupted\n"); + } + return(errno != 0); +} diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/poll_solaris.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/poll_solaris.c new file mode 100644 index 0000000000..6d27940857 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/poll_solaris.c @@ -0,0 +1,390 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1982-2009 AT&T Intellectual Property * +* and is licensed under the * +* Common Public License, Version 1.0 * +* by AT&T Intellectual Property * +* * +* A copy of the License is available at * +* http://www.opensource.org/licenses/cpl1.0.txt * +* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * +* * +* Information and Software Systems Research * +* AT&T Research * +* Florham Park NJ * +* * +* Roland Mainz * +* * +***********************************************************************/ +#pragma prototyped + +#include +#include +#include +#include +#include +#include +#include "name.h" +#undef nv_isnull +#ifndef SH_DICT +# define SH_DICT "libshell" +#endif +#include +#ifdef __GNUC__ +#include +#endif /* __GNUC__ */ + +#define sh_contexttoshb(context) ((Shbltin_t*)(context)) +#define sh_contexttoshell(context) ((context)?(sh_contexttoshb(context)->shp):(NULL)) + +static const char sh_optpoll[] = +"[-?\n@(#)$Id: poll (AT&T Labs Research) 2009-05-14 $\n]" +"[-author?Roland Mainz 0) may be " + "written. This event only examines bands " + "that have been written to at least once.]" + "[+POLLERR?An error has occurred on the device or " + "stream. This flag is only valid in the " + "revents bitmask; it is not used in the " + "events member.]" + "[+POLLHUP?A hangup has occurred on the stream. This " + "event and POLLOUT are mutually exclusive; a " + "stream can never be writable if a hangup has " + "occurred. However, this event and POLLIN, " + ", POLLRDBAND, or POLLPRI are not " + "mutually exclusive. This flag is only valid " + "in the revents bitmask; it is not used in " + "the events member.]" + "[+POLLNVAL?The specified fd value does not belong to an " + "open file. This flag is only valid in the " + "revents member; it is not used in the events " + "member.]" + "}" +"]" + +"[+?If the value fd is less than 0, events is ignored and " + "revents is set to 0 in that entry on return from poll.]" + +"[+?The results of the poll query are stored in the revents " + "member in the \bvar\b structure. POLL*-strings are set in the \brevents\b " + "variable to indicate which of the requested events are true. " + "If none are true, the \brevents\b will be an empty string when " + "the poll command returns. The event flags " + "POLLHUP, POLLERR, and POLLNVAL are always set in \brevents\b " + "if the conditions they indicate are true; this occurs even " + "though these flags were not present in events.]" + +"[+?If none of the defined events have occurred on any selected " + "file descriptor, poll waits at least timeout milliseconds " + "for an event to occur on any of the selected file descriptors. " + "On a computer where millisecond timing accuracy is not " + "available, timeout is rounded up to the nearest legal value " + "available on that system. If the value timeout is 0, poll " + "returns immediately. If the value of timeout is -1, poll " + "blocks until a requested event occurs or until the call is " + "interrupted.]" + +"[+?The poll function supports regular files, terminal and " + "pseudo-terminal devices, STREAMS-based files, FIFOs and " + "pipes. The behavior of poll on elements of fds that refer " + "to other types of file is unspecified.]" + +"[+?The poll function supports sockets.]" + +"[+?A file descriptor for a socket that is listening for connections " + "will indicate that it is ready for reading, once connections " + "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 " + "of strings is returned which contains a list of array subscripts " + "in the poll array which received events.]" +"[t:timeout]:[seconds?Timeout in seconds. If the value timeout is 0, " + "poll returns immediately. If the value of timeout is -1, poll " + "blocks until a requested event occurs or until the call is " + "interrupted.]" +"[T:mtimeout]:[milliseconds?Timeout in milliseconds. If the value timeout is 0, " + "poll returns immediately. If the value of timeout is -1, poll " + "blocks until a requested event occurs or until the call is " + "interrupted.]" +"\n" +"\nvar\n" +"\n" +"[+EXIT STATUS?]{" + "[+0?Success.]" + "[+>0?An error occurred.]" +"}" +"[+SEE ALSO?\bopen\b(1),\btmpfile\b(1),\bdup\b(1),\bclose\b(1),\bpoll\b(2)]" +; + +/* + * |mystpcpy| - like |strcpy()| but returns the end of the buffer + * + * Copy string s2 to s1. s1 must be large enough. + * return s1-1 (position of string terminator ('\0') in destnation buffer). + */ +static +char *mystpcpy(char *s1, const char *s2) +{ + while (*s1++ = *s2++) + ; + return (s1-1); +} + +static +Namval_t *nv_open_fmt(Dt_t *dict, int flags, const char *namefmt, ...) +{ + char varnamebuff[PATH_MAX]; + va_list ap; + + va_start(ap, namefmt); + vsnprintf(varnamebuff, sizeof(varnamebuff), namefmt, ap); + va_end(ap); + + return nv_open(varnamebuff, dict, flags); +} + +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; + if (strstr(str, "POLLPRI")) events |= POLLPRI; + if (strstr(str, "POLLOUT")) events |= POLLOUT; + if (strstr(str, "POLLWRNORM")) events |= POLLWRNORM; + if (strstr(str, "POLLWRBAND")) events |= POLLWRBAND; + if (strstr(str, "POLLERR")) events |= POLLERR; + if (strstr(str, "POLLHUP")) events |= POLLHUP; + if (strstr(str, "POLLNVAL")) events |= POLLNVAL; + + return events; +} + + +static +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|"); + if (events & POLLPRI) s=mystpcpy(s, "POLLPRI|"); + if (events & POLLOUT) s=mystpcpy(s, "POLLOUT|"); + if (events & POLLWRNORM) s=mystpcpy(s, "POLLWRNORM|"); + if (events & POLLWRBAND) s=mystpcpy(s, "POLLWRBAND|"); + if (events & POLLERR) s=mystpcpy(s, "POLLERR|"); + if (events & POLLHUP) s=mystpcpy(s, "POLLHUP|"); + if (events & POLLNVAL) s=mystpcpy(s, "POLLNVAL|"); + + /* Remove trailling '|' */ + s--; + if(*s=='|') + *s='\0'; +} + +#undef getconf +#define getconf(x) strtol(astconf(x,NiL,NiL),NiL,0) + +extern int b_poll(int argc, char *argv[], Shbltin_t *context) +{ + Namval_t *np; + Shell_t *shp = context->shp; + char *varname; + int n; + int fd; + nfds_t numpollfd = 0; + int i; + char *s; + double timeout = -1.; + char buff[PATH_MAX*2+1]; /* enogth to hold two variable names */ + char *eventarrayname = NULL; + + while (n = optget(argv, sh_optpoll)) switch (n) + { + case 't': + case 'T': + errno = 0; + timeout = strtod(opt_info.arg, (char **)NULL); + if (errno != 0) + errormsg(SH_DICT, ERROR_system(1), "%s: invalid timeout", opt_info.arg); + + /* -t uses seconds, -T milliseconds */ + if (n == 't') + timeout *= 1000.; + break; + case 'e': + eventarrayname = opt_info.arg; + break; + case ':': + errormsg(SH_DICT, 2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); + break; + } + argc -= opt_info.index; + argv += opt_info.index; + if(argc!=1) + errormsg(SH_DICT, ERROR_usage(2), optusage((char*)0)); + + varname = argv[0]; + + Namval_t *array_np, *array_np_sub; + const char *subname; + + array_np = nv_open(varname, shp->var_tree, NV_NOFAIL|NV_NOADD); + if (!array_np) + errormsg(SH_DICT, ERROR_system(1), "cannot find array variable %s", varname); + if(!nv_isattr(array_np, NV_ARRAY)) + errormsg(SH_DICT, ERROR_system(1), "variable %s is not an array", varname); + + /* Count number of array elememts. We need to do it "manually" to + * handle sparse indexed and associative arrays */ + nv_putsub(array_np, NULL, ARRAY_SCAN); + array_np_sub = array_np; + do + { + if (!(subname=nv_getsub(array_np_sub))) + break; + numpollfd++; + } while( array_np_sub && nv_nextsub(array_np_sub) ); + +#ifdef __GNUC__ + /* + * Allocate stack space via |alloca()| for gcc builds since ctfconvert + * is unable to handle VLAs from gcc. We need this until CR #6379193 + * is fixed. + */ + struct pollfd *pollfd = alloca(sizeof(struct pollfd)*(numpollfd+1)); +#else + /* We must allocate one more entry with VLA with zero elements do not work with all compilers */ + struct pollfd pollfd[numpollfd+1]; +#endif /* __GNUC__ */ + + nv_putsub(array_np, NULL, ARRAY_SCAN); + array_np_sub = array_np; + i = 0; + do + { + if (!(subname=nv_getsub(array_np_sub))) + break; + + np = nv_open_fmt(shp->var_tree, NV_NOFAIL|NV_NOADD, "%s[%s].fd", varname, subname); + if (!np) + errormsg(SH_DICT, ERROR_system(1), "missing pollfd %s[%s].fd", varname, subname); + fd = (int)nv_getnum(np); + if (fd < 0 || fd > OPEN_MAX) + errormsg(SH_DICT, ERROR_system(1), "invalid pollfd fd %d", fd); + nv_close(np); + pollfd[i].fd = fd; + + np = nv_open_fmt(shp->var_tree, NV_NOFAIL|NV_NOADD, "%s[%s].events", varname, subname); + if (!np) + errormsg(SH_DICT, ERROR_system(1), "missing pollfd %s[%s].events", varname, subname); + + s = nv_getval(np); + if (!s) + errormsg(SH_DICT, ERROR_system(1), "missing pollfd events value"); + pollfd[i].events = poll_strtoevents(s); + 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) + errormsg(SH_DICT, ERROR_system(1), "failure"); + + if (eventarrayname) + { + np = nv_open_fmt(shp->var_tree, NV_VARNAME|NV_ARRAY|NV_NOFAIL, "%s", eventarrayname); + if (!np) + errormsg(SH_DICT, ERROR_system(1), "couldn't create poll count variable %s", eventarrayname); + nv_close(np); + } + + nv_putsub(array_np, NULL, ARRAY_SCAN); + array_np_sub = array_np; + i = 0; + do + { + 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/contrib/ast/src/cmd/ksh93/bltins/print.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/print.c new file mode 100644 index 0000000000..99a7bcd00f --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/print.c @@ -0,0 +1,1118 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * echo [arg...] + * print [-nrps] [-f format] [-u filenum] [arg...] + * printf format [arg...] + * + * David Korn + * AT&T Labs + */ + +#include "defs.h" +#include +#include +#include "io.h" +#include "name.h" +#include "history.h" +#include "builtins.h" +#include "streval.h" +#include +#include + +union types_t +{ + unsigned char c; + short h; + int i; + long l; + Sflong_t ll; + Sfdouble_t ld; + double d; + float f; + char *s; + int *ip; + char **p; +}; + +struct printf +{ + Sffmt_t hdr; + int argsize; + int intvar; + char **nextarg; + char *lastarg; + char cescape; + char err; + 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*); +static int fmtvecho(const char*, struct printf*); +static ssize_t fmtbase64(Sfio_t*, char*, int); + +struct print +{ + Shell_t *sh; + const char *options; + char raw; + char echon; +}; + +static char* nullarg[] = { 0, 0 }; + +#if !SHOPT_ECHOPRINT + 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 = context->shp; + NOT_USED(argc); + /* This mess is because /bin/echo on BSD is different */ + if(!prdata.sh->universe) + { + register char *universe; + if(universe=astconf("UNIVERSE",0,0)) + bsd_univ = (strcmp(universe,"ucb")==0); + prdata.sh->universe = 1; + } + if(!bsd_univ) + return(b_print(0,argv,(Shbltin_t*)&prdata)); + prdata.options = sh_optecho; + prdata.raw = 1; + while(argv[1] && *argv[1]=='-') + { + if(strcmp(argv[1],"-n")==0) + prdata.echon = 1; +#if !SHOPT_ECHOE + else if(strcmp(argv[1],"-e")==0) + prdata.raw = 0; + else if(strcmp(argv[1],"-ne")==0 || strcmp(argv[1],"-en")==0) + { + prdata.raw = 0; + prdata.echon = 1; + } +#endif /* SHOPT_ECHOE */ + else + break; + argv++; + } + return(b_print(0,argv,(Shbltin_t*)&prdata)); + } +#endif /* SHOPT_ECHOPRINT */ + +int b_printf(int argc, char *argv[],Shbltin_t *context) +{ + struct print prdata; + NOT_USED(argc); + memset(&prdata,0,sizeof(prdata)); + prdata.sh = context->shp; + prdata.options = sh_optprintf; + 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); +} + +/* + * argc==0 when called from echo + * argc==-1 when called from printf + */ + +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 = 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; + nflag = rflag = 0; + format = 0; + } + else + { + struct print *pp = (struct print*)context; + shp = pp->sh; + options = pp->options; + if(argc==0) + { + nflag = pp->echon; + rflag = pp->raw; + argv++; + goto skip; + } + } + while((n = optget(argv,options))) switch(n) + { + case 'n': + nflag++; + break; + case 'p': + fd = shp->coutpipe; + msg = e_query; + break; + case 'f': + format = opt_info.arg; + break; + case 's': + /* print to history file */ + if(!sh_histinit((void*)shp)) + errormsg(SH_DICT,ERROR_system(1),e_history); + fd = sffileno(shp->gd->hist_ptr->histfp); + sh_onstate(SH_HISTORY); + sflag++; + break; + case 'e': + rflag = 0; + break; + case 'r': + rflag = 1; + break; + case 'u': + fd = (int)strtol(opt_info.arg,&opt_info.arg,10); + if(*opt_info.arg) + fd = -1; + else if(!sh_iovalidfd(shp,fd)) + fd = -1; + else if(!(shp->inuse_bits&(1<gd->hist_ptr && fd==sffileno(shp->gd->hist_ptr->histfp)))) + + fd = -1; + break; + case 'v': + vflag='v'; + break; + case 'C': + vflag='C'; + break; + case ':': + /* The following is for backward compatibility */ +#if OPT_VERSION >= 19990123 + if(strcmp(opt_info.name,"-R")==0) +#else + if(strcmp(opt_info.option,"-R")==0) +#endif + { + rflag = 1; + if(error_info.errors==0) + { + argv += opt_info.index+1; + /* special case test for -Rn */ + if(strchr(argv[-1],'n')) + nflag++; + if(*argv && strcmp(*argv,"-n")==0) + { + + nflag++; + argv++; + } + goto skip2; + } + } + else + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + break; + } + argv += opt_info.index; + if(error_info.errors || (argc<0 && !(format = *argv++))) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0)); + if(vflag && format) + errormsg(SH_DICT,ERROR_usage(2),"-%c and -f are mutually exclusive",vflag); +skip: + if(format) + format = genformat(format); + /* handle special case of '-' operand for print */ + if(argc>0 && *argv && strcmp(*argv,"-")==0 && strcmp(argv[-1],"--")) + argv++; +skip2: + if(fd < 0) + { + errno = EBADF; + n = 0; + } + else if(!(n=shp->fdstatus[fd])) + n = sh_iocheckfd(shp,fd); + if(!(n&IOWRITE)) + { + /* don't print error message for stdout for compatibility */ + if(fd==1) + return(1); + errormsg(SH_DICT,ERROR_system(1),msg); + } + if(!(outfile=shp->sftable[fd])) + { + sh_onstate(SH_NOTRACK); + n = SF_WRITE|((n&IOREAD)?SF_READ:0); + shp->sftable[fd] = outfile = sfnew(NIL(Sfio_t*),shp->outbuff,IOBSIZE,fd,n); + sh_offstate(SH_NOTRACK); + sfpool(outfile,shp->outpool,SF_WRITE); + } + /* turn off share to guarantee atomic writes for printf */ + n = sfset(outfile,SF_SHARE|SF_PUBLIC,0); + if(format) + { + /* printf style print */ + Sfio_t *pool; + struct printf pdata; + memset(&pdata, 0, sizeof(pdata)); + pdata.sh = shp; + pdata.hdr.version = SFIO_VERSION; + pdata.hdr.extf = extend; + pdata.nextarg = argv; + sh_offstate(SH_STOPOK); + pool=sfpool(sfstderr,NIL(Sfio_t*),SF_WRITE); + do + { + if(shp->trapnote&SH_SIGSET) + break; + pdata.hdr.form = format; + sfprintf(outfile,"%!",&pdata); + } while(*pdata.nextarg && pdata.nextarg!=argv); + if(pdata.nextarg == nullarg && pdata.argsize>0) + sfwrite(outfile,stakptr(staktell()),pdata.argsize); + if(sffileno(outfile)!=sffileno(sfstderr)) + sfsync(outfile); + sfpool(sfstderr,pool,SF_WRITE); + exitval = pdata.err; + } + else if(vflag) + { + while(*argv) + { + fmtbase64(outfile,*argv++,vflag=='C'); + if(!nflag) + sfputc(outfile,'\n'); + } + } + else + { + /* echo style print */ + if(nflag && !argv[0]) + sfsync((Sfio_t*)0); + else if(sh_echolist(shp,outfile,rflag,argv) && !nflag) + sfputc(outfile,'\n'); + } + if(sflag) + { + hist_flush(shp->gd->hist_ptr); + sh_offstate(SH_HISTORY); + } + else if(n&SF_SHARE) + { + sfset(outfile,SF_SHARE|SF_PUBLIC,1); + sfsync(outfile); + } + return(exitval); +} + +/* + * echo the argument list onto + * if is non-zero then \ is not a special character. + * returns 0 for \c otherwise 1. + */ + +int sh_echolist(Shell_t *shp,Sfio_t *outfile, int raw, char *argv[]) +{ + register char *cp; + register int n; + struct printf pdata; + pdata.cescape = 0; + pdata.err = 0; + while(!pdata.cescape && (cp= *argv++)) + { + if(!raw && (n=fmtvecho(cp,&pdata))>=0) + { + if(n) + sfwrite(outfile,stakptr(staktell()),n); + } + else + sfputr(outfile,cp,-1); + if(*argv) + sfputc(outfile,' '); + sh_sigcheck(shp); + } + return(!pdata.cescape); +} + +/* + * modified version of stresc for generating formats + */ +static char strformat(char *s) +{ + register char* t; + register int c; + char* b; + char* p; +#if SHOPT_MULTIBYTE && defined(FMT_EXP_WIDE) + int w; +#endif + + b = t = s; + for (;;) + { + switch (c = *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 += mbconv(t, c); + continue; + } +#endif /* FMT_EXP_WIDE */ +#endif /* SHOPT_MULTIBYTE */ + if(c=='%') + *t++ = '%'; + else if(c==0) + { + *t++ = '%'; + c = 'Z'; + } + break; + case 0: + *t = 0; + return(t - b); + } + *t++ = c; + } +} + + +static char *genformat(char *format) +{ + register char *fp; + stakseek(0); + stakputs(preformat); + stakputs(format); + fp = (char*)stakfreeze(1); + strformat(fp+sizeof(preformat)-1); + return(fp); +} + +static char *fmthtml(const char *string, int flags) +{ + register const char *cp = string; + register int c, offset = staktell(); + if(!(flags&SFFMT_ALTER)) + { + while(c= *(unsigned char*)cp++) + { +#if SHOPT_MULTIBYTE + register int s; + if((s=mbsize(cp-1)) > 1) + { + cp += (s-1); + continue; + } +#endif /* SHOPT_MULTIBYTE */ + if(c=='<') + stakputs("<"); + else if(c=='>') + stakputs(">"); + else if(c=='&') + stakputs("&"); + else if(c=='"') + stakputs("""); + else if(c=='\'') + stakputs("'"); + else if(c==' ') + stakputs(" "); + 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++) + { + if(strchr("!*'();@&+$,#[]<>~.\"{}|\\-`^% ",c) || (!isprint(c) && c!='\n' && c!='\r')) + sfprintf(stkstd,"%%%02X",CCMAPC(c,CC_NATIVE,CC_ASCII)); + else + stakputc(c); + } + } + stakputc(0); + return(stakptr(offset)); +} + +#if 1 +static ssize_t fmtbase64(Sfio_t *iop, char *string, int alt) +#else +static void *fmtbase64(char *string, ssize_t *sz, int alt) +#endif +{ + char *cp; + 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)) + { + if(sh_isoption(SH_NOUNSET)) + errormsg(SH_DICT,ERROR_exit(1),e_notset,string); + return(0); + } + if(nv_isattr(np,NV_INTEGER)) + { + d = nv_getnum(np); + if(nv_isattr(np,NV_DOUBLE)) + { + if(nv_isattr(np,NV_LONG)) + { + size = sizeof(Sfdouble_t); + number.ld = d; + } + else if(nv_isattr(np,NV_SHORT)) + { + size = sizeof(float); + number.f = (float)d; + } + else + { + size = sizeof(double); + number.d = (double)d; + } + } + else + { + if(nv_isattr(np,NV_LONG)) + { + size = sizeof(Sflong_t); + number.ll = (Sflong_t)d; + } + else if(nv_isattr(np,NV_SHORT)) + { + size = sizeof(short); + number.h = (short)d; + } + else + { + size = sizeof(short); + number.i = (int)d; + } + } +#if 1 + return(sfwrite(iop, (void*)&number, size)); +#else + if(sz) + *sz = size; + return((void*)&number); +#endif + } + if(nv_isattr(np,NV_BINARY)) +#if 1 + { + Namfun_t *fp; + for(fp=np->nvfun; fp;fp=fp->next) + { + if(fp->disc && fp->disc->writef) + break; + } + if(fp) + return (*fp->disc->writef)(np, iop, 0, fp); + else + { + int n = nv_size(np); + if(nv_isarray(np)) + { + nv_onattr(np,NV_RAW); + cp = nv_getval(np); + nv_offattr(np,NV_RAW); + } + else + cp = (char*)np->nvalue.cp; + if((size = n)==0) + size = strlen(cp); + size = sfwrite(iop, cp, size); + return(n?n:size); + } + } + 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,')'); + return(sftell(iop)); + } + else + { + if(alt && nv_isvtree(np)) + nv_onattr(np,NV_EXPORT); + 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)); + } +#else + nv_onattr(np,NV_RAW); + cp = nv_getval(np); + if(nv_isattr(np,NV_BINARY)) + nv_offattr(np,NV_RAW); + if((size = nv_size(np))==0) + size = strlen(cp); + if(sz) + *sz = size; + return((void*)cp); +#endif +} + +static int varname(const char *str, int n) +{ + register int c,dot=1,len=1; + if(n < 0) + { + if(*str=='.') + str++; + n = strlen(str); + } + for(;n > 0; n-=len) + { +#ifdef SHOPT_MULTIBYTE + len = mbsize(str); + c = mbchar(str); +#else + c = *(unsigned char*)str++; +#endif + if(dot && !(isalpha(c)||c=='_')) + break; + else if(dot==0 && !(isalnum(c) || c=='_' || c == '.')) + break; + dot = (c=='.'); + } + 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 = ""; + register int neg = 0; + Sfdouble_t d; + Sfdouble_t longmin = LDBL_LLONG_MIN; + Sfdouble_t longmax = LDBL_LLONG_MAX; + int format = fe->fmt; + int n; + 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,*s; + + 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; + else + argp = pp->lastarg; + if(argp) + { + sfprintf(pp->sh->strbuf,"%s.%.*s%c",argp,fe->n_str,fe->t_str,0); + argp = sfstruse(pp->sh->strbuf); + } + } + else + pp->lastarg = 0; + fe->flags |= SFFMT_VALUE; + if(!argp || format=='Z') + { + switch(format) + { + case 'c': + value->c = 0; + fe->flags &= ~SFFMT_LONG; + break; + case 'q': + format = 's'; + /* FALL THROUGH */ + case 's': + case 'H': + case 'B': + case 'P': + case 'R': + case 'Z': + case 'b': + fe->fmt = 's'; + fe->size = -1; + fe->base = -1; + value->s = ""; + fe->flags &= ~SFFMT_LONG; + break; + case 'a': + case 'e': + case 'f': + case 'g': + case 'A': + case 'E': + case 'F': + case 'G': + if(SFFMT_LDOUBLE) + value->ld = 0.; + else + value->d = 0.; + break; + case 'n': + value->ip = &pp->intvar; + break; + case 'Q': + value->ll = 0; + break; + case 'T': + fe->fmt = 'd'; + value->ll = tmxgettime(); + break; + default: + if(!strchr("DdXxoUu",format)) + errormsg(SH_DICT,ERROR_exit(1),e_formspec,format); + fe->fmt = 'd'; + value->ll = 0; + break; + } + } + else + { + switch(format) + { + case 'p': + value->p = (char**)strtol(argp,&lastchar,10); + break; + case 'n': + { + Namval_t *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; + nv_setsize(np,10); + if(sizeof(int)==sizeof(int32_t)) + value->ip = (int*)np->nvalue.lp; + else + { + int32_t sl = 1; + value->ip = (int*)(((char*)np->nvalue.lp) + (*((char*)&sl) ? 0 : sizeof(int))); + } + nv_close(np); + 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': + case 'H': + case 'P': + case 'R': + fe->fmt = 's'; + fe->size = -1; + if(format=='s' && fe->base>=0) + { + value->p = pp->nextarg; + pp->nextarg = nullarg; + } + else + { + fe->base = -1; + value->s = argp; + } + fe->flags &= ~SFFMT_LONG; + break; + case 'c': + if(mbwide() && (n = mbsize(argp)) > 1) + { + fe->fmt = 's'; + fe->size = n; + value->s = argp; + } + else if(fe->base >=0) + value->s = argp; + else + value->c = *argp; + fe->flags &= ~SFFMT_LONG; + break; + case 'o': + case 'x': + case 'X': + case 'u': + case 'U': + longmax = LDBL_ULLONG_MAX; + /* FALLTHROUGH */ + case '.': + if(fe->size==2 && strchr("bcsqHPRQTZ",*fe->form)) + { + value->ll = ((unsigned char*)argp)[0]; + break; + } + /* FALLTHROUGH */ + case 'd': + case 'D': + case 'i': + switch(*argp) + { + case '\'': + case '"': + w = argp + 1; + if(mbwide() && mbsize(w) > 1) + value->ll = mbchar(w); + else + value->ll = *(unsigned char*)w++; + if(w[0] && (w[0] != argp[0] || w[1])) + { + errormsg(SH_DICT,ERROR_warn(0),e_charconst,argp); + pp->err = 1; + } + break; + default: + d = sh_strnum(argp,&lastchar,0); + if(derr = 1; + d = longmin; + } + else if(d>longmax) + { + errormsg(SH_DICT,ERROR_warn(0),e_overflow,argp); + pp->err = 1; + d = longmax; + } + value->ll = (Sflong_t)d; + if(lastchar == *pp->nextarg) + { + value->ll = *argp; + lastchar = ""; + } + break; + } + if(neg) + value->ll = -value->ll; + fe->size = sizeof(value->ll); + break; + case 'a': + case 'e': + case 'f': + case 'g': + case 'A': + case 'E': + case 'F': + case 'G': + d = sh_strnum(*pp->nextarg,&lastchar,0); + switch(*argp) + { + case '\'': + case '"': + d = ((unsigned char*)argp)[1]; + if(argp[2] && (argp[2] != argp[0] || argp[3])) + { + errormsg(SH_DICT,ERROR_warn(0),e_charconst,argp); + pp->err = 1; + } + break; + default: + d = sh_strnum(*pp->nextarg,&lastchar,0); + break; + } + if(SFFMT_LDOUBLE) + { + value->ld = d; + fe->size = sizeof(value->ld); + } + else + { + value->d = d; + fe->size = sizeof(value->d); + } + break; + case 'Q': + value->ll = (Sflong_t)strelapsed(*pp->nextarg,&lastchar,1); + break; + case 'T': + value->ll = (Sflong_t)tmxdate(*pp->nextarg,&lastchar,TMX_NOW); + break; + default: + value->ll = 0; + fe->fmt = 'd'; + fe->size = sizeof(value->ll); + errormsg(SH_DICT,ERROR_exit(1),e_formspec,format); + break; + } + if (format == '.') + value->i = value->ll; + if(*lastchar) + { + errormsg(SH_DICT,ERROR_warn(0),e_argtype,format); + pp->err = 1; + } + pp->nextarg++; + } + switch(format) + { + case 'Z': + fe->fmt = 'c'; + fe->base = -1; + value->c = 0; + break; + case 'b': + if((n=fmtvecho(value->s,pp))>=0) + { + if(pp->nextarg == nullarg) + { + pp->argsize = n; + return -1; + } + value->s = stakptr(staktell()); + fe->size = n; + } + break; + case 'B': + 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, fe->flags); + break; + case 'q': + value->s = sh_fmtqf(value->s, !!(fe->flags & SFFMT_ALTER), fold); + break; + case 'P': + s = fmtmatch(value->s); + if(!s || *s==0) + errormsg(SH_DICT,ERROR_exit(1),e_badregexp,value->s); + value->s = s; + break; + case 'R': + 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) + { + fe->fmt = 'd'; + fe->size = sizeof(value->ll); + } + else + { + value->s = fmtelapsed(value->ll, 1); + fe->fmt = 's'; + fe->size = -1; + } + break; + case 'T': + if(fe->n_str>0) + { + n = fe->t_str[fe->n_str]; + fe->t_str[fe->n_str] = 0; + value->s = fmttmx(fe->t_str, value->ll); + fe->t_str[fe->n_str] = n; + } + else value->s = fmttmx(NIL(char*), value->ll); + fe->fmt = 's'; + fe->size = -1; + break; + } + return 0; +} + +/* + * construct System V echo string out of + * If there are not escape sequences, returns -1 + * Otherwise, puts null terminated result on stack, but doesn't freeze it + * returns length of output. + */ + +static int fmtvecho(const char *string, struct printf *pp) +{ + register const char *cp = string, *cpmax; + register int c; + register int offset = staktell(); +#if SHOPT_MULTIBYTE + int chlen; + if(mbwide()) + { + while(1) + { + if ((chlen = mbsize(cp)) > 1) + /* Skip over multibyte characters */ + cp += chlen; + else if((c= *cp++)==0 || c == '\\') + break; + } + } + else +#endif /* SHOPT_MULTIBYTE */ + while((c= *cp++) && (c!='\\')); + if(c==0) + return(-1); + c = --cp - string; + if(c>0) + stakwrite((void*)string,c); + for(; c= *cp; cp++) + { +#if SHOPT_MULTIBYTE + if (mbwide() && ((chlen = mbsize(cp)) > 1)) + { + stakwrite(cp,chlen); + cp += (chlen-1); + continue; + } +#endif /* SHOPT_MULTIBYTE */ + if( c=='\\') switch(*++cp) + { + case 'E': + c = ('a'==97?'\033':39); /* ASCII/EBCDIC */ + break; + case 'a': + c = '\a'; + break; + case 'b': + c = '\b'; + break; + case 'c': + pp->cescape++; + pp->nextarg = nullarg; + goto done; + case 'f': + c = '\f'; + break; + case 'n': + c = '\n'; + break; + case 'r': + c = '\r'; + break; + case 'v': + c = '\v'; + break; + case 't': + c = '\t'; + break; + case '\\': + c = '\\'; + break; + case '0': + c = 0; + cpmax = cp + 4; + while(++cp='0' && *cp<='7') + { + c <<= 3; + c |= (*cp-'0'); + } + /* FALLTHROUGH */ + default: + cp--; + } + stakputc(c); + } +done: + c = staktell()-offset; + stakputc(0); + stakseek(offset); + return(c); +} diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/read.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/read.c new file mode 100644 index 0000000000..c1c584b3ff --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/read.c @@ -0,0 +1,817 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * read [-ACprs] [-d delim] [-u filenum] [-t timeout] [-n n] [-N n] [name...] + * + * David Korn + * AT&T Labs + * + */ + +#include +#include +#include "defs.h" +#include "variables.h" +#include "lexstates.h" +#include "io.h" +#include "name.h" +#include "builtins.h" +#include "history.h" +#include "terminal.h" +#include "edit.h" + +#define R_FLAG 1 /* raw mode */ +#define S_FLAG 2 /* save in history file */ +#define A_FLAG 4 /* read into array */ +#define N_FLAG 8 /* fixed size read at most */ +#define NN_FLAG 0x10 /* fixed size read exact */ +#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 +{ + char **argv; + char *prompt; + short fd; + short plen; + int flags; + ssize_t len; + long timeout; +}; + +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 = context->shp; + ssize_t len=0; + long timeout = 1000*shp->st.tmout; + int save_prompt, fixargs=context->invariant; + struct read_save *rp; + static char default_prompt[3] = {ESC,ESC}; + rp = (struct read_save*)(context->data); + if(argc==0) + { + if(rp) + free((void*)rp); + return(0); + } + if(rp) + { + flags = rp->flags; + timeout = rp->timeout; + fd = rp->fd; + argv = rp->argv; + name = rp->prompt; + r = rp->plen; + goto bypass; + } + while((r = optget(argv,sh_optread))) switch(r) + { + case 'A': + flags |= A_FLAG; + break; + case 'C': + flags |= C_FLAG; + break; + case 't': + sec = sh_strnum(opt_info.arg, (char**)0,1); + timeout = sec ? 1000*sec : 1; + break; + case 'd': + if(opt_info.arg && *opt_info.arg!='\n') + { + char *cp = opt_info.arg; + flags &= ~((1<cpipe[0])<=0) + errormsg(SH_DICT,ERROR_exit(1),e_query); + break; + case 'n': case 'N': + flags &= ((1<fdstatus[fd])&IOREAD) || !(r&(IOSEEK|IONOSEEK))) + r = sh_iocheckfd(shp,fd); + if(fd<0 || !(r&IOREAD)) + errormsg(SH_DICT,ERROR_system(1),e_file+4); + /* look for prompt */ + if((name = *argv) && (name=strchr(name,'?')) && (r&IOTTY)) + r = strlen(name++); + else + r = 0; + if(argc==fixargs && (rp=newof(NIL(struct read_save*),struct read_save,1,0))) + { + 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; + if(r && (shp->prompt=(char*)sfreserve(sfstderr,r,SF_LOCKR))) + { + memcpy(shp->prompt,name,r); + sfwrite(sfstderr,shp->prompt,r-1); + } + shp->timeout = 0; + save_prompt = shp->nextprompt; + shp->nextprompt = 0; + 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] && errno!=EINTR) + sh_pclose(shp->cpipe); + } + return(r); +} + +/* + * here for read timeout + */ +static void timedout(void *handle) +{ + sfclrlock((Sfio_t*)handle); + sh_exit(1); +} + +/* + * This is the code to read a line and to split it into tokens + * is an array of variable names + * is the file descriptor + * is union of -A, -r, -s, and contains delimiter if not '\n' + * is number of milli-seconds until 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; + register Namval_t *np; + register char *name, *val; + register Sfio_t *iop; + Namfun_t *nfp; + char *ifs; + unsigned char *cpmax; + unsigned char *del; + char was_escape = 0; + 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; + 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); + if(names && (name = *names)) + { + Namval_t *mp; + if(val= strchr(name,'?')) + *val = 0; + 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->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 + name = *++names; + if(val) + *val = '?'; + } + else + { + name = 0; + if(dtvnext(shp->var_tree) || shp->namespace) + np = nv_open(nv_name(REPLYNOD),shp->var_tree,0); + else + np = REPLYNOD; + } + keytrap = ep?ep->e_keytrap:0; + if(size || (flags>>D_FLAG)) /* delimiter not new-line or fixed size read */ + { + 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))) + { + Namval_t *mp; + /* set up state table based on IFS */ + ifs = nv_getval(mp=sh_scoped(shp,IFSNOD)); + if((flags&R_FLAG) && shp->ifstable['\\']==S_ESC) + shp->ifstable['\\'] = 0; + else if(!(flags&R_FLAG) && shp->ifstable['\\']==0) + shp->ifstable['\\'] = S_ESC; + 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) + { + Namval_t *mp = nv_open(name,shp->var_tree,oflags|NV_NOREF); + if((c=(*nfp->disc->readf)(mp,iop,delim,nfp))>=0) + return(c); + } + } + if(binary && !(flags&(N_FLAG|NN_FLAG))) + { + flags |= NN_FLAG; + size = nv_size(np); + } + was_write = (sfset(iop,SF_WRITE,0)&SF_WRITE)!=0; + if(fd==0) + was_share = (sfset(iop,SF_SHARE,shp->redir0!=2)&SF_SHARE)!=0; + if(timeout || (shp->fdstatus[fd]&(IOTTY|IONOSEEK))) + { + sh_pushcontext(shp,&buff,1); + jmpval = sigsetjmp(buff.buff,0); + if(jmpval) + goto done; + if(timeout) + timeslot = (void*)sh_timeradd(timeout,0,timedout,(void*)iop); + } + if(flags&(N_FLAG|NN_FLAG)) + { + char buf[256],*var=buf,*cur,*end,*up,*v; + /* reserved buffer */ + if((c=size)>=sizeof(buf)) + { + if(!(var = (char*)malloc(c+1))) + sh_exit(1); + end = var + c; + } + else + end = var + sizeof(buf) - 1; + up = cur = var; + if((sfset(iop,SF_SHARE,1)&SF_SHARE) && fd!=0) + was_share = 1; + if(size==0) + { + cp = sfreserve(iop,0,0); + c = 0; + } + else + { + ssize_t m; + int f; + for (;;) + { + c = size; + if(keytrap) + { + cp = 0; + f = 0; + m = 0; + while(c-->0 && (buf[m]=ed_getchar(ep,0))) + m++; + if(m>0) + cp = (unsigned char*)buf; + } + else + { + 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))) + { + *v++ = 0; + m = v-(char*)cp; + } + if((c=m)>size) + c = size; + if(c>0) + { + if(c > (end-cur)) + { + ssize_t cx = cur - var, ux = up - var; + m = (end - var) + (c - (end - cur)); + if (var == buf) + { + v = (char*)malloc(m+1); + var = memcpy(v, var, cur - var); + } + else + var = newof(var, char, m, 1); + end = var + m; + cur = var + cx; + up = var + ux; + } + if(cur!=(char*)cp) + memcpy((void*)cur,cp,c); + if(f) + sfread(iop,cp,c); + cur += c; +#if SHOPT_MULTIBYTE + if(!binary && mbwide()) + { + int x; + int z; + + mbinit(); + *cur = 0; + x = z = 0; + while (up < cur && (z = mbsize(up)) > 0) + { + up += z; + x++; + } + if((size -= x) > 0 && (up >= cur || z < 0) && ((flags & NN_FLAG) || z < 0 || m > c)) + continue; + } +#endif + } +#if SHOPT_MULTIBYTE + if(!binary && mbwide() && (up == var || (flags & NN_FLAG) && size)) + cur = var; +#endif + *cur = 0; + if(c>=size || (flags&N_FLAG) || m==0) + { + if(m) + sfclrerr(iop); + break; + } + size -= c; + } + } + if(timeslot) + timerdel(timeslot); + if(binary && !((size=nv_size(np)) && nv_isarray(np) && c!=size)) + { + if((c==size) && np->nvalue.cp && !nv_isarray(np)) + memcpy((char*)np->nvalue.cp,var,c); + else + { + Namval_t *mp; + if(var==buf) + var = memdup(var,c+1); + nv_putval(np,var,NV_RAW); + nv_setsize(np,c); + if(!nv_isattr(np,NV_IMPORT|NV_EXPORT) && (mp=(Namval_t*)np->nvenv)) + nv_setsize(mp,c); + } + } + else + { + nv_putval(np,var,0); + if(var!=buf) + free((void*)var); + } + goto done; + } + 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->gd->hist_ptr) + { + sh_histinit((void*)shp); + if(!shp->gd->hist_ptr) + flags &= ~S_FLAG; + } + if(cp) + { + cpmax = cp + c; +#if SHOPT_CRNL + if(delim=='\n' && c>=2 && cpmax[-2]=='\r') + cpmax--; +#endif /* SHOPT_CRNL */ + if(*(cpmax-1) != delim) + *(cpmax-1) = delim; + if(flags&S_FLAG) + 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 */ + { + /* skip over leading blanks */ + while(c==S_SPACE) + c = shp->ifstable[*cp++]; + /* strip trailing delimiters */ + if(cpmax[-1] == '\n') + cpmax--; + if(cpmax>cp) + { + while((c=shp->ifstable[*--cpmax])==S_DELIM || c==S_SPACE); + cpmax[1] = 0; + } + else + *cpmax =0; + if(nv_isattr(np, NV_RDONLY)) + { + errormsg(SH_DICT,ERROR_warn(0),e_readonly, nv_name(np)); + jmpval = 1; + } + else + nv_putval(np,(char*)cp-1,0); + goto done; + } +#endif /* !SHOPT_MULTIBYTE */ + } + else + c = S_NL; + shp->nextprompt = 2; + rel= staktell(); + /* val==0 at the start of a field */ + val = 0; + del = 0; + while(1) + { + switch(c) + { +#if SHOPT_MULTIBYTE + case S_MBYTE: + if(val==0) + val = (char*)(cp-1); + if(sh_strchr(ifs,(char*)cp-1)>=0) + { + c = mbsize((char*)cp-1); + if(name) + cp[-1] = 0; + if(c>1) + cp += (c-1); + c = S_DELIM; + } + else + 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) + was_escape = 1; + else + c = 0; + if(val) + { + stakputs(val); + use_stak = 1; + was_escape = 1; + *val = 0; + } + continue; + + case S_ERR: + cp++; + /* FALLTHROUGH */ + case S_EOF: + /* check for end of buffer */ + if(val && *val) + { + stakputs(val); + use_stak = 1; + } + val = 0; + if(cp>=cpmax) + { + c = S_NL; + break; + } + /* eliminate null bytes */ + c = shp->ifstable[*cp++]; + if(!name && val && (c==S_SPACE||c==S_DELIM||c==S_MBYTE)) + c = 0; + continue; + case S_NL: + if(was_escape) + { + was_escape = 0; + 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(cp) + { + if(flags&S_FLAG) + sfwrite(shp->gd->hist_ptr->histfp,(char*)cp,c); + cpmax = cp + c; + c = shp->ifstable[*cp++]; + val=0; + if(!name && (c==S_SPACE || c==S_DELIM || c==S_MBYTE)) + c = 0; + continue; + } + } + c = S_NL; + break; + + case S_SPACE: + /* skip over blanks */ + while((c=shp->ifstable[*cp++])==S_SPACE); + if(!val) + continue; +#if SHOPT_MULTIBYTE + if(c==S_MBYTE) + { + if(sh_strchr(ifs,(char*)cp-1)>=0) + { + if((c = mbsize((char*)cp-1))>1) + cp += (c-1); + c = S_DELIM; + } + else + c = 0; + } +#endif /* SHOPT_MULTIBYTE */ + if(c!=S_DELIM) + break; + /* FALL THRU */ + + case S_DELIM: + if(!del) + del = cp - 1; + if(name) + { + /* skip over trailing blanks */ + while((c=shp->ifstable[*cp++])==S_SPACE); + break; + } + /* FALL THRU */ + + case 0: + if(val==0 || was_escape) + { + val = (char*)(cp-1); + was_escape = 0; + } + /* skip over word characters */ + wrd = -1; + while(1) + { + 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) + break; + if(wrd<0) + wrd = 0; + } + if(wrd>0) + del = (unsigned char*)""; + if(c!=S_MBYTE) + cp[-1] = 0; + continue; + } + /* assign value and advance to next variable */ + if(!val) + val = ""; + if(use_stak) + { + stakputs(val); + stakputc(0); + val = stakptr(rel); + } + if(!name && *val) + { + /* strip off trailing space delimiters */ + register unsigned char *vp = (unsigned char*)val + strlen(val); + while(shp->ifstable[*--vp]==S_SPACE); + if(vp==del) + { + if(vp==(unsigned char*)val) + vp--; + else + while(shp->ifstable[*--vp]==S_SPACE); + } + vp[1] = 0; + } + if(nv_isattr(np, NV_RDONLY)) + { + errormsg(SH_DICT,ERROR_warn(0),e_readonly, nv_name(np)); + jmpval = 1; + } + else + nv_putval(np,val,0); + val = 0; + del = 0; + if(use_stak) + { + stakseek(rel); + use_stak = 0; + } + if(array_index) + { + nv_putsub(np, NIL(char*), array_index++); + if(c!=S_NL) + continue; + name = *++names; + } + while(1) + { + if(sh_isoption(SH_ALLEXPORT)&&!strchr(nv_name(np),'.') && !nv_isattr(np,NV_EXPORT)) + { + nv_onattr(np,NV_EXPORT); + sh_envput(shp->env,np); + } + if(name) + { + nv_close(np); + np = nv_open(name,shp->var_tree,NV_NOASSIGN|NV_VARNAME); + name = *++names; + } + else + np = 0; + if(c!=S_NL) + break; + if(!np) + goto done; + if(nv_isattr(np, NV_RDONLY)) + { + errormsg(SH_DICT,ERROR_warn(0),e_readonly, nv_name(np)); + jmpval = 1; + } + else + nv_putval(np, "", 0); + } + } +done: + if(timeout || (shp->fdstatus[fd]&(IOTTY|IONOSEEK))) + sh_popcontext(shp,&buff); + if(was_write) + sfset(iop,SF_WRITE,1); + if(!was_share) + sfset(iop,SF_SHARE,0); + nv_close(np); + if((shp->fdstatus[fd]&IOTTY) && !keytrap) + tty_cooked(fd); + if(flags&S_FLAG) + hist_flush(shp->gd->hist_ptr); + if(jmpval > 1) + siglongjmp(*shp->jmplist,jmpval); + return(jmpval); +} + diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/regress.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/regress.c new file mode 100644 index 0000000000..25f3c2517e --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/regress.c @@ -0,0 +1,343 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * regression test intercept control + * enable with SHOPT_REGRESS==1 in Makefile + * not for production use + * see --man for details + * all string constants inline here instead of in data/... + * + * David Korn + * at&t research + */ + +#include "defs.h" + +#if SHOPT_REGRESS + +#include +#include +#include "io.h" +#include "builtins.h" +#include + +#define REGRESS_HEADER "ksh:REGRESS:" + +#define TRACE(r,i,f) sh_regress(REGRESS_##r, i, sfprints f, __LINE__, __FILE__) + +static const char usage[] = +"[-1p0?\n@(#)$Id: __regress__ (AT&T Research) 2009-03-29 $\n]" +USAGE_LICENSE +"[+NAME?__regress__ - shell regression test intercept control]" +"[+DESCRIPTION?\b__regress__\b controls the regression test intercepts " + "for shells compiled with SHOPT_REGRESS==1. Shells compiled this way are " + "for testing only. In addition to \b__regress__\b and the \b--regress\b " + "command line option, these shells may contain system library function " + "intercepts that behave different from the native counterparts.]" +"[+?Each option controls a different test and possibly a different set " + "of intercepts. The options are interpreted \bdd\b(1) style -- '-' or " + "'--' prefix not required. This simplifies the specification of the " + "command line \b--regress\b=\avalue\a option, where \avalue\a is passed " + "as an option to the \b__regress__\b builtin. Typically regression test " + "intercepts are enabled with one or more command line \b--regress\b " + "options, with optional specific calls to \b__regress__\b in test " + "scripts to enable/disable intercepts as the test progresses.]" +"[+?Each enabled intercept may result in trace lines of the form \b" REGRESS_HEADER + "\aoption\a:\aintercept\a:\ainfo\a on the standard error, where " + "\aoption\a is one of the options below, \aintercept\a is the name of " + "the specific intercept for \aoption\a, and \ainfo\a is \aoption\a " + "specific information. Unless noted otherwise, one regression test trace " + "line is produced each time an enabled intercept is called.]" +"[101:egid?The intercept effective gid is set to \aoriginal-egid\a. The " + "effective gid of the underlying system process is not affected. The " + "trace line info is either \begid==rgid\b or \begid!=rgid\b. The " + "intercepts are:]#?[original-egid:=1]" + "{" + "[+getegid()?The intercept effecive gid is returned. The " + "\bsetgid\b() intercept may change this between the real gid and " + "\aoriginal-egid\a.]" + "[+setgid(gid)?Sets the intercept effective gid to \agid\a. " + "Fails if \agid\a is neither the real gid nor " + "\aoriginal-egid\a.]" + "}" +"[102:euid?The intercept effective uid is set to \aoriginal-euid\a. The " + "effective uid of the underlying system process is not affected. The " + "trace line info is either \beuid==ruid\b or \beuid!=ruid\b. The " + "intercepts are:]#?[original-euid:=1]" + "{" + "[+geteuid()?The intercept effecive uid is returned. The " + "\bsetuid\b() intercept may change this between the real uid and " + "\aoriginal-euid\a.]" + "[+setuid(uid)?Sets the intercept effective uid to \auid\a. " + "Fails if \auid\a is neither the real uid nor " + "\aoriginal-euid\a.]" + "}" +"[103:p_suid?Specifies a value for SHOPT_P_SUID. Effective uids greater " + "than the non-privileged-uid disable the priveleged mode. The intercepts " + "are:]#?[non-privileged-uid:=1]" + "{" + "[+SHOPT_P_SUID?The SHOPT_P_SUID macro value is overridden by " + "\bp_suid\b. A trace line is output for each SHOPT_P_SUID " + "access.]" + "}" +"[104:source?The intercepts are:]" + "{" + "[+sh_source()?The trace line info is the path of the script " + "being sourced. Used to trace shell startup scripts.]" + "}" +"[105:etc?Map file paths matching \b/etc/\b* to \aetc-dir\a/*. The " + "intercepts are:]:[etc-dir:=/etc]" + "{" + "[+sh_open()?Paths matching \b/etc/\b* are changed to " + "\aetc-dir\a/*.]" + "}" +"[+SEE ALSO?\bksh\b(1), \bregress\b(1), \brt\b(1)]" +; + +static const char* regress_options[] = +{ + "ERROR", + "egid", + "euid", + "p_suid", + "source", + "etc", +}; + +void sh_regress_init(Shell_t* shp) +{ + static Regress_t state; + + shp->regress = &state; +} + +/* + * regress info trace output + */ + +void sh_regress(unsigned int index, const char* intercept, const char* info, unsigned int line, const char* file) +{ + char* name; + char buf[16]; + + if (index >= 1 && index <= elementsof(regress_options)) + name = (char*)regress_options[index]; + else + sfsprintf(name = buf, sizeof(buf), "%u", index); + sfprintf(sfstderr, REGRESS_HEADER "%s:%s:%s\n", name, intercept, fmtesc(info)); +} + +/* + * egid intercepts + */ + +static gid_t intercept_sgid = 0; +static gid_t intercept_egid = -1; +static gid_t intercept_rgid = -1; + +gid_t getegid(void) +{ + if (intercept_rgid == -1) + intercept_rgid = getgid(); + if (sh_isregress(REGRESS_egid)) + { + TRACE(egid, "getegid", ("%s", intercept_egid == intercept_rgid ? "egid==rgid" : "egid!=rgid")); + return intercept_egid; + } + return intercept_rgid; +} + +int setgid(gid_t gid) +{ + if (intercept_rgid == -1) + intercept_rgid = getgid(); + if (sh_isregress(REGRESS_egid)) + { + if (gid != intercept_rgid && gid != intercept_sgid) + { + TRACE(egid, "setgid", ("%s", "EPERM")); + errno = EPERM; + return -1; + } + intercept_egid = gid; + TRACE(egid, "setgid", ("%s", intercept_egid == intercept_rgid ? "egid==rgid" : "egid!=rgid")); + } + else if (gid != intercept_rgid) + { + errno = EPERM; + return -1; + } + return 0; +} + +/* + * euid intercepts + */ + +static uid_t intercept_suid = 0; +static uid_t intercept_euid = -1; +static uid_t intercept_ruid = -1; + +uid_t geteuid(void) +{ + if (intercept_ruid == -1) + intercept_ruid = getuid(); + if (sh_isregress(REGRESS_euid)) + { + TRACE(euid, "geteuid", ("%s", intercept_euid == intercept_ruid ? "euid==ruid" : "euid!=ruid")); + return intercept_euid; + } + return intercept_ruid; +} + +int setuid(uid_t uid) +{ + if (intercept_ruid == -1) + intercept_ruid = getuid(); + if (sh_isregress(REGRESS_euid)) + { + if (uid != intercept_ruid && uid != intercept_suid) + { + TRACE(euid, "setuid", ("%s", "EPERM")); + errno = EPERM; + return -1; + } + intercept_euid = uid; + TRACE(euid, "setuid", ("%s", intercept_euid == intercept_ruid ? "euid==ruid" : "euid!=ruid")); + } + else if (uid != intercept_ruid) + { + errno = EPERM; + return -1; + } + return 0; +} + +/* + * p_suid intercept + */ + +static uid_t intercept_p_suid = 0x7fffffff; + +uid_t sh_regress_p_suid(unsigned int line, const char* file) +{ + REGRESS(p_suid, "SHOPT_P_SUID", ("%d", intercept_p_suid)); + return intercept_p_suid; +} + +/* + * p_suid intercept + */ + +static char* intercept_etc = 0; + +char* sh_regress_etc(const char* path, unsigned int line, const char* file) +{ + REGRESS(etc, "sh_open", ("%s => %s%s", path, intercept_etc, path+4)); + return intercept_etc; +} + +/* + * __regress__ builtin + */ + +int b___regress__(int argc, char** argv, Shbltin_t *context) +{ + register Shell_t* shp = context->shp; + int n; + + for (;;) + { + switch (n = optget(argv, usage)) + { + case '?': + errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); + break; + case ':': + errormsg(SH_DICT, 2, "%s", opt_info.arg); + break; + case 0: + break; + default: + if (n < -100) + { + n = -(n + 100); + if (opt_info.arg || opt_info.number) + sh_onregress(n); + else + sh_offregress(n); + switch (n) + { + case REGRESS_egid: + if (sh_isregress(n)) + { + intercept_egid = intercept_sgid = (gid_t)opt_info.number; + TRACE(egid, argv[0], ("%d", intercept_egid)); + } + else + TRACE(egid, argv[0], ("%s", "off")); + break; + case REGRESS_euid: + if (sh_isregress(n)) + { + intercept_euid = intercept_suid = (uid_t)opt_info.number; + TRACE(euid, argv[0], ("%d", intercept_euid)); + } + else + TRACE(euid, argv[0], ("%s", "off")); + break; + case REGRESS_p_suid: + if (sh_isregress(n)) + { + intercept_p_suid = (uid_t)opt_info.number; + TRACE(p_suid, argv[0], ("%d", intercept_p_suid)); + } + else + TRACE(p_suid, argv[0], ("%s", "off")); + break; + case REGRESS_source: + TRACE(source, argv[0], ("%s", sh_isregress(n) ? "on" : "off")); + break; + case REGRESS_etc: + if (sh_isregress(n)) + { + intercept_etc = opt_info.arg; + TRACE(etc, argv[0], ("%s", intercept_etc)); + } + else + TRACE(etc, argv[0], ("%s", "off")); + break; + } + } + continue; + } + break; + } + if (error_info.errors || *(argv + opt_info.index)) + errormsg(SH_DICT, ERROR_usage(2), "%s", optusage(NiL)); + return 0; +} + +#else + +NoN(regress) + +#endif diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/shiocmd_solaris.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/shiocmd_solaris.c new file mode 100644 index 0000000000..be9d664f44 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/shiocmd_solaris.c @@ -0,0 +1,906 @@ +/*********************************************************************** +* * +* 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 * +* * +* David Korn * +* * +***********************************************************************/ +#pragma prototyped + +#include +#include +#include +#include +#include +#include +#include "name.h" +#undef nv_isnull +#ifndef SH_DICT +# define SH_DICT "libshell" +#endif +#include + +#define sh_contexttoshb(context) ((Shbltin_t*)(context)) +#define sh_contexttoshell(context) ((context)?(sh_contexttoshb(context)->shp):(NULL)) + +/* + * time formatting related +*/ +struct dctime +{ + Namfun_t fun; + Namval_t *format; + char buff[256]; /* Must be large enougth for |tmfmt()| */ +}; + +static char *get_time(Namval_t* np, Namfun_t* nfp) +{ + struct dctime *dp = (struct dctime*)nfp; + time_t t = nv_getn(np,nfp); + char *format = nv_getval(dp->format); + tmfmt(dp->buff,sizeof(dp->buff),format,(time_t*)0); + return(dp->buff); +} + +static void put_time(Namval_t* np, const char* val, int flag, Namfun_t* nfp) +{ + struct dctime *dp = (struct dctime*)nfp; + char *last; + if(val) + { + int32_t t; + if(flag&NV_INTEGER) + { + if(flag&NV_LONG) + t = *(Sfdouble_t*)val; + else + t = *(double*)val; + } + else + { + t = tmdate(val, &last, (time_t*)0); + if(*last) + errormsg(SH_DICT, ERROR_exit(1),"%s: invalid date/time string", val); + } + nv_putv(np, (char*)&t,NV_INTEGER, nfp); + } + else + { + nv_unset(dp->format); + free((void*)dp->format); + nv_putv(np, val, flag, nfp); + } +} + +static Namval_t *create_time(Namval_t *np, const char *name, int flags, Namfun_t *nfp) +{ + struct dctime *dp = (struct dctime*)nfp; + if(strcmp(name, "format")) + return((Namval_t*)0); + return(dp->format); +} + +static const Namdisc_t timedisc = +{ + sizeof(struct dctime), + put_time, + get_time, + 0, + 0, + create_time, +}; + + +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); + if(!dp) + return((Namval_t*)0); + sfprintf(stkstd,"%s.format\0",name); + sfputc(stkstd,0); + dp->format = nv_search(stkptr(stkstd,offset),sh.var_tree,NV_ADD); + dp->fun.disc = &timedisc; + nv_stack(np,&dp->fun); + return(np); +} + +/* + * mode formatting related +*/ +static char *get_mode(Namval_t* np, Namfun_t* nfp) +{ + mode_t mode = nv_getn(np,nfp); + return(fmtperm(mode)); +} + +static void put_mode(Namval_t* np, const char* val, int flag, Namfun_t* nfp) +{ + if(val) + { + int32_t mode; + char *last; + if(flag&NV_INTEGER) + { + if(flag&NV_LONG) + mode = *(Sfdouble_t*)val; + else + mode = *(double*)val; + } + else + { + mode = strperm(val, &last,0); + if(*last) + errormsg(SH_DICT, ERROR_exit(1),"%s: invalid mode string", val); + } + nv_putv(np,(char*)&mode,NV_INTEGER,nfp); + } + else + nv_putv(np,val,flag,nfp); +} + +static const Namdisc_t modedisc = +{ + 0, + put_mode, + get_mode, +}; + +static Namval_t *make_mode(Namval_t* np) +{ + char *name = nv_name(np); + Namfun_t *nfp = newof(NULL,Namfun_t,1,0); + if(!nfp) + return((Namval_t*)0); + nfp->disc = &modedisc; + nv_stack(np,nfp); + return(np); +} + +/* + * field related typese and functions + */ +typedef struct _field_ +{ + char *name; /* field name */ + int flags; /* flags */ + short offset; /* offset of field into data */ + short size; /* size of field */ + Namval_t *(*make)(Namval_t*); /* discipline constructor */ +} Shfield_t; + +/* + * lookup field in field table + */ +static Shfield_t *sh_findfield(Shfield_t *ftable, int nelem, const char *name) +{ + Shfield_t *fp = ftable; + register int i,n; + register const char *cp; + for(cp=name; *cp; cp++) + { + if(*cp=='.') + break; + } + n = cp-name; + for(i=0; i < nelem; i++,fp++) + { + if(memcmp(fp->name,name,n)==0 && fp->name[n]==0) + return(fp); + } + return(0); +} + +/* + * class types and functions + */ + +typedef struct _class_ +{ + int nelem; /* number of elements */ + int dsize; /* size for data structure */ + Shfield_t *fields; /* field description table */ +} Shclass_t; + +struct dcclass +{ + Namfun_t fun; + Shclass_t sclass; +}; + +static Namval_t *sh_newnode(register Shfield_t *fp, Namval_t *np) +{ + char *val = np->nvalue + fp->offset; + char *name = nv_name(np); + register Namval_t *nq; + int offset = stktell(stkstd); + sfprintf(stkstd,"%s.%s\0",name,fp->name); + sfputc(stkstd,0); + nq = nv_search(stkptr(stkstd,offset),sh.var_tree,NV_ADD); + if(fp->size<0) + val = *(char**)val; + nv_putval(nq,val,fp->flags|NV_NOFREE); + if(fp->make) + (*fp->make)(nq); + return(nq); +} + +static Namval_t *fieldcreate(Namval_t *np, const char *name, int flags, Namfun_t *nfp) +{ + struct dcclass *dcp = (struct dcclass*)nfp; + Shclass_t *sp = &dcp->sclass; + Shfield_t *fp = sh_findfield(sp->fields,sp->nelem,name); + Namval_t *nq,**nodes = (Namval_t**)(dcp+1); + int n = fp-sp->fields; + int len = strlen(fp->name); + void *data = (void*)np->nvalue; + if(!(nq=nodes[n])) + { + nodes[n] = nq = sh_newnode(fp,np); + nfp->last = ""; + } + if(name[len]==0) + return(nq); + return(nq); +} + +static void genvalue(Sfio_t *out, Shclass_t *sp, int indent, Namval_t *npar) +{ + Shfield_t *fp = sp->fields; + Namval_t *np, **nodes= (Namval_t**)(sp+1); + register int i,isarray; + if(out) + { + sfwrite(out,"(\n",2); + indent++; + } + for(i=0; i < sp->nelem; i++,fp++) + { +#if 0 + /* handle recursive case */ +#endif + if(!(np=nodes[i]) && out) + np = sh_newnode(fp,npar); + if(np) + { + isarray=0; + if(nv_isattr(np,NV_ARRAY)) + { + isarray=1; + if(array_elem(nv_arrayptr(np))==0) + isarray=2; + else + nv_putsub(np,(char*)0,ARRAY_SCAN); + } + sfnputc(out,'\t',indent); + sfputr(out,fp->name,(isarray==2?'\n':'=')); + if(isarray) + { + if(isarray==2) + continue; + sfwrite(out,"(\n",2); + sfnputc(out,'\t',++indent); + } + while(1) + { + char *fmtq; + if(isarray) + { + sfprintf(out,"[%s]",sh_fmtq(nv_getsub(np))); + sfputc(out,'='); + } + if(!(fmtq=nv_getval(np)) || !(fmtq=sh_fmtq(fmtq))) + fmtq = ""; + sfputr(out,fmtq,'\n'); + if(!nv_nextsub(np)) + break; + sfnputc(out,'\t',indent); + } + if(isarray) + { + sfnputc(out,'\t',--indent); + sfwrite(out,")\n",2); + } + } + } + if(out) + { + if(indent>1) + sfnputc(out,'\t',indent-1); + sfputc(out,')'); + } +} + +static char *walk_class(register Namval_t *np, int dlete, struct dcclass *dcp) +{ + static Sfio_t *out; + Sfio_t *outfile; + int savtop = stktell(stkstd); + char *savptr = stkfreeze(stkstd,0); + if(dlete) + outfile = 0; + else if(!(outfile=out)) + outfile = out = sfnew((Sfio_t*)0,(char*)0,-1,-1,SF_WRITE|SF_STRING); + else + sfseek(outfile,0L,SEEK_SET); + genvalue(outfile,&dcp->sclass,0,np); + stkset(stkstd,savptr,savtop); + if(!outfile) + return((char*)0); + sfputc(out,0); + return((char*)out->_data); +} + +static char *get_classval(Namval_t* np, Namfun_t* nfp) +{ + return(walk_class(np,0,(struct dcclass *)nfp)); +} + +static void put_classval(Namval_t* np, const char* val, int flag, Namfun_t* nfp) +{ + walk_class(np,1,(struct dcclass *)nfp); + if(nfp = nv_stack(np,(Namfun_t*)0)) + { + free((void*)nfp); + if(np->nvalue && !nv_isattr(np,NV_NOFREE)) + free((void*)np->nvalue); + } + if(val) + nv_putval(np,val,flag); +} + +static const Namdisc_t classdisc = +{ + sizeof(struct dcclass), + put_classval, + get_classval, + 0, + 0, + fieldcreate +}; + +static int mkclass(Namval_t *np, Shclass_t *sp) +{ + 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*)); + tcp->fun.disc = &classdisc; + tcp->sclass = *sp; + np->nvalue = (char*)calloc(sp->dsize,1); + nv_stack(np,&tcp->fun); + return(1); +} + +/* + * ====================from here down is file class specific + */ +static struct stat *Sp; + +struct filedata +{ + struct stat statb; + int fd; + char *name; +}; + +static Shfield_t filefield[] = +{ + { "atime", NV_INTEGER|NV_RDONLY, offsetof(struct stat,st_atime), sizeof(Sp->st_atime), make_time}, + { "ctime", NV_INTEGER|NV_RDONLY, offsetof(struct stat,st_ctime), sizeof(Sp->st_ctime), make_time}, + { "dev", NV_INTEGER|NV_RDONLY, offsetof(struct stat,st_dev),sizeof(Sp->st_dev)}, + { "fd", NV_INTEGER|NV_RDONLY, offsetof(struct filedata,fd), sizeof(int)}, + { "gid", NV_INTEGER|NV_RDONLY, offsetof(struct stat,st_gid), sizeof(Sp->st_gid)}, + { "ino", NV_LONG|NV_INTEGER|NV_RDONLY, offsetof(struct stat,st_ino), sizeof(Sp->st_ino)}, + { "mode", NV_INTEGER|NV_RDONLY, offsetof(struct stat,st_mode), sizeof(Sp->st_mode), make_mode}, + { "mtime", NV_INTEGER|NV_RDONLY, offsetof(struct stat,st_mtime), sizeof(Sp->st_mtime), make_time}, + { "name", NV_RDONLY, offsetof(struct filedata,name), -1 }, + { "nlink", NV_INTEGER|NV_RDONLY, offsetof(struct stat,st_nlink), sizeof(Sp->st_nlink)}, + { "size", NV_LONG|NV_INTEGER|NV_RDONLY, offsetof(struct stat,st_size), sizeof(Sp->st_size)}, + { "uid", NV_INTEGER|NV_RDONLY, offsetof(struct stat,st_uid), sizeof(Sp->st_uid)} +}; + +static Shclass_t Fileclass = +{ + sizeof(filefield)/sizeof(*filefield), + sizeof(struct filedata), + filefield +}; + + +#define letterbit(bit) (1<<((bit)-'a')) + +static const char sh_optopen[] = +"[-?\n@(#)$Id: open (AT&T Labs Research) 2007-05-07 $\n]" +"[-author?David Korn ]" +"[-author?Roland Mainz ]" +"[-license?http://www.opensource.org/licenses/cpl1.0.txt]" +"[+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.]" +"[+?\afile\a is opened (based on \b-r\b and/or \b-w\b) and the variable " + "\avar\a\b.fd\b is the file descriptor.]" +"[a:append?Open for append.]" +"[b:binary?Open in binary mode" +#ifndef O_BINARY + " (not supported/ignored on this platform)" +#endif + ".]" +"[t:text?Open in text mode" +#ifndef O_TEXT + " (not supported/ignored on this platform)" +#endif + ".]" +"[c:create?Open for create.]" +"[i:inherit?Open without the close-on-exec bit set.]" +"[I:noinherit?Open with the close-on-exec bit set.]" +"[r:read?Open with read access.]" +"[w:write?Open with write access.]" +"[m:mode]:[mode:=rwrwrw?Open with access mode \amode\a.]" +"[x:exclusive?Open exclusive.]" + +"[N:nofollow?If the path names a symbolic link, open fails with ELOOP " +#ifndef O_NOFOLLOW + " (not supported/ignored on this platform)" +#endif + ".]" +"[S:sync?Write I/O operations on the file descriptor complete as " + "defined by synchronized I/O file integrity completion" +#ifndef O_SYNC + " (not supported/ignored on this platform)" +#endif + ".]" +"[T:trunc?If the file exists and is a regular file, and the file " + "is successfully opened read/write or write-only, its length is " + "truncated to 0 and the mode and owner are unchanged. It " + "has no effect on FIFO special files or terminal device " + "files. Its effect on other file types is " + "implementation-dependent. The result of using -T " + "with read-only files is undefined" +#ifndef O_TRUNC + " (not supported/ignored on this platform)" +#endif + ".]" +"\n" +"\nvar file\n" +"\n" +"[+EXIT STATUS?]{" + "[+0?Success.]" + "[+>0?An error occurred.]" +"}" +"[+SEE ALSO?\btmpfile\b(1),\bdup\b(1),\bclose\b(1),\bstat\b(1),\bpoll\b(1),\bstat\b(2)]" +; + + +extern int b_open(int argc, char *argv[], Shbltin_t *context) +{ + register Namval_t *np; + register int n,oflag=0; + Shell_t *shp = context->shp; + struct filedata *fdp; + mode_t mode = 0666; + long flags = 0; + int fd = -1; + char *arg; + + while (n = optget(argv, sh_optopen)) switch (n) + { + case 'r': + case 'w': + case 'i': + flags |= letterbit(n); + break; + case 'I': + flags &= ~(letterbit('i')); + break; + case 'b': +#ifdef O_BINARY + oflag |= O_BINARY; +#endif + break; + case 't': +#ifdef O_TEXT + oflag |= O_TEXT; +#endif + break; + case 'N': +#ifdef O_NOFOLLOW + oflag |= O_NOFOLLOW; +#endif + break; + case 'T': +#ifdef O_TRUNC + oflag |= O_TRUNC; +#endif + break; + case 'x': + oflag |= O_EXCL; + break; + case 'c': + oflag |= O_CREAT; + break; + case 'a': + oflag |= O_APPEND; + break; + case 'S': +#ifdef O_SYNC + oflag |= O_SYNC; +#endif + break; + case 'm': + mode = strperm(arg = opt_info.arg, &opt_info.arg, mode); + if (*opt_info.arg) + errormsg(SH_DICT, ERROR_system(1), "%s: invalid mode", arg); + break; + case ':': + errormsg(SH_DICT, 2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); + break; + } + argc -= opt_info.index; + 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')) + oflag |= O_RDWR; + else + oflag |= O_RDONLY; + } + else if(flags&letterbit('w')) + oflag |= O_WRONLY; + + 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); + + np = nv_open(argv[0], shp->var_tree, NV_ARRAY|NV_VARNAME|NV_NOASSIGN); + if(!nv_isnull(np)) + nv_unset(np); + mkclass(np, &Fileclass); + fdp = (struct filedata*)np->nvalue; + fstat(fd, &fdp->statb); + fdp->fd = fd; + fdp->name = strdup(argv[1]); + return(0); +} + +static const char sh_optclose[] = +"[-?\n@(#)$Id: close (AT&T Labs Research) 2007-04-21 $\n]" +"[-author?Roland Mainz ]" +"[-license?http://www.opensource.org/licenses/cpl1.0.txt]" +"[+NAME? close - close a file descriptor]" +"[+DESCRIPTION?\bclose\b closes the file descriptor specified by fd.]" +"\n" +"\nfd\n" +"\n" +"[+EXIT STATUS?]{" + "[+0?Success.]" + "[+>0?An error occurred.]" +"}" +"[+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[], Shbltin_t *context) +{ + register int n=0; + int fd = -1; + + while (n = optget(argv, sh_optclose)) switch (n) + { + case ':': + errormsg(SH_DICT, 2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); + break; + } + argc -= opt_info.index; + argv += opt_info.index; + if(argc!=1) + errormsg(SH_DICT, ERROR_usage(2), optusage((char*)0)); + + errno = 0; + fd = strtol(argv[0], (char **)NULL, 0); + if (errno != 0 || fd < 0) + errormsg(SH_DICT, ERROR_system(1), "%s: invalid descriptor", argv[0]); + + n = sh_close(fd); + + if (n < 0) + errormsg(SH_DICT, ERROR_system(1), "%s: close error", argv[0]); + + return(n==0?0:1); +} + + +static const char sh_opttmpfile[] = +"[-?\n@(#)$Id: tmpfile (AT&T Labs Research) 2007-05-07 $\n]" +"[-author?Roland Mainz ]" +"[-license?http://www.opensource.org/licenses/cpl1.0.txt]" +"[+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.]" +"[i:inherit?Open without the close-on-exec bit set.]" +"[I:noinherit?Open with the close-on-exec bit set.]" +"\n" +"\nvar\n" +"\n" +"[+EXIT STATUS?]{" + "[+0?Success.]" + "[+>0?An error occurred.]" +"}" +"[+SEE ALSO?\bopen\b(1),\bdup\b(1),\bclose\b(1),\bstat\b(1),\bstat\b(2)]" +; + + +extern int b_tmpfile(int argc, char *argv[], Shbltin_t *context) +{ + register Namval_t *np; + register int n; + Shell_t *shp = context->shp; + struct filedata *fdp; + bool inherit = false; + FILE *file = NULL; + int ffd, fd = -1; + while (n = optget(argv, sh_opttmpfile)) switch (n) + { + case 'i': + inherit = true; + break; + case 'I': + inherit = false; + break; + case ':': + errormsg(SH_DICT, 2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); + break; + } + argc -= opt_info.index; + argv += opt_info.index; + if(argc!=1) + errormsg(SH_DICT, ERROR_usage(2), optusage((char*)0)); + + file = tmpfile(); + if(!file) + errormsg(SH_DICT, ERROR_system(1), "%s: tmpfile failed", argv[1]); + ffd = fileno(file); + fd = sh_dup(ffd); + if(fd<0) + errormsg(SH_DICT, ERROR_system(1), "%s: tmpfile failed", argv[1]); + fclose(file); + + if(!inherit) + fcntl(fd, F_SETFL, 0); + + np = nv_open(argv[0], shp->var_tree, NV_ARRAY|NV_VARNAME|NV_NOASSIGN); + if(!nv_isnull(np)) + nv_unset(np); + mkclass(np,&Fileclass); + fdp = (struct filedata*)np->nvalue; + + fstat(fd, &fdp->statb); + fdp->fd = fd; + fdp->name = NULL; + return(0); +} + +static const char sh_optdup[] = +"[-?\n@(#)$Id: dup (AT&T Labs Research) 2007-05-07 $\n]" +"[-author?Roland Mainz ]" +"[-license?http://www.opensource.org/licenses/cpl1.0.txt]" +"[+NAME? dup - duplicate an open file descriptor]" +"[+DESCRIPTION?The \bdup\b commands returns a new file descriptor having the " + "following in common with the original open file descriptor " + "fd: same open file (or pipe), same file pointer (that is, both file descriptors " + "share one file pointer) same access mode (read, write or read/write). " + "The file descriptor returned is the lowest one available.]" +"[i:inherit?Open without the close-on-exec bit set.]" +"[I:noinherit?Open with the close-on-exec bit set.]" +"\n" +"\nvar fd\n" +"\n" +"[+EXIT STATUS?]{" + "[+0?Success.]" + "[+>0?An error occurred.]" +"}" +"[+SEE ALSO?\bopen\b(1),\btmpfile\b(1),\bclose\b(1),\bpoll\b(1),\bstat\b(1)]" +; + + +extern int b_dup(int argc, char *argv[], Shbltin_t *context) +{ + register Namval_t *np; + register int n; + Shell_t *shp = context->shp; + struct filedata *fdp; + bool inherit = false; + int ffd, fd = -1; + while (n = optget(argv, sh_optdup)) switch (n) + { + case 'i': + inherit = true; + break; + case 'I': + inherit = false; + break; + case ':': + errormsg(SH_DICT, 2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); + break; + } + argc -= opt_info.index; + argv += opt_info.index; + if(argc!=2) + errormsg(SH_DICT, ERROR_usage(2), optusage((char*)0)); + + errno = 0; + ffd = strtol(argv[1], (char **)NULL, 0); + if (errno != 0 || ffd < 0) + errormsg(SH_DICT, ERROR_system(1), "%s: invalid fd", argv[1]); + + fd = sh_dup(ffd); + if(fd<0) + errormsg(SH_DICT, ERROR_system(1), "%s: dup failed", argv[1]); + + if(!inherit) + fcntl(fd,F_SETFL,0); + + np = nv_open(argv[0],shp->var_tree,NV_ARRAY|NV_VARNAME|NV_NOASSIGN); + if(!nv_isnull(np)) + nv_unset(np); + mkclass(np, &Fileclass); + fdp = (struct filedata*)np->nvalue; + + fstat(fd, &fdp->statb); + fdp->fd = fd; + fdp->name = NULL; + return(0); +} + +static const char sh_optstat[] = +"[-?\n@(#)$Id: stat (AT&T Labs Research) 2007-05-07 $\n]" +"[-author?David Korn ]" +"[-author?Roland Mainz ]" +"[-license?http://www.opensource.org/licenses/cpl1.0.txt]" +"[+NAME? stat - get file status]" +"[+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.]" +"[l:lstat?If the the named file is a symbolic link returns information about " + "the link itself.]" +"\n" +"\nvar file\n" +"\n" +"[+EXIT STATUS?]{" + "[+0?Success.]" + "[+>0?An error occurred.]" +"}" +"[+SEE ALSO?\bopen\b(1),\btmpfile\b(1),\bdup\b(1),\bclose\b(1),\bpoll\b(1),\bstat\b(2),\blstat\b(2)]" +; + + +extern int b_stat(int argc, char *argv[], Shbltin_t *context) +{ + register Namval_t *np; + register int n; + Shell_t *shp = context->shp; + struct filedata *fdp; + long flags = 0; + struct stat statb; + while (n = optget(argv, sh_optstat)) switch (n) + { + case 'l': + flags |= letterbit(n); + break; + case ':': + errormsg(SH_DICT, 2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); + break; + } + argc -= opt_info.index; + argv += opt_info.index; + if(argc!=2) + errormsg(SH_DICT, ERROR_usage(2), optusage((char*)0)); + + if(flags&letterbit('l')) + { + if(lstat(argv[1], &statb) < 0) + errormsg(SH_DICT, ERROR_system(1), "%s: stat failed", argv[1]); + } + else + { + if(stat(argv[1], &statb) < 0) + errormsg(SH_DICT, ERROR_system(1), "%s: stat failed", argv[1]); + + } + + np = nv_open(argv[0],shp->var_tree,NV_ARRAY|NV_VARNAME|NV_NOASSIGN); + if(!nv_isnull(np)) + nv_unset(np); + mkclass(np,&Fileclass); + fdp = (struct filedata*)np->nvalue; + fdp->statb = statb; + fdp->fd = -1; + fdp->name = strdup(argv[1]); + return(0); +} + + +static const char sh_optrewind[] = +"[-?\n@(#)$Id: rewind (AT&T Labs Research) 2007-05-07 $\n]" +"[-author?Roland Mainz ]" +"[-license?http://www.opensource.org/licenses/cpl1.0.txt]" +"[+NAME? rewind - reset file position indicator in a stream]" +"[+DESCRIPTION?The \brewind\b command will move the file pointer of fd to position 0.]" +"\n" +"\nfd\n" +"\n" +"[+EXIT STATUS?]{" + "[+0?Success.]" + "[+>0?An error occurred.]" +"}" +"[+SEE ALSO?\bopen\b(1),\btmpfile\b(1),\bdup\b(1),\bclose\b(1),\bstat\b(1),\bstat\b(2)]" +; + + +extern int b_rewind(int argc, char *argv[], Shbltin_t *context) +{ + Shell_t *shp = context->shp; + int fd = -1; + register int n; + while (n = optget(argv, sh_optrewind)) switch (n) + { + case ':': + errormsg(SH_DICT, 2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); + break; + } + argc -= opt_info.index; + argv += opt_info.index; + if(argc!=1) + errormsg(SH_DICT, ERROR_usage(2), optusage((char*)0)); + + errno = 0; + fd = strtol(argv[0], (char **)NULL, 0); + if (errno != 0 || fd < 0) + errormsg(SH_DICT, ERROR_system(1), "%s: invalid fd", argv[0]); + + if (sh_seek(fd, 0, SEEK_SET) == (off_t)-1) + errormsg(SH_DICT, ERROR_system(1), "seek error"); + + return(0); +} diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/sleep.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/sleep.c new file mode 100644 index 0000000000..4e64be7a57 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/sleep.c @@ -0,0 +1,183 @@ +/*********************************************************************** + * * + * This software is part of the ast package * + * Copyright (c) 1982-2013 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 * + * * + ***********************************************************************/ +#pragma prototyped +/* + * sleep delay + * + * David Korn + * AT&T Labs + * + */ + +#define sleep ______sleep +#include "defs.h" +#undef sleep +#include +#include +#include +#include "builtins.h" +#include "FEATURE/time" +#include "FEATURE/poll" +#ifdef _NEXT_SOURCE +# define sleep _ast_sleep +#endif /* _NEXT_SOURCE */ +#ifdef _lib_poll_notimer +# undef _lib_poll +#endif /* _lib_poll_notimer */ + +int b_sleep(register int argc,char *argv[],Shbltin_t *context) +{ + register char *cp; + register double d=0; + register Shell_t *shp = context->shp; + int sflag=0; + time_t tloc = 0; + char *last; + if(!(shp->sigflag[SIGALRM]&(SH_SIGFAULT|SH_SIGOFF))) + sh_sigtrap(SIGALRM); + while((argc = optget(argv,sh_optsleep))) switch(argc) + { + case 's': + sflag=1; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + break; + } + argv += opt_info.index; + if(cp = *argv) + { + d = strtod(cp, &last); + if(*last) + { + Time_t now,ns; + char* pp; + now = TMX_NOW; + if(*cp == 'P' || *cp == 'p') + ns = tmxdate(cp, &last, now); + 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); + if(*last && (pp = sfprints("p%s", cp))) + ns = tmxdate(pp, &last, now); + } + if(*last) + errormsg(SH_DICT,ERROR_exit(1),e_number,*argv); + d = ns - now; + d /= TMX_RESOLUTION; + } +skip: + if(argv[1]) + errormsg(SH_DICT,ERROR_exit(1),e_oneoperand); + } + else if(!sflag) + errormsg(SH_DICT,ERROR_exit(1),e_oneoperand); + if(d > .10) + { + time(&tloc); + tloc += (time_t)(d+.5); + } + if(sflag && d==0) + pause(); + else while(1) + { + time_t now; + errno = 0; + shp->lastsig=0; + sh_delay(d); + if(sflag || tloc==0 || errno!=EINTR || shp->lastsig) + break; + sh_sigcheck(shp); + if(tloc < (now=time(NIL(time_t*)))) + break; + d = (double)(tloc-now); + if(shp->sigflag[SIGALRM]&SH_SIGTRAP) + sh_timetraps(shp); + } + return(0); +} + +static void completed(void * handle) +{ + char *expired = (char*)handle; + *expired = 1; +} + +unsigned int sleep(unsigned int sec) +{ + Shell_t *shp = sh_getinterp(); + pid_t newpid, curpid=getpid(); + void *tp; + char expired = 0; + shp->lastsig = 0; + tp = (void*)sh_timeradd(1000*sec, 0, completed, (void*)&expired); + do + { + if(!shp->gd->waitevent || (*shp->gd->waitevent)(-1,-1L,0)==0) + pause(); + if(shp->sigflag[SIGALRM]&SH_SIGTRAP) + sh_timetraps(shp); + if((newpid=getpid()) != curpid) + { + curpid = newpid; + shp->lastsig = 0; + shp->trapnote &= ~SH_SIGSET; + if(expired) + expired = 0; + else + timerdel(tp); + tp = (void*)sh_timeradd(1000*sec, 0, completed, (void*)&expired); + } + } + while(!expired && shp->lastsig==0); + if(!expired) + timerdel(tp); + sh_sigcheck(shp); + return(0); +} + +// +// Delay execution for time . +// +void sh_delay(double t) { + Shell_t *shp = sh_getinterp(); + int n = (int)t; + Tv_t ts, tx; + + ts.tv_sec = n; + ts.tv_nsec = 1000000000 * (t - (double)n); + while (tvsleep(&ts, &tx) < 0 && errno == EINTR) { + if (shp->trapnote & (SH_SIGSET | SH_SIGTRAP)) return; + ts = tx; + } + } diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/test.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/test.c new file mode 100644 index 0000000000..19dc72b2cd --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/test.c @@ -0,0 +1,671 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * test expression + * [ expression ] + * + * David Korn + * AT&T Labs + * + */ + + +#include "defs.h" +#include +#include +#include +#include "io.h" +#include "terminal.h" +#include "test.h" +#include "builtins.h" +#include "FEATURE/externs" +#include "FEATURE/poll" +#include + +#if !_lib_setregid +# undef _lib_setreuid +#endif /* _lib_setregid */ + +#ifdef S_ISSOCK +# if _pipe_socketpair +# if _socketpair_shutdown_mode +# define isapipe(f,p) (test_stat(f,p)>=0&&S_ISFIFO((p)->st_mode)||S_ISSOCK((p)->st_mode)&&(p)->st_ino&&((p)->st_mode&(S_IRUSR|S_IWUSR))!=(S_IRUSR|S_IWUSR)) +# else +# define isapipe(f,p) (test_stat(f,p)>=0&&S_ISFIFO((p)->st_mode)||S_ISSOCK((p)->st_mode)&&(p)->st_ino) +# endif +# else +# define isapipe(f,p) (test_stat(f,p)>=0&&S_ISFIFO((p)->st_mode)||S_ISSOCK((p)->st_mode)&&(p)->st_ino) +# endif +# define isasock(f,p) (test_stat(f,p)>=0&&S_ISSOCK((p)->st_mode)) +#else +# define isapipe(f,p) (test_stat(f,p)>=0&&S_ISFIFO((p)->st_mode)) +# define isasock(f,p) (0) +#endif + +#define permission(a,f) (sh_access(a,f)==0) +static time_t test_time(const char*, const char*); +static int test_stat(const char*, struct stat*); +static int test_mode(const char*); + +/* single char string compare */ +#define c_eq(a,c) (*a==c && *(a+1)==0) +/* two character string compare */ +#define c2_eq(a,c1,c2) (*a==c1 && *(a+1)==c2 && *(a+2)==0) + +struct test +{ + Shell_t *sh; + int ap; + int ac; + char **av; +}; + +static char *nxtarg(struct test*,int); +static int expr(struct test*,int); +static int e3(struct test*); + +static int test_strmatch(Shell_t *shp,const char *str, const char *pat) +{ + regoff_t match[2*(MATCH_MAX+1)],n; + register int c, m=0; + register const char *cp=pat; + while(c = *cp++) + { + if(c=='(') + m++; + if(c=='\\' && *cp) + cp++; + } + if(m) + m++; + else + match[0] = 0; + if(m > elementsof(match)/2) + m = elementsof(match)/2; + 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(shp, str, -1, n, match, 0); + return(n); +} + +int b_test(int argc, char *argv[],Shbltin_t *context) +{ + struct test tdata; + register char *cp = argv[0]; + register int not; + tdata.sh = context->shp; + tdata.av = argv; + tdata.ap = 1; + if(c_eq(cp,'[')) + { + cp = argv[--argc]; + if(!c_eq(cp, ']')) + errormsg(SH_DICT,ERROR_exit(2),e_missing,"']'"); + } + if(argc <= 1) + return(1); + cp = argv[1]; + if(c_eq(cp,'(') && argc<=6 && c_eq(argv[argc-1],')')) + { + /* special case ( binop ) to conform with standard */ + if(!(argc==4 && (not=sh_lookup(cp=argv[2],shtab_testops)))) + { + cp = (++argv)[1]; + argc -= 2; + } + } + not = c_eq(cp,'!'); + /* posix portion for test */ + switch(argc) + { + case 5: + if(!not) + break; + argv++; + /* fall through */ + case 4: + { + register int op = sh_lookup(cp=argv[2],shtab_testops); + if(op&TEST_BINOP) + break; + if(!op) + { + if(argc==5) + break; + if(not && cp[0]=='-' && cp[2]==0) + return(test_unop(tdata.sh,cp[1],argv[3])!=0); + else if(argv[1][0]=='-' && argv[1][2]==0) + 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(tdata.sh,op,argv[1],argv[3])^(argc!=5)); + } + case 3: + if(not) + return(*argv[2]!=0); + if(cp[0] != '-' || cp[2] || cp[1]=='?') + { + if(cp[0]=='-' && (cp[1]=='-' || cp[1]=='?') && + strcmp(argv[2],"--")==0) + { + char *av[3]; + av[0] = argv[0]; + av[1] = argv[1]; + av[2] = 0; + optget(av,sh_opttest); + errormsg(SH_DICT,ERROR_usage(2), "%s",opt_info.arg); + return(2); + } + break; + } + return(!test_unop(tdata.sh,cp[1],argv[2])); + case 2: + return(*cp==0); + } + tdata.ac = argc; + return(!expr(&tdata,0)); +} + +/* + * evaluate a test expression. + * flag is 0 on outer level + * flag is 1 when in parenthesis + * flag is 2 when evaluating -a + */ +static int expr(struct test *tp,register int flag) +{ + register int r; + register char *p; + r = e3(tp); + while(tp->ap < tp->ac) + { + p = nxtarg(tp,0); + /* check for -o and -a */ + if(flag && c_eq(p,')')) + { + tp->ap--; + break; + } + if(*p=='-' && *(p+2)==0) + { + if(*++p == 'o') + { + if(flag==2) + { + tp->ap--; + break; + } + r |= expr(tp,3); + continue; + } + else if(*p == 'a') + { + r &= expr(tp,2); + continue; + } + } + if(flag==0) + break; + errormsg(SH_DICT,ERROR_exit(2),e_badsyntax); + } + return(r); +} + +static char *nxtarg(struct test *tp,int mt) +{ + if(tp->ap >= tp->ac) + { + if(mt) + { + tp->ap++; + return(0); + } + errormsg(SH_DICT,ERROR_exit(2),e_argument); + } + return(tp->av[tp->ap++]); +} + + +static int e3(struct test *tp) +{ + register char *arg, *cp; + register int op; + char *binop; + arg=nxtarg(tp,0); + if(arg && c_eq(arg, '!')) + return(!e3(tp)); + if(c_eq(arg, '(')) + { + op = expr(tp,1); + cp = nxtarg(tp,0); + if(!cp || !c_eq(cp, ')')) + errormsg(SH_DICT,ERROR_exit(2),e_missing,"')'"); + return(op); + } + cp = nxtarg(tp,1); + if(cp!=0 && (c_eq(cp,'=') || c2_eq(cp,'!','='))) + goto skip; + if(c2_eq(arg,'-','t')) + { + if(cp) + { + op = strtol(cp,&binop, 10); + return(*binop?0:tty_check(op)); + } + else + { + /* test -t with no arguments */ + tp->ap--; + return(tty_check(1)); + } + } + if(*arg=='-' && arg[2]==0) + { + op = arg[1]; + if(!cp) + { + /* for backward compatibility with new flags */ + if(op==0 || !strchr(test_opchars+10,op)) + return(1); + errormsg(SH_DICT,ERROR_exit(2),e_argument); + } + if(strchr(test_opchars,op)) + return(test_unop(tp->sh,op,cp)); + } + if(!cp) + { + tp->ap--; + return(*arg!=0); + } +skip: + op = sh_lookup(binop=cp,shtab_testops); + if(!(op&TEST_BINOP)) + cp = nxtarg(tp,0); + if(!op) + errormsg(SH_DICT,ERROR_exit(2),e_badop,binop); + if(op==TEST_AND || op==TEST_OR) + tp->ap--; + return(test_binop(tp->sh,op,arg,cp)); +} + +int test_unop(Shell_t *shp,register int op,register const char *arg) +{ + struct stat statb; + int f; + switch(op) + { + case 'r': + return(permission(arg, R_OK)); + case 'w': + return(permission(arg, W_OK)); + case 'x': + return(permission(arg, X_OK)); + case 'V': +#if SHOPT_FS_3D + { + register int offset = staktell(); + if(stat(arg,&statb)<0 || !S_ISREG(statb.st_mode)) + return(0); + /* add trailing / */ + stakputs(arg); + stakputc('/'); + stakputc(0); + arg = (const char*)stakptr(offset); + stakseek(offset); + } +#else + return(0); +#endif /* SHOPT_FS_3D */ + /* FALLTHROUGH */ + case 'd': + return(test_stat(arg,&statb)>=0 && S_ISDIR(statb.st_mode)); + case 'c': + return(test_stat(arg,&statb)>=0 && S_ISCHR(statb.st_mode)); + case 'b': + return(test_stat(arg,&statb)>=0 && S_ISBLK(statb.st_mode)); + case 'f': + return(test_stat(arg,&statb)>=0 && S_ISREG(statb.st_mode)); + case 'u': + return(test_mode(arg)&S_ISUID); + case 'g': + return(test_mode(arg)&S_ISGID); + case 'k': +#ifdef S_ISVTX + return(test_mode(arg)&S_ISVTX); +#else + return(0); +#endif /* S_ISVTX */ +#if SHOPT_TEST_L + case 'l': +#endif + case 'L': + case 'h': /* undocumented, and hopefully will disappear */ + if(*arg==0 || arg[strlen(arg)-1]=='/' || lstat(arg,&statb)<0) + return(0); + return(S_ISLNK(statb.st_mode)); + + case 'C': +#ifdef S_ISCTG + return(test_stat(arg,&statb)>=0 && S_ISCTG(statb.st_mode)); +#else + return(0); +#endif /* S_ISCTG */ + case 'H': +#ifdef S_ISCDF + { + register int offset = staktell(); + if(test_stat(arg,&statb)>=0 && S_ISCDF(statb.st_mode)) + return(1); + stakputs(arg); + stakputc('+'); + stakputc(0); + arg = (const char*)stakptr(offset); + stakseek(offset); + return(test_stat(arg,&statb)>=0 && S_ISCDF(statb.st_mode)); + } +#else + return(0); +#endif /* S_ISCDF */ + + case 'S': + return(isasock(arg,&statb)); + case 'N': + return(test_stat(arg,&statb)>=0 && tmxgetmtime(&statb) > tmxgetatime(&statb)); + case 'p': + return(isapipe(arg,&statb)); + case 'n': + return(*arg != 0); + case 'z': + return(*arg == 0); + case 's': + sfsync(sfstdout); + /* FALLTHROUGH */ + case 'O': + case 'G': + if(*arg==0 || test_stat(arg,&statb)<0) + return(0); + if(op=='s') + return(statb.st_size>0); + else if(op=='O') + 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; + if(*arg=='?') + return(sh_lookopt(arg+1,&f)>0); + op = sh_lookopt(arg,&f); + return(op && (f==(sh_isoption(op)!=0))); + case 't': + { + char *last; + op = strtol(arg,&last, 10); + return(*last?0:tty_check(op)); + } + case 'v': + case 'R': + { + Namval_t *np; + Namarr_t *ap; + int isref; + 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') + return(isref); + if(isref) + { + if(np->nvalue.cp) + np = nv_refnode(np); + else + return(0); + + } + if(ap = nv_arrayptr(np)) + return(nv_arrayisset(np,ap)); + return(!nv_isnull(np) || nv_isattr(np,NV_INTEGER)); + } + default: + { + static char a[3] = "-?"; + a[1]= op; + errormsg(SH_DICT,ERROR_exit(2),e_badop,a); + /* NOTREACHED */ + return(0); + } + } +} + +int test_binop(Shell_t *shp,register int op,const char *left,const char *right) +{ + register double lnum,rnum; + if(op&TEST_ARITH) + { + while(*left=='0') + left++; + while(*right=='0') + right++; + lnum = sh_arith(shp,left); + rnum = sh_arith(shp,right); + } + switch(op) + { + /* op must be one of the following values */ + case TEST_AND: + case TEST_OR: + return(*left!=0); + case TEST_PEQ: + return(test_strmatch(shp, left, right)); + case TEST_PNE: + return(!test_strmatch(shp, left, right)); + case TEST_SGT: + return(strcoll(left, right)>0); + case TEST_SLT: + return(strcoll(left, right)<0); + case TEST_SEQ: + return(strcmp(left, right)==0); + case TEST_SNE: + return(strcmp(left, right)!=0); + case TEST_EF: + return(test_inode(left,right)); + case TEST_NT: + return(test_time(left,right)>0); + case TEST_OT: + return(test_time(left,right)<0); + case TEST_EQ: + return(lnum==rnum); + case TEST_NE: + return(lnum!=rnum); + case TEST_GT: + return(lnum>rnum); + case TEST_LT: + return(lnum=rnum); + case TEST_LE: + return(lnum<=rnum); + } + /* NOTREACHED */ + return(0); +} + +/* + * returns the modification time of f1 - modification time of f2 + */ + +static time_t test_time(const char *file1,const char *file2) +{ + Time_t t1, t2; + struct stat statb1,statb2; + int r=test_stat(file2,&statb2); + if(test_stat(file1,&statb1)<0) + return(r<0?0:-1); + if(r<0) + return(1); + t1 = tmxgetmtime(&statb1); + t2 = tmxgetmtime(&statb2); + if (t1 > t2) + return(1); + if (t1 < t2) + return(-1); + return(0); +} + +/* + * return true if inode of two files are the same + */ + +int test_inode(const char *file1,const char *file2) +{ + struct stat stat1,stat2; + if(test_stat(file1,&stat1)>=0 && test_stat(file2,&stat2)>=0) + if(stat1.st_dev == stat2.st_dev && stat1.st_ino == stat2.st_ino) + return(1); + return(0); +} + + +/* + * This version of access checks against effective uid/gid + * The static buffer statb is shared with test_mode. + */ + +int sh_access(register const char *name, register int mode) +{ + Shell_t *shp = sh_getinterp(); + struct stat statb; + if(*name==0) + return(-1); + 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 && shp->gd->euserid==0) + goto skip; + 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(shp->gd->groupid==shp->gd->euserid || setregid(shp->gd->egroupid,shp->gd->groupid)==0) + { + /* next swap real and effective uid, if needed */ + if(shp->gd->userid==shp->gd->euserid || setreuid(shp->gd->euserid,shp->gd->userid)==0) + { + mode = access(name,mode); + /* restore ids */ + 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(shp->gd->groupid!=shp->gd->egroupid) + setregid(shp->gd->groupid,shp->gd->egroupid); + } +#endif /* _lib_setreuid */ +skip: + if(test_stat(name, &statb) == 0) + { + if(mode == F_OK) + return(mode); + 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(shp->gd->euserid == statb.st_uid) + mode <<= 6; + else if(shp->gd->egroupid == statb.st_gid) + mode <<= 3; +#ifdef _lib_getgroups + /* on some systems you can be in several groups */ + else + { + static int maxgroups; + gid_t *groups; + register int n; + if(maxgroups==0) + { + /* first time */ + if((maxgroups=getgroups(0,(gid_t*)0)) <= 0) + { + /* pre-POSIX system */ + maxgroups=NGROUPS_MAX; + } + } + groups = (gid_t*)stakalloc((maxgroups+1)*sizeof(gid_t)); + n = getgroups(maxgroups,groups); + while(--n >= 0) + { + if(groups[n] == statb.st_gid) + { + mode <<= 3; + break; + } + } + } +# endif /* _lib_getgroups */ + if(statb.st_mode & mode) + return(0); + } + return(-1); +} + +/* + * Return the mode bits of file + * If is null, then the previous stat buffer is used. + * The mode bits are zero if the file doesn't exist. + */ + +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); +} + +/* + * do an fstat() for /dev/fd/n, otherwise stat() + */ +static int test_stat(const char *name,struct stat *buff) +{ + if(*name==0) + { + errno = ENOENT; + return(-1); + } + if(sh_isdevfd(name)) + return(fstat((int)strtol(name+8, (char**)0, 10),buff)); + else + return(stat(name,buff)); +} diff --git a/usr/src/contrib/ast/src/cmd/ksh93/bltins/trap.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/trap.c new file mode 100644 index 0000000000..6cb335c4d9 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/trap.c @@ -0,0 +1,457 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * trap [-p] action sig... + * kill [-l] [sig...] + * kill [-s sig] pid... + * + * David Korn + * AT&T Labs + * research!dgk + * + */ + +#include "defs.h" +#include "jobs.h" +#include "builtins.h" + +#define L_FLAG 1 +#define S_FLAG 2 + +static const char trapfmt[] = "trap -- %s %s\n"; + +static int sig_number(Shell_t*,const char*); +static void sig_list(Shell_t*,int); + +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 = context->shp; + NOT_USED(argc); + while (sig = optget(argv, sh_opttrap)) switch (sig) + { + case 'p': + pflag=1; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); + return(2); + break; + } + argv += opt_info.index; + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s", optusage((char*)0)); + if(arg = *argv) + { + char *action = arg; + if(!dflag && !pflag) + { + /* first argument all digits or - means clear */ + while(isdigit(*arg)) + arg++; + clear = (arg!=action && *arg==0); + if(!clear) + { + ++argv; + if(*action=='-' && action[1]==0) + clear++; + /* + * NOTE: 2007-11-26: workaround for tests/signal.sh + * if function semantics can be worked out then it + * may merit a -d,--default option + */ + else if(*action=='+' && action[1]==0 && shp->st.self == &shp->global) + { + clear++; + dflag++; + } + } + if(!argv[0]) + errormsg(SH_DICT,ERROR_exit(1),e_condition); + } + while(arg = *argv++) + { + sig = sig_number(shp,arg); + if(sig<0) + { + errormsg(SH_DICT,2,e_trap,arg); + return(1); + } + /* internal traps */ + if(sig&SH_TRAP) + { + char **trap = (shp->st.otrap?shp->st.otrap:shp->st.trap); + sig &= ~SH_TRAP; + if(sig>SH_DEBUGTRAP) + { + errormsg(SH_DICT,2,e_trap,arg); + return(1); + } + if(pflag) + { + 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; + if(!clear && *action) + shp->st.trap[sig] = strdup(action); + if(sig == SH_DEBUGTRAP) + { + if(shp->st.trap[sig]) + 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->gd->sigmax) + { + errormsg(SH_DICT,2,e_trap,arg); + return(1); + } + else if(pflag) + { + char **trapcom = (shp->st.otrapcom?shp->st.otrapcom:shp->st.trapcom); + if(arg=trapcom[sig]) + sfputr(sfstdout,arg,'\n'); + } + else if(clear) + { + sh_sigclear(sig); + if(sig == 0) + shp->exittrap = 0; + if(dflag) + signal(sig,SIG_DFL); + } + else + { + if(sig >= shp->st.trapmax) + shp->st.trapmax = sig+1; + arg = shp->st.trapcom[sig]; + sh_sigtrap(sig); + 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,-2); + return(0); +} + +int b_kill(int argc,char *argv[],Shbltin_t *context) +{ + register char *signame; + register int sig=SIGTERM, flag=0, n; + 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(shp,signame+1))>=0) + goto endopts; + opt_info.index--; + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case 'n': + sig = (int)opt_info.num; + goto endopts; + case 's': + flag |= S_FLAG; + signame = opt_info.arg; + goto endopts; + case 'L': + usemenu = -1; + /* FALLTHROUGH */ + case 'l': + flag |= L_FLAG; + break; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + break; + } +endopts: + argv += opt_info.index; + if(*argv && strcmp(*argv,"--")==0 && strcmp(*(argv-1),"--")!=0) + argv++; + if(error_info.errors || flag==(L_FLAG|S_FLAG) || (!(*argv) && !(flag&L_FLAG))) + errormsg(SH_DICT,ERROR_usage(2),"%s", optusage((char*)0)); + /* just in case we send a kill -9 $$ */ + sfsync(sfstderr); + if(flag&L_FLAG) + { + if(!(*argv)) + 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(shp,signame))<0) + { + shp->exitval = 2; + errormsg(SH_DICT,ERROR_exit(1),e_nosignal,signame); + } + sfprintf(sfstdout,"%d\n",sig); + } + } + return(shp->exitval); + } + if(flag&S_FLAG) + { + 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)) + shp->exitval = 1; + return(shp->exitval); +} + +/* + * Given the name or number of a signal return the signal number + */ + +static int sig_number(Shell_t *shp,const char *string) +{ + const Shtable_t *tp; + register int n,o,sig=0; + char *last, *name; + if(isdigit(*string)) + { + n = strtol(string,&last,10); + if(*last) + n = -1; + } + else + { + register int c; + o = staktell(); + do + { + c = *string++; + if(islower(c)) + c = toupper(c); + stakputc(c); + } + while(c); + stakseek(o); + if(memcmp(stakptr(o),"SIG",3)==0) + { + sig = 1; + o += 3; + if(isdigit(*stakptr(o))) + { + n = strtol(stakptr(o),&last,10); + if(!*last) + return(n); + } + } + tp = sh_locate(stakptr(o),(const Shtable_t*)shtab_signals,sizeof(*shtab_signals)); + n = tp->sh_number; + if(sig==1 && (n>=(SH_TRAP-1) && n < (1<sh_name)==0) + n = tp->sh_number; + } + if((n>>SH_SIGBITS)&SH_SIGRUNTIME) + n = shp->gd->sigruntime[(n&((1<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 = 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 = shp->gd->sigruntime[SH_SIGRTMAX] - sig; + } + else if((sig=(int)strtol(name,&name,10)) > 0 && !*name) + n = shp->gd->sigruntime[SH_SIGRTMIN] + sig - 1; + if(ngd->sigruntime[SH_SIGRTMIN] || n>shp->gd->sigruntime[SH_SIGRTMAX]) + n = -1; + } + } + return(n); +} + +/* + * synthesize signal name for sig in buf + * pfx!=0 prepends SIG to default signal number + */ +static char* sig_name(Shell_t *shp,int sig, char* buf, int pfx) +{ + register int i; + + i = 0; + if(sig>shp->gd->sigruntime[SH_SIGRTMIN] && siggd->sigruntime[SH_SIGRTMAX]) + { + buf[i++] = 'R'; + buf[i++] = 'T'; + buf[i++] = 'M'; + 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 = shp->gd->sigruntime[SH_SIGRTMAX]-sig; + } + else + { + buf[i++] = 'I'; + buf[i++] = 'N'; + buf[i++] = '+'; + sig = sig-shp->gd->sigruntime[SH_SIGRTMIN]; + } + } + else if(pfx) + { + buf[i++] = 'S'; + buf[i++] = 'I'; + buf[i++] = 'G'; + } + i += sfsprintf(buf+i, 8, "%d", sig); + buf[i] = 0; + return buf; +} + +/* + * if is positive, then print signal name corresponding to + * if is zero, then print all signal names + * if is -1, then print all signal names in menu format + * if is <-1, then print all traps + */ +static void sig_list(register Shell_t *shp,register int flag) +{ + register const struct shtable2 *tp; + register int sig; + register char *sname; + char name[10]; + const char *names[SH_TRAP]; + const char *traps[SH_DEBUGTRAP+1]; + tp=shtab_signals; + if(flag<=0) + { + /* not all signals may be defined, so initialize */ + for(sig=shp->gd->sigmax; sig>=0; sig--) + names[sig] = 0; + for(sig=SH_DEBUGTRAP; sig>=0; sig--) + traps[sig] = 0; + } + for(; *tp->sh_name; tp++) + { + sig = tp->sh_number&((1<sh_number>>SH_SIGBITS) & SH_SIGRUNTIME) && (sig = shp->gd->sigruntime[sig-1]+1) == 1) + continue; + if(sig==flag) + { + sfprintf(sfstdout,"%s\n",tp->sh_name); + return; + } + else if(sig&SH_TRAP) + traps[sig&~SH_TRAP] = (char*)tp->sh_name; + else if(sig-- && sig < elementsof(names)) + names[sig] = (char*)tp->sh_name; + } + if(flag > 0) + sfputr(sfstdout, sig_name(shp,flag-1,name,0), '\n'); + else if(flag<-1) + { + /* print the traps */ + register char *trap,**trapcom; + sig = shp->st.trapmax; + /* use parent traps if otrapcom is set (for $(trap) */ + trapcom = (shp->st.otrapcom?shp->st.otrapcom:shp->st.trapcom); + while(--sig >= 0) + { + if(!(trap=trapcom[sig])) + continue; + 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.otrap?shp->st.otrap[sig]:shp->st.trap[sig])) + continue; + sfprintf(sfstdout,trapfmt,sh_fmtq(trap),traps[sig]); + } + } + else + { + /* print all the signal names */ + for(sig=1; sig <= shp->gd->sigmax; sig++) + { + if(!(sname=(char*)names[sig])) + { + 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/contrib/ast/src/cmd/ksh93/bltins/typeset.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/typeset.c new file mode 100644 index 0000000000..73545073a2 --- /dev/null +++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/typeset.c @@ -0,0 +1,1499 @@ +/*********************************************************************** +* * +* 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 * +* * +***********************************************************************/ +#pragma prototyped +/* + * export [-p] [arg...] + * readonly [-p] [arg...] + * typeset [options] [arg...] + * alias [-ptx] [arg...] + * unalias [arg...] + * builtin [-sd] [-f file] [name...] + * set [options] [name...] + * unset [-fnv] [name...] + * + * David Korn + * AT&T Labs + * + */ + +#include "defs.h" +#include +#include "path.h" +#include "name.h" +#include "history.h" +#include "builtins.h" +#include "variables.h" +#include "FEATURE/dynamic" + +struct tdata +{ + Shell_t *sh; + Namval_t *tp; + const char *wctname; + Sfio_t *outfile; + char *prefix; + char *tname; + char *help; + short aflag; + short pflag; + int argnum; + int scanmask; + Dt_t *scanroot; + char **argnam; + int indent; + int noref; +}; + + +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 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*); + +static Namval_t *load_class(const char *name) +{ + errormsg(SH_DICT,ERROR_exit(1),"%s: type not loadable",name); + return(0); +} + +/* + * Note export and readonly are the same + */ +#if 0 + /* for the dictionary generator */ + int b_export(int argc,char *argv[],Shbltin_t *context){} +#endif +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 = context->shp; + tdata.aflag = '-'; + while((flag = optget(argv,*command=='e'?sh_optexport:sh_optreadonly))) switch(flag) + { + case 'p': + tdata.prefix = command; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); + return(2); + } + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),optusage(NIL(char*))); + argv += (opt_info.index-1); + if(*command=='r') + flag = (NV_ASSIGN|NV_RDONLY|NV_VARNAME); +#ifdef _ENV_H + else if(!argv[1]) + { + char *cp,**env=env_get(tdata.sh->env); + while(cp = *env++) + { + if(tdata.prefix) + sfputr(sfstdout,tdata.prefix,' '); + sfprintf(sfstdout,"%s\n",sh_fmtq(cp)); + } + return(0); + } +#endif + else + { + flag = (NV_ASSIGN|NV_EXPORT|NV_IDENT); + if(!tdata.sh->prefix) + tdata.sh->prefix = ""; + } + return(setall(argv,flag,tdata.sh->var_tree, &tdata)); +} + + +int b_alias(int argc,register char *argv[],Shbltin_t *context) +{ + register unsigned flag = NV_NOARRAY|NV_NOSCOPE|NV_ASSIGN; + register Dt_t *troot; + register int n; + struct tdata tdata; + NOT_USED(argc); + memset((void*)&tdata,0,sizeof(tdata)); + tdata.sh = context->shp; + troot = tdata.sh->alias_tree; + if(*argv[0]=='h') + flag = NV_TAGGED; + if(argv[1]) + { + opt_info.offset = 0; + opt_info.index = 1; + *opt_info.option = 0; + tdata.argnum = 0; + tdata.aflag = *argv[1]; + while((n = optget(argv,sh_optalias))) switch(n) + { + case 'p': + tdata.prefix = argv[0]; + break; + case 't': + flag |= NV_TAGGED; + break; + case 'x': + flag |= NV_EXPORT; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); + return(2); + } + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage(NIL(char*))); + argv += (opt_info.index-1); + if(flag&NV_TAGGED) + { + /* hacks to handle hash -r | -- */ + if(argv[1] && argv[1][0]=='-') + { + if(argv[1][1]=='r' && argv[1][2]==0) + { + 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); + } + if(argv[1][0]=='-') + { + if(argv[1][1]=='-' && argv[1][2]==0) + argv++; + else + errormsg(SH_DICT, ERROR_exit(1), e_option, argv[1]); + } + } + troot = tdata.sh->track_tree; + } + } + return(setall(argv,flag,troot,&tdata)); +} + + +#if 0 + /* for the dictionary generator */ + int b_local(int argc,char *argv[],Shbltin_t *context){} +#endif +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*)context->ptr; + Dt_t *troot; + int isfloat=0, shortint=0, sflag=0; + NOT_USED(argc); + memset((void*)&tdata,0,sizeof(tdata)); + tdata.sh = context->shp; + if(ntp) + { + tdata.tp = ntp->tp; + opt_info.disc = (Optdisc_t*)ntp->optinfof; + optstring = ntp->optstring; + } + troot = tdata.sh->var_tree; + while((n = optget(argv,optstring))) + { + if(tdata.aflag==0) + tdata.aflag = *opt_info.option; + switch(n) + { + case 'a': + flag |= NV_IARRAY; + if(opt_info.arg && *opt_info.arg!='[') + { + opt_info.index--; + goto endargs; + } + tdata.tname = opt_info.arg; + break; + case 'A': + flag |= NV_ARRAY; + break; + case 'C': + flag |= NV_COMVAR; + break; + case 'E': + /* The following is for ksh88 compatibility */ + if(opt_info.offset && !strchr(argv[opt_info.index],'E')) + { + tdata.argnum = (int)opt_info.num; + break; + } + /* FALLTHROUGH */ + case 'F': + case 'X': + if(!opt_info.arg || (tdata.argnum = opt_info.num) <0) + tdata.argnum = (n=='X'?2*sizeof(Sfdouble_t):10); + isfloat = 1; + if(n=='E') + { + flag &= ~NV_HEXFLOAT; + flag |= NV_EXPNOTE; + } + else if(n=='X') + { + flag &= ~NV_EXPNOTE; + flag |= NV_HEXFLOAT; + } + break; + case 'b': + flag |= NV_BINARY; + break; + case 'm': + flag |= NV_MOVE; + break; + case 'n': + flag &= ~NV_VARNAME; + flag |= (NV_REF|NV_IDENT); + break; + case 'H': + flag |= NV_HOST; + break; + case 'T': + flag |= NV_TYPE; + tdata.prefix = opt_info.arg; + break; + case 'L': case 'Z': case 'R': + if(tdata.argnum==0) + tdata.argnum = (int)opt_info.num; + if(tdata.argnum < 0) + errormsg(SH_DICT,ERROR_exit(1), e_badfield, tdata.argnum); + if(n=='Z') + flag |= NV_ZFILL; + else + { + flag &= ~(NV_LJUST|NV_RJUST); + 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; + break; + case 'i': + if(!opt_info.arg || (tdata.argnum = opt_info.num) <0) + tdata.argnum = 10; + 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; + break; +#ifdef SHOPT_TYPEDEF + case 'S': + sflag=1; + break; + case 'h': + tdata.help = opt_info.arg; + break; +#endif /*SHOPT_TYPEDEF*/ + case 's': + shortint=1; + break; + case 't': + flag |= NV_TAGGED; + break; + case 'u': + tdata.wctname = e_toupper; + flag |= NV_LTOU; + break; + case 'x': + flag &= ~NV_VARNAME; + flag |= (NV_EXPORT|NV_IDENT); + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); + opt_info.disc = 0; + return(2); + } + } +endargs: + argv += opt_info.index; + opt_info.disc = 0; + /* handle argument of + and - specially */ + if(*argv && argv[0][1]==0 && (*argv[0]=='+' || *argv[0]=='-')) + tdata.aflag = *argv[0]; + else + argv--; + if((flag&NV_ZFILL) && !(flag&NV_LJUST)) + flag |= NV_RJUST; + if((flag&NV_INTEGER) && (flag&(NV_LJUST|NV_RJUST|NV_ZFILL))) + error_info.errors++; + if((flag&NV_BINARY) && (flag&(NV_LJUST|NV_UTOL|NV_LTOU))) + error_info.errors++; + if((flag&NV_MOVE) && (flag&~(NV_MOVE|NV_VARNAME|NV_ASSIGN))) + 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) + flag |= NV_REF|NV_TAGGED; + else if(!tdata.sh->typeinit) + flag |= NV_STATIC|NV_IDENT; + } + 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 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); + else if(nv_isnull(tdata.tp)) + 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; + 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) +{ + char *name; + int aflag=tp->aflag; + if(nv_isnull(np)) + { + if(!np->nvflag) + 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; + if(nv_isarray(np) && nv_arrayptr(np)) + { + nv_outnode(np,iop,-1,0); + sfwrite(iop,")\n",2); + } + else + { + if(nv_isvtree(np)) + nv_onattr(np,NV_EXPORT); + if(!(name = nv_getval(np))) + name = Empty; + if(!nv_isvtree(np)) + name = sh_fmtq(name); + sfputr(iop,name,'\n'); + } +} + +static int setall(char **argv,register int flag,Dt_t *troot,struct tdata *tp) +{ + register char *name; + char *last = 0; + int nvflags=(flag&(NV_ARRAY|NV_NOARRAY|NV_VARNAME|NV_IDENT|NV_ASSIGN|NV_STATIC|NV_MOVE)); + int r=0, ref=0, comvar=(flag&NV_COMVAR),iarray=(flag&NV_IARRAY); + Shell_t *shp =tp->sh; + if(!shp->prefix) + { + if(!tp->pflag) + nvflags |= NV_NOSCOPE; + } + 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]) + { + if(flag&NV_REF) + { + flag &= ~NV_REF; + ref=1; + if(tp->aflag!='-') + nvflags |= NV_NOREF; + } + if(tp->pflag) + 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) + { + /* + *functions can be exported or + * traced but not set + */ + flag &= ~NV_ASSIGN; + if(flag&NV_LTOU) + { + /* 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(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 && !tp->help) + { + print_namval(sfstdout,np,tp->aflag=='+',tp); + continue; + } + if(shp->subshell && !shp->subshare) + sh_subfork(); + if(tp->aflag=='-') + nv_onattr(np,flag|NV_FUNCTION); + else if(tp->aflag=='+') + nv_offattr(np,flag); + } + else + r++; + if(tp->help) + { + int offset = stktell(shp->stk); + 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; + } + continue; + } + /* tracked alias */ + if(troot==shp->track_tree && tp->aflag=='-') + { + np = nv_search(name,troot,NV_ADD); + path_alias(np,path_absolute(shp,nv_name(np),NIL(Pathcomp_t*))); + continue; + } + 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) + { + if(!nv_istable(np)) + nv_attribute(np,sfstdout,tp->prefix,1); + print_value(sfstdout,np,tp); + continue; + } + if(flag==NV_ASSIGN && !ref && tp->aflag!='-' && !strchr(name,'=')) + { + if(troot!=shp->var_tree && (nv_isnull(np) || !print_namval(sfstdout,np,0,tp))) + { + sfprintf(sfstderr,sh_translate(e_noalias),name); + r++; + } + if(!comvar && !iarray) + continue; + } + 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) + { + if(tp->tname) + nv_atypeindex(np,tp->tname+1); + else if(nv_isnull(np)) + nv_onattr(np,NV_ARRAY|(comvar?NV_NOFREE:0)); + else + { + if(ap && comvar) + ap->nelem |= ARRAY_TREE; + nv_putsub(np, (char*)0, 0); + } + } + else if(nvflags&NV_ARRAY) + { + if(comvar) + { + Namarr_t *ap=nv_arrayptr(np); + if(ap) + ap->nelem |= ARRAY_TREE; + else + { + _nv_unset(np,NV_RDONLY); + nv_onattr(np,NV_NOFREE); + } + } + nv_setarray(np,nv_associative); + } + else if(comvar && !nv_isvtree(np) && !nv_rename(np,flag|NV_COMVAR)) + nv_setvtree(np); + } + if(flag&NV_MOVE) + { + nv_rename(np, flag); + nv_close(np); + continue; + } + if(tp->tp && nv_type(np)!=tp->tp) + { + nv_settype(np,tp->tp,tp->aflag=='-'?0:NV_APPEND); + flag = (np->nvflag&NV_NOCHANGE); + } + 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))) + errormsg(SH_DICT,ERROR_exit(1),e_badexport,name); +#if SHOPT_BSH + if(flag&NV_EXPORT) + nv_offattr(np,NV_IMPORT); +#endif /* SHOPT_BSH */ + newflag = curflag; + if(flag&~NV_NOCHANGE) + newflag &= NV_NOCHANGE; + newflag |= flag; + if (flag & (NV_LJUST|NV_RJUST)) + { + if(!(flag&NV_RJUST)) + newflag &= ~NV_RJUST; + + else if(!(flag&NV_LJUST)) + newflag &= ~NV_LJUST; + } + } + else + { + if((flag&NV_RDONLY) && (curflag&NV_RDONLY)) + errormsg(SH_DICT,ERROR_exit(1),e_readonly,nv_name(np)); + newflag = curflag & ~flag; + } + if (tp->aflag && (tp->argnum>0 || (curflag!=newflag))) + { + if(shp->subshell) + sh_assignok(np,1); + if(troot!=shp->var_tree) + nv_setattr(np,newflag&~NV_ASSIGN); + else + { + char *oldname=0; + int len=strlen(name); + if(tp->argnum==1 && newflag==NV_INTEGER && nv_isattr(np,NV_INTEGER)) + tp->argnum = 10; + if(np->nvfun && !nv_isarray(np) && name[len-1]=='.') + newflag |= NV_NODISC; + nv_newattr (np, newflag&~NV_ASSIGN,tp->argnum); + if(oldname) + np->nvname = oldname; + } + } + if(tp->help && !nv_isattr(np,NV_MINIMAL|NV_EXPORT)) + { + np->nvenv = tp->help; + nv_onattr(np,NV_EXPORT); + } + if(last) + *last = '='; + /* set or unset references */ + if(ref) + { + if(tp->aflag=='-') + { + Dt_t *hp=0; + if(nv_isattr(np,NV_PARAM) && shp->st.prevst) + { + if(!(hp=(Dt_t*)shp->st.prevst->save_tree)) + hp = dtvnext(shp->var_tree); + } + if(tp->sh->mktype) + nv_onattr(np,NV_REF|NV_FUNCT); + else + nv_setref(np,hp,NV_VARNAME); + } + else + nv_unref(np); + } + nv_close(np); + } + } + else + { + if(shp->prefix) + errormsg(SH_DICT,2, e_subcomvar,shp->prefix); + if(tp->aflag) + { + if(troot==shp->fun_tree) + { + flag |= NV_FUNCTION; + tp->prefix = 0; + } + else if(troot==shp->var_tree) + { + flag |= (nvflags&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); + else + print_all(sfstdout,troot,tp); + sfsync(sfstdout); + } + return(r); +} + +#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 Libcomp_t *liblist; +static int nlib; +static int maxlib; + +/* + * 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 + */ + +int sh_addlib(Shell_t* shp, void* dll, char* name, Pathcomp_t* pp) +{ + register int n; + register int r; + 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]; + else if (liblist[n].dll == dll) + r++; + } + if (r) + nlib--; + else if ((initfn = (Libinit_f)dlllook(dll, "lib_init"))) + (*initfn)(0,sp); + if (nlib >= maxlib) + { + maxlib += GROWLIB; + 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; + } + 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(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[],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; + 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 = context->shp; + stkp = tdata.sh->stk; + if(!tdata.sh->pathlist) + path_absolute(tdata.sh,argv[0],NIL(Pathcomp_t*)); + while (n = optget(argv,sh_optbuiltin)) switch (n) + { + case 's': + flag = BLT_SPC; + break; + case 'd': + dlete=1; + break; + case 'f': +#if SHOPT_DYNAMIC + arg = opt_info.arg; +#else + errormsg(SH_DICT,2, "adding built-ins not supported"); + 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; + case '?': + errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); + break; + } + argv += opt_info.index; + if(error_info.errors) + errormsg(SH_DICT,ERROR_usage(2),"%s", optusage(NIL(char*))); + if(arg || *argv) + { + if(sh_isoption(SH_RESTRICTED)) + errormsg(SH_DICT,ERROR_exit(1),e_restricted,argv[-opt_info.index]); + if(sh_isoption(SH_PFSH)) + errormsg(SH_DICT,ERROR_exit(1),e_pfsh,argv[-opt_info.index]); + if(tdata.sh->subshell && !tdata.sh->subshare) + sh_subfork(); + } +#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 + if(!(library = dllfind(arg,NIL(char*),RTLD_LAZY,NIL(char*),0))) +#endif + { + errormsg(SH_DICT,ERROR_exit(0),"%s: %s",arg,dlerror()); + return(1); + } +#endif + sh_addlib(tdata.sh,library,arg,NiL); + } + else +#endif /* SHOPT_DYNAMIC */ + if(*argv==0 && !dlete) + { + print_scan(sfstdout, flag, tdata.sh->bltin_tree, 1, &tdata); + return(0); + } + r = 0; + flag = stktell(stkp); + while(arg = *argv) + { + name = path_basename(arg); + sfwrite(stkp,"b_",2); + sfputr(stkp,name,0); + errmsg = 0; + addr = 0; + if(dlete || liblist) + for(n=(nlib?nlib:dlete); --n>=0;) + { +#if SHOPT_DYNAMIC + if(!dlete && !liblist[n].dll) + continue; + if(dlete || (addr = (Shbltin_f)dlllook(liblist[n].dll,stkptr(stkp,flag)))) +#else + if(dlete) +#endif /* SHOPT_DYNAMIC */ + { + 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; + } + } + if(!addr && (np = nv_search(arg,context->shp->bltin_tree,0))) + { + if(nv_isattr(np,BLT_SPC)) + errmsg = "restricted name"; + 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); + r = 1; + } + stkseek(stkp,flag); + argv++; + } + return(r); +} + +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 = context->shp; + tdata.prefix=0; + if(argv[1]) + { + if(sh_argopts(argc,argv,tdata.sh) < 0) + return(2); + if(sh_isoption(SH_VERBOSE)) + sh_onstate(SH_VERBOSE); + else + sh_offstate(SH_VERBOSE); + if(sh_isoption(SH_MONITOR) && !was_monitor) + sh_onstate(SH_MONITOR); + else if(!sh_isoption(SH_MONITOR) && was_monitor) + sh_offstate(SH_MONITOR); + } + else + /*scan name chain and print*/ + print_scan(sfstdout,0,tdata.sh->var_tree,0,&tdata); + return(0); +} + +/* + * The removing of Shell variable names, aliases, and functions + * is performed here. + * Unset functions with unset -f + * Non-existent items being deleted give non-zero exit status + */ + +int b_unalias(int argc,register char *argv[],Shbltin_t *context) +{ + Shell_t *shp = context->shp; + return(unall(argc,argv,shp->alias_tree,shp)); +} + +int b_unset(int argc,register char *argv[],Shbltin_t *context) +{ + Shell_t *shp = context->shp; + return(unall(argc,argv,shp->var_tree,shp)); +} + +static int unall(int argc, char **argv, register Dt_t *troot, Shell_t* shp) +{ + register Namval_t *np; + register const char *name; + volatile int r; + Dt_t *dp; + int nflag=0,all=0,isfun,jmpval; + struct checkpt buff; + NOT_USED(argc); + if(troot==shp->alias_tree) + { + name = sh_optunalias; + if(shp->subshell) + troot = sh_subaliastree(0); + } + else + name = sh_optunset; + while(r = optget(argv,name)) switch(r) + { + case 'f': + troot = sh_subfuntree(1); + break; + case 'a': + all=1; + break; + case 'n': + nflag = NV_NOREF; + /* FALLTHROUGH */ + case 'v': + troot = shp->var_tree; + break; + case ':': + errormsg(SH_DICT,2, "%s", opt_info.arg); + break; + case '?': + errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); + return(2); + } + argv += opt_info.index; + if(error_info.errors || (*argv==0 &&!all)) + errormsg(SH_DICT,ERROR_usage(2),"%s",optusage(NIL(char*))); + if(!troot) + return(1); + r = 0; + if(troot==shp->var_tree) + nflag |= NV_VARNAME; + else + nflag = NV_NOSCOPE; + if(all) + { + dtclear(troot); + return(r); + } + 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; + continue; + } + if(np) + { + if(is_abuiltin(np) || nv_isattr(np,NV_RDONLY)) + { + if(nv_isattr(np,NV_RDONLY)) + errormsg(SH_DICT,ERROR_warn(0),e_readonly, nv_name(np)); + r = 1; + continue; + } + 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; + } + + if(shp->subshell) + np=sh_assignok(np,0); + } + 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 && !(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(shp,&buff); + return(r); +} + +/* + * print out the name and value of a name-value pair + */ + +static int print_namval(Sfio_t *file,register Namval_t *np,register int flag, struct tdata *tp) +{ + register char *cp; + 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) && 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) + { + 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,' '); + } + } + 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",' '); + 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) + fname = np->nvalue.rp->fname; + else + flag = '\n'; + if(flag) + { + if(tp->pflag && np->nvalue.ip && np->nvalue.rp->hoffset>=0) + sfprintf(file," #line %d %s\n",np->nvalue.rp->lineno,fname?sh_fmtq(fname):""); + else + sfputc(file, '\n'); + } + else + { + if(nv_isattr(np,NV_FTMP)) + { + fname = 0; + iop = tp->sh->heredocs; + } + else if(fname) + iop = sfopen(iop,fname,"r"); + 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 + flag = '\n'; + if(fname) + sfclose(iop); + } + return(nv_size(np)+1); + } + if(nv_arrayptr(np)) + { + if(indent) + sfnputc(file,'\t',indent); + print_value(file,np,tp); + return(0); + } + if(nv_isvtree(np)) + 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 = '='; + sfputc(file,flag); + if(flag != '\n') + { + if(nv_isref(np) && nv_refsub(np)) + { + sfputr(file,sh_fmtq(cp),-1); + sfprintf(file,"[%s]\n", sh_fmtq(nv_refsub(np))); + } + else +#if SHOPT_TYPEDEF + sfputr(file,nv_isvtree(np)?cp:sh_fmtq(cp),'\n'); +#else + sfputr(file,sh_fmtq(cp),'\n'); +#endif /* SHOPT_TYPEDEF */ + } + return(1); + } + else if(outname || (tp->scanmask && tp->scanroot==tp->sh->var_tree)) + sfputr(file,nv_name(np),'\n'); + return(0); +} + +/* + * print attributes at all nodes + */ +static void print_all(Sfio_t *file,Dt_t *root, struct tdata *tp) +{ + tp->outfile = file; + nv_scan(root, print_attribute, (void*)tp, 0, 0); +} + +/* + * print the attributes of name value pair give by + */ +static void print_attribute(register Namval_t *np,void *data) +{ + register struct tdata *dp = (struct tdata*)data; + nv_attribute(np,dp->outfile,dp->prefix,dp->aflag); +} + +/* + * print the nodes in tree which have attributes set + * of