Mail Archives: cygwin-developers/2002/08/26/10:38:19
--=-SiP1R21S2BPg/zp+uwQX
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
On Tue, 2002-08-27 at 00:29, Corinna Vinschen wrote:
> On Mon, Aug 26, 2002 at 03:20:00PM +0100, Conrad Scott wrote:
> > "Christopher Faylor" <cgf AT redhat DOT com> wrote:
> > > There shouldn't really be that much overhead to the current
> > method for
> > > handling text/binary reads, though. It's just checking a bit
> > field.
> >=20
> > At the coal-face it ends up being a bit more messy than that. For
> > example, the fhandler::read code checks the readahead buffers for
> > pending data but they will always be empty in binary-mode (AFAIK)
> > . In fact there's a page of code before the check for whether a
> > binary read is being done and only then does the code escape back
> > to the caller. Since (AFAIK) you can't change the text/binary
> > mode of an fd once it's been opened (and thus the readahead
>=20
> You can. setmode(fd, O_TEXT); or setmode(fd, O_BINARY);
Which is why I was suggesting stripping O_TEXT capability for raw FD's,
and making the TEXT translation only ever apply to the FILE * calls -
fprintf, fscanf, fread etc...
It allows all the fd level code to be much much simpler.
Rob
--=-SiP1R21S2BPg/zp+uwQX
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQA9aj1RI5+kQ8LJcoIRAm6OAJ4s5FLVCRqiCKgBbGyx2VPpayJDOACggkHk
GaH3QLrAraso6xJ9hwPaywQ=
=WTBD
-----END PGP SIGNATURE-----
--=-SiP1R21S2BPg/zp+uwQX--
- Raw text -