From: Todd C. Miller <Todd.Miller@courtesan.com>
The following ksh diff needs wide testing. It does the following:
1) proper error message for bad substitution.
Before:
$ echo ${a[@]:foo}
ksh: : bad substitution
After:
$ echo ${a[@]:foo}
ksh: ${a[@]:foo}: bad substitution
2) fix a core dump for "echo ${a[@]:?foo}".
3) fix a use-after-free bug (from otto@)
trailing IFS non-whitespace "because many sh-derived
shells have this behavious", and me checking for ksh88
on Solaris confirms it.
So, for the sake of compatibility to AT&T ksh, change
it and document the change.
with their more recent counterparts
* no $Log keyword!
* update licence template to most recent version in files touched
* in some places, don't add our own licence boilerplate, just
add my name to the others
* make dev/rndvar.h suitable for inclusion in asm code
* include dev/rndvar.h by in_cksum.s instead of
hardcoding pool size
* ENTRY(a); ENTRY(b) -> NENTRY(a); ENTRY(b)
* RCS IDs belong into .comment not .text
but the one fixed by a diff by jaredy@openbsd (which intro-
duces other problems though):
Log message:
Change the behavior of IFS word-splitting: split words
when the current character is IFS space and the last
character was a word character or it was non-white IFS
space and the current character is non-white IFS space.
This deviates from the previous behavior because the
latter splits words when the last character is any IFS
space and the current is non-white IFS, resulting in
more fields most of the time.
This new behavior follows what the man page describes;
i.e., that a field is delimited by one or more IFS
whitespace characters followed by zero or one non-white
IFS characters.
* Build.sh: fix manpage name
* chvt.c: Solaris:
chvt.c:57: `TIOCSCTTY' undeclared (first use in this function)
* chvt.c: GNU/Linux:
/tmp/ccrAeq0h.o(.text+0x5e): In function `chvt':
: warning: warning: revoke is not implemented and will always fail
* sh.h: let it only change to .section .comment ifdef __ELF__