So I guess the question is , gee, what is the C lang spec that I should
be using on all platforms for this ?
First, you should be aware what relevant standards exist:
- C,
- POSIX: contains additional functions typically found on Unix-like systems,
- GNU: roughly the same as the LSB, contains additional functions provided
by the glibc. (And remember that glibc provides access to most Linux
kernel system calls.)
The C standard can be chosen for a program that is written in portable C,
for example a program that computes and prints N digits of pi.
The POSIX standard can be chosen for a program that uses Unix features (e.g.
mmap), for example a database program.
The GNU "standard" should be chosen for a program that accesses all kinds
of non-portable features.
Second, the GCC manual [1] translates these choices into command-line options
for GCC.
Now, ask yourself: In which category is GNU libsigsegv? A library which makes
use of a signal 'SIGSEGV', which exists in POSIX but not in C.
Bruno
[1] https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/C-Dialect-Options.html