This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Error from signal.h when _POSIX_C_SOURCE == 1


A two-line source file demonstrates this bug:

   #define _POSIX_C_SOURCE 1
   #include <signal.h>

Then when compiled:

   $ gcc -c tmp.c
   In file included from /usr/include/sys/signal.h:22:0,
                    from /usr/include/signal.h:6,
                    from tmp.c:2:
   /usr/include/cygwin/signal.h:328:34: error: unknown type name ‘siginfo_t’
        void  (*sa_sigaction) ( int, siginfo_t *, void * );
                                     ^

Since _POSIX_C_SOURCE < 199309L, siginfo_t isn't defined. However, cygwin/signal.h erroneously uses this type anyway when defining struct sigaction. The sa_sigaction field in struct sigaction must also be guarded by the same feature test macro.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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