]> tinc-vpn.org Git - tinc/commitdiff
Modernize configure.ac
authorGuus Sliepen <guus@tinc-vpn.org>
Thu, 26 Feb 2026 20:31:04 +0000 (21:31 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 26 Feb 2026 20:31:04 +0000 (21:31 +0100)
Fix warnings from newer versions of autotools, and assume we are living in
the 21st century.

configure.ac
src/process.c

index ca2948aa5392d685a119dd4e3ba48157c891f7fd..0641015e004b40fd053c7308b2f932f4489723ae 100644 (file)
@@ -1,6 +1,6 @@
 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])
@@ -11,14 +11,12 @@ AM_SILENT_RULES([yes])
 # 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
@@ -195,7 +193,7 @@ AC_CHECK_TYPES([socklen_t, struct ether_header, struct arphdr, struct ether_arp,
 )
 
 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"]
 )
index 13d100716bf7807d25aa7a6c0b0d698cb84f4a1d..9b9bcfdc4d80b16cd8a7a955cb3b1451d6f3fb08 100644 (file)
@@ -504,7 +504,7 @@ bool execute_script(const char *name, char **envp) {
 */
 
 #ifndef HAVE_MINGW
-static RETSIGTYPE sigterm_handler(int a) {
+static void sigterm_handler(int a) {
        (void)a;
        logger(LOG_NOTICE, "Got %s signal", "TERM");
 
@@ -515,7 +515,7 @@ static RETSIGTYPE sigterm_handler(int a) {
        }
 }
 
-static RETSIGTYPE sigquit_handler(int a) {
+static void sigquit_handler(int a) {
        (void)a;
        logger(LOG_NOTICE, "Got %s signal", "QUIT");
 
@@ -526,13 +526,13 @@ static RETSIGTYPE sigquit_handler(int a) {
        }
 }
 
-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));
 
@@ -554,13 +554,13 @@ static RETSIGTYPE fatal_signal_handler(int 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;
 
@@ -580,18 +580,18 @@ static RETSIGTYPE sigint_handler(int a) {
        }
 }
 
-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();
@@ -599,17 +599,17 @@ static RETSIGTYPE sigusr2_handler(int a) {
        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));
 }