Eric Blake <[EMAIL PROTECTED]> wrote:
...
> I'm wondering if we could just add something like this to the binary-io
> module, which we can then update as needed to compensate for any other
> irregularities discovered in swapping stdio to binary mode:
>
> /* Make sure FP is in binary mode.  Return FP on success,
>    NULL on failure.  */
> FILE *
> fsetbinary (FILE *fp)

In coreutils, we'd also need a function to operate on a file descriptor,
like SET_BINARY does.  Maybe SET_BINARY itself, after all.  I know
Paul eradicated all uses of SET_BINARY in coreutils a couple years ago,
but since there's an actual problem now, and all of this code will be
compiled out for unix-based systems, I have no qualms about going back
to the use of SET_BINARY.

Eric, do you feel like doing this?
It'd be great if you would also add a test or two that
demonstrate how the current implementations fail on Cygwin.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to