Binary I/O on stdin/stdout?

Doug Gwyn gwyn at brl-smoke.ARPA
Mon Mar 28 01:59:51 AEST 1988


In article <4250 at hoptoad.uucp> gnu at hoptoad.uucp (John Gilmore) writes:
>There seems to be *no way* to "reopen" these streams as binary.

That's right; on POSIX-conforming systems it makes no difference
but on oddball OSes it could.  However, on such OSes it seems
unlikely that processes would be nicely piped together anyway,
or that it would make sense for the application to tell the
system what type of file it was dealing with when the system had
actually set it up for the process.

There was a proposal for freopen((char*)0,mode,stream) to effect
a change of mode on an open stream, but several implementors
thought that switching modes in midstream could be difficult to
support on some systems.



More information about the Comp.lang.c mailing list