signal now deals with void functions

This commit is contained in:
ceriel
1993-11-17 16:53:43 +00:00
parent 1ac5aa547d
commit e3e19a7a0d
4 changed files with 13 additions and 13 deletions

View File

@@ -1,11 +1,11 @@
static long masks[32];
static long flags[32];
int (*
void (*
signal(sig,handler))()
int (*handler)();
void (*handler)();
{
struct {
int (*sv_handler)();
void (*sv_handler)();
long sv_mask;
long sv_flags;
} v, ov;
@@ -13,13 +13,13 @@ signal(sig,handler))()
v.sv_handler = handler;
v.sv_mask = masks[sig];
v.sv_flags = flags[sig];
if (sigvec(sig,&v, &ov) < 0) return (int (*)()) -1;
if (sigvec(sig,&v, &ov) < 0) return (void (*)()) -1;
if (v.sv_mask != ov.sv_mask || v.sv_flags != ov.sv_flags) {
v.sv_mask = ov.sv_mask;
masks[sig] = ov.sv_mask;
v.sv_flags = ov.sv_flags;
flags[sig] = ov.sv_flags;
if (sigvec(sig,&v,(char *) 0) < 0) return (int (*)()) -1;
if (sigvec(sig,&v,(char *) 0) < 0) return (void (*)()) -1;
}
return ov.sv_handler;
}