Autotools warning fixes (#671)

* get rid of clashes with curl namespace
* remove warnings due to deprecated functionality
* reorder some macro calls to get rid of warnings due to being called in the wrong order

Fix By: Brad House (@bradh352)
pull/673/head
Brad House 12 months ago committed by GitHub
parent c203ace2ed
commit 1e34608cc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 152
      acinclude.m4
  2. 58
      configure.ac
  3. 40
      m4/cares-compilers.m4
  4. 2
      m4/cares-functions.m4
  5. 6
      src/lib/ares_config.h.cmake
  6. 3
      src/lib/config-dos.h
  7. 6
      src/lib/config-win32.h
  8. 20
      src/lib/setup_once.h
  9. 2
      test/configure.ac

@ -11,8 +11,8 @@ dnl result in a set of double-quoted strings the returned expansion will
dnl actually be a single double-quoted string concatenating all them.
AC_DEFUN([CURL_CHECK_DEF], [
AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl
AS_VAR_PUSHDEF([ac_Def], [curl_cv_def_$1])dnl
AS_VAR_PUSHDEF([ac_HaveDef], [cares_cv_have_def_$1])dnl
AS_VAR_PUSHDEF([ac_Def], [cares_cv_def_$1])dnl
if test -z "$SED"; then
AC_MSG_ERROR([SED not set. Cannot continue without SED being set.])
fi
@ -58,7 +58,7 @@ dnl default includes even if no INCLUDES argument is given. This macro
dnl will run silently when invoked with three arguments.
AC_DEFUN([CURL_CHECK_DEF_CC], [
AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl
AS_VAR_PUSHDEF([ac_HaveDef], [cares_cv_have_def_$1])dnl
ifelse($3,,[AC_MSG_CHECKING([for compiler definition of $1])])
AC_COMPILE_IFELSE([
AC_LANG_SOURCE(
@ -360,12 +360,12 @@ AC_DEFUN([CURL_CHECK_HEADER_MALLOC], [
free(q);
]])
],[
curl_cv_need_header_malloc_h="no"
cares_cv_need_header_malloc_h="no"
],[
curl_cv_need_header_malloc_h="yes"
cares_cv_need_header_malloc_h="yes"
])
#
case "$curl_cv_need_header_malloc_h" in
case "$cares_cv_need_header_malloc_h" in
yes)
AC_DEFINE_UNQUOTED(NEED_MALLOC_H, 1,
[Define to 1 if you need the malloc.h header file even with stdlib.h])
@ -412,12 +412,12 @@ AC_DEFUN([CURL_CHECK_HEADER_MEMORY], [
free(q);
]])
],[
curl_cv_need_header_memory_h="no"
cares_cv_need_header_memory_h="no"
],[
curl_cv_need_header_memory_h="yes"
cares_cv_need_header_memory_h="yes"
])
#
case "$curl_cv_need_header_memory_h" in
case "$cares_cv_need_header_memory_h" in
yes)
AC_DEFINE_UNQUOTED(NEED_MEMORY_H, 1,
[Define to 1 if you need the memory.h header file even with stdlib.h])
@ -447,13 +447,13 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
AC_LANG_FUNC_LINK_TRY([getnameinfo])
],[
AC_MSG_RESULT([yes])
curl_cv_getnameinfo="yes"
cares_cv_getnameinfo="yes"
],[
AC_MSG_RESULT([no])
curl_cv_getnameinfo="no"
cares_cv_getnameinfo="no"
])
#
if test "$curl_cv_getnameinfo" != "yes"; then
if test "$cares_cv_getnameinfo" != "yes"; then
AC_MSG_CHECKING([deeper for getnameinfo])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
@ -462,14 +462,14 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
]])
],[
AC_MSG_RESULT([yes])
curl_cv_getnameinfo="yes"
cares_cv_getnameinfo="yes"
],[
AC_MSG_RESULT([but still no])
curl_cv_getnameinfo="no"
cares_cv_getnameinfo="no"
])
fi
#
if test "$curl_cv_getnameinfo" != "yes"; then
if test "$cares_cv_getnameinfo" != "yes"; then
AC_MSG_CHECKING([deeper and deeper for getnameinfo])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
@ -501,22 +501,22 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
]])
],[
AC_MSG_RESULT([yes])
curl_cv_getnameinfo="yes"
cares_cv_getnameinfo="yes"
],[
AC_MSG_RESULT([but still no])
curl_cv_getnameinfo="no"
cares_cv_getnameinfo="no"
])
fi
#
if test "$curl_cv_getnameinfo" = "yes"; then
if test "$cares_cv_getnameinfo" = "yes"; then
AC_CACHE_CHECK([types of arguments for getnameinfo],
[curl_cv_func_getnameinfo_args], [
curl_cv_func_getnameinfo_args="unknown"
[cares_cv_func_getnameinfo_args], [
cares_cv_func_getnameinfo_args="unknown"
for gni_arg1 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
for gni_arg2 in 'socklen_t' 'size_t' 'int'; do
for gni_arg46 in 'size_t' 'int' 'socklen_t' 'unsigned int' 'DWORD'; do
for gni_arg7 in 'int' 'unsigned int'; do
if test "$curl_cv_func_getnameinfo_args" = "unknown"; then
if test "$cares_cv_func_getnameinfo_args" = "unknown"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#undef inline
@ -560,7 +560,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
int res = getnameinfo(0, salen, 0, hostlen, 0, servlen, flags);
]])
],[
curl_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7"
cares_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7"
])
fi
done
@ -568,12 +568,12 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
done
done
]) # AC-CACHE-CHECK
if test "$curl_cv_func_getnameinfo_args" = "unknown"; then
if test "$cares_cv_func_getnameinfo_args" = "unknown"; then
AC_MSG_WARN([Cannot find proper types to use for getnameinfo args])
AC_MSG_WARN([HAVE_GETNAMEINFO will not be defined])
else
gni_prev_IFS=$IFS; IFS=','
set dummy `echo "$curl_cv_func_getnameinfo_args" | sed 's/\*/\*/g'`
set dummy `echo "$cares_cv_func_getnameinfo_args" | sed 's/\*/\*/g'`
IFS=$gni_prev_IFS
shift
#
@ -810,22 +810,22 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
]])
],[
AC_MSG_RESULT([yes])
curl_cv_recv="yes"
cares_cv_recv="yes"
],[
AC_MSG_RESULT([no])
curl_cv_recv="no"
cares_cv_recv="no"
])
#
if test "$curl_cv_recv" = "yes"; then
if test "$cares_cv_recv" = "yes"; then
AC_CACHE_CHECK([types of args and return type for recv],
[curl_cv_func_recv_args], [
curl_cv_func_recv_args="unknown"
[cares_cv_func_recv_args], [
cares_cv_func_recv_args="unknown"
for recv_retv in 'int' 'ssize_t'; do
for recv_arg1 in 'int' 'ssize_t' 'SOCKET'; do
for recv_arg2 in 'char *' 'void *'; do
for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
for recv_arg4 in 'int' 'unsigned int'; do
if test "$curl_cv_func_recv_args" = "unknown"; then
if test "$cares_cv_func_recv_args" = "unknown"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#undef inline
@ -861,7 +861,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
$recv_retv res = recv(s, buf, len, flags);
]])
],[
curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
cares_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
])
fi
done
@ -870,11 +870,11 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
done
done
]) # AC-CACHE-CHECK
if test "$curl_cv_func_recv_args" = "unknown"; then
if test "$cares_cv_func_recv_args" = "unknown"; then
AC_MSG_ERROR([Cannot find proper types to use for recv args])
else
recv_prev_IFS=$IFS; IFS=','
set dummy `echo "$curl_cv_func_recv_args" | sed 's/\*/\*/g'`
set dummy `echo "$cares_cv_func_recv_args" | sed 's/\*/\*/g'`
IFS=$recv_prev_IFS
shift
#
@ -944,22 +944,22 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
]])
],[
AC_MSG_RESULT([yes])
curl_cv_send="yes"
cares_cv_send="yes"
],[
AC_MSG_RESULT([no])
curl_cv_send="no"
cares_cv_send="no"
])
#
if test "$curl_cv_send" = "yes"; then
if test "$cares_cv_send" = "yes"; then
AC_CACHE_CHECK([types of args and return type for send],
[curl_cv_func_send_args], [
curl_cv_func_send_args="unknown"
[cares_cv_func_send_args], [
cares_cv_func_send_args="unknown"
for send_retv in 'int' 'ssize_t'; do
for send_arg1 in 'int' 'ssize_t' 'SOCKET'; do
for send_arg2 in 'char *' 'void *' 'const char *' 'const void *'; do
for send_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
for send_arg4 in 'int' 'unsigned int'; do
if test "$curl_cv_func_send_args" = "unknown"; then
if test "$cares_cv_func_send_args" = "unknown"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#undef inline
@ -994,7 +994,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
$send_retv res = send(s, 0, len, flags);
]])
],[
curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv"
cares_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv"
])
fi
done
@ -1003,11 +1003,11 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
done
done
]) # AC-CACHE-CHECK
if test "$curl_cv_func_send_args" = "unknown"; then
if test "$cares_cv_func_send_args" = "unknown"; then
AC_MSG_ERROR([Cannot find proper types to use for send args])
else
send_prev_IFS=$IFS; IFS=','
set dummy `echo "$curl_cv_func_send_args" | sed 's/\*/\*/g'`
set dummy `echo "$cares_cv_func_send_args" | sed 's/\*/\*/g'`
IFS=$send_prev_IFS
shift
#
@ -1112,16 +1112,16 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
]])
],[
AC_MSG_RESULT([yes])
curl_cv_recvfrom="yes"
cares_cv_recvfrom="yes"
],[
AC_MSG_RESULT([no])
curl_cv_recvfrom="no"
cares_cv_recvfrom="no"
])
#
if test "$curl_cv_recvfrom" = "yes"; then
if test "$cares_cv_recvfrom" = "yes"; then
AC_CACHE_CHECK([types of args and return type for recvfrom],
[curl_cv_func_recvfrom_args], [
curl_cv_func_recvfrom_args="unknown"
[cares_cv_func_recvfrom_args], [
cares_cv_func_recvfrom_args="unknown"
for recvfrom_retv in 'int' 'ssize_t'; do
for recvfrom_arg1 in 'int' 'ssize_t' 'SOCKET'; do
for recvfrom_arg2 in 'char *' 'void *'; do
@ -1129,7 +1129,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
for recvfrom_arg4 in 'int' 'unsigned int'; do
for recvfrom_arg5 in 'struct sockaddr *' 'void *' 'const struct sockaddr *'; do
for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do
if test "$curl_cv_func_recvfrom_args" = "unknown"; then
if test "$cares_cv_func_recvfrom_args" = "unknown"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#undef inline
@ -1170,7 +1170,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
res = recvfrom(s, buf, len, flags, addr, addrlen);
]])
],[
curl_cv_func_recvfrom_args="$recvfrom_arg1,$recvfrom_arg2,$recvfrom_arg3,$recvfrom_arg4,$recvfrom_arg5,$recvfrom_arg6,$recvfrom_retv"
cares_cv_func_recvfrom_args="$recvfrom_arg1,$recvfrom_arg2,$recvfrom_arg3,$recvfrom_arg4,$recvfrom_arg5,$recvfrom_arg6,$recvfrom_retv"
])
fi
done
@ -1186,11 +1186,11 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
[Define to 1 if you have the recvfrom function.])
ac_cv_func_recvfrom="yes"
# Nearly last minute change for this release ends here
if test "$curl_cv_func_recvfrom_args" = "unknown"; then
if test "$cares_cv_func_recvfrom_args" = "unknown"; then
AC_MSG_WARN([Cannot find proper types to use for recvfrom args])
else
recvfrom_prev_IFS=$IFS; IFS=','
set dummy `echo "$curl_cv_func_recvfrom_args" | sed 's/\*/\*/g'`
set dummy `echo "$cares_cv_func_recvfrom_args" | sed 's/\*/\*/g'`
IFS=$recvfrom_prev_IFS
shift
#
@ -1326,7 +1326,6 @@ dnl -------------------------------------------------
dnl Check for timeval struct
AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
AC_REQUIRE([AC_HEADER_TIME])dnl
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h sys/socket.h)
@ -1436,10 +1435,10 @@ AC_DEFUN([TYPE_IN_ADDR_T], [
AC_CHECK_TYPE([in_addr_t], ,[
dnl in_addr_t not available
AC_CACHE_CHECK([for in_addr_t equivalent],
[curl_cv_in_addr_t_equiv], [
curl_cv_in_addr_t_equiv="unknown"
[cares_cv_in_addr_t_equiv], [
cares_cv_in_addr_t_equiv="unknown"
for t in "unsigned long" int size_t unsigned long; do
if test "$curl_cv_in_addr_t_equiv" = "unknown"; then
if test "$cares_cv_in_addr_t_equiv" = "unknown"; then
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
#undef inline
@ -1473,17 +1472,17 @@ AC_DEFUN([TYPE_IN_ADDR_T], [
$t data = inet_addr ("1.2.3.4");
]])
],[
curl_cv_in_addr_t_equiv="$t"
cares_cv_in_addr_t_equiv="$t"
])
fi
done
])
case "$curl_cv_in_addr_t_equiv" in
case "$cares_cv_in_addr_t_equiv" in
unknown)
AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t])
;;
*)
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
AC_DEFINE_UNQUOTED(in_addr_t, $cares_cv_in_addr_t_equiv,
[Type to use in place of in_addr_t when system does not provide it.])
;;
esac
@ -1524,7 +1523,6 @@ dnl -------------------------------------------------
dnl Check if monotonic clock_gettime is available.
AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
AC_REQUIRE([AC_HEADER_TIME])dnl
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h)
AC_MSG_CHECKING([for monotonic clock_gettime])
AC_COMPILE_IFELSE([
@ -1570,15 +1568,15 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
#
AC_MSG_CHECKING([for clock_gettime in libraries])
#
curl_cv_save_LIBS="$LIBS"
curl_cv_gclk_LIBS="unknown"
cares_cv_save_LIBS="$LIBS"
cares_cv_gclk_LIBS="unknown"
#
for x_xlibs in '' '-lrt' '-lposix4' ; do
if test "$curl_cv_gclk_LIBS" = "unknown"; then
if test "$cares_cv_gclk_LIBS" = "unknown"; then
if test -z "$x_xlibs"; then
LIBS="$curl_cv_save_LIBS"
LIBS="$cares_cv_save_LIBS"
else
LIBS="$x_xlibs $curl_cv_save_LIBS"
LIBS="$x_xlibs $cares_cv_save_LIBS"
fi
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
@ -1600,14 +1598,14 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
(void)clock_gettime(CLOCK_MONOTONIC, &ts);
]])
],[
curl_cv_gclk_LIBS="$x_xlibs"
cares_cv_gclk_LIBS="$x_xlibs"
])
fi
done
#
LIBS="$curl_cv_save_LIBS"
LIBS="$cares_cv_save_LIBS"
#
case X-"$curl_cv_gclk_LIBS" in
case X-"$cares_cv_gclk_LIBS" in
X-unknown)
AC_MSG_RESULT([cannot find clock_gettime])
AC_MSG_WARN([HAVE_CLOCK_GETTIME_MONOTONIC will not be defined])
@ -1618,12 +1616,12 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
ac_cv_func_clock_gettime="yes"
;;
*)
if test -z "$curl_cv_save_LIBS"; then
LIBS="$curl_cv_gclk_LIBS"
if test -z "$cares_cv_save_LIBS"; then
LIBS="$cares_cv_gclk_LIBS"
else
LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS"
LIBS="$cares_cv_gclk_LIBS $cares_cv_save_LIBS"
fi
AC_MSG_RESULT([$curl_cv_gclk_LIBS])
AC_MSG_RESULT([$cares_cv_gclk_LIBS])
ac_cv_func_clock_gettime="yes"
;;
esac
@ -1663,7 +1661,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
AC_MSG_RESULT([no])
AC_MSG_WARN([HAVE_CLOCK_GETTIME_MONOTONIC will not be defined])
ac_cv_func_clock_gettime="no"
LIBS="$curl_cv_save_LIBS"
LIBS="$cares_cv_save_LIBS"
])
fi
#
@ -1875,10 +1873,12 @@ dnl CARES_CHECK_STRUCT(headers, struct name, if found, [if not found])
AC_DEFUN([CARES_CHECK_STRUCT], [
AC_MSG_CHECKING([for struct $2])
AC_TRY_COMPILE([$1],
[
struct $2 struct_instance;
], ac_struct="yes", ac_found="no")
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([$1],
[struct $2 struct_instance;]
)
], ac_struct="yes", ac_struct="no"
)
if test "$ac_struct" = "yes" ; then
AC_MSG_RESULT(yes)
$3

@ -18,7 +18,7 @@
# SPDX-License-Identifier: MIT
#
#############################################################
AC_PREREQ([2.60])
AC_PREREQ([2.69])
AC_INIT([c-ares], [1.24.0],
[c-ares mailing list: http://lists.haxx.se/listinfo/c-ares])
@ -56,19 +56,24 @@ AC_SUBST([CARES_VERSION_INFO])
AC_CONFIG_SRCDIR([src/lib/ares_ipv6.h])
AC_CONFIG_HEADERS([src/lib/ares_config.h include/ares_build.h])
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX_14])
CARES_CHECK_OPTION_DEBUG
CARES_CHECK_OPTION_OPTIMIZE
CARES_CHECK_OPTION_WARNINGS
XC_CHECK_PATH_SEPARATOR
XC_CHECK_PROG_CC
CARES_CHECK_OPTION_WERROR
CARES_CHECK_OPTION_SYMBOL_HIDING
CARES_CHECK_OPTION_EXPOSE_STATICS
XC_CHECK_PATH_SEPARATOR
dnl make sure we use system extensions like _GNU_SOURCE or _XOPEN_SOURCE
AC_USE_SYSTEM_EXTENSIONS
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX_14])
dnl SED is mandatory for configure process and libtool.
dnl Set it now, allowing it to be changed later.
@ -117,7 +122,6 @@ AC_SUBST([AR])
AX_CODE_COVERAGE
dnl
dnl Detect the canonical host and target build environment
dnl
@ -126,14 +130,10 @@ AC_CANONICAL_HOST
dnl Get system canonical name
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
XC_CHECK_PROG_CC
AX_CXX_COMPILE_STDCXX_14([noext],[optional])
XC_AUTOMAKE
dnl make sure we use system extensions like _GNU_SOURCE or _XOPEN_SOURCE
AC_USE_SYSTEM_EXTENSIONS
dnl This defines _ALL_SOURCE for AIX
CARES_CHECK_AIX_ALL_SOURCE
@ -556,12 +556,8 @@ dnl **********************************************************************
dnl Back to "normal" configuring
dnl **********************************************************************
dnl Checks for header files.
AC_HEADER_STDC
AC_PROG_EGREP
CURL_CHECK_HEADER_MALLOC
CURL_CHECK_HEADER_MEMORY
@ -638,19 +634,6 @@ CARES_DEFINE_UNQUOTED([CARES_HAVE_ARPA_NAMESER_COMPAT_H])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
m4_warn([obsolete],
[Update your code to rely only on HAVE_SYS_TIME_H,
then remove this warning and the obsolete code below it.
All current systems provide time.h; it need not be checked for.
Not all systems provide sys/time.h, but those that do, all allow
you to include it and time.h simultaneously.])dnl
AC_CHECK_HEADERS_ONCE([sys/time.h])
# Obsolete code to be removed.
if test $ac_cv_header_sys_time_h = yes; then
AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
and <time.h>. This macro is obsolete.])
fi
# End of obsolete code.
CURL_CHECK_STRUCT_TIMEVAL
@ -705,20 +688,6 @@ TYPE_SOCKADDR_STORAGE
TYPE_SIG_ATOMIC_T
m4_warn([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 <sys/types.h>
#include <signal.h>
],
[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').])
CURL_CHECK_FUNC_RECV
CURL_CHECK_FUNC_RECVFROM
CURL_CHECK_FUNC_SEND
@ -922,8 +891,7 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
)
AC_CHECK_FUNCS([bitncmp \
gettimeofday \
AC_CHECK_FUNCS([gettimeofday \
if_indextoname \
if_nametoindex \
ConvertInterfaceIndexToLuid \
@ -984,7 +952,7 @@ CARES_CHECK_NONBLOCKING_SOCKET
dnl ------------ THREADING --------------
AC_ARG_ENABLE(cares-threads,
AC_HELP_STRING([--disable-cares-threads], [Disable building of thread safety support]),
AS_HELP_STRING([--disable-cares-threads],[Disable building of thread safety support]),
[ CARES_THREADS=${enableval} ],
[ CARES_THREADS=yes ])

@ -76,7 +76,7 @@ AC_DEFUN([CARES_CHECK_COMPILER_CLANG], [
AC_BEFORE([$0],[CARES_CHECK_COMPILER_GNU_C])dnl
AC_MSG_CHECKING([if compiler is clang])
CURL_CHECK_DEF([__clang__], [], [silent])
if test "$curl_cv_have_def___clang__" = "yes"; then
if test "$cares_cv_have_def___clang__" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="CLANG"
clangver=`$CC -dumpversion`
@ -110,8 +110,8 @@ AC_DEFUN([CARES_CHECK_COMPILER_DEC_C], [
AC_MSG_CHECKING([if compiler is DEC/Compaq/HP C])
CURL_CHECK_DEF([__DECC], [], [silent])
CURL_CHECK_DEF([__DECC_VER], [], [silent])
if test "$curl_cv_have_def___DECC" = "yes" &&
test "$curl_cv_have_def___DECC_VER" = "yes"; then
if test "$cares_cv_have_def___DECC" = "yes" &&
test "$cares_cv_have_def___DECC_VER" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="DEC_C"
flags_dbg_all="-g -g0 -g1 -g2 -g3"
@ -135,7 +135,7 @@ AC_DEFUN([CARES_CHECK_COMPILER_GNU_C], [
AC_REQUIRE([CARES_CHECK_COMPILER_CLANG])dnl
AC_MSG_CHECKING([if compiler is GNU C])
CURL_CHECK_DEF([__GNUC__], [], [silent])
if test "$curl_cv_have_def___GNUC__" = "yes" &&
if test "$cares_cv_have_def___GNUC__" = "yes" &&
test "$compiler_id" = "unknown"; then
AC_MSG_RESULT([yes])
compiler_id="GNU_C"
@ -170,7 +170,7 @@ dnl Verify if compiler being used is HP-UX C.
AC_DEFUN([CARES_CHECK_COMPILER_HPUX_C], [
AC_MSG_CHECKING([if compiler is HP-UX C])
CURL_CHECK_DEF([__HP_cc], [], [silent])
if test "$curl_cv_have_def___HP_cc" = "yes"; then
if test "$cares_cv_have_def___HP_cc" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="HP_UX_C"
flags_dbg_all="-g -s"
@ -192,7 +192,7 @@ dnl Verify if compiler being used is IBM C.
AC_DEFUN([CARES_CHECK_COMPILER_IBM_C], [
AC_MSG_CHECKING([if compiler is IBM C])
CURL_CHECK_DEF([__IBMC__], [], [silent])
if test "$curl_cv_have_def___IBMC__" = "yes"; then
if test "$cares_cv_have_def___IBMC__" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="IBM_C"
flags_dbg_all="-g -g0 -g1 -g2 -g3"
@ -223,11 +223,11 @@ AC_DEFUN([CARES_CHECK_COMPILER_INTEL_C], [
AC_BEFORE([$0],[CARES_CHECK_COMPILER_GNU_C])dnl
AC_MSG_CHECKING([if compiler is Intel C])
CURL_CHECK_DEF([__INTEL_COMPILER], [], [silent])
if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then
if test "$cares_cv_have_def___INTEL_COMPILER" = "yes"; then
AC_MSG_RESULT([yes])
compiler_num="$curl_cv_def___INTEL_COMPILER"
compiler_num="$cares_cv_def___INTEL_COMPILER"
CURL_CHECK_DEF([__unix__], [], [silent])
if test "$curl_cv_have_def___unix__" = "yes"; then
if test "$cares_cv_have_def___unix__" = "yes"; then
compiler_id="INTEL_UNIX_C"
flags_dbg_all="-g -g0"
flags_dbg_yes="-g"
@ -264,7 +264,7 @@ dnl Verify if compiler being used is LCC.
AC_DEFUN([CARES_CHECK_COMPILER_LCC], [
AC_MSG_CHECKING([if compiler is LCC])
CURL_CHECK_DEF([__LCC__], [], [silent])
if test "$curl_cv_have_def___LCC__" = "yes"; then
if test "$cares_cv_have_def___LCC__" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="LCC"
flags_dbg_all="-g"
@ -288,8 +288,8 @@ AC_DEFUN([CARES_CHECK_COMPILER_SGI_MIPS_C], [
AC_MSG_CHECKING([if compiler is SGI MIPS C])
CURL_CHECK_DEF([__GNUC__], [], [silent])
CURL_CHECK_DEF([__sgi], [], [silent])
if test "$curl_cv_have_def___GNUC__" = "no" &&
test "$curl_cv_have_def___sgi" = "yes" &&
if test "$cares_cv_have_def___GNUC__" = "no" &&
test "$cares_cv_have_def___sgi" = "yes" &&
test "$compiler_id" = "unknown"; then
AC_MSG_RESULT([yes])
compiler_id="SGI_MIPS_C"
@ -315,9 +315,9 @@ AC_DEFUN([CARES_CHECK_COMPILER_SGI_MIPSPRO_C], [
CURL_CHECK_DEF([__GNUC__], [], [silent])
CURL_CHECK_DEF([_COMPILER_VERSION], [], [silent])
CURL_CHECK_DEF([_SGI_COMPILER_VERSION], [], [silent])
if test "$curl_cv_have_def___GNUC__" = "no" &&
(test "$curl_cv_have_def__SGI_COMPILER_VERSION" = "yes" ||
test "$curl_cv_have_def__COMPILER_VERSION" = "yes"); then
if test "$cares_cv_have_def___GNUC__" = "no" &&
(test "$cares_cv_have_def__SGI_COMPILER_VERSION" = "yes" ||
test "$cares_cv_have_def__COMPILER_VERSION" = "yes"); then
AC_MSG_RESULT([yes])
compiler_id="SGI_MIPSPRO_C"
flags_dbg_all="-g -g0 -g1 -g2 -g3"
@ -339,7 +339,7 @@ dnl Verify if compiler being used is SunPro C.
AC_DEFUN([CARES_CHECK_COMPILER_SUNPRO_C], [
AC_MSG_CHECKING([if compiler is SunPro C])
CURL_CHECK_DEF([__SUNPRO_C], [], [silent])
if test "$curl_cv_have_def___SUNPRO_C" = "yes"; then
if test "$cares_cv_have_def___SUNPRO_C" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="SUNPRO_C"
flags_dbg_all="-g -s"
@ -361,7 +361,7 @@ dnl Verify if compiler being used is Tiny C.
AC_DEFUN([CARES_CHECK_COMPILER_TINY_C], [
AC_MSG_CHECKING([if compiler is Tiny C])
CURL_CHECK_DEF([__TINYC__], [], [silent])
if test "$curl_cv_have_def___TINYC__" = "yes"; then
if test "$cares_cv_have_def___TINYC__" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="TINY_C"
flags_dbg_all="-g -b"
@ -383,10 +383,10 @@ dnl Verify if compiler being used is Watcom C.
AC_DEFUN([CARES_CHECK_COMPILER_WATCOM_C], [
AC_MSG_CHECKING([if compiler is Watcom C])
CURL_CHECK_DEF([__WATCOMC__], [], [silent])
if test "$curl_cv_have_def___WATCOMC__" = "yes"; then
if test "$cares_cv_have_def___WATCOMC__" = "yes"; then
AC_MSG_RESULT([yes])
CURL_CHECK_DEF([__UNIX__], [], [silent])
if test "$curl_cv_have_def___UNIX__" = "yes"; then
if test "$cares_cv_have_def___UNIX__" = "yes"; then
compiler_id="WATCOM_UNIX_C"
flags_dbg_all="-g1 -g1+ -g2 -g3"
flags_dbg_yes="-g2"
@ -939,7 +939,7 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [
dnl Only gcc 4.5 or later
if test "$compiler_num" -ge "405"; then
dnl Only windows targets
if test "$curl_cv_have_def__WIN32" = "yes"; then
if test "$cares_cv_have_def__WIN32" = "yes"; then
tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
fi
fi

@ -1108,7 +1108,7 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
$cares_includes_sys_socket
$cares_includes_netdb
], [silent])
if test "$curl_cv_have_def_h_errno" = "yes"; then
if test "$cares_cv_have_def_h_errno" = "yes"; then
tst_h_errno_macro="yes"
else
tst_h_errno_macro="no"

@ -434,9 +434,6 @@
/* Define to the function return type for recv. */
#define RECV_TYPE_RETV @RECV_TYPE_RETV@
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE @RETSIGTYPE@
/* Define to the type qualifier of arg 2 for send. */
#define SEND_QUAL_ARG2 @SEND_QUAL_ARG2@
@ -455,9 +452,6 @@
/* Define to the function return type for send. */
#define SEND_TYPE_RETV @SEND_TYPE_RETV@
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#cmakedefine TIME_WITH_SYS_TIME
/* Define to disable non-blocking sockets. */
#undef USE_BLOCKING_SOCKETS

@ -35,9 +35,6 @@
#define NEED_MALLOC_H 1
#define RETSIGTYPE void
#define TIME_WITH_SYS_TIME 1
/* Qualifiers for send(), recv(), recvfrom() and getnameinfo(). */
#define SEND_TYPE_ARG1 int

@ -111,9 +111,6 @@
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if you can safely include both <sys/time.h> and <time.h>. */
/* #define TIME_WITH_SYS_TIME 1 */
/* ---------------------------------------------------------------- */
/* FUNCTIONS */
/* ---------------------------------------------------------------- */
@ -240,9 +237,6 @@
/* Define if in_addr_t is not an available 'typedefed' type. */
#define in_addr_t unsigned long
/* Define to the return type of signal handlers (int or void). */
#define RETSIGTYPE void
#ifdef __cplusplus
/* Compiling headers in C++ mode means bool is available */
# define HAVE_BOOL_T

@ -69,13 +69,10 @@
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# ifdef TIME_WITH_SYS_TIME
# include <time.h>
# endif
#else
# ifdef HAVE_TIME_H
# include <time.h>
# endif
#endif
#ifdef HAVE_TIME_H
# include <time.h>
#endif
#ifdef WIN32
@ -385,15 +382,6 @@ typedef int sig_atomic_t;
#endif
/*
* Default return type for signal handlers.
*/
#ifndef RETSIGTYPE
# define RETSIGTYPE void
#endif
/*
* Macro used to include code only in debug builds.
*/

2
test/configure.ac vendored

@ -18,7 +18,7 @@
# SPDX-License-Identifier: MIT
#
#############################################################
AC_PREREQ(2.57)
AC_PREREQ(2.69)
AC_INIT([c-ares-test],[-],[-])
AC_CONFIG_SRCDIR([ares-test.cc])
AC_CONFIG_MACRO_DIR([../m4])

Loading…
Cancel
Save