Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2024 05:14:01 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 276743] Many SIG* macros in <signal.h> are not visible without _XOPEN_SOURCE
Message-ID:  <bug-276743-99@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276743

            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: standards@FreeBSD.org
          Reporter: jbeich@FreeBSD.org

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276743-99>