Mail Archives: djgpp/2012/05/05/07:11:38
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 -