• Build.sh: always prepend well-known signal names, so that some signals

will not come up weirdly (e.g. on AIX: SIGSAK (SIGMAX?), SIGIO (SIGAIO?),
  SIGURG (SIGIOINT?)), and add a few more while here
• check.t, sh.h: bump
This commit is contained in:
tg 2007-07-22 13:46:15 +00:00
parent cf5fc9eac2
commit a1433b7122
3 changed files with 11 additions and 15 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $MirOS: src/bin/mksh/Build.sh,v 1.241 2007/07/22 13:34:48 tg Exp $ # $MirOS: src/bin/mksh/Build.sh,v 1.242 2007/07/22 13:46:13 tg Exp $
#- #-
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NEED_MKNOD MKSH_NOPWNAM # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NEED_MKNOD MKSH_NOPWNAM
@ -861,16 +861,12 @@ if test 0 = $HAVE_SYS_SIGNAME; then
esac esac
NSIG=`printf %d "$NSIG" 2>/dev/null` NSIG=`printf %d "$NSIG" 2>/dev/null`
test $h = 1 && printf "NSIG=$NSIG ... " test $h = 1 && printf "NSIG=$NSIG ... "
if test 1 = $HAVE_CPP_DD && test $NSIG -gt 1; then signames="ABRT ALRM BUS CHLD CLD CONT EMT FPE HUP ILL INFO INT IO IOT"
signames=`vq "$CC $CPPFLAGS -dD -E scn.c" | \ signames="$signames KILL PIPE PROF PWR QUIT SAK SEGV STOP SYS TERM"
grep '[ ]SIG[A-Z0-9]*[ ]' | \ signames="$signames TRAP TSTP TTIN TTOU URG USR1 USR2 WINCH XCPU XFSZ"
sed 's/^\(.*[ ]SIG\)\([A-Z0-9]*\)\([ ].*\)$/\2/' | \ test 1 = $HAVE_CPP_DD && test $NSIG -gt 1 && signames="$signames "`vq \
sort` "$CC $CPPFLAGS -dD -E scn.c" | grep '[ ]SIG[A-Z0-9]*[ ]' | \
else sed 's/^\(.*[ ]SIG\)\([A-Z0-9]*\)\([ ].*\)$/\2/' | sort`
signames="ABRT ALRM BUS CHLD CLD CONT EMT FPE HUP ILL INT IO"
signames="$signames IOT KILL PIPE PWR QUIT SEGV SYS STOP TERM"
signames="$signames TRAP TSTP TTIN TTOU URG USR1 USR2 WINCH"
fi
test $NSIG -gt 1 || signames= test $NSIG -gt 1 || signames=
for name in $signames; do for name in $signames; do
echo '#include <signal.h>' >scn.c echo '#include <signal.h>' >scn.c

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.126 2007/07/17 13:56:50 tg Exp $ # $MirOS: src/bin/mksh/check.t,v 1.127 2007/07/22 13:46:14 tg Exp $
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
@ -7,7 +7,7 @@
# http://www.research.att.com/~gsf/public/ifs.sh # http://www.research.att.com/~gsf/public/ifs.sh
expected-stdout: expected-stdout:
@(#)MIRBSD KSH R30 2007/07/17 @(#)MIRBSD KSH R30 2007/07/22
description: description:
Check version of shell. Check version of shell.
category: pdksh category: pdksh

4
sh.h
View File

@ -8,8 +8,8 @@
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */ /* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */ /* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.159 2007/07/22 13:38:26 tg Exp $" #define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.160 2007/07/22 13:46:15 tg Exp $"
#define MKSH_VERSION "R30 2007/07/17" #define MKSH_VERSION "R30 2007/07/22"
#if HAVE_SYS_PARAM_H #if HAVE_SYS_PARAM_H
#include <sys/param.h> #include <sys/param.h>