-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Jim Meyering on 5/31/2007 7:14 AM: > In coreutils, we'd also need a function to operate on a file descriptor, > like SET_BINARY does. Maybe SET_BINARY itself, after all.
The gnulib binary-io module provides SET_BINARY, and I'm not sure whether it was written before or after the SET_BINARY that used to live in coreutils' system.h; but yes, it is the correct thing to use when dealing with file descriptors. What was wrong was expecting SET_BINARY(fileno(fp)) to work, because the stdio library (at least on cygwin) also maintains some state as to whether the underlying fd is in text mode, and changing the underlying fd without notifying stdio causes problems. > 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. OK, give me some time to polish and post my patches, one to gnulib and one to coreutils. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGXst684KuGfSFAYARAr0OAKCQhvcxOOcyfXFRFcwd6h7M98bUVwCeKhbw c9ID167DVGImtGecgIlU5jU= =e+CA -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils