* Build.sh, histrap.c: prevent testing of strsignal() if we have sys_siglist[]

* mksh.1: .Nm is never used with "" as argument, fixes GNU groff 1.15
This commit is contained in:
tg 2007-01-17 23:47:15 +00:00
parent 65a2806e81
commit bca0f4d603
3 changed files with 11 additions and 9 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $MirOS: src/bin/mksh/Build.sh,v 1.133 2007/01/17 23:27:47 tg Exp $
# $MirOS: src/bin/mksh/Build.sh,v 1.134 2007/01/17 23:47:14 tg Exp $
#-
# Env: CC, CFLAGS, CPP, CPPFLAGS, LDFLAGS, LIBS, NOWARN, NROFF, TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_NOPWNAM
@ -351,12 +351,16 @@ ac_test sys_siglist '' 'the sys_siglist[] array' <<-'EOF'
int main(void) { return (sys_siglist[0][0]); }
EOF
ac_test _sys_siglist '!' sys_siglist 0 'the _sys_siglist[] array' <<-'EOF'
ac_testn _sys_siglist '!' sys_siglist 0 'the _sys_siglist[] array' <<-'EOF'
extern const char *const _sys_siglist[];
int main(void) { return (_sys_siglist[0][0]); }
EOF
if test 1 = $HAVE__SYS_SIGLIST; then
HAVE_SYS_SIGLIST=1
CPPFLAGS="$CPPFLAGS -DHAVE_SYS_SIGLIST -Dsys_siglist=_sys_siglist"
fi
ac_test strsignal '!' _sys_siglist 0 <<-'EOF'
ac_test strsignal '!' sys_siglist 0 <<-'EOF'
#include <string.h>
#include <signal.h>
int main(void) { return (strsignal(1)[0]); }

View File

@ -3,7 +3,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.40 2007/01/15 02:48:27 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.41 2007/01/17 23:47:15 tg Exp $");
Trap sigtraps[NSIG + 1];
static struct sigaction Sigact_ign, Sigact_trap;
@ -991,8 +991,6 @@ inittraps(void)
}
#if HAVE_SYS_SIGLIST
sigtraps[i].mess = sys_siglist[i];
#elif HAVE__SYS_SIGLIST
sigtraps[i].mess = _sys_siglist[i];
#elif HAVE_STRSIGNAL
sigtraps[i].mess = strsignal(i);
#else

6
mksh.1
View File

@ -1,7 +1,7 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.75 2007/01/14 01:56:23 tg Exp $
.\" $MirOS: src/bin/mksh/mksh.1,v 1.76 2007/01/17 23:47:15 tg Exp $
.\" $OpenBSD: ksh.1,v 1.118 2006/11/30 08:47:58 jmc Exp $
.\"
.Dd January 14, 2007
.Dd January 17, 2007
.Dt MKSH 1
.Os MirBSD
.Sh NAME
@ -5285,7 +5285,7 @@ projects and patches and suggestions from users
and many other persons.
.Sh BUGS
This document attempts to describe
.Nm "" R29 ,
.Nm mksh R29 ,
compiled without
.Dv MKSH_SMALL
or other functionality-reducing options.