Mail Archives: djgpp/2012/05/05/11:26:43
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
- Raw text -