[Bug 276743] Many SIG* macros in <signal.h> are not visible without _XOPEN_SOURCE
| Newsgroups | gmane.os.freebsd.devel.standards |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276743
Bug ID: 276743
Summary: Many SIG* macros in <signal.h> are not visible without
_XOPEN_SOURCE
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: standards
Assignee: [email protected]
Reporter: [email protected]
According to POSIX.1-2004 only SIGPOLL and SIGVTALRM are marked as XSI. This
can break build on FreeBSD unlike NetBSD and OpenBSD.
$ cc a.c
a.c:6:9: error: use of undeclared identifier 'SIGTRAP'
6 | raise(SIGTRAP);
| ^
1 error generated.
$ cat a.c
#define _POSIX_C_SOURCE 200112L
#include <signal.h>
int main(void)
{
raise(SIGTRAP);
return 0;
}
See also
https://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
https://github.com/netbsd/src/commit/579c2072dde4
https://github.com/openbsd/src/commit/8aa35f3ee488
--
You are receiving this mail because:
You are the assignee for the bug.