[Bug 276743] Many SIG* macros in <signal.h> are not visible with _POSIX_C_SOURCE

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 31 Jan 2024 08:53:33 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276743

--- Comment #3 from Warner Losh <imp@FreeBSD.org> ---
Your reading of the POSIX group's web site is in error. the start marks on on
the signals you specify, but the end marks are elsewhere (SIGTRAP and SIGXFSZ
respectively). The website is confusing, but it's like this all over the place
in these standards. The printed standard has them clearly shaded, at least for
issue6 and the forthcoming issue 8.

SIGTRAP (and other signals) are all defined as XPG in this standard, the XSI
start marker ENDS at the end of SIGTRAP if you look at the web site. The
printed standard (as well as the last available issue 6 draft) has them
highlighted as XSI rather than the confusing symbol on the web site. I don't
have the issue 7 standard standard, but the website has the same start/end
marks. The issue 8 draft standard has the clearly highlighted as well. FreeBSD
is strictly standards conformant.

Neither the NetBSD nor the OpenBSD commits cite a reference and just assert it.
These are at best secondary sources. 

However, neither musl nor glibc appear to implement this hygiene, most likely
owing to the fact that Linux has these values as MD values and the MD files are
not at all careful to implement strictness in many ways (both the glibc
original and the reimplementation in musl). musl is generally not compliant
with POSIX hygiene requirements. gilbc's conformance tests test for the right
thing, but glibc doesn't pass this test for signals.

The question becomes, do we want to maintain the strict interpretation, or do
we want to relax it like others implement and adopt this as an extension.

-- 
You are receiving this mail because:
You are the assignee for the bug.