MFC remaining fixes; tested locally a lot, plus remotely with

GNU C11 (Debian 20150413-1) version 5.0.1 20150413 (prerelease) [gcc-5-branch revision 222050] (x86_64-linux-gnu)
including ASan (testsuite) and Valgrind (short)
This commit is contained in:
tg
2015-04-19 19:18:07 +00:00
parent 65f9b93926
commit c9ccf0bab7
3 changed files with 52 additions and 8 deletions

50
check.t
View File

@@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.689 2015/04/11 23:28:17 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.690 2015/04/19 19:18:03 tg Exp $
# -*- mode: sh -*-
#-
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
@@ -30,7 +30,7 @@
# (2013/12/02 20:39:44) http://openbsd.cs.toronto.edu/cgi-bin/cvsweb/src/regress/bin/ksh/?sortby=date
expected-stdout:
@(#)MIRBSD KSH R51 2015/04/11
@(#)MIRBSD KSH R51 2015/04/19
description:
Check version of shell.
stdin:
@@ -39,7 +39,7 @@ name: KSH_VERSION
category: shell:legacy-no
---
expected-stdout:
@(#)LEGACY KSH R51 2015/04/11
@(#)LEGACY KSH R51 2015/04/19
description:
Check version of legacy shell.
stdin:
@@ -8591,6 +8591,50 @@ expected-stdout:
]
{220-blau.mirbsd.org ESMTP ready at Thu, 25 Jul 2013 15:57:57 GMT
}
{220->> Bitte keine Werbung einwerfen! <<
}
{220 Who do you wanna pretend to be today?
}
---
name: print-crlf
description:
Check that CR+LF is shown and read as-is
stdin:
cat >foo <<-'EOF'
x='bar
' #
if test x"$KSH_VERSION" = x""; then #
printf '<%s>' "$x" #
else #
print -nr -- "<$x>" #
fi #
EOF
echo "[$("$__progname" foo)]"
"$__progname" foo | while IFS= read -r line; do
print -r -- "{$line}"
done
expected-stdout:
[<bar
>]
{<bar
}
---
name: print-lf
description:
Check that LF-only is shown and read as-is
stdin:
cat >foo <<-'EOF'
x='bar
' #
if test x"$KSH_VERSION" = x""; then #
printf '<%s>' "$x" #
else #
print -nr -- "<$x>" #
fi #
EOF
echo "[$("$__progname" foo)]"
"$__progname" foo | while IFS= read -r line; do
print -r -- "{$line}"
done
expected-stdout:

6
mksh.1
View File

@@ -1,4 +1,4 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.361 2015/04/12 22:32:12 tg Exp $
.\" $MirOS: src/bin/mksh/mksh.1,v 1.362 2015/04/19 19:18:05 tg Exp $
.\" $OpenBSD: ksh.1,v 1.159 2015/03/25 12:10:52 jca Exp $
.\"-
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
@@ -74,7 +74,7 @@
.\" with -mandoc, it might implement .Mx itself, but we want to
.\" use our own definition. And .Dd must come *first*, always.
.\"
.Dd $Mdocdate: April 12 2015 $
.Dd $Mdocdate: April 19 2015 $
.\"
.\" Check which macro package we use, and do other -mdoc setup.
.\"
@@ -1130,7 +1130,7 @@ login=\*(aq\eexec login\*(aq
nameref=\*(aq\etypeset \-n\*(aq
nohup=\*(aqnohup \*(aq
r=\*(aq\ebuiltin fc \-e \-\*(aq
source=\*(aqPATH=$PATH:. \ecommand .'
source=\*(aqPATH=$PATH:. \ecommand .\*(aq
stop=\*(aq\ekill \-STOP\*(aq
type=\*(aq\ebuiltin whence \-v\*(aq
.Ed

4
sh.h
View File

@@ -169,9 +169,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.724 2015/04/19 18:50:37 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.725 2015/04/19 19:18:07 tg Exp $");
#endif
#define MKSH_VERSION "R51 2015/04/11"
#define MKSH_VERSION "R51 2015/04/19"
/* arithmetic types: C implementation */
#if !HAVE_CAN_INTTYPES