+2007-01-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ * zdiff.in (cmp0): New var.
+ Rewrite test for /dev/fd/3 to detect bugs in Solaris 8
+ /bin/bash 2.03. Problem reported by Nelson H. F. Beebe in
+ <http://lists.gnu.org/archive/html/bug-gzip/2007-01/msg00001.html>.
+ Avoid "for file; do", which doesn't work with Solaris 8 /bin/sh.
+
2007-01-03 Paul Eggert <eggert@cs.ucla.edu>
* zdiff.in: Test /dev//fd/3, not /dev/fd/3, to work around a problem
*cmp) prog=cmp ; cmp='${CMP-cmp}' ;;
*) prog=diff; cmp='${DIFF-diff}';;
esac
+cmp0=$cmp
version="z$prog (gzip) @VERSION@
Copyright (C) 2006 Free Software Foundation, Inc.
done
cmp="$cmp --"
-for file; do
+for file
+do
test "X$file" = X- || <"$file" || exit 2
done
*[-.]gz* | *[-.][zZ] | *.t[ga]z | -)
if test "$1$2" = --; then
gzip -cdfq - | eval "$cmp" - -
- # The extra slash in /dev//fd works around a problem with
- # Tru64 4.0F ksh M-11/16/88f.
- elif test -r /dev//fd/3 3</dev/null; then
+ elif
+ # Reject Solaris 8's buggy /bin/bash 2.03.
+ echo X |
+ (echo X | eval "$cmp0" /dev/fd/3 - >/dev/null 2>&1) \
+ 3<&0
+ then
gzip -cdfq -- "$1" |
(gzip -cdfq -- "$2" |
eval "$cmp" /dev/fd/3 -) 3<&0