mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-28 10:56:36 +00:00
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
This commit is contained in:
parent
bc8000ff70
commit
3e6d6928bd
@ -1,3 +1,7 @@
|
||||
2012-09-07 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* inc/ms-w32.h (struct sigaction): Declare sa_handler __cdecl.
|
||||
|
||||
2012-09-05 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* config.nt: Sync with autogen/config.in.
|
||||
|
@ -127,7 +127,7 @@ typedef int ssize_t;
|
||||
|
||||
struct sigaction {
|
||||
int sa_flags;
|
||||
void (*sa_handler)(int);
|
||||
void (_CALLBACK_ *sa_handler)(int);
|
||||
sigset_t sa_mask;
|
||||
};
|
||||
#define SIG_BLOCK 1
|
||||
|
@ -1,5 +1,10 @@
|
||||
2012-09-07 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
|
||||
|
||||
* w32.c (sigemptyset): Empty the set.
|
||||
(sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
|
||||
|
||||
* alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
|
||||
|
||||
2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
26
src/w32.c
26
src/w32.c
@ -1530,34 +1530,10 @@ is_unc_volume (const char *filename)
|
||||
}
|
||||
|
||||
/* Routines that are no-ops on NT but are defined to get Emacs to compile. */
|
||||
|
||||
int
|
||||
sigsetmask (int signal_mask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sigmask (int sig)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sigblock (int sig)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sigunblock (int sig)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sigemptyset (sigset_t *set)
|
||||
{
|
||||
*set = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -103,6 +103,29 @@ sys_signal (int sig, signal_handler handler)
|
||||
return old;
|
||||
}
|
||||
|
||||
/* Emulate sigaction. */
|
||||
int
|
||||
sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
|
||||
{
|
||||
signal_handler old;
|
||||
|
||||
if (sig != SIGCHLD)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
old = sig_handlers[sig];
|
||||
if (act)
|
||||
sig_handlers[sig] = act->sa_handler;
|
||||
if (oact)
|
||||
{
|
||||
oact->sa_handler = old;
|
||||
oact->sa_flags = 0;
|
||||
oact->sa_mask = empty_mask;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Defined in <process.h> which conflicts with the local copy */
|
||||
#define _P_NOWAIT 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user