Rename struct ucontext tag (bug 21457)

Florian Weimer fweimer@redhat.com
Tue Jun 13 06:49:00 GMT 2017


On 06/13/2017 01:58 AM, Joseph Myers wrote:
> The ucontext_t type has a tag struct ucontext.  As with previous such
> issues for siginfo_t and stack_t, this tag is not permitted by POSIX
> (is not in a reserved namespace), and so namespace conformance means
> breaking C++ name mangling for this type.

I don't see a reference in Fedora to a _Z*ucontext* symbol, so I don't
expect any ABI problems.

> In this case, the type does need to have some tag rather than just a
> typedef name, because it includes a pointer to itself.  This patch
> uses struct ucontext_t as the new tag, so the type is mangled as
> ucontext_t (the POSIX *_t reservation applies in all namespaces, not
> just the namespace of ordinary identifiers).  Another reserved name
> such as struct __ucontext could of course be used.

How widely known is the reserved nature of _t names?  Maybe the __
prefix would communicate better that this is an internal name?  Although
I assume we will never change it again, so applications referencing the
new name should not face any future problems.

Thanks,
Florian



More information about the Libc-alpha mailing list