From e3e19a7a0dd125fe1b2a8560ce94329f9496dbad Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 17 Nov 1993 16:53:43 +0000 Subject: [PATCH] signal now deals with void functions --- lang/cem/libcc/gen/sleep.c | 4 ++-- lang/cem/libcc/mon/signal.c | 2 +- mach/sun2/libsys/signal.c | 10 +++++----- mach/sun3/libsys/signal.c | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lang/cem/libcc/gen/sleep.c b/lang/cem/libcc/gen/sleep.c index 180ae7cec..572b575d3 100644 --- a/lang/cem/libcc/gen/sleep.c +++ b/lang/cem/libcc/gen/sleep.c @@ -4,7 +4,7 @@ static jmp_buf setjmpbuf; -static +static void alfun(){ longjmp(setjmpbuf, 1); } /* used with sleep() below */ @@ -14,7 +14,7 @@ sleep(n) { /* sleep(n) pauses for 'n' seconds by scheduling an alarm interrupt. */ unsigned oldalarm; - int (*oldsig)(); + void (*oldsig)(); if (n <= 0) return; if (setjmp(setjmpbuf)) { diff --git a/lang/cem/libcc/mon/signal.c b/lang/cem/libcc/mon/signal.c index 11d6442e1..d8b967436 100644 --- a/lang/cem/libcc/mon/signal.c +++ b/lang/cem/libcc/mon/signal.c @@ -1,7 +1,7 @@ /* $Header$ */ #include -typedef int (*callvec)() ; +typedef void (*callvec)() ; static callvec vector[16] = { SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, diff --git a/mach/sun2/libsys/signal.c b/mach/sun2/libsys/signal.c index 5c829ae1c..9a9574f19 100644 --- a/mach/sun2/libsys/signal.c +++ b/mach/sun2/libsys/signal.c @@ -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; } diff --git a/mach/sun3/libsys/signal.c b/mach/sun3/libsys/signal.c index 25688e71d..0ae3b6979 100644 --- a/mach/sun3/libsys/signal.c +++ b/mach/sun3/libsys/signal.c @@ -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; }