diff options
-rwxr-xr-x | camlp4/tools/apply.sh | 7 | ||||
-rwxr-xr-x | camlp4/tools/camlp4_comm.sh | 5 | ||||
-rwxr-xr-x | camlp4/tools/conv.sh | 2 | ||||
-rwxr-xr-x | config/gnu/config.guess | 6 |
4 files changed, 12 insertions, 8 deletions
diff --git a/camlp4/tools/apply.sh b/camlp4/tools/apply.sh index b9b14e699f..078b1d501e 100755 --- a/camlp4/tools/apply.sh +++ b/camlp4/tools/apply.sh @@ -11,9 +11,12 @@ while test "" != "$1"; do shift done -head -1 $FILE >/dev/null 2>&1 || exit 1 +# FILE must exist and be non empty (at least one line) +test -s "$FILE" || exit 1 -set - `head -1 $FILE` + + +set - `awk 'NR == 1' "$FILE"` if test "$2" = "camlp4r" -o "$2" = "camlp4"; then COMM="../boot/$2 -nolib -I ../boot -I ../etc" shift; shift diff --git a/camlp4/tools/camlp4_comm.sh b/camlp4/tools/camlp4_comm.sh index 0b0cab1dda..b6bb8f87ed 100755 --- a/camlp4/tools/camlp4_comm.sh +++ b/camlp4/tools/camlp4_comm.sh @@ -13,9 +13,10 @@ while test "" != "$1"; do shift done -head -1 $FILE >/dev/null || exit 1 +# FILE must exist and be non empty (at least one line) +test -s "$FILE" || exit 1 -set - `head -1 $FILE` +set - `awk 'NR == 1' "$FILE"` if test "$2" = "camlp4r" -o "$2" = "camlp4"; then COMM="ocamlrun$EXE ../boot/$2$EXE -nolib -I ../boot" if test "`basename $OTOP`" != "ocaml_stuff"; then diff --git a/camlp4/tools/conv.sh b/camlp4/tools/conv.sh index 98ba728f50..64a4e2b1d3 100755 --- a/camlp4/tools/conv.sh +++ b/camlp4/tools/conv.sh @@ -11,7 +11,7 @@ while test "" != "$1"; do shift done -set - `head -1 $FILE` +set - `awk 'NR == 1' "$FILE"` if test "$2" = "camlp4r" -o "$2" = "camlp4"; then COMM="$OTOP/boot/ocamlrun $DIR/../boot/$2 -nolib -I $DIR/../boot $INCL $DIR/../etc/pr_o.cmo" shift; shift diff --git a/config/gnu/config.guess b/config/gnu/config.guess index 7620ff9441..4a903edf44 100755 --- a/config/gnu/config.guess +++ b/config/gnu/config.guess @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. -timestamp='2001-06-25' +timestamp='2003-11-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -314,7 +314,7 @@ EOF 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=`(cat /etc/motd | awk 'NR == 1 {print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) @@ -496,7 +496,7 @@ EOF 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 | awk 'NR == 1 { print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else |