Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2008 10:33:54 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        David Schultz <das@freebsd.org>
Cc:        arch@freebsd.org, Garrett Wollman <wollman@hergotha.csail.mit.edu>
Subject:   Re: Cleaning up FILE in stdio..
Message-ID:  <Pine.GSO.4.64.0802271030120.13743@sea.ntplx.net>
In-Reply-To: <20080227144303.GA79999@zim.MIT.EDU>
References:  <200802262251.m1QMp7bV021709@hergotha.csail.mit.edu> <200802262355.16519.jhb@freebsd.org> <20080227144303.GA79999@zim.MIT.EDU>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 27 Feb 2008, David Schultz wrote:

> On Tue, Feb 26, 2008, John Baldwin wrote:
>>> I think you have the right idea but this will break the ABI in a way
>>> that can't be fudged with symbol versioning.
> [...]
>> However, I can't fix the fact that our stdio can't handle fd's > SHRT_MAX
>> (again, glibc handles this just fine) w/o making a royal mess.  We could
>> create a new versioned FILE struct (so long as we can recognize the existing
>> FILE struct somehow) and have new fopen()/fdopen()/freopen() symbols that
>> return the new struct but then all the stdio routines would have to check to
>> see if the structure was an old structure explicitly and handle it
>> appropriately if so.  Rather gross.
>
> Symbol versioning also doesn't help the case where a FILE * gets
> passed from an app that's using the new symbol to another library
> that's using the old symbol, or vise versa. If you do wind up
> breaking the ABI again, maybe it's worth it to add an explicit
> version number in the FILE struct itself, so we never have to
> worry about this again.

If we are doing anything about this and modifying FILE, perhaps
we should also think about hiding all the innards of FILE, except
for the few fields that are required for the stdio macros.

-- 
DE



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