From 132434d3e637810147392363e6826a0338474868 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 12 Sep 2004 13:24:23 +0000 Subject: [PATCH] Clifford Wolf: Fixed pdksh for bash-3.0 [2004090418535502001] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@4146 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/pdksh/siglist.patch | 25 +++++++++++++++++++++++++ package/base/pdksh/sort-use.patch | 18 ------------------ 2 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 package/base/pdksh/siglist.patch delete mode 100644 package/base/pdksh/sort-use.patch diff --git a/package/base/pdksh/siglist.patch b/package/base/pdksh/siglist.patch new file mode 100644 index 000000000..c58fa92b3 --- /dev/null +++ b/package/base/pdksh/siglist.patch @@ -0,0 +1,25 @@ +--- ./siglist.sh.orig 1996-09-18 18:52:41.000000000 +0200 ++++ ./siglist.sh 2004-09-04 18:35:17.346755840 +0200 +@@ -11,19 +11,19 @@ + out=tmpo$$.c + ecode=1 + trapsigs='0 1 2 13 15' +-trap 'rm -f $in $out; trap 0; exit $ecode' $trapsigs ++trap 'rm -f $in $out; trap - 0; exit $ecode' $trapsigs + + 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 -n -k 2 | + sed 's/^[0-9]* //' | + awk 'BEGIN { last=0; nsigs=0; } + { diff --git a/package/base/pdksh/sort-use.patch b/package/base/pdksh/sort-use.patch deleted file mode 100644 index 9d46e55b7..000000000 --- a/package/base/pdksh/sort-use.patch +++ /dev/null @@ -1,18 +0,0 @@ - -Hm. I find the resulting output a bit unlogic - but it is exactly the same -with the old options and an old sort. So this "chaotic" sort might have -been intended - or always been buggy ... - - - Rene Rebe - ---- pdksh-5.2.14/siglist.sh.orig 1996-09-18 18:52:41.000000000 +0200 -+++ pdksh-5.2.14/siglist.sh 2004-05-05 02:41:53.000000000 +0200 -@@ -23,7 +23,7 @@ - { 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 -n -k 2 | - sed 's/^[0-9]* //' | - awk 'BEGIN { last=0; nsigs=0; } - {