diff options
| author | Jim Blandy | 1993-05-19 22:01:35 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-05-19 22:01:35 +0000 |
| commit | 00eaaa321cbd33275bd2cece992824999cf7a5cf (patch) | |
| tree | 13e418975952ad2401cf6fb78187b7c61ddaa1aa /src/syssignal.h | |
| parent | 0674a1f9461cd79ea06e8b2e9b1e7cd6401f8fc5 (diff) | |
| download | emacs-00eaaa321cbd33275bd2cece992824999cf7a5cf.tar.gz emacs-00eaaa321cbd33275bd2cece992824999cf7a5cf.zip | |
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.h | 15 |
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 | |||
| 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 19 | 19 | ||
| 20 | #ifdef POSIX_SIGNALS | 20 | #ifdef POSIX_SIGNALS |
| 21 | |||
| 22 | #include <signal.h> | ||
| 23 | |||
| 21 | #define SIGMASKTYPE sigset_t | 24 | #define SIGMASKTYPE sigset_t |
| 22 | 25 | ||
| 23 | #define SIGEMPTYMASK (empty_mask) | 26 | #define SIGEMPTYMASK (empty_mask) |
| @@ -26,6 +29,7 @@ extern sigset_t empty_mask, full_mask, temp_mask; | |||
| 26 | 29 | ||
| 27 | /* POSIX pretty much destroys any possibility of writing sigmask as a | 30 | /* POSIX pretty much destroys any possibility of writing sigmask as a |
| 28 | macro in standard C. */ | 31 | macro in standard C. */ |
| 32 | #ifndef sigmask | ||
| 29 | #ifdef __GNUC__ | 33 | #ifdef __GNUC__ |
| 30 | #define sigmask(SIG) \ | 34 | #define sigmask(SIG) \ |
| 31 | ({ \ | 35 | ({ \ |
| @@ -37,6 +41,7 @@ extern sigset_t empty_mask, full_mask, temp_mask; | |||
| 37 | #else /* ! defined (__GNUC__) */ | 41 | #else /* ! defined (__GNUC__) */ |
| 38 | #define sigmask(SIG) (sys_sigmask (SIG)) | 42 | #define sigmask(SIG) (sys_sigmask (SIG)) |
| 39 | #endif /* ! defined (__GNUC__) */ | 43 | #endif /* ! defined (__GNUC__) */ |
| 44 | #endif | ||
| 40 | 45 | ||
| 41 | #define sigpause(SIG) sys_sigpause(SIG) | 46 | #define sigpause(SIG) sys_sigpause(SIG) |
| 42 | #define sigblock(SIG) sys_sigblock(SIG) | 47 | #define sigblock(SIG) sys_sigblock(SIG) |
| @@ -45,9 +50,13 @@ extern sigset_t empty_mask, full_mask, temp_mask; | |||
| 45 | #define sighold(SIG) ONLY_USED_IN_BSD_4_1 | 50 | #define sighold(SIG) ONLY_USED_IN_BSD_4_1 |
| 46 | #define sigrelse(SIG) ONLY_USED_IN_BSD_4_1 | 51 | #define sigrelse(SIG) ONLY_USED_IN_BSD_4_1 |
| 47 | 52 | ||
| 48 | int (*sys_signal (int signal_number, int (*action)())) (); | 53 | /* Whether this is what all systems want or not, this is what |
| 49 | int sys_sigpause (int signal_number); | 54 | appears to be assumed in the source, for example data.c:arith_error() */ |
| 50 | sigset_t sys_sigblock (sigset_t new_mask); | 55 | typedef RETSIGTYPE (*signal_handler_t) (int); |
| 56 | |||
| 57 | signal_handler_t sys_signal (int signal_number, int (*action)()); | ||
| 58 | int sys_sigpause (sigset_t new_mask); | ||
| 59 | sigset_t sys_sigblock (sigset_t new_mask); | ||
| 51 | sigset_t sys_sigunblock (sigset_t new_mask); | 60 | sigset_t sys_sigunblock (sigset_t new_mask); |
| 52 | sigset_t sys_sigsetmask (sigset_t new_mask); | 61 | sigset_t sys_sigsetmask (sigset_t new_mask); |
| 53 | 62 | ||