OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../pdksh/sort-trap.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Hm. I find the resulting output a bit unlogic - but it is exactly the same
  17. with the old options and an old sort. So this "chaotic" sort might have
  18. been intended - or always been buggy ...
  19. Also fixed the trap usage.
  20. - Rene Rebe <rene@exactcode.de>
  21. --- pdksh-5.2.14/siglist.sh.orig 1996-09-18 18:52:41.000000000 +0200
  22. +++ pdksh-5.2.14/siglist.sh 2004-05-05 02:41:53.000000000 +0200
  23. @@ -11,19 +11,19 @@
  24. out=tmpo$$.c
  25. ecode=1
  26. trapsigs='0 1 2 13 15'
  27. -trap 'rm -f $in $out; trap 0; exit $ecode' $trapsigs
  28. +trap 'rm -f $in $out; trap - 0; exit $ecode' $trapsigs
  29. CPP="${1-cc -E}"
  30. # The trap here to make up for a bug in bash (1.14.3(1)) that calls the trap
  31. -(trap $trapsigs;
  32. +(trap - $trapsigs;
  33. echo '#include "sh.h"';
  34. echo ' { QwErTy SIGNALS , "DUMMY" , "hook for number of signals" },';
  35. sed -e '/^[ ]*#/d' -e 's/^[ ]*\([^ ][^ ]*\)[ ][ ]*\(.*[^ ]\)[ ]*$/#ifdef SIG\1\
  36. { QwErTy SIG\1 , "\1", "\2" },\
  37. #endif/') > $in
  38. $CPP $in > $out
  39. -sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort +2n +0n |
  40. +sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -n -k 2 |
  41. sed 's/^[0-9]* //' |
  42. awk 'BEGIN { last=0; nsigs=0; }
  43. {