Subject: Re: Problem with diff3
From: [email-masked] (Patrick Doyle)

1 Aug 1997 10:34:10 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Original-To: [email-masked]
Original-Cc: [email-masked]
In-Reply-To: <D54B1932FFB4CF11B5C80000F8018BD27DE65D@CRCMAIL>
	([email-masked])
Original-Sender: [email-masked]

   I have (successfully) build rcs-5.7 using gnuwin32 b18. 
   Configure failed due to a problem with diff3

   To reproduce the error

   echo 0 > conftest0
   echo 1 > conftest1
   diff3 -E -m -L 0 -L 1 -L 2 conftest0 conftest1 /dev/null

   On ultrix 4.3 and Irix 6.2 I get
   <<<<<<< 0
   0
   =======
   >>>>>>> 2

   With win95 and gnuwin32 b18 I get
   diff3: /dev/null: No such file or directory

The problem is that "diff3" attempts to perform a 'stat()' system call
on each of the file names and 'stat()' fails (returns ENOENT) for
"/dev/null".  You can fix this at least four different ways:

1) Change offending line to read (something like):
   cat /dev/null | diff3 -E -m -L 0 -L 1 -L 2 conftest0 conftest1 -

2) Change the offending line to read (something like):
   diff3 -E -m -L 0 -L 1 -L 2 conftest0 conftest1 NUL

3) Change "diff3" to compare the filename to be opened with
   "/dev/null" and not call 'stat()' if they are equal.  (It's a hack,
   but it solves the problem).

4) Change the implementation of 'stat()' in CYGWIN32.DLL to produce
   the correct (i.e. unix-like) result for files called "/dev/null".
   I believe that 'open()' already does this.

-- 
--patrick

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".