summaryrefslogtreecommitdiff
path: root/libgo/mksigtab.sh
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/mksigtab.sh')
-rw-r--r--libgo/mksigtab.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/libgo/mksigtab.sh b/libgo/mksigtab.sh
index fd31022824c..358e0ed907e 100644
--- a/libgo/mksigtab.sh
+++ b/libgo/mksigtab.sh
@@ -86,6 +86,20 @@ if test "${GOOS}" = "linux"; then
fi
nsig=`grep 'const _*NSIG = [0-9]*$' gen-sysinfo.go | sed -e 's/.* = \([0-9]*\)/\1/'`
+if test -z "$nsig"; then
+ if grep 'const _*NSIG = [ (]*_*SIGRTMAX + 1[ )]*' gen-sysinfo.go >/dev/null 2>&1; then
+ rtmax=`grep 'const _*SIGRTMAX = [0-9]*$' gen-sysinfo.go | sed -e 's/.* = \([0-9]*\)/\1/'`
+ if test -n "$rtmax"; then
+ nsig=`expr $rtmax + 1`
+ fi
+ fi
+fi
+
+if test -z "$nsig"; then
+ echo 1>&2 "could not determine number of signals"
+ exit 1
+fi
+
i=1
while test "$i" -lt "$nsig"; do
if ! grep "const _SIG.* = $i" gen-sysinfo.go >/dev/null 2>&1; then