summaryrefslogtreecommitdiff
path: root/system/pdksh/patches/043_Debian-siglist.patch
blob: bd7a9af805f71f21eb731e169ea4f2edf7c94403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  * siglist.sh: fix sed command line
  * siglist.sh: pass `-' to trap call, fixes FTBFS on sparc.
Index: pdksh-5.2.14/siglist.sh
===================================================================
--- pdksh-5.2.14.orig/siglist.sh	2008-04-15 20:46:55.000000000 +0200
+++ pdksh-5.2.14/siglist.sh	2008-04-15 20:53:20.000000000 +0200
@@ -16,14 +16,14 @@
 CPP="${1-cc -E}"
 
 # The trap here to make up for a bug in bash (1.14.3(1)) that calls the trap
-(trap $trapsigs;
+(trap - $trapsigs;
  echo '#include "sh.h"';
  echo '	{ QwErTy SIGNALS , "DUMMY" , "hook for number of signals" },';
  sed -e '/^[	 ]*#/d' -e 's/^[	 ]*\([^ 	][^ 	]*\)[	 ][	 ]*\(.*[^ 	]\)[ 	]*$/#ifdef SIG\1\
 	{ QwErTy SIG\1 , "\1", "\2" },\
 #endif/') > $in
 $CPP $in  > $out
-sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort +2n +0n |
+sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -k 3n -k 1n |
     sed 's/^[0-9]* //' |
     awk 'BEGIN { last=0; nsigs=0; }
 	{