This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix sigstack namespace (bug 21511)
- From: Zack Weinberg <zackw at panix dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 23 May 2017 12:39:49 -0400
- Subject: Re: Fix sigstack namespace (bug 21511)
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1705231611530.15456@digraph.polyomino.org.uk>
On Tue, May 23, 2017 at 12:12 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> The sigstack function was removed in the 2001 edition of POSIX, and
> the sigstack structure in the 2008 edition. signal.h wrongly includes
> those declarations even for newer POSIX versions. This patch fixes
> the conditions, and conform/ expectations, accordingly.
Patch looks good to me.
> This patch makes the minimum change to when these declarations are
> present, leaving them visible for __USE_MISC as they would previously
> have been visible by default. Arguably these legacy declarations
> should only be visible when an old standard is specifically requested,
> but implementing that would require arranging for the various sigstack
> implementations to be able to see the struct sigstack type despite it
> not being in _GNU_SOURCE in that case.
Another option is to do what we do for e.g. gettimeofday: expose them
under the appropriate old POSIX standards and under _GNU_SOURCE, but
not under the most recent _POSIX_C_SOURCE/_XOPEN_SOURCE values
*without* _GNU_SOURCE. In this case I think I might also take them
out of _DEFAULT_SOURCE,, since they're rarely used and thoroughly
superseded by newer interfaces. (gettimeofday is also superseded, but
it's still much too widely used to not be in _DEFAULT_SOURCE imo.)
zw