rewrite funcs.c:c_test(), i.e. test(1) and [(1), to follow POSIX and XSI

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)
This commit is contained in:
tg
2011-11-30 21:34:15 +00:00
parent 44a27fa8e0
commit 2fb9df56e4
4 changed files with 113 additions and 74 deletions

4
sh.h
View File

@ -151,9 +151,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.505 2011/11/26 00:45:21 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.506 2011/11/30 21:34:15 tg Exp $");
#endif
#define MKSH_VERSION "R40 2011/11/25"
#define MKSH_VERSION "R40 2011/11/30"
#ifndef MKSH_INCLUDES_ONLY