X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Authenticated: #27081556 X-Provags-ID: V01U2FsdGVkX19IZ8BJXDlIV9dWRsJWp0Q4+/dstJU54L5Jpv2+hH 7IaZspTGSJEsab From: Juan Manuel Guerrero To: Eli Zaretskii 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: <834nru6g14.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201205051726.28054.juan.guerrero@gmx.de> 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 dif32s.zip. 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. Regards, Juan M. Guerrero