dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.61)
+AC_PREREQ([2.72])
AC_INIT([tinc], [1.0.36])
AC_CONFIG_SRCDIR([src/tincd.c])
AM_INIT_AUTOMAKE([1.11 check-news std-options subdir-objects nostdinc silent-rules -Wall])
# Enable GNU extensions.
# Define this here, not in acconfig's @TOP@ section, since definitions
# in the latter don't make it into the configure-time tests.
-AC_GNU_SOURCE
+AC_USE_SYSTEM_EXTENSIONS
AC_DEFINE([__USE_BSD], 1, [Enable BSD extensions])
dnl Checks for programs.
-AC_PROG_CC_C99
-AC_PROG_CPP
+AC_PROG_CC
AC_PROG_INSTALL
-
AM_PROG_CC_C_O
dnl Check and set OS
)
dnl Checks for library functions.
-AC_TYPE_SIGNAL
+
AC_CHECK_FUNCS([asprintf daemon fchmod flock fork gettimeofday mlockall pselect putenv strsignal system unsetenv usleep vsyslog devname fdevname],
[], [], [#include "$srcdir/src/have.h"]
)
*/
#ifndef HAVE_MINGW
-static RETSIGTYPE sigterm_handler(int a) {
+static void sigterm_handler(int a) {
(void)a;
logger(LOG_NOTICE, "Got %s signal", "TERM");
}
}
-static RETSIGTYPE sigquit_handler(int a) {
+static void sigquit_handler(int a) {
(void)a;
logger(LOG_NOTICE, "Got %s signal", "QUIT");
}
}
-static RETSIGTYPE fatal_signal_square(int a) {
+static void fatal_signal_square(int a) {
logger(LOG_ERR, "Got another fatal signal %d (%s): not restarting.", a,
strsignal(a));
exit(1);
}
-static RETSIGTYPE fatal_signal_handler(int a) {
+static void fatal_signal_handler(int a) {
struct sigaction act;
logger(LOG_ERR, "Got fatal signal %d (%s)", a, strsignal(a));
}
}
-static RETSIGTYPE sighup_handler(int a) {
+static void sighup_handler(int a) {
(void)a;
logger(LOG_NOTICE, "Got %s signal", "HUP");
sighup = true;
}
-static RETSIGTYPE sigint_handler(int a) {
+static void sigint_handler(int a) {
(void)a;
static int saved_debug_level = -1;
}
}
-static RETSIGTYPE sigalrm_handler(int a) {
+static void sigalrm_handler(int a) {
(void)a;
logger(LOG_NOTICE, "Got %s signal", "ALRM");
sigalrm = true;
}
-static RETSIGTYPE sigusr1_handler(int a) {
+static void sigusr1_handler(int a) {
(void)a;
dump_connections();
}
-static RETSIGTYPE sigusr2_handler(int a) {
+static void sigusr2_handler(int a) {
(void)a;
devops.dump_stats();
dump_nodes();
dump_subnets();
}
-static RETSIGTYPE sigwinch_handler(int a) {
+static void sigwinch_handler(int a) {
(void)a;
do_purge = true;
}
-static RETSIGTYPE unexpected_signal_handler(int a) {
+static void unexpected_signal_handler(int a) {
(void)a;
logger(LOG_WARNING, "Got unexpected signal %d (%s)", a, strsignal(a));
}
-static RETSIGTYPE ignore_signal_handler(int a) {
+static void ignore_signal_handler(int a) {
(void)a;
ifdebug(SCARY_THINGS) logger(LOG_DEBUG, "Ignored signal %d (%s)", a, strsignal(a));
}