that get used, plus one for the realpath-1 regression test; also make
sys_siglist_decl detection nicer and poison strerror() with non-const
return value ifdef DEBUG, make it always const
• all writers of exstat ensure the value is in [0; 0xFF]
• all readers of exstat AND it with 0xFF (not strictly needed thus)
• trap_exstat is “safe”, i.e. always either -1 or [0; 0xFF]
This was actually more evil:
• use a recursive function to display blocks in reverse order,
so that local variable values overwrite global ones
• add array support to typeset -p (from typeset -p -)
• display 'set -A varname' line before setting values, for -p
• if -p got arguments, only display those (from the innermost scope)
Also, the usual amount of code cleanup…
• promote SCO OpenServer and UnixWare to !oswarn
• omit trying -O2/-O on OpenServer 5 and USL C
• cast mksh_ari_t to int, mksh_uari_t to unsigned int for printf
• skip ulimit-1 on syllable (which is still too broken)
• write ((mksh_ari_t)-2147483648) ipv UB ((mksh_ari_t)1 << 31)
and add a comment that that is actually meant
• rewrite functions returning !void ending in NOTREACHED
so they’ve got a jump target returning an error at the
end, to aid older compilers and just to be safe
• cast struct stat.st_size to off_t or size_t explicitly when needed
• shorten struct env by two bytes and an alignment, at least
also, optimise control flow and fix more paren matching cases
on unblock just fine and hurt since they interrupt select(2)
① and² SIGPIPE, SIGINFO, SIGUSR{1,2} in addition to already blocked SIGCHLD
② exact list open for suggestions – I’ve got no idea what I’m doing…
in the cases where they are defined unambiguously; bug reported by
Jilles Tjoelker in <20111129232526.GC14357@stack.nl> due to a report
by Stefano Lattarini on bug-autoconf
in the ambiguous case, I stick to traditional pdksh behaviour, which means
test ! a = b vs. test a = b
and
test ! a -o b vs. test a -o b
behave different from each other (in the second case, the NOT operator
binds strong; POSIX demands a reduction to 3 arguments and negating
that result in the first case), so we're at two known not-ok in the
FreeBSD® testsuite. (81 and 82 in regress.sh,v 1.3)
• while here, reformat 'struct tbl' comment-wise and placement-wise
and drop the Tflag typedef
• while here, write regression test for the "global" built-in, which
does what typeset is supposed to do except that it doubles as "local"