summaryrefslogtreecommitdiff
path: root/lib/signal.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/signal.in.h')
-rw-r--r--lib/signal.in.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/signal.in.h b/lib/signal.in.h
index bcf793523a..01987a7aff 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -30,6 +30,12 @@
#ifndef _@GUARD_PREFIX@_SIGNAL_H
+/* Define pid_t, uid_t.
+ Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.
+ On Solaris 10, <signal.h> includes <sys/types.h>, which eventually includes
+ us; so include <sys/types.h> now, before the second inclusion guard. */
+#include <sys/types.h>
+
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
@@ -42,10 +48,6 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-/* Define pid_t, uid_t.
- Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
-#include <sys/types.h>
-
/* On AIX, sig_atomic_t already includes volatile. C99 requires that
'volatile sig_atomic_t' ignore the extra modifier, but C89 did not.
Hence, redefine this to a non-volatile type as needed. */
@@ -100,6 +102,20 @@ typedef void (*sighandler_t) (int);
#endif
+#if @GNULIB_PTHREAD_SIGMASK@
+# if @REPLACE_PTHREAD_SIGMASK@
+# undef pthread_sigmask
+# define pthread_sigmask sigprocmask
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_sigmask
+# if HAVE_RAW_DECL_PTHREAD_SIGMASK
+_GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - "
+ "use gnulib module pthread_sigmask for portability");
+# endif
+#endif
+
+
#if @GNULIB_SIGPROCMASK@
# if !@HAVE_POSIX_SIGNALBLOCKING@