* Error from signal.h when _POSIX_C_SOURCE == 1
@ 2017-07-12 0:01 Christopher Wellons
2017-07-12 0:05 ` Yaakov Selkowitz
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Wellons @ 2017-07-12 0:01 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Error from signal.h when _POSIX_C_SOURCE == 1
2017-07-12 0:01 Error from signal.h when _POSIX_C_SOURCE == 1 Christopher Wellons
@ 2017-07-12 0:05 ` Yaakov Selkowitz
0 siblings, 0 replies; 2+ messages in thread
From: Yaakov Selkowitz @ 2017-07-12 0:05 UTC (permalink / raw)
To: cygwin
On 2017-07-11 19:01, Christopher Wellons wrote:
> /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.
Already fixed in git:
https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=8a508f301cb9fb7e11f7cc2e3be7ffd42e64c25f
--
Yaakov
--
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-12 0:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12 0:01 Error from signal.h when _POSIX_C_SOURCE == 1 Christopher Wellons
2017-07-12 0:05 ` Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).