From 025596757ccd21226b3306b11cc7c8d94b6f7a6f Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 16 Oct 2022 10:28:58 -0700 Subject: [PATCH] Silence autoconf warnings. --- configure.ac | 16 +++++++--------- m4/have_type.m4 | 1 - rsync.h | 8 +------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index 8ad6137e2..a2c995587 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,6 @@ AC_INIT([rsync],[ ],[https://rsync.samba.org/bug-tracking.html]) AC_C_BIGENDIAN AC_HEADER_DIRENT -AC_HEADER_TIME AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \ unistd.h utime.h compat.h sys/param.h ctype.h sys/wait.h sys/stat.h \ @@ -20,7 +19,7 @@ AC_HEADER_MAJOR_FIXED AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([byteorder.h]) -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS([config.h]) AC_PREREQ([2.69]) PACKAGE_VERSION=`sed -n 's/.*RSYNC_VERSION.*"\(.*\)".*/\1/p' <$srcdir/version.h` @@ -61,7 +60,6 @@ AC_PROG_AWK AC_PROG_EGREP AC_PROG_INSTALL AC_PROG_MKDIR_P -AC_PROG_CC_STDC AC_SUBST(SHELL) AC_PATH_PROG([PERL], [perl]) AC_PATH_PROG([PYTHON3], [python3]) @@ -390,7 +388,7 @@ AS_HELP_STRING([--disable-ipv6],[disable to omit ipv6 support]), ;; esac ], - AC_TRY_RUN([ /* AF_INET6 availability check */ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 availability check */ #include #include #include @@ -401,11 +399,11 @@ main() else exit(0); } -], - AC_MSG_RESULT(yes) - AC_DEFINE(INET6, 1, [true if you have IPv6]), - AC_MSG_RESULT(no), - AC_MSG_RESULT(no) +]])], + [AC_MSG_RESULT(yes) + AC_DEFINE(INET6, 1, true if you have IPv6)], + [AC_MSG_RESULT(no)], + [AC_MSG_RESULT(no)] )) dnl Do you want to disable use of locale functions diff --git a/m4/have_type.m4 b/m4/have_type.m4 index 704ca33b5..12fc719e8 100644 --- a/m4/have_type.m4 +++ b/m4/have_type.m4 @@ -1,6 +1,5 @@ dnl AC_HAVE_TYPE(TYPE,INCLUDES) AC_DEFUN([AC_HAVE_TYPE], [ -AC_REQUIRE([AC_HEADER_STDC]) cv=`echo "$1" | sed 'y%./+- %__p__%'` AC_MSG_CHECKING(for $1) AC_CACHE_VAL([ac_cv_type_$cv], diff --git a/rsync.h b/rsync.h index 2c5e5376b..d3709fe0f 100644 --- a/rsync.h +++ b/rsync.h @@ -366,16 +366,10 @@ enum delret { #include #endif -#ifdef TIME_WITH_SYS_TIME -#include -#include -#else #ifdef HAVE_SYS_TIME_H #include -#else -#include -#endif #endif +#include #ifdef HAVE_FCNTL_H #include -- 2.47.2