This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix uc_* namespace (bug 21457)
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Wed, 9 Aug 2017 14:30:54 -0300
- Subject: Re: Fix uc_* namespace (bug 21457)
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1708091559300.18502@digraph.polyomino.org.uk>
On 09/08/2017 12:59, Joseph Myers wrote:
> The standard members of ucontext_t, in all standard versions with that
> type, are uc_link, uc_sigmask, uc_stack and uc_mcontext.
>
> The uc_* namespace is mostly reserved for additions to the structure.
> However, in XPG4.2, it's only reserved when <ucontext.h> is included,
> not when <signal.h> is included, while <signal.h> is required to
> define ucontext_t (but not allowed to make visible other symbols from
> <ucontext.h>). Thus, nonstandard members should avoid uc_* names.
> Some already do use __uc_*, but others don't; most architectures (all
> except ia64, I think) have a member uc_flags and some have additional
> members beyond that.
>
> This patch makes nonstandard members have an __ prefix unless
> __USE_MISC is defined. Members whose names indicate they are solely
> padding / reserved for future use are renamed unconditionally to use
> the __glibc_reserved1 naming convention.
>
> This is part of the preparation for a revised version of the
> mcontext_t / sigcontext patch to be able to eliminate all 13 of the
> miscellaneous XFAILs in conform/Makefile, rather than only 11 of them
> as at present (at least one further fix on top of this one will be
> needed for that as well).
>
> Tested for x86_64, and with build-many-glibcs.py.
LGTM.