public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: cygwin@cygwin.com
Subject: [PATCH] sys/signal.h: include sys/ucontext.h on Cygwin per POSIX.1-2008
Date: Tue, 18 Aug 2015 02:46:00 -0000	[thread overview]
Message-ID: <1439865979-12361-1-git-send-email-yselkowi@redhat.com> (raw)
In-Reply-To: <20150817121015.GF18305@calimero.vinschen.de>

* 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

  reply	other threads:[~2015-08-18  2:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Yaakov Selkowitz [this message]
2015-08-18  9:10     ` [PATCH] sys/signal.h: include sys/ucontext.h on Cygwin per POSIX.1-2008 Corinna Vinschen
2015-08-18 12:29       ` Václav Haisman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439865979-12361-1-git-send-email-yselkowi@redhat.com \
    --to=yselkowi@redhat.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).