summaryrefslogtreecommitdiff
path: root/src/syssignal.h
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-05-19 22:01:35 +0000
committerJim Blandy <jimb@redhat.com>1993-05-19 22:01:35 +0000
commit8618c5a33ec857a2415f42e86d2c6ba2ece7569a (patch)
treecc78980aff899947294201e8f7c60e001a5af245 /src/syssignal.h
parentd95a856592e469f0ca37c80e03be9ba8f6c5bdcf (diff)
downloademacs-8618c5a33ec857a2415f42e86d2c6ba2ece7569a.tar.gz
Some changes from Michael K. Johnson for Linux.
* sysdep.c (sys_siglist): Don't define this if HAVE_SYS_SIGLIST is #defined. That lets the system provide it, if it has it. * syssignal.h (sigmask): Only define this if <signal.h> hasn't given us a definition already. * syssignal.h (sys_sigpause): Fix argument in prototype. * sysdep.c (init_signals): The masks are called empty_mask and full_mask, not signal_empty_mask and signal_full_mask. (signal_handler_t): Moved .... * syssignal.h: ... to here. * systty.h (EMACS_SET_TTY_PGRP): Call tcsetpgrp with the correct arguments. * emacs.c (main): Don't try to establish signal handlers for SIGBUS and SIGSYS unless they're actually #defined.
Diffstat (limited to 'src/syssignal.h')
-rw-r--r--src/syssignal.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/syssignal.h b/src/syssignal.h
index dddaee80924..ad3958647f2 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -18,6 +18,9 @@ along with GNU Emacs; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef POSIX_SIGNALS
+
+#include <signal.h>
+
#define SIGMASKTYPE sigset_t
#define SIGEMPTYMASK (empty_mask)
@@ -26,6 +29,7 @@ extern sigset_t empty_mask, full_mask, temp_mask;
/* POSIX pretty much destroys any possibility of writing sigmask as a
macro in standard C. */
+#ifndef sigmask
#ifdef __GNUC__
#define sigmask(SIG) \
({ \
@@ -37,6 +41,7 @@ extern sigset_t empty_mask, full_mask, temp_mask;
#else /* ! defined (__GNUC__) */
#define sigmask(SIG) (sys_sigmask (SIG))
#endif /* ! defined (__GNUC__) */
+#endif
#define sigpause(SIG) sys_sigpause(SIG)
#define sigblock(SIG) sys_sigblock(SIG)
@@ -45,9 +50,13 @@ extern sigset_t empty_mask, full_mask, temp_mask;
#define sighold(SIG) ONLY_USED_IN_BSD_4_1
#define sigrelse(SIG) ONLY_USED_IN_BSD_4_1
-int (*sys_signal (int signal_number, int (*action)())) ();
-int sys_sigpause (int signal_number);
-sigset_t sys_sigblock (sigset_t new_mask);
+/* 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() */
+typedef RETSIGTYPE (*signal_handler_t) (int);
+
+signal_handler_t sys_signal (int signal_number, int (*action)());
+int sys_sigpause (sigset_t new_mask);
+sigset_t sys_sigblock (sigset_t new_mask);
sigset_t sys_sigunblock (sigset_t new_mask);
sigset_t sys_sigsetmask (sigset_t new_mask);