bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cat bug on cygwin


From: Eric Blake
Subject: Re: cat bug on cygwin
Date: Thu, 31 May 2007 07:19:54 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666

-----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             address@hidden
-----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-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]