Subject: misc/33807: netbsd-current fails to compile on linux
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <dsean@charter.net>
List: netbsd-bugs
Date: 06/23/2006 13:20:02
>Number:         33807
>Category:       misc
>Synopsis:       netbsd-current fails to compile on linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 23 13:20:01 +0000 2006
>Originator:     Sean Davidson
>Release:        netbsd-current
>Organization:
>Environment:
Linux ncc1701 2.6.16-gentoo-r9 #1 SMP PREEMPT Mon Jun 5 09:12:02 EDT 2006 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GNU/Linux

>Description:
The bin/ksh/siglist.sh script has incomplete shell syntax and still
uses the old sort options that have been removed in newer linux
distro's.

>How-To-Repeat:
Build netbsd-current on gentoo/linux or redhat fedora core.

>Fix:
RCS file: /cvsroot/src/bin/ksh/siglist.sh,v
retrieving revision 1.2
diff -c -r1.2 siglist.sh
*** bin/ksh/siglist.sh  12 Jan 1997 19:12:18 -0000      1.2
--- bin/ksh/siglist.sh  23 Jun 2006 13:14:35 -0000
***************
*** 13,19 ****
  trapsigs='0 1 2 13 15'
  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;
--- 13,19 ----
  trapsigs='0 1 2 13 15'
  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;
***************
*** 23,29 ****
        { QwErTy SIG\1 , "\1", "\2" },\
  #endif/') > $in
  $CPP $in  > $out
! sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort +2n +0n |
      sed 's/^[0-9]* //' |
      awk 'BEGIN { last=0; nsigs=0; }
        {
--- 23,29 ----
        { QwErTy SIG\1 , "\1", "\2" },\
  #endif/') > $in
  $CPP $in  > $out
! sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -k3n -k1n |
      sed 's/^[0-9]* //' |
      awk 'BEGIN { last=0; nsigs=0; }
        {