Cleaning up FILE in stdio..

Garrett Wollman wollman at hergotha.csail.mit.edu
Wed Feb 27 05:15:01 UTC 2008


In article <Pine.GSO.4.64.0802262351060.11586 at sea.ntplx.net>,
Daniel Eischen <deischen at freebsd.org> writes:
>> [I 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.
>
>Well, you can if you add compat symbols for all functions with FILE
>as an argument.

In every library, including hundreds of third-party libraries that
pass FILE * arguments?  I don't think so.

What would work, although it would be extra pain, would be to extend
the structure.  It would be necessary to keep compatibility members of
the structure, in their old locations, and update them to reflect
state changes appropriately.  If the only thing that will change is
the width of _file, then that's probably a workable approach, since it
doesn't break anything that wasn't already broken in the presence of
FD 65536 anyway.  Applications aren't permitted to store objects of
type FILE, only FILE *, so this should be safe.

-GAWollman


More information about the freebsd-arch mailing list