cvs commit: src/include stdio.h src/lib/libc/stdio clrerr.c feof.c ferror.c fileno.c getc.c getchar.c local.h putc.c putchar.c xprintf.c

Garrett Wollman wollman at bimajority.org
Thu May 8 02:01:30 UTC 2008


<<On Wed, 7 May 2008 16:14:44 -0700, Alfred Perlstein <alfred at FreeBSD.org> said:

> I don't think that's really fair, stdio has had adequate accessors
> for a long time

Actually, no it hasn't.  std stdio does not provide visibility into
its internal buffering state so that implementations would not be
constrained.  This does not mean that useful applications would never
want to access this information, only that accessing it is not
Portable-with-a-capital-P.  (Many of these applications implement
things which are inherently not Portable anyway, like garbage
collection.)

I like the idea of making FILE opaque, in the abstract, but it does
come with some very real costs, and if we're not prepared to pay those
costs, we need to leave FILE translucent at the very least.  (At least
we can be certain that only the library ever allocates a FILE object,
which isn't the case for some other warty interfaces.)

-GAWollman


More information about the cvs-src mailing list