diff -uNr gcc-3.3-20030510.orig/boehm-gc/config.guess gcc-3.3-20030510/boehm-gc/config.guess --- gcc-3.3-20030510.orig/boehm-gc/config.guess 2002-02-12 15:37:53.000000000 +1100 +++ gcc-3.3-20030510/boehm-gc/config.guess 2003-05-10 14:44:06.000000000 +1000 @@ -340,7 +340,7 @@ echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=`(head -n 1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) @@ -509,7 +509,7 @@ fi exit 0 ;; *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -n 1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else diff -uNr gcc-3.3-20030510.orig/configure gcc-3.3-20030510/configure --- gcc-3.3-20030510.orig/configure 2002-09-30 02:11:24.000000000 +1000 +++ gcc-3.3-20030510/configure 2003-05-10 14:44:07.000000000 +1000 @@ -820,7 +820,7 @@ s/\\\n//g t loop /^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc - CC=`tail -1 Makefile.cc` + CC=`tail -n 1 Makefile.cc` rm -f Makefile.cc fi @@ -830,7 +830,7 @@ s/\\\n//g t loop /^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc - CFLAGS=`tail -1 Makefile.cc` + CFLAGS=`tail -n 1 Makefile.cc` rm -f Makefile.cc fi @@ -840,7 +840,7 @@ s/\\\n//g t loop /^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc - CXX=`tail -1 Makefile.cc` + CXX=`tail -n 1 Makefile.cc` rm -f Makefile.cc fi @@ -850,7 +850,7 @@ s/\\\n//g t loop /^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc - CXXFLAGS=`tail -1 Makefile.cc` + CXXFLAGS=`tail -n 1 Makefile.cc` rm -f Makefile.cc fi @@ -931,7 +931,7 @@ t loop /^'"${var}"'[ ]*=/ s/'"${var}"'[ ]*=[ ]*\(.*\)/\1/p' \ < Makefile > Makefile.v - t=`tail -1 Makefile.v` + t=`tail -n 1 Makefile.v` if [ -n "${t}" ]; then eval "${var}=\${t}" fi diff -uNr gcc-3.3-20030510.orig/contrib/test_summary gcc-3.3-20030510/contrib/test_summary --- gcc-3.3-20030510.orig/contrib/test_summary 2002-05-17 03:41:58.000000000 +1000 +++ gcc-3.3-20030510/contrib/test_summary 2003-05-10 14:44:07.000000000 +1000 @@ -98,7 +98,7 @@ srcdir = $1; gsub(/\/configure$/, "", srcdir); printf "LAST_UPDATED: "; - system("tail -1 " srcdir "/LAST_UPDATED"); + system("tail -n 1 " srcdir "/LAST_UPDATED"); print ""; $1 = "configure flags:"; configflags = $0; diff -uNr gcc-3.3-20030510.orig/gcc/configure gcc-3.3-20030510/gcc/configure --- gcc-3.3-20030510.orig/gcc/configure 2003-04-04 19:17:46.000000000 +1000 +++ gcc-3.3-20030510/gcc/configure 2003-05-10 14:44:09.000000000 +1000 @@ -7483,7 +7483,7 @@ # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for. Look for # the date string after the version number. - ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` + ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -n 1` if echo "$ld_ver" | grep GNU > /dev/null; then ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'` ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` @@ -7559,7 +7559,7 @@ # ??? There exists an elf-specific test that will crash # the assembler. Perhaps it's better to figure out whether # arbitrary sections are supported and try the test. - as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` + as_ver=`$gcc_cv_as --version 2>/dev/null | head -n 1` if echo "$as_ver" | grep GNU > /dev/null; then as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` as_major=`echo $as_ver | sed 's/\..*//'` @@ -7588,7 +7588,7 @@ fi elif test x$gcc_cv_as != x; then # Check if this is GAS. - as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` + as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -n 1` rm -f a.out 2> /dev/null if echo "$as_ver" | grep GNU > /dev/null; then # Versions up to and including 2.11.0 may mis-optimize @@ -7641,7 +7641,7 @@ # and we got the correct data, then succeed. if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ - | tail -3 > conftest.got \ + | tail -n 3 > conftest.got \ && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ || cmp conftest.big conftest.got > /dev/null 2>&1; } then diff -uNr gcc-3.3-20030510.orig/gcc/configure.in gcc-3.3-20030510/gcc/configure.in --- gcc-3.3-20030510.orig/gcc/configure.in 2003-04-04 19:17:46.000000000 +1000 +++ gcc-3.3-20030510/gcc/configure.in 2003-05-10 14:44:10.000000000 +1000 @@ -1614,7 +1614,7 @@ # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for. Look for # the date string after the version number. - ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` + ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -n 1` if echo "$ld_ver" | grep GNU > /dev/null; then changequote(,)dnl ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'` @@ -1689,7 +1689,7 @@ # ??? There exists an elf-specific test that will crash # the assembler. Perhaps it's better to figure out whether # arbitrary sections are supported and try the test. - as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` + as_ver=`$gcc_cv_as --version 2>/dev/null | head -n 1` if echo "$as_ver" | grep GNU > /dev/null; then changequote(,)dnl as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` @@ -1717,7 +1717,7 @@ fi elif test x$gcc_cv_as != x; then # Check if this is GAS. - as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` + as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -n 1` rm -f a.out 2> /dev/null if echo "$as_ver" | grep GNU > /dev/null; then # Versions up to and including 2.11.0 may mis-optimize @@ -1770,7 +1770,7 @@ # and we got the correct data, then succeed. if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ - | tail -3 > conftest.got \ + | tail -n 3 > conftest.got \ && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ || cmp conftest.big conftest.got > /dev/null 2>&1; } then diff -uNr gcc-3.3-20030510.orig/gcc/Makefile.in gcc-3.3-20030510/gcc/Makefile.in --- gcc-3.3-20030510.orig/gcc/Makefile.in 2003-04-23 01:50:48.000000000 +1000 +++ gcc-3.3-20030510/gcc/Makefile.in 2003-05-10 14:44:08.000000000 +1000 @@ -3476,16 +3476,16 @@ -rm -f .bad_compare case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ for file in *$(objext); do \ - tail +16c ./$$file > tmp-foo1; \ - tail +16c stage$$stage/$$file > tmp-foo2 \ + tail -c +16 ./$$file > tmp-foo1; \ + tail -c +16 stage$$stage/$$file > tmp-foo2 \ && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ done case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ for dir in tmp-foo intl $(SUBDIRS); do \ if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ for file in $$dir/*$(objext); do \ - tail +16c ./$$file > tmp-foo1; \ - tail +16c stage$$stage/$$file > tmp-foo2 \ + tail -c +16 ./$$file > tmp-foo1; \ + tail -c +16 stage$$stage/$$file > tmp-foo2 \ && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ done; \ else true; fi; \ diff -uNr gcc-3.3-20030510.orig/libjava/acinclude.m4 gcc-3.3-20030510/libjava/acinclude.m4 --- gcc-3.3-20030510.orig/libjava/acinclude.m4 2003-02-01 05:01:17.000000000 +1100 +++ gcc-3.3-20030510/libjava/acinclude.m4 2003-05-10 14:44:10.000000000 +1000 @@ -279,8 +279,8 @@ AC_MSG_CHECKING(whether 'ld' is at least 2.13) LD_PROG=`$CC --print-prog-name=ld` LD_VERSION=`$LD_PROG --version` -LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4` -LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2` +LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4` +LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2` if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then LD_OK="ok" else diff -uNr gcc-3.3-20030510.orig/libjava/aclocal.m4 gcc-3.3-20030510/libjava/aclocal.m4 --- gcc-3.3-20030510.orig/libjava/aclocal.m4 2003-02-01 05:01:17.000000000 +1100 +++ gcc-3.3-20030510/libjava/aclocal.m4 2003-05-10 14:44:10.000000000 +1000 @@ -291,8 +291,8 @@ AC_MSG_CHECKING(whether 'ld' is at least 2.13) LD_PROG=`$CC --print-prog-name=ld` LD_VERSION=`$LD_PROG --version` -LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4` -LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2` +LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4` +LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2` if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then LD_OK="ok" else diff -uNr gcc-3.3-20030510.orig/libjava/configure gcc-3.3-20030510/libjava/configure --- gcc-3.3-20030510.orig/libjava/configure 2003-03-29 10:42:55.000000000 +1100 +++ gcc-3.3-20030510/libjava/configure 2003-05-10 14:44:12.000000000 +1000 @@ -2965,8 +2965,8 @@ echo "configure:2966: checking whether 'ld' is at least 2.13" >&5 LD_PROG=`$CC --print-prog-name=ld` LD_VERSION=`$LD_PROG --version` -LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4` -LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2` +LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4` +LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2` if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then LD_OK="ok" else diff -uNr gcc-3.3-20030510.orig/libstdc++-v3/acinclude.m4 gcc-3.3-20030510/libstdc++-v3/acinclude.m4 --- gcc-3.3-20030510.orig/libstdc++-v3/acinclude.m4 2003-05-02 06:41:14.000000000 +1000 +++ gcc-3.3-20030510/libstdc++-v3/acinclude.m4 2003-05-10 14:44:12.000000000 +1000 @@ -315,7 +315,7 @@ # Start by getting the version number. I think the libtool test already # does some of this, but throws away the result. changequote(,) - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` changequote([,]) glibcpp_gnu_ld_version=`echo $ldver | \ diff -uNr gcc-3.3-20030510.orig/libstdc++-v3/aclocal.m4 gcc-3.3-20030510/libstdc++-v3/aclocal.m4 --- gcc-3.3-20030510.orig/libstdc++-v3/aclocal.m4 2003-05-02 06:41:14.000000000 +1000 +++ gcc-3.3-20030510/libstdc++-v3/aclocal.m4 2003-05-10 14:44:13.000000000 +1000 @@ -327,7 +327,7 @@ # Start by getting the version number. I think the libtool test already # does some of this, but throws away the result. changequote(,) - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` changequote([,]) glibcpp_gnu_ld_version=`echo $ldver | \ diff -uNr gcc-3.3-20030510.orig/libstdc++-v3/configure gcc-3.3-20030510/libstdc++-v3/configure --- gcc-3.3-20030510.orig/libstdc++-v3/configure 2003-05-02 12:37:25.000000000 +1000 +++ gcc-3.3-20030510/libstdc++-v3/configure 2003-05-10 14:44:17.000000000 +1000 @@ -4285,7 +4285,7 @@ # Start by getting the version number. I think the libtool test already # does some of this, but throws away the result. - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -5285,7 +5285,7 @@ # Start by getting the version number. I think the libtool test already # does some of this, but throws away the result. - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -6265,7 +6265,7 @@ # Start by getting the version number. I think the libtool test already # does some of this, but throws away the result. - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -7255,7 +7255,7 @@ # Start by getting the version number. I think the libtool test already # does some of this, but throws away the result. - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -8259,7 +8259,7 @@ # Start by getting the version number. I think the libtool test already # does some of this, but throws away the result. - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -9154,7 +9154,7 @@ # Start by getting the version number. I think the libtool test already # does some of this, but throws away the result. - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -10638,7 +10638,7 @@ # Start by getting the version number. I think the libtool test already # does some of this, but throws away the result. - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ diff -uNr gcc-3.3-20030510.orig/libstdc++-v3/mkcheck.in gcc-3.3-20030510/libstdc++-v3/mkcheck.in --- gcc-3.3-20030510.orig/libstdc++-v3/mkcheck.in 2002-06-08 06:25:04.000000000 +1000 +++ gcc-3.3-20030510/libstdc++-v3/mkcheck.in 2003-05-10 14:44:17.000000000 +1000 @@ -181,9 +181,9 @@ function size_command() { case $1 in - TEXT) TEXT=$(size -B $EXENAME | tail -1 | awk '{print $1}') ;; - DATA) DATA=$(size -B $EXENAME | tail -1 | awk '{print $2}') ;; - SIZE) SIZE=$(size -B $EXENAME | tail -1 | awk '{print $4}') ;; + TEXT) TEXT=$(size -B $EXENAME | tail -n 1 | awk '{print $1}') ;; + DATA) DATA=$(size -B $EXENAME | tail -n 1 | awk '{print $2}') ;; + SIZE) SIZE=$(size -B $EXENAME | tail -n 1 | awk '{print $4}') ;; esac } else diff -uNr gcc-3.3-20030510.orig/ltcf-c.sh gcc-3.3-20030510/ltcf-c.sh --- gcc-3.3-20030510.orig/ltcf-c.sh 2002-08-14 12:39:52.000000000 +1000 +++ gcc-3.3-20030510/ltcf-c.sh 2003-05-10 14:44:17.000000000 +1000 @@ -153,7 +153,7 @@ # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! - archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then + archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; diff -uNr gcc-3.3-20030510.orig/ltcf-gcj.sh gcc-3.3-20030510/ltcf-gcj.sh --- gcc-3.3-20030510.orig/ltcf-gcj.sh 2003-02-20 11:36:49.000000000 +1100 +++ gcc-3.3-20030510/ltcf-gcj.sh 2003-05-10 14:44:17.000000000 +1000 @@ -156,7 +156,7 @@ # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! - archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then + archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def;