summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/sys/signal.h
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2017-06-14 10:20:05 -0500
committerYaakov Selkowitz <yselkowi@redhat.com>2017-06-14 14:23:52 -0500
commitdde6af6f82d117532cc8a57f34ccbb52ca3160fa (patch)
tree8c72371339bef911eb50cf430fee33d85631d5ef /newlib/libc/include/sys/signal.h
parent40ca6f02ed9083890f8e2aecaca7df6e2a72ae7d (diff)
downloadcygnal-dde6af6f82d117532cc8a57f34ccbb52ca3160fa.tar.gz
cygnal-dde6af6f82d117532cc8a57f34ccbb52ca3160fa.tar.bz2
cygnal-dde6af6f82d117532cc8a57f34ccbb52ca3160fa.zip
Export XSI sigpause
There are two common sigpause variants, both of which take an int argument. If you request _XOPEN_SOURCE or _GNU_SOURCE, you get the System V version, which removes the given signal from the process's signal mask; otherwise you get the BSD version, which sets the process's signal mask to the given value. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc/include/sys/signal.h')
-rw-r--r--newlib/libc/include/sys/signal.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/signal.h b/newlib/libc/include/sys/signal.h
index a56f18a1b..da064cd5f 100644
--- a/newlib/libc/include/sys/signal.h
+++ b/newlib/libc/include/sys/signal.h
@@ -200,7 +200,19 @@ int _EXFUN(sigwait, (const sigset_t *set, int *sig));
#endif /* !__CYGWIN__ && !__rtems__ */
#endif /* __POSIX_VISIBLE */
-#if __BSD_VISIBLE
+/* There are two common sigpause variants, both of which take an int argument.
+ If you request _XOPEN_SOURCE or _GNU_SOURCE, you get the System V version,
+ which removes the given signal from the process's signal mask; otherwise
+ you get the BSD version, which sets the process's signal mask to the given
+ value. */
+#if __XSI_VISIBLE && !defined(__INSIDE_CYGWIN__)
+# ifdef __GNUC__
+int _EXFUN(sigpause, (int)) __asm__ (__ASMNAME ("__xpg_sigpause"));
+# else
+int _EXFUN(__xpg_sigpause, (int));
+# define sigpause __xpg_sigpause
+# endif
+#elif __BSD_VISIBLE
int _EXFUN(sigpause, (int));
#endif