diff options
| author | Eli Zaretskii | 2012-09-07 11:20:07 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2012-09-07 11:20:07 +0300 |
| commit | 3e6d6928bdb9d823cdd54512990e6951f377713a (patch) | |
| tree | 6bcdaff89654e3ec8d3121a6d12c9188a0f70270 /src | |
| parent | bc8000ff702f2161253c1f5b54313e32619a2a44 (diff) | |
| download | emacs-3e6d6928bdb9d823cdd54512990e6951f377713a.tar.gz emacs-3e6d6928bdb9d823cdd54512990e6951f377713a.zip | |
MS-Windows followup for 2012-09-07T01:27:44Z!eggert@cs.ucla.edu, signal-handler cleanup.
src/w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
src/w32.c (sigemptyset): Empty the set.
(sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
nt/inc/ms-w32.h (struct sigaction): Declare sa_handler __cdecl.
Fixes: debbugs:12327
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/w32.c | 26 | ||||
| -rw-r--r-- | src/w32proc.c | 23 |
3 files changed, 29 insertions, 25 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1ff58232538..068584969f7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2012-09-07 Eli Zaretskii <eliz@gnu.org> | 1 | 2012-09-07 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * w32proc.c (sigaction): New function, emulates Posix 'sigaction'. | ||
| 4 | |||
| 5 | * w32.c (sigemptyset): Empty the set. | ||
| 6 | (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions. | ||
| 7 | |||
| 3 | * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT. | 8 | * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT. |
| 4 | 9 | ||
| 5 | 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru> | 10 | 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru> |
| @@ -1530,34 +1530,10 @@ is_unc_volume (const char *filename) | |||
| 1530 | } | 1530 | } |
| 1531 | 1531 | ||
| 1532 | /* Routines that are no-ops on NT but are defined to get Emacs to compile. */ | 1532 | /* Routines that are no-ops on NT but are defined to get Emacs to compile. */ |
| 1533 | |||
| 1534 | int | ||
| 1535 | sigsetmask (int signal_mask) | ||
| 1536 | { | ||
| 1537 | return 0; | ||
| 1538 | } | ||
| 1539 | |||
| 1540 | int | ||
| 1541 | sigmask (int sig) | ||
| 1542 | { | ||
| 1543 | return 0; | ||
| 1544 | } | ||
| 1545 | |||
| 1546 | int | ||
| 1547 | sigblock (int sig) | ||
| 1548 | { | ||
| 1549 | return 0; | ||
| 1550 | } | ||
| 1551 | |||
| 1552 | int | ||
| 1553 | sigunblock (int sig) | ||
| 1554 | { | ||
| 1555 | return 0; | ||
| 1556 | } | ||
| 1557 | |||
| 1558 | int | 1533 | int |
| 1559 | sigemptyset (sigset_t *set) | 1534 | sigemptyset (sigset_t *set) |
| 1560 | { | 1535 | { |
| 1536 | *set = 0; | ||
| 1561 | return 0; | 1537 | return 0; |
| 1562 | } | 1538 | } |
| 1563 | 1539 | ||
diff --git a/src/w32proc.c b/src/w32proc.c index f83e81aedff..b9239cbb99a 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -103,6 +103,29 @@ sys_signal (int sig, signal_handler handler) | |||
| 103 | return old; | 103 | return old; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | /* Emulate sigaction. */ | ||
| 107 | int | ||
| 108 | sigaction (int sig, const struct sigaction *act, struct sigaction *oact) | ||
| 109 | { | ||
| 110 | signal_handler old; | ||
| 111 | |||
| 112 | if (sig != SIGCHLD) | ||
| 113 | { | ||
| 114 | errno = EINVAL; | ||
| 115 | return -1; | ||
| 116 | } | ||
| 117 | old = sig_handlers[sig]; | ||
| 118 | if (act) | ||
| 119 | sig_handlers[sig] = act->sa_handler; | ||
| 120 | if (oact) | ||
| 121 | { | ||
| 122 | oact->sa_handler = old; | ||
| 123 | oact->sa_flags = 0; | ||
| 124 | oact->sa_mask = empty_mask; | ||
| 125 | } | ||
| 126 | return 0; | ||
| 127 | } | ||
| 128 | |||
| 106 | /* Defined in <process.h> which conflicts with the local copy */ | 129 | /* Defined in <process.h> which conflicts with the local copy */ |
| 107 | #define _P_NOWAIT 1 | 130 | #define _P_NOWAIT 1 |
| 108 | 131 | ||