This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: <signal.h> broken with _POSIX_SOURCE=1 defined


> 
> 
> 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.
> 

I have sent a patch:

Thu Oct 29 08:19:03 1998  H.J. Lu  <hjl@gnu.org>

        * sysdeps/unix/sysv/linux/bits/sigaction.h (sigaction): Use
        union only if __USE_POSIX199309 is defined.

What happened to it? In fact, I have sent quite a few patches. Most
of them are not in the current glibc 2.1.


-- 
H.J. Lu (hjl@gnu.org)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]