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:45 UTC 2008


On Thursday 08 May 2008 03:40:41 am Peter Jeremy wrote:
> On Wed, May 07, 2008 at 03:04:50PM -0700, Maxim Sobolev wrote:
> >Can you please explain the "needed" part?
>
> - The file struct is in two pieces: struct __sFILE and struct __sFILEX
>   This is at best a wart.

This is already fixed.

> - stdio currently only supports file descriptors <=32767.

This will soon be fixed.

> > What are gains apart from pure aesthetics
>
> "data-hiding" is a standard technique.  Making FILE opaque means that
> future changes can be made without impacting altering the ABI.

This was the real reason.  Fixing the file descriptor bit will involve some 
ABI hacks because of the inlining, etc. in the current implementation.  
Removing the inlining and transparency of FILE would avoid the need for 
similar hacks in the future.

-- 
John Baldwin


More information about the cvs-src mailing list