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

John Baldwin jhb at freebsd.org
Thu May 8 12:36:44 UTC 2008


On Wednesday 07 May 2008 07:11:09 pm Alfred Perlstein wrote:
> * Maxim Sobolev <sobomax at FreeBSD.org> [080507 15:05] wrote:
> > Alfred Perlstein wrote:
> > >>It appears that autoconf only believes a type is real if you can
> > >> typedef it to another type, cast 0 to a valid pointer to the new
> > >> typedef'd type, and do a sizeof() of the typdef'd type.  The last is
> > >> where having an opaque type breaks down for scripts that want to make
> > >> sure FILE is a real type.
> > >
> > >Oh c'mon!  we're going to revert this needed fix just because of
> > >autoconf?
> > >
> > >By the time 8.0 rolls around, autoconf will be fixed and there
> > >will be some standard patch/workaround for old autoconf.
> > >
> > >Let's just roll forward with this.  We've needed it for years.
> >
> > Can you please explain the "needed" part? What are gains apart from pure
> > aesthetics and removing some type dependency from libc that otherwise
> > needs to know actual storage type of pthread_t&Co? Neither is worth
> > breaking zillion autoconf scripts out there IMHO (not everybody uses up
> > to date ports and ports in general!).
>
> My understanding is that we are stuck with a max 16k stdio descriptors
> until we rev the structure.

This doesn't require FILE being opaque.  I will still fix this, and even if I 
was able to make FILE opaque the old 16-bit _file field would still have to 
exist and be valid (for some value of valid) pretty much forever because 
libc.so.7 users in 7.0 already use it directly.

> Regarding the API rev, this is in CURRENT, and we can change things.

Since we don't bump the libc major rev anymore with symbol versioning, we are 
stuck with the ABI of the FILE fields that were ever used directly pretty 
much forever.

> I don't think a few base utils AND autoconf is reason to abort this
> direction.

I think it is telling that other OS's don't make FILE opaque either.  I 
originally tried it because I thought glibc's FILE was opaque, but I had 
misparsed the maze of headers and #ifdef's and their FILE is open as well.

-- 
John Baldwin


More information about the cvs-src mailing list