Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2008 08:16:17 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        Maxim Sobolev <sobomax@freebsd.org>, src-committers@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org
Subject:   Re: 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
Message-ID:  <200805080816.18083.jhb@freebsd.org>
In-Reply-To: <20080508074041.GM7293@server.vk2pj.dyndns.org>
References:  <200805051603.m45G3rrN089219@repoman.freebsd.org> <48222782.7000303@FreeBSD.org> <20080508074041.GM7293@server.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805080816.18083.jhb>