build: stop using an obsolete macro, and use 'void' for signal handlers

The Autoconf manual says that 'AC_TYPE_SIGNAL' is obsolete and
that it is fine to simply use 'void' instead of 'RETSIGTYPE'.
This commit is contained in:
Benno Schulenberg 2020-09-16 12:11:09 +02:00
parent 235f92ce09
commit e8abbc7045
4 changed files with 12 additions and 16 deletions

View File

@ -543,10 +543,6 @@ dnl Checks for available flags.
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"], [], [])
dnl Checks for library functions.
AC_TYPE_SIGNAL
dnl Checks for libraries.
if eval "test x$CURSES_LIB_NAME = x"; then

View File

@ -916,7 +916,7 @@ static pid_t pid_of_command = -1;
/* The PID of a forked process -- needed when wanting to abort it. */
/* Send an unconditional kill signal to the running external command. */
RETSIGTYPE cancel_the_command(int signal)
void cancel_the_command(int signal)
{
kill(pid_of_command, SIGKILL);
}

View File

@ -780,7 +780,7 @@ void version(void)
}
/* Register that Ctrl+C was pressed during some system call. */
RETSIGTYPE make_a_note(int signal)
void make_a_note(int signal)
{
control_C_was_pressed = TRUE;
}
@ -915,21 +915,21 @@ void signal_init(void)
}
/* Handler for SIGHUP (hangup) and SIGTERM (terminate). */
RETSIGTYPE handle_hupterm(int signal)
void handle_hupterm(int signal)
{
die(_("Received SIGHUP or SIGTERM\n"));
}
#if !defined(NANO_TINY) && !defined(DEBUG)
/* Handler for SIGSEGV (segfault) and SIGABRT (abort). */
RETSIGTYPE handle_crash(int signal)
void handle_crash(int signal)
{
die(_("Sorry! Nano crashed! Code: %d. Please report a bug.\n"), signal);
}
#endif
/* Handler for SIGTSTP (suspend). */
RETSIGTYPE do_suspend(int signal)
void do_suspend(int signal)
{
#ifdef ENABLE_MOUSE
disable_mouse_support();
@ -971,7 +971,7 @@ void do_suspend_void(void)
}
/* Handler for SIGCONT (continue after suspend). */
RETSIGTYPE do_continue(int signal)
void do_continue(int signal)
{
#ifdef ENABLE_MOUSE
if (ISSET(USE_MOUSE))
@ -1013,7 +1013,7 @@ void block_sigwinch(bool blockit)
#ifndef NANO_TINY
/* Handler for SIGWINCH (window size change). */
RETSIGTYPE handle_sigwinch(int signal)
void handle_sigwinch(int signal)
{
/* Let the input routine know that a SIGWINCH has occurred. */
the_window_resized = TRUE;

View File

@ -403,17 +403,17 @@ void restore_handler_for_Ctrl_C(void);
#ifndef NANO_TINY
void reconnect_and_store_state(void);
#endif
RETSIGTYPE handle_hupterm(int signal);
void handle_hupterm(int signal);
#ifndef DEBUG
RETSIGTYPE handle_crash(int signal);
void handle_crash(int signal);
#endif
RETSIGTYPE do_suspend(int signal);
RETSIGTYPE do_continue(int signal);
void do_suspend(int signal);
void do_continue(int signal);
#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
void block_sigwinch(bool blockit);
#endif
#ifndef NANO_TINY
RETSIGTYPE handle_sigwinch(int signal);
void handle_sigwinch(int signal);
void compute_the_extra_rows_per_line_from(linestruct *fromline);
void regenerate_screen(void);
void do_toggle(int flag);