From fc71710f8695ea07d852284286b058ecb3955317 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Tue, 27 Mar 2012 07:44:43 +0200 Subject: [PATCH] Switch from using RETSIGTYPE via autoconf to void. POSIX says that's the type to use for a signal handler. Pulled in from nmh. Thanks to Ken Hornstein. (btw: `to pull in' describes my action better than `to merge'.) --- configure.ac | 1 - h/signals.h | 2 +- sbr/getans.c | 4 ++-- sbr/lock_file.c | 4 ++-- uip/mhl.c | 12 ++++++------ uip/mhlist.c | 4 ++-- uip/mhmail.c | 4 ++-- uip/mhshow.c | 4 ++-- uip/mhstore.c | 4 ++-- uip/mhtest.c | 4 ++-- uip/prompter.c | 4 ++-- uip/slocal.c | 4 ++-- 12 files changed, 25 insertions(+), 26 deletions(-) diff --git a/configure.ac b/configure.ac index 9469adb..7b2666c 100644 --- a/configure.ac +++ b/configure.ac @@ -526,7 +526,6 @@ LIBS="$nmh_save_LIBS" dnl -------------- dnl CHECK TYPEDEFS dnl -------------- -AC_TYPE_SIGNAL AC_TYPE_PID_T AC_TYPE_OFF_T AC_TYPE_UID_T diff --git a/h/signals.h b/h/signals.h index d805d19..b8f0865 100644 --- a/h/signals.h +++ b/h/signals.h @@ -7,7 +7,7 @@ /* ** The type for a signal handler */ -typedef RETSIGTYPE (*SIGNAL_HANDLER)(int); +typedef void (*SIGNAL_HANDLER)(int); /* ** If not a POSIX machine, then we create our diff --git a/sbr/getans.c b/sbr/getans.c index af882d5..7254d6b 100644 --- a/sbr/getans.c +++ b/sbr/getans.c @@ -17,7 +17,7 @@ static jmp_buf sigenv; /* ** static prototypes */ -static RETSIGTYPE intrser(int); +static void intrser(int); char ** @@ -66,7 +66,7 @@ getans(char *prompt, struct swit *ansp) } -static RETSIGTYPE +static void intrser(int i) { /* diff --git a/sbr/lock_file.c b/sbr/lock_file.c index 6b74068..11531df 100644 --- a/sbr/lock_file.c +++ b/sbr/lock_file.c @@ -104,7 +104,7 @@ static int lkopen_dot(char *, int, mode_t); static void lockname(char *, struct lockinfo *, int); static void timerON(char *, int); static void timerOFF(int); -static RETSIGTYPE alrmser(int); +static void alrmser(int); #if !defined(HAVE_LIBLOCKFILE) static int lockit(struct lockinfo *); @@ -573,7 +573,7 @@ timerOFF(int fd) ** lockfiles, so another command doesn't remove them. */ -static RETSIGTYPE +static void alrmser(int sig) { char *lockfile; diff --git a/uip/mhl.c b/uip/mhl.c index c1c5355..e139a83 100644 --- a/uip/mhl.c +++ b/uip/mhl.c @@ -231,9 +231,9 @@ static void putcomp(struct mcomp *, struct mcomp *, int); static char *oneline(char *, long); static void putstr(char *); static void putch(char); -static RETSIGTYPE intrser(int); -static RETSIGTYPE pipeser(int); -static RETSIGTYPE quitser(int); +static void intrser(int); +static void pipeser(int); +static void quitser(int); static void mhladios(char *, char *, ...); static void mhldone(int); static void m_popen(char *); @@ -1223,7 +1223,7 @@ putch(char ch) } -static RETSIGTYPE +static void intrser(int i) { #ifndef RELIABLE_SIGNALS @@ -1236,7 +1236,7 @@ intrser(int i) } -static RETSIGTYPE +static void pipeser(int i) { #ifndef RELIABLE_SIGNALS @@ -1247,7 +1247,7 @@ pipeser(int i) } -static RETSIGTYPE +static void quitser(int i) { #ifndef RELIABLE_SIGNALS diff --git a/uip/mhlist.c b/uip/mhlist.c index fc8b751..3104e6f 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.c @@ -106,7 +106,7 @@ void freects_done(int) NORETURN; /* ** static prototypes */ -static RETSIGTYPE pipeser(int); +static void pipeser(int); int @@ -367,7 +367,7 @@ do_cache: } -static RETSIGTYPE +static void pipeser(int i) { if (i == SIGQUIT) { diff --git a/uip/mhmail.c b/uip/mhmail.c index ef1a050..374c8fd 100644 --- a/uip/mhmail.c +++ b/uip/mhmail.c @@ -38,7 +38,7 @@ static char tmpfil[BUFSIZ]; /* ** static prototypes */ -static RETSIGTYPE intrser(int); +static void intrser(int); int @@ -211,7 +211,7 @@ main(int argc, char **argv) } -static RETSIGTYPE +static void intrser(int i) { #ifndef RELIABLE_SIGNALS diff --git a/uip/mhshow.c b/uip/mhshow.c index ebbd8ec..4a07d01 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -102,7 +102,7 @@ void freects_done(int) NORETURN; /* ** static prototypes */ -static RETSIGTYPE pipeser(int); +static void pipeser(int); int @@ -405,7 +405,7 @@ do_cache: } -static RETSIGTYPE +static void pipeser(int i) { if (i == SIGQUIT) { diff --git a/uip/mhstore.c b/uip/mhstore.c index 377e8dc..e510d13 100644 --- a/uip/mhstore.c +++ b/uip/mhstore.c @@ -94,7 +94,7 @@ void freects_done(int) NORETURN; /* ** static prototypes */ -static RETSIGTYPE pipeser(int); +static void pipeser(int); int autosw = 0; @@ -423,7 +423,7 @@ do_cache: } -static RETSIGTYPE +static void pipeser(int i) { if (i == SIGQUIT) { diff --git a/uip/mhtest.c b/uip/mhtest.c index dc38126..37174de 100644 --- a/uip/mhtest.c +++ b/uip/mhtest.c @@ -103,7 +103,7 @@ void freects_done(int) NORETURN; ** static prototypes */ static int write_content(CT *, char *); -static RETSIGTYPE pipeser(int); +static void pipeser(int); int @@ -374,7 +374,7 @@ write_content(CT *cts, char *outfile) } -static RETSIGTYPE +static void pipeser(int i) { if (i == SIGQUIT) { diff --git a/uip/prompter.c b/uip/prompter.c index a398832..2f39f29 100644 --- a/uip/prompter.c +++ b/uip/prompter.c @@ -69,7 +69,7 @@ static jmp_buf sigenv; int getln(char *, int); static int chrcnv(char *); static void chrdsp(char *, char); -static RETSIGTYPE intrser(int); +static void intrser(int); int @@ -394,7 +394,7 @@ getln(char *buffer, int n) } -static RETSIGTYPE +static void intrser(int i) { #ifndef RELIABLE_SIGNALS diff --git a/uip/slocal.c b/uip/slocal.c index c8af725..086fac3 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -175,7 +175,7 @@ static int timely(char *, char *); static int usr_file(int, char *); static int usr_pipe(int, char *, char *, char **, int); static int usr_folder(int, char *); -static RETSIGTYPE alrmser(int); +static void alrmser(int); static void get_sender(char *, char **); static int copy_message(int, char *, int); static void verbose_printf(char *fmt, ...); @@ -1200,7 +1200,7 @@ usr_pipe(int fd, char *cmd, char *pgm, char **vec, int suppress) } -static RETSIGTYPE +static void alrmser(int i) { #ifndef RELIABLE_SIGNALS -- 1.7.10.4