summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-06-15 04:05:32 +0000
committerRichard M. Stallman <rms@gnu.org>1994-06-15 04:05:32 +0000
commit92edfac3e9bd9f834c242007e5bb09922ad7dfe5 (patch)
treeb053234c2c673b603ebfbe86ac98b65b0a2ea0f5 /src
parent8e6f2b54fe3ef3d2d8f881c35364c67b6648ec11 (diff)
downloademacs-92edfac3e9bd9f834c242007e5bb09922ad7dfe5.tar.gz
(sigblock) [USG5_4]: Define if not defined.
Diffstat (limited to 'src')
-rw-r--r--src/syssignal.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/syssignal.h b/src/syssignal.h
index 432eb163322..25ef1c02924 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -48,15 +48,15 @@ extern sigset_t sys_sigmask ();
#endif /* ! defined (__GNUC__) */
#endif
-#define sigpause(SIG) sys_sigpause(SIG)
-#define sigblock(SIG) sys_sigblock(SIG)
-#define sigunblock(SIG) sys_sigunblock(SIG)
-#define sigsetmask(SIG) sys_sigsetmask(SIG)
+#define sigpause(SIG) sys_sigpause (SIG)
+#define sigblock(SIG) sys_sigblock (SIG)
+#define sigunblock(SIG) sys_sigunblock (SIG)
+#define sigsetmask(SIG) sys_sigsetmask (SIG)
#define sighold(SIG) ONLY_USED_IN_BSD_4_1
#define sigrelse(SIG) ONLY_USED_IN_BSD_4_1
/* Whether this is what all systems want or not, this is what
- appears to be assumed in the source, for example data.c:arith_error() */
+ appears to be assumed in the source, for example data.c:arith_error. */
typedef RETSIGTYPE (*signal_handler_t) (int);
signal_handler_t sys_signal (int signal_number, signal_handler_t action);
@@ -65,12 +65,16 @@ sigset_t sys_sigblock (sigset_t new_mask);
sigset_t sys_sigunblock (sigset_t new_mask);
sigset_t sys_sigsetmask (sigset_t new_mask);
-#define sys_sigdel(MASK,SIG) sigdelset(&MASK,SIG)
+#define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG)
#else /* ! defined (POSIX_SIGNALS) */
#ifdef USG5_4
-#define sigunblock(sig) (sigprocmask(SIG_SETMASK, SIGFULLMASK & ~(sig), NULL))
+#ifndef sigblock
+#define sigblock(sig) (sigprocmask (SIG_BLOCK, SIGEMPTYMASK & sig, NULL))
+#endif
+
+#define sigunblock(sig) (sigprocmask (SIG_SETMASK, SIGFULLMASK & ~(sig), NULL))
#else
#ifdef USG