This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Condition signal.h inclusion in sys/wait.h (bug 21560)
- 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: Fri, 9 Jun 2017 08:13:49 -0400
- Subject: Re: Condition signal.h inclusion in sys/wait.h (bug 21560)
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1706090319180.28164@digraph.polyomino.org.uk>
On Thu, Jun 8, 2017 at 11:19 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> sys/wait.h includes signal.h unconditionally. But the permission to
> do so is UX-shaded in XPG4.2, and XSI-shaded in POSIX before 2008, so
> this should not be unconditional. This patch fixes this
> conservatively: the include is kept, but conditioned on the standards
> that permit it (meaning it is still present by default, because
> non-XSI POSIX.1:2008 is enabled by default). <bits/types.h> is now
> included unconditionally to provide the required definition of
> __pid_t; it was previously included via <signal.h>. Some standards
> require pid_t to be defined here, and all allow it to be defined here;
> previously defined via <signal.h>, it's now defined directly in this
> header.
>
> Tested for x86_64. This does not fix any of the sys/wait.h
> conformtest failures, but substantially reduces the number of
> namespace failures for sys/wait.h for XPG4 and POSIX.
This is OK. We might want to think about removing the include
altogether in a future release, but that's probably not a good plan
this close to a release freeze.
zw