2005-05-23 14:01:09 +02:00
|
|
|
#!/bin/sh
|
2005-05-23 14:06:39 +02:00
|
|
|
# $MirOS: src/bin/mksh/gensigs.sh,v 1.2 2005/05/23 12:06:39 tg Exp $
|
2005-05-23 14:01:09 +02:00
|
|
|
|
|
|
|
echo '#include <signal.h>' | $CC -E -dD -D_ANSI_SOURCE - \
|
|
|
|
| grep '[ ]SIG[A-Z0-9]*[ ]' \
|
|
|
|
| sed 's/^\(.*[ ]SIG\)\([A-Z0-9]*\)\([ ].*\)$/\2/' \
|
|
|
|
| while read name; do
|
|
|
|
( echo '#include <signal.h>'; echo "__mksh_test: SIG$name" ) \
|
2005-05-23 14:06:39 +02:00
|
|
|
| $CC -E - | fgrep __mksh_test: | sed \
|
|
|
|
's/^__mksh_test: \([0-9]*\).*$/ { \1, "'$name'" },/'
|
2005-05-23 14:01:09 +02:00
|
|
|
done | fgrep -v '{ ,' >signames.inc
|