Commit fa846918 by Ian Lance Taylor

mksigtab.sh: recurse once when adding signals to SIGLIST

    
    On MIPS, SIGABRT is defined like this:
     #define SIGIOT   6
     #define SIGABRT  SIGIOT
    
    This breaks addsig which tries to append __SIGIOT_ to SIGLIST. Signal
    number 6 is later added to the output and go complains about a
    duplicate signal number.
    
    Fix by recursing once when obtaining the signal number from
    gen-sysinfo.go if the signal is defined as an alias of another signal.
    Also modify the sed expression to 's/.* = //' which is equivalent to
    the original expression but is less misleading given that it might not
    match a number.
    
    Reviewed-on: https://go-review.googlesource.com/43252

From-SVN: r247948
parent b3a7fdc3
fc3d6af694c518d73a126bcbd90d79982524f9f6 3c1258156a2ae483c5cc523cb7a3c3374cbe7c2c
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -28,7 +28,12 @@ SIGLIST="" ...@@ -28,7 +28,12 @@ SIGLIST=""
addsig() { addsig() {
echo " $1: $2," echo " $1: $2,"
# Get the signal number and add it to SIGLIST # Get the signal number and add it to SIGLIST
signum=`grep "const $1 = " gen-sysinfo.go | sed -e 's/.* = \([0-9]*\)/\1/'` signum=`grep "const $1 = " gen-sysinfo.go | sed -e 's/.* = //'`
if echo "$signum" | grep -q '^_SIG[A-Z0-9_]*$'; then
# Recurse once to obtain signal number
# This is needed for some MIPS signals defined as aliases of other signals
signum=`grep "const $signum = " gen-sysinfo.go | sed -e 's/.* = //'`
fi
SIGLIST=$SIGLIST"_${signum}_" SIGLIST=$SIGLIST"_${signum}_"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment