Thomas Koutcher <[EMAIL PROTECTED]> writes:

> On Tru64 4.0F zdiff is using ksh Version M-11/16/88f. ksh has some support for
> the syntax /dev/fd/n and thus the command "test -r /dev/fd/3 3</dev/null"
> returns 0 but this syntax does not work for external commands

Thanks for reporting that.  Can you please try the following patch
instead?  It should be one fewer system call.  I installed it, as it
shouldn't hurt, but if possible I'd like you to verify that it
actually works on your host.  Thanks.

2007-01-03  Paul Eggert  <[EMAIL PROTECTED]>

        * zdiff.in: Test /dev//fd/3, not /dev/fd/3, to work around a problem
        with Tru64 4.0F ksh M-11/16/88f reported by Thomas Koutcher in
        <http://lists.gnu.org/archive/html/bug-gzip/2007-01/msg00000.html>.

--- zdiff.in    24 Dec 2006 04:14:57 -0000      1.6
+++ zdiff.in    4 Jan 2007 05:23:48 -0000
@@ -65,7 +65,9 @@ elif test $# -eq 2; then
                *[-.]gz* | *[-.][zZ] | *.t[ga]z | -)
                    if test "$1$2" = --; then
                        gzip -cdfq - | eval "$cmp" - -
-                   elif test -r /dev/fd/3 3</dev/null; then
+                   # 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
                        gzip -cdfq -- "$1" |
                          (gzip -cdfq -- "$2" |
                           eval "$cmp" /dev/fd/3 -) 3<&0


Reply via email to