This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix sigstack namespace (bug 21511)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]