This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
<signal.h> broken with _POSIX_SOURCE=1 defined
- To: libc-hacker@cygnus.com
- Subject: <signal.h> broken with _POSIX_SOURCE=1 defined
- From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
- Date: 02 Nov 1998 19:39:50 +0100
- Mail-Copies-To: never
Hi,
This small program shows the broken behaviour with the current glibc
2.1 cvs sources:
#define _POSIX_SOURCE 1
#include <signal.h>
int main(void)
{ ;}
The result is:
In file included from /usr/include/signal.h:217,
from t.c:2:
/usr/include/bits/sigaction.h:33: parse error before `siginfo_t'
We either have to change bits/sigaction or signal.h - but I don't know
which way. Could somebody please check the standards what should
happen here and install a fix?
The problem is that <signal.h> has:
# ifdef __USE_POSIX199309
/* Get the `siginfo_t' type plus the needed symbols. */
# include <bits/siginfo.h>
# endif
but struct sigaction in <bits/sigaction.h> defines unconditionally:
void (*sa_sigaction) __PMT ((int, siginfo_t *, void *));
<bits/sigaction.h> is included #ifdef __USE_POSIX.
Thanks,
Andreas
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de