Commit 3e6d6928 authored by Eli Zaretskii's avatar Eli Zaretskii

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
parent bc8000ff
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
......
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>
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment