Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Oct 2015 13:18:24 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        Xin Li <delphij@delphij.net>
Cc:        "Andrey A. Chernov" <ache@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r290110 - in head: include lib/libc/stdio
Message-ID:  <3167315.dHBYRLxVfB@ralph.baldwin.cx>
In-Reply-To: <5630EF2F.5080102@delphij.net>
References:  <201510281440.t9SEe2PR093917@repo.freebsd.org> <5630EF2F.5080102@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, October 28, 2015 08:52:15 AM Xin Li wrote:
> 
> On 10/28/15 07:40, Andrey A. Chernov wrote:
> > Author: ache
> > Date: Wed Oct 28 14:40:02 2015
> > New Revision: 290110
> > URL: https://svnweb.freebsd.org/changeset/base/290110
> > 
> > Log:
> >   Add _flags2 per jhb@ suggestion since no room left in _flags.
> >   Rewrite O_APPEND flag checking using new __S2OAP flag.
> 
> Is this ABI-safe?  (I was somewhat surprised that struct FILE is not
> opaque, which seems to be unavoidable because some methods are
> traditionally macros that have direct access to the members; the
> addition is done in the end of the structure so it looks like the change
> is safe).

I believe that adding new fields should be safe.  Allocating a static
FILE object in an application hasn't been supported in a long while.

However, we cannot make FILE fully opaque.  (I tried and had to revert
it.)  I have thought about using an #ifdef to hide all of the members
not marked for ABI compat though so that they are otherwise only
accessible to libc's implementation.  This is probably worth doing to
at least prevent accidental use of the internal fields.

-- 
John Baldwin



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