From: Michael Elkins Date: Fri, 21 Dec 2012 04:49:08 +0000 (-0800) Subject: remove deprecated check for signal() return type X-Git-Tag: neomutt-20160307~212 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=79851f135722d7ff448dc69270b949ee9412b83d;p=neomutt remove deprecated check for signal() return type --- diff --git a/configure.ac b/configure.ac index 981c125b0..32bc6e7b8 100644 --- a/configure.ac +++ b/configure.ac @@ -306,19 +306,6 @@ AC_CHECK_HEADERS(unix.h) AC_CHECK_FUNCS(setrlimit getsid) -AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void. -Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl -AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE( -[AC_LANG_PROGRAM([#include -#include -], - [return *(signal (0, 0)) (0) == 1;])], - [ac_cv_type_signal=int], - [ac_cv_type_signal=void])]) -AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers - (`int' or `void').]) - - AC_MSG_CHECKING(for sig_atomic_t in signal.h) AC_EGREP_HEADER(sig_atomic_t,signal.h, [ diff --git a/sendlib.c b/sendlib.c index 0328dd2ac..c1c32fbda 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2139,7 +2139,7 @@ char *mutt_gen_msgid (void) return (safe_strdup (buf)); } -static RETSIGTYPE alarm_handler (int sig) +static void alarm_handler (int sig) { SigAlrm = 1; } diff --git a/signal.c b/signal.c index 7bfffab5f..acb297235 100644 --- a/signal.c +++ b/signal.c @@ -35,7 +35,7 @@ static struct sigaction SysOldQuit; static int IsEndwin = 0; /* Attempt to catch "ordinary" signals and shut down gracefully. */ -static RETSIGTYPE exit_handler (int sig) +static void exit_handler (int sig) { curs_set (1); endwin (); /* just to be safe */ @@ -55,12 +55,12 @@ static RETSIGTYPE exit_handler (int sig) exit (0); } -static RETSIGTYPE chld_handler (int sig) +static void chld_handler (int sig) { /* empty */ } -static RETSIGTYPE sighandler (int sig) +static void sighandler (int sig) { int save_errno = errno;