* ucontext_t is not available from signal.h
@ 2015-08-17 10:28 Václav Haisman
2015-08-17 12:10 ` Corinna Vinschen
0 siblings, 1 reply; 5+ messages in thread
From: Václav Haisman @ 2015-08-17 10:28 UTC (permalink / raw)
To: cygwin
Hi.
I have just noticed, while porting my stuff from Linux to Cygwin, that
signal.h does not provide `ucontext_t`. It should be available from
signal.h. From <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html>:
> The ucontext_t and mcontext_t structures are added here from the obsolescent <ucontext.h> header.
--
VH
--
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] 5+ messages in thread
* Re: ucontext_t is not available from signal.h
2015-08-17 10:28 ucontext_t is not available from signal.h Václav Haisman
@ 2015-08-17 12:10 ` Corinna Vinschen
2015-08-18 2:46 ` [PATCH] sys/signal.h: include sys/ucontext.h on Cygwin per POSIX.1-2008 Yaakov Selkowitz
0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2015-08-17 12:10 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 680 bytes --]
On Aug 17 12:28, Václav Haisman wrote:
> Hi.
>
> I have just noticed, while porting my stuff from Linux to Cygwin, that
> signal.h does not provide `ucontext_t`. It should be available from
> signal.h. From <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html>:
>
> > The ucontext_t and mcontext_t structures are added here from the obsolescent <ucontext.h> header.
That's a bit tricky, given the split of signal.h between newlib and
Cygwin. Any suggestions how to fix it?
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] sys/signal.h: include sys/ucontext.h on Cygwin per POSIX.1-2008
2015-08-17 12:10 ` Corinna Vinschen
@ 2015-08-18 2:46 ` Yaakov Selkowitz
2015-08-18 9:10 ` Corinna Vinschen
0 siblings, 1 reply; 5+ messages in thread
From: Yaakov Selkowitz @ 2015-08-18 2:46 UTC (permalink / raw)
To: cygwin
* libc/include/sys/signal.h [__CYGWIN__]: include <sys/ucontext.h>
if compiling for POSIX.1-2008.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
How about this? Other places I tried didn't compile.
newlib/libc/include/sys/signal.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/newlib/libc/include/sys/signal.h b/newlib/libc/include/sys/signal.h
index af5a489..e9aba7c 100644
--- a/newlib/libc/include/sys/signal.h
+++ b/newlib/libc/include/sys/signal.h
@@ -352,6 +352,12 @@ int _EXFUN(sigqueue, (pid_t pid, int signo, const union sigval value));
}
#endif
+#if defined(__CYGWIN__)
+#if __POSIX_VISIBLE >= 200809
+#include <sys/ucontext.h>
+#endif
+#endif
+
#ifndef _SIGNAL_H_
/* Some applications take advantage of the fact that <sys/signal.h>
* and <signal.h> are equivalent in glibc. Allow for that here. */
--
2.4.3
--
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] 5+ messages in thread
* Re: [PATCH] sys/signal.h: include sys/ucontext.h on Cygwin per POSIX.1-2008
2015-08-18 2:46 ` [PATCH] sys/signal.h: include sys/ucontext.h on Cygwin per POSIX.1-2008 Yaakov Selkowitz
@ 2015-08-18 9:10 ` Corinna Vinschen
2015-08-18 12:29 ` Václav Haisman
0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2015-08-18 9:10 UTC (permalink / raw)
To: cygwin; +Cc: newlib
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
On Aug 17 21:46, Yaakov Selkowitz wrote:
> * libc/include/sys/signal.h [__CYGWIN__]: include <sys/ucontext.h>
> if compiling for POSIX.1-2008.
>
> Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
> ---
> How about this? Other places I tried didn't compile.
>
> newlib/libc/include/sys/signal.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/newlib/libc/include/sys/signal.h b/newlib/libc/include/sys/signal.h
> index af5a489..e9aba7c 100644
> --- a/newlib/libc/include/sys/signal.h
> +++ b/newlib/libc/include/sys/signal.h
> @@ -352,6 +352,12 @@ int _EXFUN(sigqueue, (pid_t pid, int signo, const union sigval value));
> }
> #endif
>
> +#if defined(__CYGWIN__)
> +#if __POSIX_VISIBLE >= 200809
> +#include <sys/ucontext.h>
> +#endif
> +#endif
> +
> #ifndef _SIGNAL_H_
> /* Some applications take advantage of the fact that <sys/signal.h>
> * and <signal.h> are equivalent in glibc. Allow for that here. */
> --
> 2.4.3
Looks good, I applied the patch.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sys/signal.h: include sys/ucontext.h on Cygwin per POSIX.1-2008
2015-08-18 9:10 ` Corinna Vinschen
@ 2015-08-18 12:29 ` Václav Haisman
0 siblings, 0 replies; 5+ messages in thread
From: Václav Haisman @ 2015-08-18 12:29 UTC (permalink / raw)
To: cygwin
On 18 August 2015 at 11:10, Corinna Vinschen wrote:
> On Aug 17 21:46, Yaakov Selkowitz wrote:
>> * libc/include/sys/signal.h [__CYGWIN__]: include <sys/ucontext.h>
>> if compiling for POSIX.1-2008.
>>
>> Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
>> ---
>> How about this? Other places I tried didn't compile.
>>
>> newlib/libc/include/sys/signal.h | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/newlib/libc/include/sys/signal.h b/newlib/libc/include/sys/signal.h
>> index af5a489..e9aba7c 100644
>> --- a/newlib/libc/include/sys/signal.h
>> +++ b/newlib/libc/include/sys/signal.h
>> @@ -352,6 +352,12 @@ int _EXFUN(sigqueue, (pid_t pid, int signo, const union sigval value));
>> }
>> #endif
>>
>> +#if defined(__CYGWIN__)
>> +#if __POSIX_VISIBLE >= 200809
>> +#include <sys/ucontext.h>
>> +#endif
>> +#endif
>> +
>> #ifndef _SIGNAL_H_
>> /* Some applications take advantage of the fact that <sys/signal.h>
>> * and <signal.h> are equivalent in glibc. Allow for that here. */
>> --
>> 2.4.3
>
> Looks good, I applied the patch.
Thank you both.
--
VH
--
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] 5+ messages in thread
end of thread, other threads:[~2015-08-18 12:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-17 10:28 ucontext_t is not available from signal.h Václav Haisman
2015-08-17 12:10 ` Corinna Vinschen
2015-08-18 2:46 ` [PATCH] sys/signal.h: include sys/ucontext.h on Cygwin per POSIX.1-2008 Yaakov Selkowitz
2015-08-18 9:10 ` Corinna Vinschen
2015-08-18 12:29 ` Václav Haisman
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).