#ifndef _FSIGNAL_H_ #define _FSIGNAL_H_
#define __GNU_SOURCE #include <signal.h> #include <stdio.h>
I think you want _GNU_SOURCE there, not __GNU_SOURCE. Though "#define _POSIX_C_SOURCE 199309L" should be adequate.
It's kind of a mess, but when I include __USE_POSIX and __USE_POSIX199309, I get "constant redefinition" errors. So instead, I add:
You aren't supposed to define the __USE_* macros yourself. See <features.h>. Actually, when I ran your fsignal.h through "gcc -E" the postprocessed C contained the siginfo_t definition. If you're not getting it, then perhaps you've set one of the standard-selection macros to an old standard such that __USE_POSIX199309 isn't supposed to be defined.
How am I supposed to figure out how to get a definition for siginfo_t? Am I really supposed to grub around in the libc header files???
No, of course not. There are standards for this stuff, though programming books don't always do a good job of explaining them. For example, on a modern system running:
echo '#include <signal.h>' | gcc -E -
should get you a copy of the siginfo_t definition, but:
echo '#include <signal.h>' | gcc -E -D_POSIX_SOURCE -
because _POSIX_SOURCE implies a specific revision of the POSIX standard that predates the siginfo_t type.
-- Ken Herron _______________________________________________ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
