summaryrefslogtreecommitdiff
path: root/lib/signal.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-09-26 13:25:57 +0200
committerBruno Haible <bruno@clisp.org>2008-09-26 13:44:51 +0200
commitb5298eb7a71c5ae0a2320a99dd3965ef8df33648 (patch)
tree1701a50a98d9e437b514d1da5ddf17298091477c /lib/signal.in.h
parent1d569ca4e7e6147793e6e6510e5a36a4139b2f31 (diff)
downloadgnulib-b5298eb7a71c5ae0a2320a99dd3965ef8df33648.tar.gz
Support signal handling with SIGPIPE on native Windows platforms.
Diffstat (limited to 'lib/signal.in.h')
-rw-r--r--lib/signal.in.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/signal.in.h b/lib/signal.in.h
index fce94f31c9..4df1567c92 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -44,6 +44,17 @@ extern "C" {
#endif
+#if @GNULIB_SIGNAL_H_SIGPIPE@
+# ifndef SIGPIPE
+/* Define SIGPIPE to a value that does not overlap with other signals. */
+# define SIGPIPE 13
+# define GNULIB_defined_SIGPIPE 1
+/* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask',
+ 'write', 'stdio'. */
+# endif
+#endif
+
+
#if !@HAVE_POSIX_SIGNALBLOCKING@
/* Maximum signal number + 1. */
@@ -92,8 +103,18 @@ extern int sigprocmask (int operation, const sigset_t *set, sigset_t *old_set);
handler. */
extern void (*signal (int sig, void (*func) (int))) (int);
+# if GNULIB_defined_SIGPIPE
+
+/* Raise signal SIG. */
+# undef raise
+# define raise rpl_raise
+extern int raise (int sig);
+
+# endif
+
#endif /* !@HAVE_POSIX_SIGNALBLOCKING@ */
+
#if !@HAVE_SIGACTION@
# if !@HAVE_SIGINFO_T@