delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/08/01/10:34:10

From: wdoyle AT bode DOT cdsp DOT neu DOT edu (Patrick Doyle)
Subject: Re: Problem with diff3
1 Aug 1997 10:34:10 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199708011525.LAA00336.cygnus.gnu-win32@cdsp.neu.edu>
Original-To: David DOT Billinghurst AT restech DOT cra DOT com DOT au
Original-Cc: gnu-win32 AT cygnus DOT com
In-Reply-To: <D54B1932FFB4CF11B5C80000F8018BD27DE65D@CRCMAIL>
(David DOT Billinghurst AT restech DOT cra DOT com DOT au)
Original-Sender: owner-gnu-win32 AT cygnus DOT com

   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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019