[Bug 275328] <signal.h> fails to expose SA_* macros without XSI

[email protected]
Newsgroups gmane.os.freebsd.devel.standards
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275328

            Bug ID: 275328
           Summary: <signal.h> fails to expose SA_* macros without XSI
           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-2008:

> Issue 7
[...]
> The SA_RESETHAND, SA_RESTART, SA_SIGINFO, SA_NOCLDWAIT, and SA_NODEFER constants are moved from the XSI option to the Base.

https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/basedefs/signal.h.html
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html

which doesn't seem to work on FreeBSD:

$ cc a.c
a.c:6:39: error: use of undeclared identifier 'SA_RESTART'
    6 |   struct sigaction sa = { .sa_flags = SA_RESTART, /* .sa_handler =
myfunc */ };
      |                                       ^
1 error generated.

#define _POSIX_C_SOURCE 200809L
#include <signal.h>

int main()
{
  struct sigaction sa = { .sa_flags = SA_RESTART, /* .sa_handler = myfunc */ };
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.