Mail Archives: djgpp/2012/05/05/11:26:43

X-Authentication-Warning: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Authenticated: #27081556
X-Provags-ID: V01U2FsdGVkX19IZ8BJXDlIV9dWRsJWp0Q4+/dstJU54L5Jpv2+hH
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
To: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: cmp in DJGPP port of Diffutils 3.2
Date: Sat, 5 May 2012 17:26:27 +0200
User-Agent: KMail/1.9.10
Cc: djgpp AT delorie DOT com
References: <834nru6g14 DOT fsf AT gnu DOT org>
In-Reply-To: <>
MIME-Version: 1.0
Message-Id: <>
X-Y-GMX-Trusted: 0

Am Samstag, 5. Mai 2012 schrieb Eli Zaretskii:
> 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.)

This is simply a bug,  I missed this.  I will switch stdin to binary mode as
long as it is not connected to the console..

> 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

Another bug.  For some reason I do not remember I have forgotten to include
the diffs file.

> Apologies if I missed something.

Thank you for reporting the issues.  I will fix this ASAP.

Juan M. Guerrero

- Raw text -

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