Neither strsignal
nor WCOREDUMP
are specified in C (checked C99). So you won't get them out of the box if you put GCC strictly in ANSI mode (which gets you C90).
strsignal
is defined in POSIX, but WCOREDUMP
isn't (see wait
for POSIX, the Linux manpage states that it's not POSIX), so you can't get that even if you add POSIX extensions.
Easiest way to get both would be to define _GNU_SOURCE
before including any headers (or directly on the compile command line), for Linux.
For Mac OS X, you probably (don't have that available) need _BSD_SOURCE
and a _POSIX_C_SOURCE
defined to something at or above 200809L
.