delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2012/05/05/07:11:38

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Date: Sat, 05 May 2012 14:09:11 +0300
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: cmp in DJGPP port of Diffutils 3.2
X-012-Sender: halo1 AT inter DOT net DOT il
To: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
Cc: djgpp AT delorie DOT com
Message-id: <834nru6g14.fsf@gnu.org>
Reply-To: djgpp AT delorie DOT com

The following command fails in the ported Diffutils:

 cat FOO | cmp FOO -
 h:/test/bin/cmp: failed to reopen `stdin' with mode `rb': Not supported

(FOO can be any file; I used cmp.exe itself.)

This is on Windows XP, but I think it should fail on any system,
because this version of Diffutils does the following:

      if (STREQ (file[f1], "-"))
	{
	  file_desc[f1] = STDIN_FILENO;
	  if (O_BINARY && ! isatty (STDIN_FILENO))
	    xfreopen (NULL, "rb", stdin);
	}

However, xfreopen just calls reopen, whose DJGPP implementation
doesn't support NULL as the first argument, not even in the current
development version of the library.  (The expected result of such a
call is to switch the existing stdin stream to binary mode.)

The announcement of the ported Diffutils said, inter alia:

  As usual, all djgpp specific files (config.bat, diffs, README files, etc.)
  are located in the /djgpp subdir.

But there's no file named "diffs", or anything to that effect, in the
djgpp subdirectory in dif32s.zip.

Apologies if I missed something.

- Raw text -


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