Eric Blake <address@hidden> writes:
> As it is, you will need a wrapper for freopen. At least Solaris 8 and cygwin
> 1.5.18 choke on the program below,
Solaris 8 won't choke with the way coreutils invokes it, since it
always looks something like this:
if (O_BINARY && ! isatty (STDIN_FILENO))
freopen (NULL, "rb", stdin);
and O_BINARY is zero in Solaris 8.
So we don't have to worry about this problem with traditional Unix
implementations; only with DOS-like ones.
> has broken coreutils CVS head on cygwin until we have a replacement freopen
> that can handle a NULL filename when the platform won't.
Is it easy to write an freopen wrapper for cygwin? And have it do the
isatty check as well? That way, we can migrate the "&& ! isatty
(fileno (stream))" part out of the mailine code.