indicate that SIGIO doesn't work by #undef-ing SIGIO. If this file
#includes <signal.h>, then that will re-#define SIGIO and confuse
things. */
+/* XXX This is not correct anymore, there is a BROKEN_SIGIO macro. */
#define SIGMASKTYPE sigset_t
#else /* ! defined (POSIX_SIGNALS) */
#ifdef USG5_4
+extern SIGMASKTYPE sigprocmask_set;
+
#ifndef sigblock
-#define sigblock(sig) (sigprocmask (SIG_BLOCK, SIGEMPTYMASK | sig, NULL))
+#define sigblock(sig) \
+ (sigprocmask_set = SIGEMPTYMASK | (sig), \
+ sigprocmask (SIG_BLOCK, &sigprocmask_set, NULL))
#endif
-#define sigunblock(sig) (sigprocmask (SIG_SETMASK, SIGFULLMASK & ~(sig), NULL))
+#ifndef sigunblock
+#define sigunblock(sig) \
+ (sigprocmask_set = SIGFULLMASK & ~(sig), \
+ sigprocmask (SIG_SETMASK, &sigprocmask_set, NULL))
+#endif
#else
#ifdef USG
-#define sigunblock(sig)
+#ifndef sigunblock
+#define sigunblock(sig)
+#endif
#else
+#ifndef sigunblock
#define sigunblock(SIG) \
{ SIGMASKTYPE omask = sigblock (SIGEMPTYMASK); sigsetmask (omask & ~SIG); }
+#endif
#endif /* ! defined (USG) */
#endif /* ! defined (USG5_4) */
#if defined (SIGURG) && defined (BROKEN_SIGURG)
#undef SIGURG
#endif
+#if defined (SIGAIO) && defined (BROKEN_SIGAIO)
+#undef SIGAIO
+#endif
+#if defined (SIGPTY) && defined (BROKEN_SIGPTY)
+#undef SIGPTY
+#endif
+
#if NSIG < NSIG_MINIMUM
# ifdef NSIG
/* strsignal is in sysdep.c */
char *strsignal ();
#endif
+
+/* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152
+ (do not change this comment) */