diff --git a/cmake/libraries.cmake b/cmake/libraries.cmake index 098b4dba191..832d2da6e4a 100644 --- a/cmake/libraries.cmake +++ b/cmake/libraries.cmake @@ -19,7 +19,7 @@ set(FLB_PATH_LIB_ONIGMO "lib/onigmo") set(FLB_PATH_LIB_MPACK "lib/mpack-amalgamation-1.1") set(FLB_PATH_LIB_MINIZ "lib/miniz") set(FLB_PATH_LIB_TUTF8E "lib/tutf8e") -set(FLB_PATH_LIB_CARES "lib/c-ares-1.19.0") +set(FLB_PATH_LIB_CARES "lib/c-ares-1.19.1") set(FLB_PATH_LIB_SNAPPY "lib/snappy-fef67ac") set(FLB_PATH_LIB_RDKAFKA "lib/librdkafka-2.1.0") set(FLB_PATH_LIB_RING_BUFFER "lib/lwrb") diff --git a/lib/c-ares-1.19.0/RELEASE-NOTES b/lib/c-ares-1.19.0/RELEASE-NOTES deleted file mode 100644 index db705905bae..00000000000 --- a/lib/c-ares-1.19.0/RELEASE-NOTES +++ /dev/null @@ -1,91 +0,0 @@ -c-ares version 1.19.0 - -This is a feature and bugfix release. It addresses a couple of new feature -requests as well as a couple of bug fixes. - -Security: - o Low. Stack overflow in ares_set_sortlist() which is used during c-ares - initialization and typically provided by an administrator and not an - end user. [24] - -Changes: - o Windows: Drop support for XP and derivatives which greatly cleans up - initialization code. [3] - o Add ARES_OPT_HOSTS_FILE similar to ARES_OPT_RESOLVCONF for specifying a - custom hosts file location. [10] - o Add vcpkg installation instructions [13] - -Bug fixes: - o Fix cross-compilation from Windows to Linux due to CPACK logic. [1] - o Fix memory leak in reading /etc/hosts when using localhost fallback. [2] - o Fix chain building c-ares when libresolv is already included by another - project [4] - o File lookup should not immediately abort as there may be other tries due to - search criteria. - o Asterisks should be allowed in host validation as CNAMEs may reference - wildcard domains [5] - o AutoTools build system referenced bad STDC_HEADERS macro [6] - o Even if one address class returns a failure for ares_getaddrinfo() we should - still return the results we have - o CMake Windows: DLLs did not include resource file to include versions [7] [8] - o CMake: Guard target creation in exported config [9] - o Fix ares_getaddrinfo() numerical address resolution with AF_UNSPEC [11] - o Apple: fix libresolv configured query times. [12] - o Fix tools and help information [14] [15] - o Various documentation fixes and cleanups [16] [22] [25] - o Add include guards to ares_data.h [17] - o c-ares could try to exceed maximum number of iovec entries supported by - system [18] - o CMake package config generation allow for absolute install paths [19] - o Intel compiler fixes [20] - o ares_strsplit bugs [21] [23] - o The RFC6761 6.3 states localhost subdomains must be offline too. [26] - -Thanks go to these friendly people for their efforts and contributions: - Boby Reynolds (@reynoldsbd) - Brad House (@bradh352) - Brad Spencer (@b-spencer) - @bsergean - Daniel Stenberg (@bagder) - Dmitry Karpov - @FrankXie05 - @hopper-vul - Jonathan Ringer (@jonringer) - Kai Pastor (@dg0yt) - @lifenjoiner - Manish Mehra (@mmehra) - @marc-groundctl - Nikolaos Chatzikonstantinou (@createyourpersonalaccount) - Ridge Kennedy (@ridgek) - Sam James (@thesamesam) - Stephen Sachs (@stephenmsachs) - Thomas Dreibholz (@dreibh) -(18 contributors) - -References to bug reports and discussions on issues: - [1] = https://github.com/c-ares/c-ares/pull/436 - [2] = https://github.com/c-ares/c-ares/issues/439 - [3] = https://github.com/c-ares/c-ares/pull/445 - [4] = https://github.com/c-ares/c-ares/pull/451 - [5] = https://github.com/c-ares/c-ares/issues/457 - [6] = https://github.com/c-ares/c-ares/pull/459 - [7] = https://github.com/c-ares/c-ares/issues/460 - [8] = https://github.com/c-ares/c-ares/pull/468 - [9] = https://github.com/c-ares/c-ares/pull/464 - [10] = https://github.com/c-ares/c-ares/pull/465 - [11] = https://github.com/c-ares/c-ares/pull/469 - [12] = https://github.com/c-ares/c-ares/pull/467 - [13] = https://github.com/c-ares/c-ares/pull/478 - [14] = https://github.com/c-ares/c-ares/pull/479 - [15] = https://github.com/c-ares/c-ares/pull/481 - [16] = https://github.com/c-ares/c-ares/pull/490 - [17] = https://github.com/c-ares/c-ares/pull/491 - [18] = https://github.com/c-ares/c-ares/pull/489 - [19] = https://github.com/c-ares/c-ares/pull/486 - [20] = https://github.com/c-ares/c-ares/pull/485 - [21] = https://github.com/c-ares/c-ares/pull/492 - [22] = https://github.com/c-ares/c-ares/pull/494 - [23] = https://github.com/c-ares/c-ares/pull/495 - [24] = https://github.com/c-ares/c-ares/pull/497 - [25] = https://github.com/c-ares/c-ares/issues/487 - [26] = https://github.com/c-ares/c-ares/issues/477 diff --git a/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4 b/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4 deleted file mode 100644 index fe4a11c67e0..00000000000 --- a/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4 +++ /dev/null @@ -1,166 +0,0 @@ -# ============================================================================ -# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html -# ============================================================================ -# -# SYNOPSIS -# -# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) -# -# DESCRIPTION -# -# Check for baseline language coverage in the compiler for the C++11 -# standard; if necessary, add switches to CXXFLAGS to enable support. -# -# The first argument, if specified, indicates whether you insist on an -# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -# -std=c++11). If neither is specified, you get whatever works, with -# preference for an extended mode. -# -# The second argument, if specified 'mandatory' or if left unspecified, -# indicates that baseline C++11 support is required and that the macro -# should error out if no mode with that support is found. If specified -# 'optional', then configuration proceeds regardless, after defining -# HAVE_CXX11 if and only if a supporting mode is found. -# -# LICENSE -# -# Copyright (c) 2008 Benjamin Kosnik -# Copyright (c) 2012 Zack Weinberg -# Copyright (c) 2013 Roy Stogner -# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 9 - -m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ - -#define static_assert _Static_assert - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - struct Base { - virtual void f() {} - }; - struct Child : public Base { - virtual void f() override {} - }; - - typedef check> right_angle_brackets; - - int a; - decltype(a) b; - - typedef check check_type; - check_type c; - check_type&& cr = static_cast(c); - - auto d = a; - auto l = [](){}; - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this - namespace test_template_alias_sfinae { - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { - func(0); - } - } -]]) - -AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl - m4_if([$1], [], [], - [$1], [ext], [], - [$1], [noext], [], - [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl - m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], - [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], - [$2], [optional], [ax_cxx_compile_cxx11_required=false], - [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) - AC_LANG_PUSH([C++])dnl - ac_success=no - AC_CACHE_CHECK(whether $CXX supports C++11 features by default, - ax_cv_cxx_compile_cxx11, - [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], - [ax_cv_cxx_compile_cxx11=yes], - [ax_cv_cxx_compile_cxx11=no])]) - if test x$ax_cv_cxx_compile_cxx11 = xyes; then - ac_success=yes - fi - - m4_if([$1], [noext], [], [dnl - if test x$ac_success = xno; then - for switch in -std=gnu++11 -std=gnu++0x; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, - $cachevar, - [ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXXFLAGS="$ac_save_CXXFLAGS"]) - if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" - ac_success=yes - break - fi - done - fi]) - - m4_if([$1], [ext], [], [dnl - if test x$ac_success = xno; then - for switch in -std=c++11 -std=c++0x; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, - $cachevar, - [ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXXFLAGS="$ac_save_CXXFLAGS"]) - if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" - ac_success=yes - break - fi - done - fi]) - AC_LANG_POP([C++]) - if test x$ax_cxx_compile_cxx11_required = xtrue; then - if test x$ac_success = xno; then - AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) - fi - else - if test x$ac_success = xno; then - HAVE_CXX11=0 - AC_MSG_NOTICE([No compiler with C++11 support was found]) - else - HAVE_CXX11=1 - AC_DEFINE(HAVE_CXX11,1, - [define if the compiler supports basic C++11 syntax]) - fi - - AC_SUBST(HAVE_CXX11) - fi -]) diff --git a/lib/c-ares-1.19.0/m4/ax_pthread.m4 b/lib/c-ares-1.19.0/m4/ax_pthread.m4 deleted file mode 100644 index d383ad5c6d6..00000000000 --- a/lib/c-ares-1.19.0/m4/ax_pthread.m4 +++ /dev/null @@ -1,332 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threads programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the -# PTHREAD_PRIO_INHERIT symbol is defined when compiling with -# PTHREAD_CFLAGS. -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# Updated for Autoconf 2.68 by Daniel Richard G. -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# Copyright (c) 2011 Daniel Richard G. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 21 - -AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) -AC_DEFUN([AX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_PUSH([C]) -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes]) - AC_MSG_RESULT([$ax_pthread_ok]) - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case ${host_os} in - solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; - - darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" - ;; -esac - -# Clang doesn't consider unrecognized options an error unless we specify -# -Werror. We throw in some extra Clang-specific options to ensure that -# this doesn't happen for GCC, which also accepts -Werror. - -AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags]) -save_CFLAGS="$CFLAGS" -ax_pthread_extra_flags="-Werror" -CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])], - [AC_MSG_RESULT([yes])], - [ax_pthread_extra_flags= - AC_MSG_RESULT([no])]) -CFLAGS="$save_CFLAGS" - -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; }], - [pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */])], - [ax_pthread_ok=yes], - []) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT([$ax_pthread_ok]) - if test "x$ax_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [int attr = $attr; return attr /* ; */])], - [attr_name=$attr; break], - []) - done - AC_MSG_RESULT([$attr_name]) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name], - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - # TODO: What about Clang on Solaris? - flag="-mt -D_REENTRANT" - fi - ;; - esac - AC_MSG_RESULT([$flag]) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], - [ax_cv_PTHREAD_PRIO_INHERIT], [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[int i = PTHREAD_PRIO_INHERIT;]])], - [ax_cv_PTHREAD_PRIO_INHERIT=yes], - [ax_cv_PTHREAD_PRIO_INHERIT=no]) - ]) - AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], - [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then - case $host_os in - aix*) - AS_CASE(["x/$CC"], - [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], - [#handle absolute path differently from PATH based program lookup - AS_CASE(["x$CC"], - [x/*], - [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], - [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) - ;; - esac - fi -fi - -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - -AC_SUBST([PTHREAD_LIBS]) -AC_SUBST([PTHREAD_CFLAGS]) -AC_SUBST([PTHREAD_CC]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then - ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) - : -else - ax_pthread_ok=no - $2 -fi -AC_LANG_POP -])dnl AX_PTHREAD diff --git a/lib/c-ares-1.19.0/AUTHORS b/lib/c-ares-1.19.1/AUTHORS similarity index 100% rename from lib/c-ares-1.19.0/AUTHORS rename to lib/c-ares-1.19.1/AUTHORS diff --git a/lib/c-ares-1.19.0/CHANGES b/lib/c-ares-1.19.1/CHANGES similarity index 96% rename from lib/c-ares-1.19.0/CHANGES rename to lib/c-ares-1.19.1/CHANGES index 5ecd504f063..d465143131d 100644 --- a/lib/c-ares-1.19.0/CHANGES +++ b/lib/c-ares-1.19.1/CHANGES @@ -1,5 +1,232 @@ Changelog for the c-ares project. Generated with git2changes.pl +Version 1.19.1 (22 May 2023) + +bradh352 (22 May 2023) +- Makefile.inc Windows requires tabs not spaces for nmake + +GitHub (22 May 2023) +- [Daniel Stenberg brought this change] + + ares_expand_name: fix compiler warnings (#522) + + Fix some compiler warnings (not introduced in this release) + + Fix By: Daniel Stenberg (@bagder) + +bradh352 (22 May 2023) +- windows MSVC compiler fix on 32bit + +- update security advisory links + +- minor CI issues fixes for imported inet_net_pton + +- ares_rand static analysis fixes from CI + +- windows build fix + +- security release notes + +GitHub (22 May 2023) +- [Brad House brought this change] + + Merge pull request from GHSA-9g78-jv2r-p7vc + +- [Brad House brought this change] + + Merge pull request from GHSA-x6mf-cxr9-8q6v + + * Merged latest OpenBSD changes for inet_net_pton_ipv6() into c-ares. + * Always use our own IP conversion functions now, do not delegate to OS + so we can have consistency in testing and fuzzing. + * Removed bogus test cases that never should have passed. + * Add new test case for crash bug found. + + Fix By: Brad House (@bradh352) + +- [Brad House brought this change] + + Merge pull request from GHSA-8r8p-23f3-64c2 + + * segment random number generation into own file + + * abstract random code to make it more modular so we can have multiple backends + + * rand: add support for arc4random_buf() and also direct CARES_RANDOM_FILE reading + + * autotools: fix detection of arc4random_buf + + * rework initial rc4 seed for PRNG as last fallback + + * rc4: more proper implementation, simplified for clarity + + * clarifications + +bradh352 (20 May 2023) +- add public release note information + +- bump version to 1.19.1 + +GitHub (6 May 2023) +- [Gregor Jasny brought this change] + + test: fix warning about uninitialized memory (#515) + + fix warning in tests + + Fix By: Gregor Jasny (@gjasny) + +- [lifenjoiner brought this change] + + Turn off IPV6_V6ONLY on Windows if it is supported (#520) + + Turn off IPV6_V6ONLY on Windows if it is supported, support for IPv4-mapped IPv6 addresses. + + IPV6_V6ONLY refs: + https://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses + https://github.com/golang/go/blob/master/src/net/ipsock_posix.go + https://en.wikipedia.org/wiki/Unix-like + off: + https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html#proc-sys-net-ipv6-variables + https://man.netbsd.org/inet6.4 + https://man.freebsd.org/cgi/man.cgi?query=inet6 + https://github.com/apple-oss-distributions/xnu/blob/main/bsd/man/man4/inet6.4 + on: + https://learn.microsoft.com/en-us/windows/win32/winsock/ipproto-ipv6-socket-options + acts like off, but returns 1 and dummy setting: + https://man.dragonflybsd.org/?command=inet6 + https://man.dragonflybsd.org/?command=ip6 + unsupported and read-only returns 1: + https://man.openbsd.org/inet6.4 + + default value refs: + https://datatracker.ietf.org/doc/html/rfc3493#section-5.3 + https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html#proc-sys-net-ipv6-variables + +- [Brad House brought this change] + + Merge pull request from GHSA-54xr-f67r-4pc4 + + * CARES_RANDOM_FILE should always default to /dev/urandom + + During cross-compilation, CARES_RANDOM_FILE may not be able to be appropriately + detected, therefore we should always set it to /dev/urandom and allow the + entity requesting compilation override the value. The code does appropriately + fall back if CARES_RANDOM_FILE cannot be opened. + + * use set not option + +bradh352 (18 Mar 2023) +- ares_getaddrinfo using service of "0" should be allowed + + As per #517 glibc allows a service/servname of "0" to be treated the + same as if NULL was provided. Also, add a sanity check to ensure + the port number is in range instead of a blind cast. + + Fixes: #517 + Fix By: Brad House (@bradh352) + +GitHub (10 Feb 2023) +- [Nikolaos Chatzikonstantinou brought this change] + + fix memory leak in ares_send (#511) + + When the condition channel->nservers < 1 holds, the function returns + prematurely, without deallocating query->tcpbuf. We rearrange the + check to be done prior to the allocations, avoiding the memory + leak. In this way, we also avoid unnecessary allocations if + channel->nservers < 1 holds. + + Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount) + +- [Nikolaos Chatzikonstantinou brought this change] + + change comment style to old-style (#513) + + Following the README.md guidelines, + + "Comments must be written in the old-style" + + the comment is changed to the old style. + + Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount) + +- [Nikolaos Chatzikonstantinou brought this change] + + use strncasecmp in ares__strsplit (#512) + + strncasecmp on platforms that don't already have it is already #define'd to a private implementation. There is no need to have OS-specific logic. Also removes ares__strsplit.h as a header as ares_private.h already includes it. + + Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount) + +- [Yijie Ma brought this change] + + Fix a typo in ares_init_options.3 (#510) + + that -> than + + Fix By: Yijie Ma (@yijiem) + +- [Douglas R. Reno brought this change] + + Watcom Portability Improvements (#509) + + - Modify the Watcom Makefile for the source code reorganization (#352) + - Add *.map files into .gitignore + - Fix build errors with Watcom's builtin Windows SDK (which is rather + outdated). It's smart enough to understand Windows Vista, but doesn't + have PMIB_UNICASTIPADDRESS_TABLE or MIB_IPFORWARD_ROW2. + + It may be possible to use a different Windows SDK with the Watcom + compiler, such as the most recent Windows 10 SDK. Alternatively the SDK + in OpenWatcom 2.0 (which is in development) should fix this. + + I have no problems testing this Makefile prior to releases, just give me + a ping. + + Tested with Windows Vista, Windows 7, and Windows 10 using 'adig', + 'acountry', and 'ahost'. This also seems to work on Windows XP, though + this is likely due to the compiler in use. + + Fix By: Douglas R. Reno (@renodr) + Fixes Bug: #352 + +- [Jay Freeman (saurik) brought this change] + + ignore aminclude_static.am, as generated by AX_AM_MACROS_STATIC (#508) + + Fix By: Jay Freeman (@saurik) + +- [Jay Freeman (saurik) brought this change] + + sync ax_pthread.m4 with upstream (#507) + + The version in the repository is many years old so this PR simply pulls in the latest + available revision from: + http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=tree;f=m4 + + Fix By: Jay Freeman (@saurik) + +- [Chilledheart brought this change] + + Windows: Invalid stack variable out of scope for HOSTS file path (#502) + + In some conditions Windows might try to use a stack address that has gone out of scope when determining where to read the hosts data from for file lookups. + + Fix By: @Chilledheart + +- [Brad House brought this change] + + sync ax_cxx_compile_stdcxx_11.m4 with upstream (#505) + + It was reported that ax_cxx_compile_stdcxx_11.m4 was not compatible with uclibc. + The version in the repository is many years old so this PR simply pulls in the latest + available revision from: + http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=tree;f=m4 + + Fixes Bug: #504 + Fix By: Brad House (@bradh352) + Version 1.19.0 (18 Jan 2023) bradh352 (18 Jan 2023) @@ -5325,76 +5552,3 @@ Daniel Stenberg (23 Mar 2010) - git now, not CVS - ignore lots of generated files - -- [Daniel Johnson brought this change] - - Fix warnings for clang - -Yang Tse (17 Mar 2010) -- replaced intel compiler option -no-ansi-alias with -fno-strict-aliasing - -- update outdated serial number - -- fix compiler warning - -- watt32 compilation fix - -- Added another VS10 version string - -- fix line break - -- removed usage of 's6_addr', fixing compilation issue triggered with no - longer using 'in6_addr' but only our 'ares_in6_addr' struct - -Daniel Stenberg (5 Mar 2010) -- Daniel Johnson provided fixes for building with the clang compiler - -Yang Tse (5 Mar 2010) -- Added IPv6 name servers support - -Gisle Vanem (5 Mar 2010) -- Ops!. Readded ares_nowarn.h. - -- Added ares_nowarn.c. - -Yang Tse (28 Feb 2010) -- Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems - -- Added ares_nowarn.* to VC6 project file - -- Added SIZEOF_INT definition - -- fix compiler warning - -- fix compiler warning - -- fix compiler warning - -Daniel Stenberg (17 Feb 2010) -- ares_reinit() - - - To allow an app to force a re-read of /etc/resolv.conf etc, pretty much - like the res_init() resolver function offers - -- - Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't - check for broken connections like ares_process() did. Based on that, I - merged the two functions into a single generic one with two front-ends. - -Yang Tse (30 Dec 2009) -- VMS specific preprocessor symbol checking adjustments - -- Mention last changes - -- - Fix configure_socket() to use ares_socket_t instead of int data type. - -- - Where run-time error checks enabling compiler option /GZ was used it is now - replaced with equivalent /RTCsu for Visual Studio 2003 and newer versions. - - - Compiler option /GX is now replaced with equivalent /EHsc for all versions. - -- - Ingmar Runge noticed that Windows config-win32.h configuration file - did not include a definition for HAVE_CLOSESOCKET which resulted in - function close() being inappropriately used to close sockets. - -Daniel Stenberg (30 Nov 2009) -- start working on 1.7.1 diff --git a/lib/c-ares-1.19.0/CMakeLists.txt b/lib/c-ares-1.19.1/CMakeLists.txt similarity index 98% rename from lib/c-ares-1.19.0/CMakeLists.txt rename to lib/c-ares-1.19.1/CMakeLists.txt index d11c0bba52d..9379014296c 100644 --- a/lib/c-ares-1.19.0/CMakeLists.txt +++ b/lib/c-ares-1.19.1/CMakeLists.txt @@ -8,10 +8,10 @@ INCLUDE (CheckCSourceCompiles) INCLUDE (CheckStructHasMember) INCLUDE (CheckLibraryExists) -PROJECT (c-ares LANGUAGES C VERSION "1.19.0" ) +PROJECT (c-ares LANGUAGES C VERSION "1.19.1" ) # Set this version before release -SET (CARES_VERSION "1.19.0") +SET (CARES_VERSION "1.19.1") INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are wrong. @@ -26,7 +26,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w # For example, a version of 4:0:2 would generate output such as: # libname.so -> libname.so.2 # libname.so.2 -> libname.so.2.2.0 -SET (CARES_LIB_VERSIONINFO "8:0:6") +SET (CARES_LIB_VERSIONINFO "8:1:6") OPTION (CARES_STATIC "Build as a static library" OFF) @@ -36,6 +36,8 @@ OPTION (CARES_STATIC_PIC "Build the static library as PIC (position independent) OPTION (CARES_BUILD_TESTS "Build and run tests" OFF) OPTION (CARES_BUILD_CONTAINER_TESTS "Build and run container tests (implies CARES_BUILD_TESTS, Linux only)" OFF) OPTION (CARES_BUILD_TOOLS "Build tools" ON) +SET (CARES_RANDOM_FILE "/dev/urandom" CACHE STRING "Suitable File / Device Path for entropy, such as /dev/urandom") + # Tests require static to be enabled on Windows to be able to access otherwise hidden symbols IF (CARES_BUILD_TESTS AND (NOT CARES_STATIC) AND WIN32) @@ -391,6 +393,8 @@ CHECK_SYMBOL_EXISTS (strncasecmp "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRNCAS CHECK_SYMBOL_EXISTS (strncmpi "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRNCMPI) CHECK_SYMBOL_EXISTS (strnicmp "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRNICMP) CHECK_SYMBOL_EXISTS (writev "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_WRITEV) +CHECK_SYMBOL_EXISTS (arc4random_buf "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_ARC4RANDOM_BUF) + # On Android, the system headers may define __system_property_get(), but excluded # from libc. We need to perform a link test instead of a header/symbol test. @@ -402,10 +406,6 @@ SET (CMAKE_REQUIRED_DEFINITIONS) SET (CMAKE_REQUIRED_LIBRARIES) -find_file(CARES_RANDOM_FILE urandom /dev) -mark_as_advanced(CARES_RANDOM_FILE) - - ################################################################################ # recv, recvfrom, send, getnameinfo, gethostname # ARGUMENTS AND RETURN VALUES diff --git a/lib/c-ares-1.19.0/CONTRIBUTING.md b/lib/c-ares-1.19.1/CONTRIBUTING.md similarity index 100% rename from lib/c-ares-1.19.0/CONTRIBUTING.md rename to lib/c-ares-1.19.1/CONTRIBUTING.md diff --git a/lib/c-ares-1.19.0/INSTALL.md b/lib/c-ares-1.19.1/INSTALL.md similarity index 100% rename from lib/c-ares-1.19.0/INSTALL.md rename to lib/c-ares-1.19.1/INSTALL.md diff --git a/lib/c-ares-1.19.0/LICENSE.md b/lib/c-ares-1.19.1/LICENSE.md similarity index 100% rename from lib/c-ares-1.19.0/LICENSE.md rename to lib/c-ares-1.19.1/LICENSE.md diff --git a/lib/c-ares-1.19.0/Makefile.Watcom b/lib/c-ares-1.19.1/Makefile.Watcom similarity index 67% rename from lib/c-ares-1.19.0/Makefile.Watcom rename to lib/c-ares-1.19.1/Makefile.Watcom index fa529a56edc..34e07bb4c6b 100644 --- a/lib/c-ares-1.19.0/Makefile.Watcom +++ b/lib/c-ares-1.19.1/Makefile.Watcom @@ -1,6 +1,7 @@ # # Watcom / OpenWatcom / Win32 makefile for cares. # Quick hack by Guenter; comments to: /dev/nul +# Updated by Douglas R. Reno, comments to: renodr2002@gmail.com. 2023 # !ifndef %watcom @@ -38,9 +39,9 @@ MD = mkdir RD = rmdir /q /s 2>NUL CP = copy -CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm & - -wcd=201 -bt=nt -d+ -dWIN32 -dCARES_BUILDING_LIBRARY & - -dNTDDI_VERSION=0x05010000 -I. $(SYS_INCL) +CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm -aa & + -wcd=201 -bt=nt -d+ -dWIN32 -dCARES_BUILDING_LIBRARY & + -dNTDDI_VERSION=0x06000000 -I. -I.\include -I.\src\lib $(SYS_INCL) LFLAGS = option quiet, map, caseexact, eliminate @@ -69,7 +70,7 @@ LIB_ARG = $(OBJ_BASE)\stat\wlib.arg !ifneq __MAKEOPTS__ -u !error You MUST call wmake with the -u switch! !else -!include Makefile.inc +!include src\lib\Makefile.inc !endif OBJS = $(CSOURCES:.c=.obj) @@ -82,10 +83,11 @@ OBJ_DIR = $(OBJ_BASE)\stat OBJS_STAT = $+ $(OBJS) $- OBJ_DIR = $(OBJ_BASE)\dyn -OBJS_DYN = $+ $(OBJS) $- +OBJS_DYN += $(OBJS) $- ARESBUILDH = ares_build.h RESOURCE = $(OBJ_BASE)\dyn\cares.res +ARESBUILDH = include\ares_build.h all: $(ARESBUILDH) $(OBJ_BASE) $(TARGETS) $(DEMOS) .SYMBOLIC @echo Welcome to cares @@ -94,10 +96,10 @@ $(OBJ_BASE): -$(MD) $^@ -$(MD) $^@\stat -$(MD) $^@\dyn - -$(MD) $^@\demos + -$(MD) $^@\tools $(ARESBUILDH): .EXISTSONLY - $(CP) $^@.dist $^@ + @echo Make sure to run buildconf.bat! $(LIBNAME).dll: $(OBJS_DYN) $(RESOURCE) $(LINK_ARG) $(LD) name $^@ @$]@ @@ -105,14 +107,20 @@ $(LIBNAME).dll: $(OBJS_DYN) $(RESOURCE) $(LINK_ARG) $(LIBNAME).lib: $(OBJS_STAT) $(LIB_ARG) $(AR) -q -b -c $^@ @$]@ -adig.exe: $(OBJ_BASE)\demos\adig.obj $(OBJ_BASE)\demos\ares_getopt.obj $(LIBNAME).lib - $(LD) name $^@ system nt $(LFLAGS) file { $(OBJ_BASE)\demos\ares_getopt.obj $[@ } library $]@, ws2_32.lib +$(OBJ_BASE)\tools\ares_getopt.obj: + $(CC) $(CFLAGS) -DCARES_STATICLIB .\src\tools\ares_getopt.c -fo=$^@ -ahost.exe: $(OBJ_BASE)\demos\ahost.obj $(OBJ_BASE)\demos\ares_getopt.obj $(LIBNAME).lib - $(LD) name $^@ system nt $(LFLAGS) file { $(OBJ_BASE)\demos\ares_getopt.obj $[@ } library $]@, ws2_32.lib +adig.exe: $(OBJ_BASE)\tools\ares_getopt.obj $(LIBNAME).lib + $(CC) $(CFLAGS) src\tools\adig.c -fo=$(OBJ_BASE)\tools\adig.obj + $(LD) name $^@ system nt $(LFLAGS) file { $(OBJ_BASE)\tools\adig.obj $[@ } library $]@, ws2_32.lib, iphlpapi.lib -acountry.exe: $(OBJ_BASE)\demos\acountry.obj $(OBJ_BASE)\demos\ares_getopt.obj $(LIBNAME).lib - $(LD) name $^@ system nt $(LFLAGS) file { $(OBJ_BASE)\demos\ares_getopt.obj $[@ } library $]@, ws2_32.lib +ahost.exe: $(OBJ_BASE)\tools\ares_getopt.obj $(LIBNAME).lib + $(CC) $(CFLAGS) src\tools\ahost.c -fo=$(OBJ_BASE)\tools\ahost.obj + $(LD) name $^@ system nt $(LFLAGS) file { $(OBJ_BASE)\tools\ahost.obj $[@ } library $]@, ws2_32.lib, iphlpapi.lib + +acountry.exe: $(OBJ_BASE)\tools\ares_getopt.obj $(LIBNAME).lib + $(CC) $(CFLAGS) src\tools\acountry.c -fo=$(OBJ_BASE)\tools\acountry.obj + $(LD) name $^@ system nt $(LFLAGS) file { $(OBJ_BASE)\tools\acountry.obj $[@ } library $]@, ws2_32.lib, iphlpapi.lib clean: .SYMBOLIC -$(RM) $(OBJS_STAT) @@ -124,24 +132,23 @@ vclean realclean: clean .SYMBOLIC -$(RM) $(DEMOS) $(DEMOS:.exe=.map) -$(RD) $(OBJ_BASE)\stat -$(RD) $(OBJ_BASE)\dyn - -$(RD) $(OBJ_BASE)\demos + -$(RD) $(OBJ_BASE)\tools -$(RD) $(OBJ_BASE) .ERASE -$(RESOURCE): cares.rc .AUTODEPEND +.c: .\src\lib + +.ERASE +$(RESOURCE): src\lib\cares.rc .AUTODEPEND $(RC) $(DEBUG) -q -r -zm -I..\include $(SYS_INCL) $[@ -fo=$^@ .ERASE .c{$(OBJ_BASE)\dyn}.obj: - $(CC) $(CFLAGS) -bd $[@ -fo=$^@ + $(CC) $(CFLAGS) -bd .\src\lib\$^& -fo=$^@ .ERASE .c{$(OBJ_BASE)\stat}.obj: - $(CC) $(CFLAGS) -DCARES_STATICLIB $[@ -fo=$^@ - -.ERASE -.c{$(OBJ_BASE)\demos}.obj: - $(CC) $(CFLAGS) -DCARES_STATICLIB $[@ -fo=$^@ + $(CC) $(CFLAGS) -DCARES_STATICLIB .\src\lib\$^& -fo=$^@ $(LINK_ARG): $(__MAKEFILES__) %create $^@ @@ -155,6 +162,7 @@ $(LINK_ARG): $(__MAKEFILES__) @%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib !else @%append $^@ library ws2_32.lib + @%append $^@ library iphlpapi.lib !endif $(LIB_ARG): $(__MAKEFILES__) diff --git a/lib/c-ares-1.19.0/Makefile.am b/lib/c-ares-1.19.1/Makefile.am similarity index 100% rename from lib/c-ares-1.19.0/Makefile.am rename to lib/c-ares-1.19.1/Makefile.am diff --git a/lib/c-ares-1.19.0/Makefile.dj b/lib/c-ares-1.19.1/Makefile.dj similarity index 100% rename from lib/c-ares-1.19.0/Makefile.dj rename to lib/c-ares-1.19.1/Makefile.dj diff --git a/lib/c-ares-1.19.0/Makefile.in b/lib/c-ares-1.19.1/Makefile.in similarity index 99% rename from lib/c-ares-1.19.0/Makefile.in rename to lib/c-ares-1.19.1/Makefile.in index a512effa1f6..3dfa479a244 100644 --- a/lib/c-ares-1.19.0/Makefile.in +++ b/lib/c-ares-1.19.1/Makefile.in @@ -96,6 +96,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_ac_append_to_file.m4 \ $(top_srcdir)/m4/ax_am_macros_static.m4 \ $(top_srcdir)/m4/ax_check_gnu_make.m4 \ $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_file_escapes.m4 \ $(top_srcdir)/m4/ax_require_defined.m4 \ diff --git a/lib/c-ares-1.19.0/Makefile.m32 b/lib/c-ares-1.19.1/Makefile.m32 similarity index 100% rename from lib/c-ares-1.19.0/Makefile.m32 rename to lib/c-ares-1.19.1/Makefile.m32 diff --git a/lib/c-ares-1.19.0/Makefile.msvc b/lib/c-ares-1.19.1/Makefile.msvc similarity index 100% rename from lib/c-ares-1.19.0/Makefile.msvc rename to lib/c-ares-1.19.1/Makefile.msvc diff --git a/lib/c-ares-1.19.0/Makefile.netware b/lib/c-ares-1.19.1/Makefile.netware similarity index 100% rename from lib/c-ares-1.19.0/Makefile.netware rename to lib/c-ares-1.19.1/Makefile.netware diff --git a/lib/c-ares-1.19.0/NEWS b/lib/c-ares-1.19.1/NEWS similarity index 100% rename from lib/c-ares-1.19.0/NEWS rename to lib/c-ares-1.19.1/NEWS diff --git a/lib/c-ares-1.19.0/README.cares b/lib/c-ares-1.19.1/README.cares similarity index 100% rename from lib/c-ares-1.19.0/README.cares rename to lib/c-ares-1.19.1/README.cares diff --git a/lib/c-ares-1.19.0/README.md b/lib/c-ares-1.19.1/README.md similarity index 100% rename from lib/c-ares-1.19.0/README.md rename to lib/c-ares-1.19.1/README.md diff --git a/lib/c-ares-1.19.0/README.msvc b/lib/c-ares-1.19.1/README.msvc similarity index 100% rename from lib/c-ares-1.19.0/README.msvc rename to lib/c-ares-1.19.1/README.msvc diff --git a/lib/c-ares-1.19.1/RELEASE-NOTES b/lib/c-ares-1.19.1/RELEASE-NOTES new file mode 100644 index 00000000000..2524f3ccf41 --- /dev/null +++ b/lib/c-ares-1.19.1/RELEASE-NOTES @@ -0,0 +1,57 @@ +c-ares version 1.19.1 + +This is a security and bugfix release. + +A special thanks goes out to the Open Source Technology Improvement Fund +(https://ostif.org) for sponsoring a security audit of c-ares performed by X41 +(https://x41-dsec.de). + +Security: + o CVE-2023-32067. High. 0-byte UDP payload causes Denial of Service [12] + o CVE-2023-31147. Moderate. Insufficient randomness in generation of DNS + query IDs [13] + o CVE-2023-31130. Moderate. Buffer Underwrite in ares_inet_net_pton() [14] + o CVE-2023-31124. Low. AutoTools does not set CARES_RANDOM_FILE during cross + compilation [15] + +Bug fixes: + o Fix uninitialized memory warning in test [1] + o Turn off IPV6_V6ONLY on Windows to allow IPv4-mapped IPv6 addresses [2] + o ares_getaddrinfo() should allow a port of 0 [3] + o Fix memory leak in ares_send() on error [4] + o Fix comment style in ares_data.h [5] + o Remove unneeded ifdef for Windows [6] + o Fix typo in ares_init_options.3 [7] + o Re-add support for Watcom compiler [8] + o Sync ax_pthread.m4 with upstream [9] + o Windows: Invalid stack variable used out of scope for HOSTS path [10] + o Sync ax_cxx_compile_stdcxx_11.m4 with upstream to fix uclibc support [11] + +Thanks go to these friendly people for their efforts and contributions: + Brad House (@bradh352) + @Chilledheart + Daniel Stenberg (@bagder) + Douglas R. Reno (@renodr) + Gregor Jasny (@gjasny) + Jay Freeman (@saurik) + @lifenjoiner + Nikolaos Chatzikonstantinou (@createyourpersonalaccount) + Yijie Ma (@yijiem) +(9 contributors) + +References to bug reports and discussions on issues: + [1] = https://github.com/c-ares/c-ares/pull/515 + [2] = https://github.com/c-ares/c-ares/pull/520 + [3] = https://github.com/c-ares/c-ares/issues/517 + [4] = https://github.com/c-ares/c-ares/pull/511 + [5] = https://github.com/c-ares/c-ares/pull/513 + [6] = https://github.com/c-ares/c-ares/pull/512 + [7] = https://github.com/c-ares/c-ares/pull/510 + [8] = https://github.com/c-ares/c-ares/pull/509 + [9] = https://github.com/c-ares/c-ares/pull/507 + [10] = https://github.com/c-ares/c-ares/pull/502 + [11] = https://github.com/c-ares/c-ares/pull/505 + [12] = https://github.com/c-ares/c-ares/security/advisories/GHSA-9g78-jv2r-p7vc + [13] = https://github.com/c-ares/c-ares/security/advisories/GHSA-8r8p-23f3-64c2 + [14] = https://github.com/c-ares/c-ares/security/advisories/GHSA-x6mf-cxr9-8q6v + [15] = https://github.com/c-ares/c-ares/security/advisories/GHSA-54xr-f67r-4pc4 diff --git a/lib/c-ares-1.19.0/SECURITY.md b/lib/c-ares-1.19.1/SECURITY.md similarity index 100% rename from lib/c-ares-1.19.0/SECURITY.md rename to lib/c-ares-1.19.1/SECURITY.md diff --git a/lib/c-ares-1.19.0/TODO b/lib/c-ares-1.19.1/TODO similarity index 100% rename from lib/c-ares-1.19.0/TODO rename to lib/c-ares-1.19.1/TODO diff --git a/lib/c-ares-1.19.0/acinclude.m4 b/lib/c-ares-1.19.1/acinclude.m4 similarity index 100% rename from lib/c-ares-1.19.0/acinclude.m4 rename to lib/c-ares-1.19.1/acinclude.m4 diff --git a/lib/c-ares-1.19.0/aclocal.m4 b/lib/c-ares-1.19.1/aclocal.m4 similarity index 99% rename from lib/c-ares-1.19.0/aclocal.m4 rename to lib/c-ares-1.19.1/aclocal.m4 index e7ced790b91..ef2987bfa00 100644 --- a/lib/c-ares-1.19.0/aclocal.m4 +++ b/lib/c-ares-1.19.1/aclocal.m4 @@ -1190,6 +1190,7 @@ m4_include([m4/ax_add_am_macro_static.m4]) m4_include([m4/ax_am_macros_static.m4]) m4_include([m4/ax_check_gnu_make.m4]) m4_include([m4/ax_code_coverage.m4]) +m4_include([m4/ax_cxx_compile_stdcxx.m4]) m4_include([m4/ax_cxx_compile_stdcxx_11.m4]) m4_include([m4/ax_file_escapes.m4]) m4_include([m4/ax_require_defined.m4]) diff --git a/lib/c-ares-1.19.0/test/aminclude_static.am b/lib/c-ares-1.19.1/aminclude_static.am similarity index 99% rename from lib/c-ares-1.19.0/test/aminclude_static.am rename to lib/c-ares-1.19.1/aminclude_static.am index 306f5b68518..94db7e3a8c6 100644 --- a/lib/c-ares-1.19.0/test/aminclude_static.am +++ b/lib/c-ares-1.19.1/aminclude_static.am @@ -1,6 +1,6 @@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Tue Nov 8 13:43:42 CET 2022 +# from AX_AM_MACROS_STATIC on Mon May 22 14:23:05 CEST 2023 # Code coverage diff --git a/lib/c-ares-1.19.0/buildconf b/lib/c-ares-1.19.1/buildconf similarity index 100% rename from lib/c-ares-1.19.0/buildconf rename to lib/c-ares-1.19.1/buildconf diff --git a/lib/c-ares-1.19.0/buildconf.bat b/lib/c-ares-1.19.1/buildconf.bat similarity index 100% rename from lib/c-ares-1.19.0/buildconf.bat rename to lib/c-ares-1.19.1/buildconf.bat diff --git a/lib/c-ares-1.19.0/c-ares-config.cmake.in b/lib/c-ares-1.19.1/c-ares-config.cmake.in similarity index 100% rename from lib/c-ares-1.19.0/c-ares-config.cmake.in rename to lib/c-ares-1.19.1/c-ares-config.cmake.in diff --git a/lib/c-ares-1.19.0/compile b/lib/c-ares-1.19.1/compile similarity index 100% rename from lib/c-ares-1.19.0/compile rename to lib/c-ares-1.19.1/compile diff --git a/lib/c-ares-1.19.0/config.guess b/lib/c-ares-1.19.1/config.guess similarity index 100% rename from lib/c-ares-1.19.0/config.guess rename to lib/c-ares-1.19.1/config.guess diff --git a/lib/c-ares-1.19.0/config.sub b/lib/c-ares-1.19.1/config.sub similarity index 100% rename from lib/c-ares-1.19.0/config.sub rename to lib/c-ares-1.19.1/config.sub diff --git a/lib/c-ares-1.19.0/configure b/lib/c-ares-1.19.1/configure similarity index 98% rename from lib/c-ares-1.19.0/configure rename to lib/c-ares-1.19.1/configure index 58712ec3414..2f182e0ce31 100755 --- a/lib/c-ares-1.19.0/configure +++ b/lib/c-ares-1.19.1/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for c-ares 1.19.0. +# Generated by GNU Autoconf 2.71 for c-ares 1.19.1. # # Report bugs to . # @@ -855,8 +855,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='c-ares' PACKAGE_TARNAME='c-ares' -PACKAGE_VERSION='1.19.0' -PACKAGE_STRING='c-ares 1.19.0' +PACKAGE_VERSION='1.19.1' +PACKAGE_STRING='c-ares 1.19.1' PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares' PACKAGE_URL='' @@ -1650,7 +1650,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures c-ares 1.19.0 to adapt to many kinds of systems. +\`configure' configures c-ares 1.19.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1721,7 +1721,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of c-ares 1.19.0:";; + short | recursive ) echo "Configuration of c-ares 1.19.1:";; esac cat <<\_ACEOF @@ -1861,7 +1861,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -c-ares configure 1.19.0 +c-ares configure 1.19.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2453,7 +2453,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by c-ares $as_me 1.19.0, which was +It was created by c-ares $as_me 1.19.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3426,7 +3426,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -CARES_VERSION_INFO="8:0:6" +CARES_VERSION_INFO="8:1:6" @@ -6301,148 +6301,323 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ax_cxx_compile_cxx11_required=false + ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=false ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 -printf %s "checking whether $CXX supports C++11 features by default... " >&6; } -if test ${ax_cv_cxx_compile_cxx11+y} + + + + + + if test x$ac_success = xno; then + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 +printf %s "checking whether $CXX supports C++11 features with $switch... " >&6; } +if eval test \${$cachevar+y} then : printf %s "(cached) " >&6 else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_save_CXX="$CXX" + CXX="$CXX $switch" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define static_assert _Static_assert - template +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +// MSVC always sets __cplusplus to 199711L in older versions; newer versions +// only set it correctly if /Zc:__cplusplus is specified as well as a +// /std:c++NN switch: +// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ +#elif __cplusplus < 201103L && !defined _MSC_VER + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; - struct Base { - virtual void f() {} + } + + namespace test_final_override + { + + struct Base + { + virtual ~Base() {} + virtual void f() {} }; - struct Child : public Base { - virtual void f() override {} + + struct Derived : public Base + { + virtual ~Derived() override {} + virtual void f() override {} }; - typedef check> right_angle_brackets; + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; - int a; - decltype(a) b; + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } - typedef check check_type; - check_type c; - check_type&& cr = static_cast(c); + namespace test_decltype + { - auto d = a; - auto l = [](){}; + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this - namespace test_template_alias_sfinae { - struct foo {}; + } - template - using member = typename T::member_type; + namespace test_type_deduction + { - template - void func(...) {} + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; - template - void func(member*) {} + template < typename T > + struct is_same + { + static const bool value = true; + }; - void test(); + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } - void test() { - func(0); - } + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); } -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ax_cv_cxx_compile_cxx11=yes -else $as_nop - ax_cv_cxx_compile_cxx11=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 -printf "%s\n" "$ax_cv_cxx_compile_cxx11" >&6; } - if test x$ax_cv_cxx_compile_cxx11 = xyes; then - ac_success=yes - fi + } + namespace test_noexcept + { + int f() { return 0; } + int g() noexcept { return 0; } - if test x$ac_success = xno; then - for switch in -std=c++11 -std=c++0x; do - cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 -printf %s "checking whether $CXX supports C++11 features with $switch... " >&6; } -if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $switch" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); -#define static_assert _Static_assert + } - template - struct check + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; }; - struct Base { - virtual void f() {} + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; }; - struct Child : public Base { - virtual void f() override {} + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; }; - typedef check> right_angle_brackets; + template <> + struct sum<> + { + static constexpr auto value = 0; + }; - int a; - decltype(a) b; + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - typedef check check_type; - check_type c; - check_type&& cr = static_cast(c); + } - auto d = a; - auto l = [](){}; + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this - namespace test_template_alias_sfinae { - struct foo {}; + struct foo {}; - template - using member = typename T::member_type; + template + using member = typename T::member_type; - template - void func(...) {} + template + void func(...) {} - template - void func(member*) {} + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L - void test(); - void test() { - func(0); - } - } _ACEOF if ac_fn_cxx_try_compile "$LINENO" @@ -6452,14 +6627,21 @@ else $as_nop eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CXXFLAGS="$ac_save_CXXFLAGS" + CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } - if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" - ac_success=yes + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + if test x$ac_success = xyes; then break fi done @@ -6474,22 +6656,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x$ac_success = xno; then as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 fi - else - if test x$ac_success = xno; then - HAVE_CXX11=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 + fi + if test x$ac_success = xno; then + HAVE_CXX11=0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 printf "%s\n" "$as_me: No compiler with C++11 support was found" >&6;} - else - HAVE_CXX11=1 + else + HAVE_CXX11=1 printf "%s\n" "#define HAVE_CXX11 1" >>confdefs.h - fi - - fi + am__api_version='1.16' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 @@ -6880,7 +7060,7 @@ fi # Define the identity of the package. PACKAGE='c-ares' - VERSION='1.19.0' + VERSION='1.19.1' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -33016,6 +33196,166 @@ printf "%s\n" "no" >&6; } fi + # + tst_links_arc4random_buf="unknown" + tst_proto_arc4random_buf="unknown" + tst_compi_arc4random_buf="unknown" + tst_allow_arc4random_buf="unknown" + # + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if arc4random_buf can be linked" >&5 +printf %s "checking if arc4random_buf can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* Define arc4random_buf to an innocuous variant, in case declares arc4random_buf. + For example, HP-UX 11i declares gettimeofday. */ +#define arc4random_buf innocuous_arc4random_buf + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char arc4random_buf (); below. */ + +#include +#undef arc4random_buf + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char arc4random_buf (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_arc4random_buf || defined __stub___arc4random_buf +choke me +#endif + +int +main (void) +{ +return arc4random_buf (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + tst_links_arc4random_buf="yes" + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + tst_links_arc4random_buf="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_arc4random_buf" = "yes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if arc4random_buf is prototyped" >&5 +printf %s "checking if arc4random_buf is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $cares_includes_stdlib + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "arc4random_buf" >/dev/null 2>&1 +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + tst_proto_arc4random_buf="yes" + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + tst_proto_arc4random_buf="no" + +fi +rm -rf conftest* + + fi + # + if test "$tst_proto_arc4random_buf" = "yes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if arc4random_buf is compilable" >&5 +printf %s "checking if arc4random_buf is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $cares_includes_stdlib + +int +main (void) +{ + + arc4random_buf(NULL, 0); + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + tst_compi_arc4random_buf="yes" + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + tst_compi_arc4random_buf="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + # + if test "$tst_compi_arc4random_buf" = "yes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if arc4random_buf usage allowed" >&5 +printf %s "checking if arc4random_buf usage allowed... " >&6; } + if test "x$cares_disallow_arc4random_buf" != "xyes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + tst_allow_arc4random_buf="yes" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + tst_allow_arc4random_buf="no" + fi + fi + # + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if arc4random_buf might be used" >&5 +printf %s "checking if arc4random_buf might be used... " >&6; } + if test "$tst_links_arc4random_buf" = "yes" && + test "$tst_proto_arc4random_buf" = "yes" && + test "$tst_compi_arc4random_buf" = "yes" && + test "$tst_allow_arc4random_buf" = "yes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h + + ac_cv_func_arc4random_buf="yes" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ac_cv_func_arc4random_buf="no" + fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PF_INET6" >&5 @@ -33954,37 +34294,7 @@ if test ${with_random+y} then : withval=$with_random; CARES_RANDOM_FILE="$withval" else $as_nop - - if test "$cross_compiling" = "no"; then - as_ac_File=`printf "%s\n" "ac_cv_file_"/dev/urandom"" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for \"/dev/urandom\"" >&5 -printf %s "checking for \"/dev/urandom\"... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r ""/dev/urandom""; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : CARES_RANDOM_FILE="/dev/urandom" -fi - - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for /dev/urandom while cross compiling; assuming none" >&5 -printf "%s\n" "$as_me: WARNING: cannot check for /dev/urandom while cross compiling; assuming none" >&2;} - fi - - fi @@ -34868,7 +35178,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by c-ares $as_me 1.19.0, which was +This file was extended by c-ares $as_me 1.19.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34936,7 +35246,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -c-ares config.status 1.19.0 +c-ares config.status 1.19.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/lib/c-ares-1.19.0/configure.ac b/lib/c-ares-1.19.1/configure.ac similarity index 98% rename from lib/c-ares-1.19.0/configure.ac rename to lib/c-ares-1.19.1/configure.ac index 56a570bce01..54e79d6e2a9 100644 --- a/lib/c-ares-1.19.0/configure.ac +++ b/lib/c-ares-1.19.1/configure.ac @@ -1,9 +1,9 @@ AC_PREREQ([2.60]) -AC_INIT([c-ares], [1.19.0], +AC_INIT([c-ares], [1.19.1], [c-ares mailing list: http://lists.haxx.se/listinfo/c-ares]) -CARES_VERSION_INFO="8:0:6" +CARES_VERSION_INFO="8:1:6" dnl This flag accepts an argument of the form current[:revision[:age]]. So, dnl passing -version-info 3:12:1 sets current to 3, revision to 12, and age to dnl 1. @@ -683,6 +683,7 @@ CARES_CHECK_FUNC_STRNCASECMP CARES_CHECK_FUNC_STRNCMPI CARES_CHECK_FUNC_STRNICMP CARES_CHECK_FUNC_WRITEV +CARES_CHECK_FUNC_ARC4RANDOM_BUF dnl check for AF_INET6 @@ -896,17 +897,7 @@ AC_ARG_WITH(random, AS_HELP_STRING([--with-random=FILE], [read randomness from FILE (default=/dev/urandom)]), [ CARES_RANDOM_FILE="$withval" ], - [ - dnl Check for random device. If we're cross compiling, we can't - dnl check, and it's better to assume it doesn't exist than it is - dnl to fail on AC_CHECK_FILE or later. - if test "$cross_compiling" = "no"; then - AC_CHECK_FILE("/dev/urandom", [ CARES_RANDOM_FILE="/dev/urandom"] ) - else - AC_MSG_WARN([cannot check for /dev/urandom while cross compiling; assuming none]) - fi - - ] + [ CARES_RANDOM_FILE="/dev/urandom" ] ) if test -n "$CARES_RANDOM_FILE" && test X"$CARES_RANDOM_FILE" != Xno ; then AC_SUBST(CARES_RANDOM_FILE) diff --git a/lib/c-ares-1.19.0/depcomp b/lib/c-ares-1.19.1/depcomp similarity index 100% rename from lib/c-ares-1.19.0/depcomp rename to lib/c-ares-1.19.1/depcomp diff --git a/lib/c-ares-1.19.0/docs/CMakeLists.txt b/lib/c-ares-1.19.1/docs/CMakeLists.txt similarity index 100% rename from lib/c-ares-1.19.0/docs/CMakeLists.txt rename to lib/c-ares-1.19.1/docs/CMakeLists.txt diff --git a/lib/c-ares-1.19.0/docs/Makefile.am b/lib/c-ares-1.19.1/docs/Makefile.am similarity index 100% rename from lib/c-ares-1.19.0/docs/Makefile.am rename to lib/c-ares-1.19.1/docs/Makefile.am diff --git a/lib/c-ares-1.19.0/docs/Makefile.in b/lib/c-ares-1.19.1/docs/Makefile.in similarity index 99% rename from lib/c-ares-1.19.0/docs/Makefile.in rename to lib/c-ares-1.19.1/docs/Makefile.in index 94dc18d1e04..b169b2a01d1 100644 --- a/lib/c-ares-1.19.0/docs/Makefile.in +++ b/lib/c-ares-1.19.1/docs/Makefile.in @@ -99,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_ac_append_to_file.m4 \ $(top_srcdir)/m4/ax_am_macros_static.m4 \ $(top_srcdir)/m4/ax_check_gnu_make.m4 \ $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_file_escapes.m4 \ $(top_srcdir)/m4/ax_require_defined.m4 \ diff --git a/lib/c-ares-1.19.0/docs/Makefile.inc b/lib/c-ares-1.19.1/docs/Makefile.inc similarity index 100% rename from lib/c-ares-1.19.0/docs/Makefile.inc rename to lib/c-ares-1.19.1/docs/Makefile.inc diff --git a/lib/c-ares-1.19.0/docs/acountry.1 b/lib/c-ares-1.19.1/docs/acountry.1 similarity index 100% rename from lib/c-ares-1.19.0/docs/acountry.1 rename to lib/c-ares-1.19.1/docs/acountry.1 diff --git a/lib/c-ares-1.19.0/docs/adig.1 b/lib/c-ares-1.19.1/docs/adig.1 similarity index 100% rename from lib/c-ares-1.19.0/docs/adig.1 rename to lib/c-ares-1.19.1/docs/adig.1 diff --git a/lib/c-ares-1.19.0/docs/ahost.1 b/lib/c-ares-1.19.1/docs/ahost.1 similarity index 100% rename from lib/c-ares-1.19.0/docs/ahost.1 rename to lib/c-ares-1.19.1/docs/ahost.1 diff --git a/lib/c-ares-1.19.0/docs/ares_cancel.3 b/lib/c-ares-1.19.1/docs/ares_cancel.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_cancel.3 rename to lib/c-ares-1.19.1/docs/ares_cancel.3 diff --git a/lib/c-ares-1.19.0/docs/ares_create_query.3 b/lib/c-ares-1.19.1/docs/ares_create_query.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_create_query.3 rename to lib/c-ares-1.19.1/docs/ares_create_query.3 diff --git a/lib/c-ares-1.19.0/docs/ares_destroy.3 b/lib/c-ares-1.19.1/docs/ares_destroy.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_destroy.3 rename to lib/c-ares-1.19.1/docs/ares_destroy.3 diff --git a/lib/c-ares-1.19.0/docs/ares_destroy_options.3 b/lib/c-ares-1.19.1/docs/ares_destroy_options.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_destroy_options.3 rename to lib/c-ares-1.19.1/docs/ares_destroy_options.3 diff --git a/lib/c-ares-1.19.0/docs/ares_dup.3 b/lib/c-ares-1.19.1/docs/ares_dup.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_dup.3 rename to lib/c-ares-1.19.1/docs/ares_dup.3 diff --git a/lib/c-ares-1.19.0/docs/ares_expand_name.3 b/lib/c-ares-1.19.1/docs/ares_expand_name.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_expand_name.3 rename to lib/c-ares-1.19.1/docs/ares_expand_name.3 diff --git a/lib/c-ares-1.19.0/docs/ares_expand_string.3 b/lib/c-ares-1.19.1/docs/ares_expand_string.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_expand_string.3 rename to lib/c-ares-1.19.1/docs/ares_expand_string.3 diff --git a/lib/c-ares-1.19.0/docs/ares_fds.3 b/lib/c-ares-1.19.1/docs/ares_fds.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_fds.3 rename to lib/c-ares-1.19.1/docs/ares_fds.3 diff --git a/lib/c-ares-1.19.0/docs/ares_free_data.3 b/lib/c-ares-1.19.1/docs/ares_free_data.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_free_data.3 rename to lib/c-ares-1.19.1/docs/ares_free_data.3 diff --git a/lib/c-ares-1.19.0/docs/ares_free_hostent.3 b/lib/c-ares-1.19.1/docs/ares_free_hostent.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_free_hostent.3 rename to lib/c-ares-1.19.1/docs/ares_free_hostent.3 diff --git a/lib/c-ares-1.19.0/docs/ares_free_string.3 b/lib/c-ares-1.19.1/docs/ares_free_string.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_free_string.3 rename to lib/c-ares-1.19.1/docs/ares_free_string.3 diff --git a/lib/c-ares-1.19.0/docs/ares_freeaddrinfo.3 b/lib/c-ares-1.19.1/docs/ares_freeaddrinfo.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_freeaddrinfo.3 rename to lib/c-ares-1.19.1/docs/ares_freeaddrinfo.3 diff --git a/lib/c-ares-1.19.0/docs/ares_get_servers.3 b/lib/c-ares-1.19.1/docs/ares_get_servers.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_get_servers.3 rename to lib/c-ares-1.19.1/docs/ares_get_servers.3 diff --git a/lib/c-ares-1.19.0/docs/ares_get_servers_ports.3 b/lib/c-ares-1.19.1/docs/ares_get_servers_ports.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_get_servers_ports.3 rename to lib/c-ares-1.19.1/docs/ares_get_servers_ports.3 diff --git a/lib/c-ares-1.19.0/docs/ares_getaddrinfo.3 b/lib/c-ares-1.19.1/docs/ares_getaddrinfo.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_getaddrinfo.3 rename to lib/c-ares-1.19.1/docs/ares_getaddrinfo.3 diff --git a/lib/c-ares-1.19.0/docs/ares_gethostbyaddr.3 b/lib/c-ares-1.19.1/docs/ares_gethostbyaddr.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_gethostbyaddr.3 rename to lib/c-ares-1.19.1/docs/ares_gethostbyaddr.3 diff --git a/lib/c-ares-1.19.0/docs/ares_gethostbyname.3 b/lib/c-ares-1.19.1/docs/ares_gethostbyname.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_gethostbyname.3 rename to lib/c-ares-1.19.1/docs/ares_gethostbyname.3 diff --git a/lib/c-ares-1.19.0/docs/ares_gethostbyname_file.3 b/lib/c-ares-1.19.1/docs/ares_gethostbyname_file.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_gethostbyname_file.3 rename to lib/c-ares-1.19.1/docs/ares_gethostbyname_file.3 diff --git a/lib/c-ares-1.19.0/docs/ares_getnameinfo.3 b/lib/c-ares-1.19.1/docs/ares_getnameinfo.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_getnameinfo.3 rename to lib/c-ares-1.19.1/docs/ares_getnameinfo.3 diff --git a/lib/c-ares-1.19.0/docs/ares_getsock.3 b/lib/c-ares-1.19.1/docs/ares_getsock.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_getsock.3 rename to lib/c-ares-1.19.1/docs/ares_getsock.3 diff --git a/lib/c-ares-1.19.0/docs/ares_inet_ntop.3 b/lib/c-ares-1.19.1/docs/ares_inet_ntop.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_inet_ntop.3 rename to lib/c-ares-1.19.1/docs/ares_inet_ntop.3 diff --git a/lib/c-ares-1.19.0/docs/ares_inet_pton.3 b/lib/c-ares-1.19.1/docs/ares_inet_pton.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_inet_pton.3 rename to lib/c-ares-1.19.1/docs/ares_inet_pton.3 diff --git a/lib/c-ares-1.19.0/docs/ares_init.3 b/lib/c-ares-1.19.1/docs/ares_init.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_init.3 rename to lib/c-ares-1.19.1/docs/ares_init.3 diff --git a/lib/c-ares-1.19.0/docs/ares_init_options.3 b/lib/c-ares-1.19.1/docs/ares_init_options.3 similarity index 99% rename from lib/c-ares-1.19.0/docs/ares_init_options.3 rename to lib/c-ares-1.19.1/docs/ares_init_options.3 index 02d30721080..b31f6637c75 100644 --- a/lib/c-ares-1.19.0/docs/ares_init_options.3 +++ b/lib/c-ares-1.19.1/docs/ares_init_options.3 @@ -283,7 +283,7 @@ When initializing from path location) \fBares_init_options(3)\fP reads the \fIdomain\fP and \fIsearch\fP directives to allow lookups of short names relative to the domains specified. The -\fIdomain\fP and \fIsearch\fP directives override one another. If more that +\fIdomain\fP and \fIsearch\fP directives override one another. If more than one instance of either \fIdomain\fP or \fIsearch\fP directives is specified, the last occurrence wins. For more information, please see the .BR resolv.conf (5) diff --git a/lib/c-ares-1.19.0/docs/ares_library_cleanup.3 b/lib/c-ares-1.19.1/docs/ares_library_cleanup.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_library_cleanup.3 rename to lib/c-ares-1.19.1/docs/ares_library_cleanup.3 diff --git a/lib/c-ares-1.19.0/docs/ares_library_init.3 b/lib/c-ares-1.19.1/docs/ares_library_init.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_library_init.3 rename to lib/c-ares-1.19.1/docs/ares_library_init.3 diff --git a/lib/c-ares-1.19.0/docs/ares_library_init_android.3 b/lib/c-ares-1.19.1/docs/ares_library_init_android.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_library_init_android.3 rename to lib/c-ares-1.19.1/docs/ares_library_init_android.3 diff --git a/lib/c-ares-1.19.0/docs/ares_library_initialized.3 b/lib/c-ares-1.19.1/docs/ares_library_initialized.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_library_initialized.3 rename to lib/c-ares-1.19.1/docs/ares_library_initialized.3 diff --git a/lib/c-ares-1.19.0/docs/ares_mkquery.3 b/lib/c-ares-1.19.1/docs/ares_mkquery.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_mkquery.3 rename to lib/c-ares-1.19.1/docs/ares_mkquery.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_a_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_a_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_a_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_a_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_aaaa_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_aaaa_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_aaaa_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_aaaa_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_caa_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_caa_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_caa_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_caa_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_mx_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_mx_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_mx_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_mx_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_naptr_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_naptr_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_naptr_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_naptr_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_ns_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_ns_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_ns_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_ns_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_ptr_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_ptr_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_ptr_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_ptr_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_soa_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_soa_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_soa_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_soa_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_srv_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_srv_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_srv_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_srv_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_txt_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_txt_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_txt_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_txt_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_parse_uri_reply.3 b/lib/c-ares-1.19.1/docs/ares_parse_uri_reply.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_parse_uri_reply.3 rename to lib/c-ares-1.19.1/docs/ares_parse_uri_reply.3 diff --git a/lib/c-ares-1.19.0/docs/ares_process.3 b/lib/c-ares-1.19.1/docs/ares_process.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_process.3 rename to lib/c-ares-1.19.1/docs/ares_process.3 diff --git a/lib/c-ares-1.19.0/docs/ares_query.3 b/lib/c-ares-1.19.1/docs/ares_query.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_query.3 rename to lib/c-ares-1.19.1/docs/ares_query.3 diff --git a/lib/c-ares-1.19.0/docs/ares_save_options.3 b/lib/c-ares-1.19.1/docs/ares_save_options.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_save_options.3 rename to lib/c-ares-1.19.1/docs/ares_save_options.3 diff --git a/lib/c-ares-1.19.0/docs/ares_search.3 b/lib/c-ares-1.19.1/docs/ares_search.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_search.3 rename to lib/c-ares-1.19.1/docs/ares_search.3 diff --git a/lib/c-ares-1.19.0/docs/ares_send.3 b/lib/c-ares-1.19.1/docs/ares_send.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_send.3 rename to lib/c-ares-1.19.1/docs/ares_send.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_local_dev.3 b/lib/c-ares-1.19.1/docs/ares_set_local_dev.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_local_dev.3 rename to lib/c-ares-1.19.1/docs/ares_set_local_dev.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_local_ip4.3 b/lib/c-ares-1.19.1/docs/ares_set_local_ip4.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_local_ip4.3 rename to lib/c-ares-1.19.1/docs/ares_set_local_ip4.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_local_ip6.3 b/lib/c-ares-1.19.1/docs/ares_set_local_ip6.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_local_ip6.3 rename to lib/c-ares-1.19.1/docs/ares_set_local_ip6.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_servers.3 b/lib/c-ares-1.19.1/docs/ares_set_servers.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_servers.3 rename to lib/c-ares-1.19.1/docs/ares_set_servers.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_servers_csv.3 b/lib/c-ares-1.19.1/docs/ares_set_servers_csv.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_servers_csv.3 rename to lib/c-ares-1.19.1/docs/ares_set_servers_csv.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_servers_ports.3 b/lib/c-ares-1.19.1/docs/ares_set_servers_ports.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_servers_ports.3 rename to lib/c-ares-1.19.1/docs/ares_set_servers_ports.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_servers_ports_csv.3 b/lib/c-ares-1.19.1/docs/ares_set_servers_ports_csv.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_servers_ports_csv.3 rename to lib/c-ares-1.19.1/docs/ares_set_servers_ports_csv.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_socket_callback.3 b/lib/c-ares-1.19.1/docs/ares_set_socket_callback.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_socket_callback.3 rename to lib/c-ares-1.19.1/docs/ares_set_socket_callback.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_socket_configure_callback.3 b/lib/c-ares-1.19.1/docs/ares_set_socket_configure_callback.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_socket_configure_callback.3 rename to lib/c-ares-1.19.1/docs/ares_set_socket_configure_callback.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_socket_functions.3 b/lib/c-ares-1.19.1/docs/ares_set_socket_functions.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_socket_functions.3 rename to lib/c-ares-1.19.1/docs/ares_set_socket_functions.3 diff --git a/lib/c-ares-1.19.0/docs/ares_set_sortlist.3 b/lib/c-ares-1.19.1/docs/ares_set_sortlist.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_set_sortlist.3 rename to lib/c-ares-1.19.1/docs/ares_set_sortlist.3 diff --git a/lib/c-ares-1.19.0/docs/ares_strerror.3 b/lib/c-ares-1.19.1/docs/ares_strerror.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_strerror.3 rename to lib/c-ares-1.19.1/docs/ares_strerror.3 diff --git a/lib/c-ares-1.19.0/docs/ares_timeout.3 b/lib/c-ares-1.19.1/docs/ares_timeout.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_timeout.3 rename to lib/c-ares-1.19.1/docs/ares_timeout.3 diff --git a/lib/c-ares-1.19.0/docs/ares_version.3 b/lib/c-ares-1.19.1/docs/ares_version.3 similarity index 100% rename from lib/c-ares-1.19.0/docs/ares_version.3 rename to lib/c-ares-1.19.1/docs/ares_version.3 diff --git a/lib/c-ares-1.19.0/get_ver.awk b/lib/c-ares-1.19.1/get_ver.awk similarity index 100% rename from lib/c-ares-1.19.0/get_ver.awk rename to lib/c-ares-1.19.1/get_ver.awk diff --git a/lib/c-ares-1.19.0/include/CMakeLists.txt b/lib/c-ares-1.19.1/include/CMakeLists.txt similarity index 100% rename from lib/c-ares-1.19.0/include/CMakeLists.txt rename to lib/c-ares-1.19.1/include/CMakeLists.txt diff --git a/lib/c-ares-1.19.0/include/Makefile.am b/lib/c-ares-1.19.1/include/Makefile.am similarity index 100% rename from lib/c-ares-1.19.0/include/Makefile.am rename to lib/c-ares-1.19.1/include/Makefile.am diff --git a/lib/c-ares-1.19.0/include/Makefile.in b/lib/c-ares-1.19.1/include/Makefile.in similarity index 99% rename from lib/c-ares-1.19.0/include/Makefile.in rename to lib/c-ares-1.19.1/include/Makefile.in index 40c1d51fb17..8586bd52f11 100644 --- a/lib/c-ares-1.19.0/include/Makefile.in +++ b/lib/c-ares-1.19.1/include/Makefile.in @@ -96,6 +96,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_ac_append_to_file.m4 \ $(top_srcdir)/m4/ax_am_macros_static.m4 \ $(top_srcdir)/m4/ax_check_gnu_make.m4 \ $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_file_escapes.m4 \ $(top_srcdir)/m4/ax_require_defined.m4 \ diff --git a/lib/c-ares-1.19.0/include/ares.h b/lib/c-ares-1.19.1/include/ares.h similarity index 100% rename from lib/c-ares-1.19.0/include/ares.h rename to lib/c-ares-1.19.1/include/ares.h diff --git a/lib/c-ares-1.19.0/include/ares_build.h b/lib/c-ares-1.19.1/include/ares_build.h similarity index 100% rename from lib/c-ares-1.19.0/include/ares_build.h rename to lib/c-ares-1.19.1/include/ares_build.h diff --git a/lib/c-ares-1.19.0/include/ares_build.h.cmake b/lib/c-ares-1.19.1/include/ares_build.h.cmake similarity index 100% rename from lib/c-ares-1.19.0/include/ares_build.h.cmake rename to lib/c-ares-1.19.1/include/ares_build.h.cmake diff --git a/lib/c-ares-1.19.0/include/ares_build.h.in b/lib/c-ares-1.19.1/include/ares_build.h.in similarity index 100% rename from lib/c-ares-1.19.0/include/ares_build.h.in rename to lib/c-ares-1.19.1/include/ares_build.h.in diff --git a/lib/c-ares-1.19.0/include/ares_dns.h b/lib/c-ares-1.19.1/include/ares_dns.h similarity index 100% rename from lib/c-ares-1.19.0/include/ares_dns.h rename to lib/c-ares-1.19.1/include/ares_dns.h diff --git a/lib/c-ares-1.19.0/include/ares_nameser.h b/lib/c-ares-1.19.1/include/ares_nameser.h similarity index 100% rename from lib/c-ares-1.19.0/include/ares_nameser.h rename to lib/c-ares-1.19.1/include/ares_nameser.h diff --git a/lib/c-ares-1.19.0/include/ares_rules.h b/lib/c-ares-1.19.1/include/ares_rules.h similarity index 100% rename from lib/c-ares-1.19.0/include/ares_rules.h rename to lib/c-ares-1.19.1/include/ares_rules.h diff --git a/lib/c-ares-1.19.0/include/ares_version.h b/lib/c-ares-1.19.1/include/ares_version.h similarity index 90% rename from lib/c-ares-1.19.0/include/ares_version.h rename to lib/c-ares-1.19.1/include/ares_version.h index 4d8d62fd18e..35a1ed1a3d3 100644 --- a/lib/c-ares-1.19.0/include/ares_version.h +++ b/lib/c-ares-1.19.1/include/ares_version.h @@ -7,11 +7,11 @@ #define ARES_VERSION_MAJOR 1 #define ARES_VERSION_MINOR 19 -#define ARES_VERSION_PATCH 0 +#define ARES_VERSION_PATCH 1 #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ (ARES_VERSION_MINOR<<8)|\ (ARES_VERSION_PATCH)) -#define ARES_VERSION_STR "1.19.0" +#define ARES_VERSION_STR "1.19.1" #if (ARES_VERSION >= 0x010700) # define CARES_HAVE_ARES_LIBRARY_INIT 1 diff --git a/lib/c-ares-1.19.0/install-sh b/lib/c-ares-1.19.1/install-sh similarity index 100% rename from lib/c-ares-1.19.0/install-sh rename to lib/c-ares-1.19.1/install-sh diff --git a/lib/c-ares-1.19.0/libcares.pc.cmake b/lib/c-ares-1.19.1/libcares.pc.cmake similarity index 100% rename from lib/c-ares-1.19.0/libcares.pc.cmake rename to lib/c-ares-1.19.1/libcares.pc.cmake diff --git a/lib/c-ares-1.19.0/libcares.pc.in b/lib/c-ares-1.19.1/libcares.pc.in similarity index 100% rename from lib/c-ares-1.19.0/libcares.pc.in rename to lib/c-ares-1.19.1/libcares.pc.in diff --git a/lib/c-ares-1.19.0/ltmain.sh b/lib/c-ares-1.19.1/ltmain.sh similarity index 100% rename from lib/c-ares-1.19.0/ltmain.sh rename to lib/c-ares-1.19.1/ltmain.sh diff --git a/lib/c-ares-1.19.0/m4/ax_ac_append_to_file.m4 b/lib/c-ares-1.19.1/m4/ax_ac_append_to_file.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ax_ac_append_to_file.m4 rename to lib/c-ares-1.19.1/m4/ax_ac_append_to_file.m4 diff --git a/lib/c-ares-1.19.0/m4/ax_ac_print_to_file.m4 b/lib/c-ares-1.19.1/m4/ax_ac_print_to_file.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ax_ac_print_to_file.m4 rename to lib/c-ares-1.19.1/m4/ax_ac_print_to_file.m4 diff --git a/lib/c-ares-1.19.0/m4/ax_add_am_macro_static.m4 b/lib/c-ares-1.19.1/m4/ax_add_am_macro_static.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ax_add_am_macro_static.m4 rename to lib/c-ares-1.19.1/m4/ax_add_am_macro_static.m4 diff --git a/lib/c-ares-1.19.0/m4/ax_am_macros_static.m4 b/lib/c-ares-1.19.1/m4/ax_am_macros_static.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ax_am_macros_static.m4 rename to lib/c-ares-1.19.1/m4/ax_am_macros_static.m4 diff --git a/lib/c-ares-1.19.0/m4/ax_check_gnu_make.m4 b/lib/c-ares-1.19.1/m4/ax_check_gnu_make.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ax_check_gnu_make.m4 rename to lib/c-ares-1.19.1/m4/ax_check_gnu_make.m4 diff --git a/lib/c-ares-1.19.0/m4/ax_check_user_namespace.m4 b/lib/c-ares-1.19.1/m4/ax_check_user_namespace.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ax_check_user_namespace.m4 rename to lib/c-ares-1.19.1/m4/ax_check_user_namespace.m4 diff --git a/lib/c-ares-1.19.0/m4/ax_check_uts_namespace.m4 b/lib/c-ares-1.19.1/m4/ax_check_uts_namespace.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ax_check_uts_namespace.m4 rename to lib/c-ares-1.19.1/m4/ax_check_uts_namespace.m4 diff --git a/lib/c-ares-1.19.0/m4/ax_code_coverage.m4 b/lib/c-ares-1.19.1/m4/ax_code_coverage.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ax_code_coverage.m4 rename to lib/c-ares-1.19.1/m4/ax_code_coverage.m4 diff --git a/lib/c-ares-1.19.1/m4/ax_cxx_compile_stdcxx.m4 b/lib/c-ares-1.19.1/m4/ax_cxx_compile_stdcxx.m4 new file mode 100644 index 00000000000..a3d964c699a --- /dev/null +++ b/lib/c-ares-1.19.1/m4/ax_cxx_compile_stdcxx.m4 @@ -0,0 +1,1009 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the specified +# version of the C++ standard. If necessary, add switches to CXX and +# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for +# the respective C++ standard version. +# +# The second argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for no added switch, and then for an extended mode. +# +# The third argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline support for the specified C++ standard is +# required and that the macro should error out if no mode with that +# support is found. If specified 'optional', then configuration proceeds +# regardless, after defining HAVE_CXX${VERSION} if and only if a +# supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov +# Copyright (c) 2015 Paul Norman +# Copyright (c) 2015 Moritz Klammler +# Copyright (c) 2016, 2018 Krzesimir Nowak +# Copyright (c) 2019 Enji Cooper +# Copyright (c) 2020 Jason Merrill +# Copyright (c) 2021 Jörn Heusipp +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 15 + +dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro +dnl (serial version number 13). + +AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl + m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], + [$1], [14], [ax_cxx_compile_alternatives="14 1y"], + [$1], [17], [ax_cxx_compile_alternatives="17 1z"], + [$1], [20], [ax_cxx_compile_alternatives="20"], + [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$2], [], [], + [$2], [ext], [], + [$2], [noext], [], + [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], + [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], + [$3], [optional], [ax_cxx_compile_cxx$1_required=false], + [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) + AC_LANG_PUSH([C++])dnl + ac_success=no + + m4_if([$2], [], [dnl + AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, + ax_cv_cxx_compile_cxx$1, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [ax_cv_cxx_compile_cxx$1=yes], + [ax_cv_cxx_compile_cxx$1=no])]) + if test x$ax_cv_cxx_compile_cxx$1 = xyes; then + ac_success=yes + fi]) + + m4_if([$2], [noext], [], [dnl + if test x$ac_success = xno; then + for alternative in ${ax_cxx_compile_alternatives}; do + switch="-std=gnu++${alternative}" + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + fi]) + + m4_if([$2], [ext], [], [dnl + if test x$ac_success = xno; then + dnl HP's aCC needs +std=c++11 according to: + dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf + dnl Cray's crayCC needs "-h std=c++11" + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + if test x$ac_success = xyes; then + break + fi + done + fi]) + AC_LANG_POP([C++]) + if test x$ax_cxx_compile_cxx$1_required = xtrue; then + if test x$ac_success = xno; then + AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) + fi + fi + if test x$ac_success = xno; then + HAVE_CXX$1=0 + AC_MSG_NOTICE([No compiler with C++$1 support was found]) + else + HAVE_CXX$1=1 + AC_DEFINE(HAVE_CXX$1,1, + [define if the compiler supports basic C++$1 syntax]) + fi + AC_SUBST(HAVE_CXX$1) +]) + + +dnl Test body for checking C++11 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 +) + +dnl Test body for checking C++14 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 +) + +dnl Test body for checking C++17 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 +) + +dnl Test body for checking C++20 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_20 +) + + +dnl Tests for new features in C++11 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +// MSVC always sets __cplusplus to 199711L in older versions; newer versions +// only set it correctly if /Zc:__cplusplus is specified as well as a +// /std:c++NN switch: +// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ +#elif __cplusplus < 201103L && !defined _MSC_VER + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + } + + namespace test_final_override + { + + struct Base + { + virtual ~Base() {} + virtual void f() {} + }; + + struct Derived : public Base + { + virtual ~Derived() override {} + virtual void f() override {} + }; + + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; + + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } + + namespace test_decltype + { + + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + + } + + namespace test_type_deduction + { + + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + +]]) + + +dnl Tests for new features in C++14 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ + +// If the compiler admits that it is not ready for C++14, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201402L && !defined _MSC_VER + +#error "This is not a C++14 compiler" + +#else + +namespace cxx14 +{ + + namespace test_polymorphic_lambdas + { + + int + test() + { + const auto lambda = [](auto&&... args){ + const auto istiny = [](auto x){ + return (sizeof(x) == 1UL) ? 1 : 0; + }; + const int aretiny[] = { istiny(args)... }; + return aretiny[0]; + }; + return lambda(1, 1L, 1.0f, '1'); + } + + } + + namespace test_binary_literals + { + + constexpr auto ivii = 0b0000000000101010; + static_assert(ivii == 42, "wrong value"); + + } + + namespace test_generalized_constexpr + { + + template < typename CharT > + constexpr unsigned long + strlen_c(const CharT *const s) noexcept + { + auto length = 0UL; + for (auto p = s; *p; ++p) + ++length; + return length; + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("x") == 1UL, ""); + static_assert(strlen_c("test") == 4UL, ""); + static_assert(strlen_c("another\0test") == 7UL, ""); + + } + + namespace test_lambda_init_capture + { + + int + test() + { + auto x = 0; + const auto lambda1 = [a = x](int b){ return a + b; }; + const auto lambda2 = [a = lambda1(x)](){ return a; }; + return lambda2(); + } + + } + + namespace test_digit_separators + { + + constexpr auto ten_million = 100'000'000; + static_assert(ten_million == 100000000, ""); + + } + + namespace test_return_type_deduction + { + + auto f(int& x) { return x; } + decltype(auto) g(int& x) { return x; } + + template < typename T1, typename T2 > + struct is_same + { + static constexpr auto value = false; + }; + + template < typename T > + struct is_same + { + static constexpr auto value = true; + }; + + int + test() + { + auto x = 0; + static_assert(is_same::value, ""); + static_assert(is_same::value, ""); + return x; + } + + } + +} // namespace cxx14 + +#endif // __cplusplus >= 201402L + +]]) + + +dnl Tests for new features in C++17 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ + +// If the compiler admits that it is not ready for C++17, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201703L && !defined _MSC_VER + +#error "This is not a C++17 compiler" + +#else + +#include +#include +#include + +namespace cxx17 +{ + + namespace test_constexpr_lambdas + { + + constexpr int foo = [](){return 42;}(); + + } + + namespace test::nested_namespace::definitions + { + + } + + namespace test_fold_expression + { + + template + int multiply(Args... args) + { + return (args * ... * 1); + } + + template + bool all(Args... args) + { + return (args && ...); + } + + } + + namespace test_extended_static_assert + { + + static_assert (true); + + } + + namespace test_auto_brace_init_list + { + + auto foo = {5}; + auto bar {5}; + + static_assert(std::is_same, decltype(foo)>::value); + static_assert(std::is_same::value); + } + + namespace test_typename_in_template_template_parameter + { + + template typename X> struct D; + + } + + namespace test_fallthrough_nodiscard_maybe_unused_attributes + { + + int f1() + { + return 42; + } + + [[nodiscard]] int f2() + { + [[maybe_unused]] auto unused = f1(); + + switch (f1()) + { + case 17: + f1(); + [[fallthrough]]; + case 42: + f1(); + } + return f1(); + } + + } + + namespace test_extended_aggregate_initialization + { + + struct base1 + { + int b1, b2 = 42; + }; + + struct base2 + { + base2() { + b3 = 42; + } + int b3; + }; + + struct derived : base1, base2 + { + int d; + }; + + derived d1 {{1, 2}, {}, 4}; // full initialization + derived d2 {{}, {}, 4}; // value-initialized bases + + } + + namespace test_general_range_based_for_loop + { + + struct iter + { + int i; + + int& operator* () + { + return i; + } + + const int& operator* () const + { + return i; + } + + iter& operator++() + { + ++i; + return *this; + } + }; + + struct sentinel + { + int i; + }; + + bool operator== (const iter& i, const sentinel& s) + { + return i.i == s.i; + } + + bool operator!= (const iter& i, const sentinel& s) + { + return !(i == s); + } + + struct range + { + iter begin() const + { + return {0}; + } + + sentinel end() const + { + return {5}; + } + }; + + void f() + { + range r {}; + + for (auto i : r) + { + [[maybe_unused]] auto v = i; + } + } + + } + + namespace test_lambda_capture_asterisk_this_by_value + { + + struct t + { + int i; + int foo() + { + return [*this]() + { + return i; + }(); + } + }; + + } + + namespace test_enum_class_construction + { + + enum class byte : unsigned char + {}; + + byte foo {42}; + + } + + namespace test_constexpr_if + { + + template + int f () + { + if constexpr(cond) + { + return 13; + } + else + { + return 42; + } + } + + } + + namespace test_selection_statement_with_initializer + { + + int f() + { + return 13; + } + + int f2() + { + if (auto i = f(); i > 0) + { + return 3; + } + + switch (auto i = f(); i + 4) + { + case 17: + return 2; + + default: + return 1; + } + } + + } + + namespace test_template_argument_deduction_for_class_templates + { + + template + struct pair + { + pair (T1 p1, T2 p2) + : m1 {p1}, + m2 {p2} + {} + + T1 m1; + T2 m2; + }; + + void f() + { + [[maybe_unused]] auto p = pair{13, 42u}; + } + + } + + namespace test_non_type_auto_template_parameters + { + + template + struct B + {}; + + B<5> b1; + B<'a'> b2; + + } + + namespace test_structured_bindings + { + + int arr[2] = { 1, 2 }; + std::pair pr = { 1, 2 }; + + auto f1() -> int(&)[2] + { + return arr; + } + + auto f2() -> std::pair& + { + return pr; + } + + struct S + { + int x1 : 2; + volatile double y1; + }; + + S f3() + { + return {}; + } + + auto [ x1, y1 ] = f1(); + auto& [ xr1, yr1 ] = f1(); + auto [ x2, y2 ] = f2(); + auto& [ xr2, yr2 ] = f2(); + const auto [ x3, y3 ] = f3(); + + } + + namespace test_exception_spec_type_system + { + + struct Good {}; + struct Bad {}; + + void g1() noexcept; + void g2(); + + template + Bad + f(T*, T*); + + template + Good + f(T1*, T2*); + + static_assert (std::is_same_v); + + } + + namespace test_inline_variables + { + + template void f(T) + {} + + template inline T g(T) + { + return T{}; + } + + template<> inline void f<>(int) + {} + + template<> int g<>(int) + { + return 5; + } + + } + +} // namespace cxx17 + +#endif // __cplusplus < 201703L && !defined _MSC_VER + +]]) + + +dnl Tests for new features in C++20 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[ + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 202002L && !defined _MSC_VER + +#error "This is not a C++20 compiler" + +#else + +#include + +namespace cxx20 +{ + +// As C++20 supports feature test macros in the standard, there is no +// immediate need to actually test for feature availability on the +// Autoconf side. + +} // namespace cxx20 + +#endif // __cplusplus < 202002L && !defined _MSC_VER + +]]) diff --git a/lib/c-ares-1.19.1/m4/ax_cxx_compile_stdcxx_11.m4 b/lib/c-ares-1.19.1/m4/ax_cxx_compile_stdcxx_11.m4 new file mode 100644 index 00000000000..1733fd85f95 --- /dev/null +++ b/lib/c-ares-1.19.1/m4/ax_cxx_compile_stdcxx_11.m4 @@ -0,0 +1,39 @@ +# ============================================================================= +# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html +# ============================================================================= +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the C++11 +# standard; if necessary, add switches to CXX and CXXCPP to enable +# support. +# +# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX +# macro with the version set to C++11. The two optional arguments are +# forwarded literally as the second and third argument respectively. +# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for +# more information. If you want to use this macro, you also need to +# download the ax_cxx_compile_stdcxx.m4 file. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov +# Copyright (c) 2015 Paul Norman +# Copyright (c) 2015 Moritz Klammler +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 18 + +AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX]) +AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])]) diff --git a/lib/c-ares-1.19.0/m4/ax_file_escapes.m4 b/lib/c-ares-1.19.1/m4/ax_file_escapes.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ax_file_escapes.m4 rename to lib/c-ares-1.19.1/m4/ax_file_escapes.m4 diff --git a/lib/c-ares-1.19.1/m4/ax_pthread.m4 b/lib/c-ares-1.19.1/m4/ax_pthread.m4 new file mode 100644 index 00000000000..9f35d139149 --- /dev/null +++ b/lib/c-ares-1.19.1/m4/ax_pthread.m4 @@ -0,0 +1,522 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is +# needed for multi-threaded programs (defaults to the value of CC +# respectively CXX otherwise). (This is necessary on e.g. AIX to use the +# special cc_r/CC_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also to link with them as well. For example, you might link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threaded programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# CXX="$PTHREAD_CXX" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to +# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the +# PTHREAD_PRIO_INHERIT symbol is defined when compiling with +# PTHREAD_CFLAGS. +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# Updated for Autoconf 2.68 by Daniel Richard G. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson +# Copyright (c) 2011 Daniel Richard G. +# Copyright (c) 2019 Marc Stevens +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 31 + +AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) +AC_DEFUN([AX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_SED]) +AC_LANG_PUSH([C]) +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on Tru64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) + AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) + AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) + AC_MSG_RESULT([$ax_pthread_ok]) + if test "x$ax_pthread_ok" = "xno"; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], + [ +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + ], + [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) + ;; + + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" + ;; +esac + +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + +AS_IF([test "x$GCC" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +AS_IF([test "x$ax_pthread_clang" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread"]) + + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + + *) + ax_pthread_check_macro="--" + ;; +esac +AS_IF([test "x$ax_pthread_check_macro" = "x--"], + [ax_pthread_check_cond=0], + [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) + + +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + AC_MSG_RESULT([$ax_pthread_ok]) + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [ac_link="$ax_pthread_2step_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [break]) + ]) + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + ]) + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + + + +# Various other checks: +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_CACHE_CHECK([for joinable pthread attribute], + [ax_cv_PTHREAD_JOINABLE_ATTR], + [ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $ax_pthread_attr; return attr /* ; */])], + [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], + []) + done + ]) + AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"], + [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], + [$ax_cv_PTHREAD_JOINABLE_ATTR], + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + ax_pthread_joinable_attr_defined=yes + ]) + + AC_CACHE_CHECK([whether more special flags are required for pthreads], + [ax_cv_PTHREAD_SPECIAL_FLAGS], + [ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + ]) + AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"], + [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes]) + + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], + [ax_cv_PTHREAD_PRIO_INHERIT], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) + ]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"], + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) + ax_pthread_prio_inherit_defined=yes + ]) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then + case $host_os in + aix*) + AS_CASE(["x/$CC"], + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [ + AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) + AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) + ], + [ + AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) + AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) + ] + ) + ]) + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" + +AC_SUBST([PTHREAD_LIBS]) +AC_SUBST([PTHREAD_CFLAGS]) +AC_SUBST([PTHREAD_CC]) +AC_SUBST([PTHREAD_CXX]) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test "x$ax_pthread_ok" = "xyes"; then + ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) + : +else + ax_pthread_ok=no + $2 +fi +AC_LANG_POP +])dnl AX_PTHREAD diff --git a/lib/c-ares-1.19.0/m4/ax_require_defined.m4 b/lib/c-ares-1.19.1/m4/ax_require_defined.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ax_require_defined.m4 rename to lib/c-ares-1.19.1/m4/ax_require_defined.m4 diff --git a/lib/c-ares-1.19.0/m4/cares-compilers.m4 b/lib/c-ares-1.19.1/m4/cares-compilers.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/cares-compilers.m4 rename to lib/c-ares-1.19.1/m4/cares-compilers.m4 diff --git a/lib/c-ares-1.19.0/m4/cares-confopts.m4 b/lib/c-ares-1.19.1/m4/cares-confopts.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/cares-confopts.m4 rename to lib/c-ares-1.19.1/m4/cares-confopts.m4 diff --git a/lib/c-ares-1.19.0/m4/cares-functions.m4 b/lib/c-ares-1.19.1/m4/cares-functions.m4 similarity index 97% rename from lib/c-ares-1.19.0/m4/cares-functions.m4 rename to lib/c-ares-1.19.1/m4/cares-functions.m4 index 0f3992c7f08..d4f4f994c6f 100644 --- a/lib/c-ares-1.19.0/m4/cares-functions.m4 +++ b/lib/c-ares-1.19.1/m4/cares-functions.m4 @@ -3753,3 +3753,88 @@ AC_DEFUN([CARES_CHECK_FUNC_WRITEV], [ ac_cv_func_writev="no" fi ]) + +dnl CARES_CHECK_FUNC_ARC4RANDOM_BUF +dnl ------------------------------------------------- +dnl Verify if arc4random_buf is available, prototyped, and +dnl can be compiled. If all of these are true, and +dnl usage has not been previously disallowed with +dnl shell variable cares_disallow_arc4random_buf, then +dnl HAVE_ARC4RANDOM_BUF will be defined. + +AC_DEFUN([CARES_CHECK_FUNC_ARC4RANDOM_BUF], [ + AC_REQUIRE([CARES_INCLUDES_STDLIB])dnl + # + tst_links_arc4random_buf="unknown" + tst_proto_arc4random_buf="unknown" + tst_compi_arc4random_buf="unknown" + tst_allow_arc4random_buf="unknown" + # + AC_MSG_CHECKING([if arc4random_buf can be linked]) + AC_LINK_IFELSE([ + AC_LANG_FUNC_LINK_TRY([arc4random_buf]) + ],[ + AC_MSG_RESULT([yes]) + tst_links_arc4random_buf="yes" + ],[ + AC_MSG_RESULT([no]) + tst_links_arc4random_buf="no" + ]) + # + if test "$tst_links_arc4random_buf" = "yes"; then + AC_MSG_CHECKING([if arc4random_buf is prototyped]) + AC_EGREP_CPP([arc4random_buf],[ + $cares_includes_stdlib + ],[ + AC_MSG_RESULT([yes]) + tst_proto_arc4random_buf="yes" + ],[ + AC_MSG_RESULT([no]) + tst_proto_arc4random_buf="no" + ]) + fi + # + if test "$tst_proto_arc4random_buf" = "yes"; then + AC_MSG_CHECKING([if arc4random_buf is compilable]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + $cares_includes_stdlib + ]],[[ + arc4random_buf(NULL, 0); + return 1; + ]]) + ],[ + AC_MSG_RESULT([yes]) + tst_compi_arc4random_buf="yes" + ],[ + AC_MSG_RESULT([no]) + tst_compi_arc4random_buf="no" + ]) + fi + # + if test "$tst_compi_arc4random_buf" = "yes"; then + AC_MSG_CHECKING([if arc4random_buf usage allowed]) + if test "x$cares_disallow_arc4random_buf" != "xyes"; then + AC_MSG_RESULT([yes]) + tst_allow_arc4random_buf="yes" + else + AC_MSG_RESULT([no]) + tst_allow_arc4random_buf="no" + fi + fi + # + AC_MSG_CHECKING([if arc4random_buf might be used]) + if test "$tst_links_arc4random_buf" = "yes" && + test "$tst_proto_arc4random_buf" = "yes" && + test "$tst_compi_arc4random_buf" = "yes" && + test "$tst_allow_arc4random_buf" = "yes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE_UNQUOTED(HAVE_ARC4RANDOM_BUF, 1, + [Define to 1 if you have the arc4random_buf function.]) + ac_cv_func_arc4random_buf="yes" + else + AC_MSG_RESULT([no]) + ac_cv_func_arc4random_buf="no" + fi +]) + diff --git a/lib/c-ares-1.19.0/m4/cares-reentrant.m4 b/lib/c-ares-1.19.1/m4/cares-reentrant.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/cares-reentrant.m4 rename to lib/c-ares-1.19.1/m4/cares-reentrant.m4 diff --git a/lib/c-ares-1.19.0/m4/libtool.m4 b/lib/c-ares-1.19.1/m4/libtool.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/libtool.m4 rename to lib/c-ares-1.19.1/m4/libtool.m4 diff --git a/lib/c-ares-1.19.0/m4/ltoptions.m4 b/lib/c-ares-1.19.1/m4/ltoptions.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ltoptions.m4 rename to lib/c-ares-1.19.1/m4/ltoptions.m4 diff --git a/lib/c-ares-1.19.0/m4/ltsugar.m4 b/lib/c-ares-1.19.1/m4/ltsugar.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ltsugar.m4 rename to lib/c-ares-1.19.1/m4/ltsugar.m4 diff --git a/lib/c-ares-1.19.0/m4/ltversion.m4 b/lib/c-ares-1.19.1/m4/ltversion.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/ltversion.m4 rename to lib/c-ares-1.19.1/m4/ltversion.m4 diff --git a/lib/c-ares-1.19.0/m4/lt~obsolete.m4 b/lib/c-ares-1.19.1/m4/lt~obsolete.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/lt~obsolete.m4 rename to lib/c-ares-1.19.1/m4/lt~obsolete.m4 diff --git a/lib/c-ares-1.19.0/m4/xc-am-iface.m4 b/lib/c-ares-1.19.1/m4/xc-am-iface.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/xc-am-iface.m4 rename to lib/c-ares-1.19.1/m4/xc-am-iface.m4 diff --git a/lib/c-ares-1.19.0/m4/xc-cc-check.m4 b/lib/c-ares-1.19.1/m4/xc-cc-check.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/xc-cc-check.m4 rename to lib/c-ares-1.19.1/m4/xc-cc-check.m4 diff --git a/lib/c-ares-1.19.0/m4/xc-lt-iface.m4 b/lib/c-ares-1.19.1/m4/xc-lt-iface.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/xc-lt-iface.m4 rename to lib/c-ares-1.19.1/m4/xc-lt-iface.m4 diff --git a/lib/c-ares-1.19.0/m4/xc-translit.m4 b/lib/c-ares-1.19.1/m4/xc-translit.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/xc-translit.m4 rename to lib/c-ares-1.19.1/m4/xc-translit.m4 diff --git a/lib/c-ares-1.19.0/m4/xc-val-flgs.m4 b/lib/c-ares-1.19.1/m4/xc-val-flgs.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/xc-val-flgs.m4 rename to lib/c-ares-1.19.1/m4/xc-val-flgs.m4 diff --git a/lib/c-ares-1.19.0/m4/zz40-xc-ovr.m4 b/lib/c-ares-1.19.1/m4/zz40-xc-ovr.m4 similarity index 100% rename from lib/c-ares-1.19.0/m4/zz40-xc-ovr.m4 rename to lib/c-ares-1.19.1/m4/zz40-xc-ovr.m4 diff --git a/lib/c-ares-1.19.0/maketgz b/lib/c-ares-1.19.1/maketgz similarity index 100% rename from lib/c-ares-1.19.0/maketgz rename to lib/c-ares-1.19.1/maketgz diff --git a/lib/c-ares-1.19.0/missing b/lib/c-ares-1.19.1/missing similarity index 100% rename from lib/c-ares-1.19.0/missing rename to lib/c-ares-1.19.1/missing diff --git a/lib/c-ares-1.19.0/msvc_ver.inc b/lib/c-ares-1.19.1/msvc_ver.inc similarity index 100% rename from lib/c-ares-1.19.0/msvc_ver.inc rename to lib/c-ares-1.19.1/msvc_ver.inc diff --git a/lib/c-ares-1.19.0/src/CMakeLists.txt b/lib/c-ares-1.19.1/src/CMakeLists.txt similarity index 100% rename from lib/c-ares-1.19.0/src/CMakeLists.txt rename to lib/c-ares-1.19.1/src/CMakeLists.txt diff --git a/lib/c-ares-1.19.0/src/Makefile.am b/lib/c-ares-1.19.1/src/Makefile.am similarity index 100% rename from lib/c-ares-1.19.0/src/Makefile.am rename to lib/c-ares-1.19.1/src/Makefile.am diff --git a/lib/c-ares-1.19.0/src/Makefile.in b/lib/c-ares-1.19.1/src/Makefile.in similarity index 99% rename from lib/c-ares-1.19.0/src/Makefile.in rename to lib/c-ares-1.19.1/src/Makefile.in index da56f4c23ca..6aa63b002ad 100644 --- a/lib/c-ares-1.19.0/src/Makefile.in +++ b/lib/c-ares-1.19.1/src/Makefile.in @@ -95,6 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_ac_append_to_file.m4 \ $(top_srcdir)/m4/ax_am_macros_static.m4 \ $(top_srcdir)/m4/ax_check_gnu_make.m4 \ $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_file_escapes.m4 \ $(top_srcdir)/m4/ax_require_defined.m4 \ diff --git a/lib/c-ares-1.19.0/src/lib/CMakeLists.txt b/lib/c-ares-1.19.1/src/lib/CMakeLists.txt similarity index 100% rename from lib/c-ares-1.19.0/src/lib/CMakeLists.txt rename to lib/c-ares-1.19.1/src/lib/CMakeLists.txt diff --git a/lib/c-ares-1.19.0/src/lib/Makefile.am b/lib/c-ares-1.19.1/src/lib/Makefile.am similarity index 100% rename from lib/c-ares-1.19.0/src/lib/Makefile.am rename to lib/c-ares-1.19.1/src/lib/Makefile.am diff --git a/lib/c-ares-1.19.0/src/lib/Makefile.in b/lib/c-ares-1.19.1/src/lib/Makefile.in similarity index 98% rename from lib/c-ares-1.19.0/src/lib/Makefile.in rename to lib/c-ares-1.19.1/src/lib/Makefile.in index 71449c1c43b..f1ed8a0b0c5 100644 --- a/lib/c-ares-1.19.0/src/lib/Makefile.in +++ b/lib/c-ares-1.19.1/src/lib/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Sat Jan 28 10:29:54 CET 2023 +# from AX_AM_MACROS_STATIC on Mon May 22 13:34:17 CEST 2023 VPATH = @srcdir@ am__is_gnu_make = { \ @@ -106,6 +106,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_ac_append_to_file.m4 \ $(top_srcdir)/m4/ax_am_macros_static.m4 \ $(top_srcdir)/m4/ax_check_gnu_make.m4 \ $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_file_escapes.m4 \ $(top_srcdir)/m4/ax_require_defined.m4 \ @@ -194,13 +195,14 @@ am__objects_1 = libcares_la-ares__addrinfo2hostent.lo \ libcares_la-ares_parse_txt_reply.lo \ libcares_la-ares_parse_uri_reply.lo \ libcares_la-ares_platform.lo libcares_la-ares_process.lo \ - libcares_la-ares_query.lo libcares_la-ares_search.lo \ - libcares_la-ares_send.lo libcares_la-ares_strcasecmp.lo \ - libcares_la-ares_strdup.lo libcares_la-ares_strerror.lo \ - libcares_la-ares_strsplit.lo libcares_la-ares_timeout.lo \ - libcares_la-ares_version.lo libcares_la-ares_writev.lo \ - libcares_la-bitncmp.lo libcares_la-inet_net_pton.lo \ - libcares_la-inet_ntop.lo libcares_la-windows_port.lo + libcares_la-ares_query.lo libcares_la-ares_rand.lo \ + libcares_la-ares_search.lo libcares_la-ares_send.lo \ + libcares_la-ares_strcasecmp.lo libcares_la-ares_strdup.lo \ + libcares_la-ares_strerror.lo libcares_la-ares_strsplit.lo \ + libcares_la-ares_timeout.lo libcares_la-ares_version.lo \ + libcares_la-ares_writev.lo libcares_la-bitncmp.lo \ + libcares_la-inet_net_pton.lo libcares_la-inet_ntop.lo \ + libcares_la-windows_port.lo am__objects_2 = am_libcares_la_OBJECTS = $(am__objects_1) $(am__objects_2) libcares_la_OBJECTS = $(am_libcares_la_OBJECTS) @@ -273,6 +275,7 @@ am__depfiles_remade = \ ./$(DEPDIR)/libcares_la-ares_platform.Plo \ ./$(DEPDIR)/libcares_la-ares_process.Plo \ ./$(DEPDIR)/libcares_la-ares_query.Plo \ + ./$(DEPDIR)/libcares_la-ares_rand.Plo \ ./$(DEPDIR)/libcares_la-ares_search.Plo \ ./$(DEPDIR)/libcares_la-ares_send.Plo \ ./$(DEPDIR)/libcares_la-ares_strcasecmp.Plo \ @@ -617,6 +620,7 @@ CSOURCES = ares__addrinfo2hostent.c \ ares_platform.c \ ares_process.c \ ares_query.c \ + ares_rand.c \ ares_search.c \ ares_send.c \ ares_strcasecmp.c \ @@ -793,6 +797,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_platform.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_process.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_query.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_rand.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_search.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_send.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_strcasecmp.Plo@am__quote@ # am--include-marker @@ -1159,6 +1164,13 @@ libcares_la-ares_query.lo: ares_query.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_query.lo `test -f 'ares_query.c' || echo '$(srcdir)/'`ares_query.c +libcares_la-ares_rand.lo: ares_rand.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_rand.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_rand.Tpo -c -o libcares_la-ares_rand.lo `test -f 'ares_rand.c' || echo '$(srcdir)/'`ares_rand.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcares_la-ares_rand.Tpo $(DEPDIR)/libcares_la-ares_rand.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ares_rand.c' object='libcares_la-ares_rand.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -c -o libcares_la-ares_rand.lo `test -f 'ares_rand.c' || echo '$(srcdir)/'`ares_rand.c + libcares_la-ares_search.lo: ares_search.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcares_la_CPPFLAGS) $(CPPFLAGS) $(libcares_la_CFLAGS) $(CFLAGS) -MT libcares_la-ares_search.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_search.Tpo -c -o libcares_la-ares_search.lo `test -f 'ares_search.c' || echo '$(srcdir)/'`ares_search.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcares_la-ares_search.Tpo $(DEPDIR)/libcares_la-ares_search.Plo @@ -1503,6 +1515,7 @@ distclean: distclean-recursive -rm -f ./$(DEPDIR)/libcares_la-ares_platform.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_process.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_query.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_rand.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_search.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_send.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_strcasecmp.Plo @@ -1607,6 +1620,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/libcares_la-ares_platform.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_process.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_query.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_rand.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_search.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_send.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_strcasecmp.Plo diff --git a/lib/c-ares-1.19.0/src/lib/Makefile.inc b/lib/c-ares-1.19.1/src/lib/Makefile.inc similarity index 97% rename from lib/c-ares-1.19.0/src/lib/Makefile.inc rename to lib/c-ares-1.19.1/src/lib/Makefile.inc index 140378d67e2..02d8d58a6d5 100644 --- a/lib/c-ares-1.19.0/src/lib/Makefile.inc +++ b/lib/c-ares-1.19.1/src/lib/Makefile.inc @@ -45,6 +45,7 @@ CSOURCES = ares__addrinfo2hostent.c \ ares_platform.c \ ares_process.c \ ares_query.c \ + ares_rand.c \ ares_search.c \ ares_send.c \ ares_strcasecmp.c \ @@ -59,7 +60,7 @@ CSOURCES = ares__addrinfo2hostent.c \ inet_ntop.c \ windows_port.c -HHEADERS = ares_android.h \ +HHEADERS = ares_android.h \ ares_data.h \ ares_getenv.h \ ares_inet_net_pton.h \ diff --git a/lib/c-ares-1.19.0/src/lib/ares__addrinfo2hostent.c b/lib/c-ares-1.19.1/src/lib/ares__addrinfo2hostent.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares__addrinfo2hostent.c rename to lib/c-ares-1.19.1/src/lib/ares__addrinfo2hostent.c diff --git a/lib/c-ares-1.19.0/src/lib/ares__addrinfo_localhost.c b/lib/c-ares-1.19.1/src/lib/ares__addrinfo_localhost.c similarity index 99% rename from lib/c-ares-1.19.0/src/lib/ares__addrinfo_localhost.c rename to lib/c-ares-1.19.1/src/lib/ares__addrinfo_localhost.c index 7940ecdae7d..5bc1e0bff08 100644 --- a/lib/c-ares-1.19.0/src/lib/ares__addrinfo_localhost.c +++ b/lib/c-ares-1.19.1/src/lib/ares__addrinfo_localhost.c @@ -131,7 +131,7 @@ static int ares__system_loopback_addrs(int aftype, unsigned short port, struct ares_addrinfo_node **nodes) { -#if defined(_WIN32) && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0600 +#if defined(_WIN32) && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0600 && !defined(__WATCOMC__) PMIB_UNICASTIPADDRESS_TABLE table; unsigned int i; int status; diff --git a/lib/c-ares-1.19.0/src/lib/ares__close_sockets.c b/lib/c-ares-1.19.1/src/lib/ares__close_sockets.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares__close_sockets.c rename to lib/c-ares-1.19.1/src/lib/ares__close_sockets.c diff --git a/lib/c-ares-1.19.0/src/lib/ares__get_hostent.c b/lib/c-ares-1.19.1/src/lib/ares__get_hostent.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares__get_hostent.c rename to lib/c-ares-1.19.1/src/lib/ares__get_hostent.c diff --git a/lib/c-ares-1.19.0/src/lib/ares__parse_into_addrinfo.c b/lib/c-ares-1.19.1/src/lib/ares__parse_into_addrinfo.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares__parse_into_addrinfo.c rename to lib/c-ares-1.19.1/src/lib/ares__parse_into_addrinfo.c diff --git a/lib/c-ares-1.19.0/src/lib/ares__read_line.c b/lib/c-ares-1.19.1/src/lib/ares__read_line.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares__read_line.c rename to lib/c-ares-1.19.1/src/lib/ares__read_line.c diff --git a/lib/c-ares-1.19.0/src/lib/ares__readaddrinfo.c b/lib/c-ares-1.19.1/src/lib/ares__readaddrinfo.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares__readaddrinfo.c rename to lib/c-ares-1.19.1/src/lib/ares__readaddrinfo.c diff --git a/lib/c-ares-1.19.0/src/lib/ares__sortaddrinfo.c b/lib/c-ares-1.19.1/src/lib/ares__sortaddrinfo.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares__sortaddrinfo.c rename to lib/c-ares-1.19.1/src/lib/ares__sortaddrinfo.c diff --git a/lib/c-ares-1.19.0/src/lib/ares__timeval.c b/lib/c-ares-1.19.1/src/lib/ares__timeval.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares__timeval.c rename to lib/c-ares-1.19.1/src/lib/ares__timeval.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_android.c b/lib/c-ares-1.19.1/src/lib/ares_android.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_android.c rename to lib/c-ares-1.19.1/src/lib/ares_android.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_android.h b/lib/c-ares-1.19.1/src/lib/ares_android.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_android.h rename to lib/c-ares-1.19.1/src/lib/ares_android.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_cancel.c b/lib/c-ares-1.19.1/src/lib/ares_cancel.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_cancel.c rename to lib/c-ares-1.19.1/src/lib/ares_cancel.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_config.h.cmake b/lib/c-ares-1.19.1/src/lib/ares_config.h.cmake similarity index 99% rename from lib/c-ares-1.19.0/src/lib/ares_config.h.cmake rename to lib/c-ares-1.19.1/src/lib/ares_config.h.cmake index fddb7853514..798820a3a68 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_config.h.cmake +++ b/lib/c-ares-1.19.1/src/lib/ares_config.h.cmake @@ -346,6 +346,9 @@ /* Define to 1 if you need the memory.h header file even with stdlib.h */ #cmakedefine NEED_MEMORY_H +/* Define if have arc4random_buf() */ +#cmakedefine HAVE_ARC4RANDOM_BUF + /* a suitable file/device to read random data from */ #cmakedefine CARES_RANDOM_FILE "@CARES_RANDOM_FILE@" diff --git a/lib/c-ares-1.19.0/src/lib/ares_config.h.in b/lib/c-ares-1.19.1/src/lib/ares_config.h.in similarity index 99% rename from lib/c-ares-1.19.0/src/lib/ares_config.h.in rename to lib/c-ares-1.19.1/src/lib/ares_config.h.in index b260c08fe62..3f6954a74db 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_config.h.in +++ b/lib/c-ares-1.19.1/src/lib/ares_config.h.in @@ -54,6 +54,9 @@ /* Define to 1 if you have AF_INET6. */ #undef HAVE_AF_INET6 +/* Define to 1 if you have the arc4random_buf function. */ +#undef HAVE_ARC4RANDOM_BUF + /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H diff --git a/lib/c-ares-1.19.0/src/lib/ares_create_query.c b/lib/c-ares-1.19.1/src/lib/ares_create_query.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_create_query.c rename to lib/c-ares-1.19.1/src/lib/ares_create_query.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_data.c b/lib/c-ares-1.19.1/src/lib/ares_data.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_data.c rename to lib/c-ares-1.19.1/src/lib/ares_data.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_data.h b/lib/c-ares-1.19.1/src/lib/ares_data.h similarity index 99% rename from lib/c-ares-1.19.0/src/lib/ares_data.h rename to lib/c-ares-1.19.1/src/lib/ares_data.h index 54d729d0e7e..a682ad54cb9 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_data.h +++ b/lib/c-ares-1.19.1/src/lib/ares_data.h @@ -78,4 +78,4 @@ struct ares_data { void *ares_malloc_data(ares_datatype type); -#endif // __ARES_DATA_H +#endif /* __ARES_DATA_H */ diff --git a/lib/c-ares-1.19.0/src/lib/ares_destroy.c b/lib/c-ares-1.19.1/src/lib/ares_destroy.c similarity index 97% rename from lib/c-ares-1.19.0/src/lib/ares_destroy.c rename to lib/c-ares-1.19.1/src/lib/ares_destroy.c index 7ec2bde5a45..62c899f82e0 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_destroy.c +++ b/lib/c-ares-1.19.1/src/lib/ares_destroy.c @@ -95,6 +95,9 @@ void ares_destroy(ares_channel channel) if (channel->hosts_path) ares_free(channel->hosts_path); + if (channel->rand_state) + ares__destroy_rand_state(channel->rand_state); + ares_free(channel); } diff --git a/lib/c-ares-1.19.0/src/lib/ares_expand_name.c b/lib/c-ares-1.19.1/src/lib/ares_expand_name.c similarity index 98% rename from lib/c-ares-1.19.0/src/lib/ares_expand_name.c rename to lib/c-ares-1.19.1/src/lib/ares_expand_name.c index 6c7a35a715b..ad1c97f9377 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_expand_name.c +++ b/lib/c-ares-1.19.1/src/lib/ares_expand_name.c @@ -179,9 +179,9 @@ int ares__expand_name_validated(const unsigned char *encoded, if (!ares__isprint(*p) && !(name_len == 1 && *p == 0)) { *q++ = '\\'; - *q++ = '0' + *p / 100; - *q++ = '0' + (*p % 100) / 10; - *q++ = '0' + (*p % 10); + *q++ = (char)('0' + *p / 100); + *q++ = (char)('0' + (*p % 100) / 10); + *q++ = (char)('0' + (*p % 10)); } else if (is_reservedch(*p)) { diff --git a/lib/c-ares-1.19.0/src/lib/ares_expand_string.c b/lib/c-ares-1.19.1/src/lib/ares_expand_string.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_expand_string.c rename to lib/c-ares-1.19.1/src/lib/ares_expand_string.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_fds.c b/lib/c-ares-1.19.1/src/lib/ares_fds.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_fds.c rename to lib/c-ares-1.19.1/src/lib/ares_fds.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_free_hostent.c b/lib/c-ares-1.19.1/src/lib/ares_free_hostent.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_free_hostent.c rename to lib/c-ares-1.19.1/src/lib/ares_free_hostent.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_free_string.c b/lib/c-ares-1.19.1/src/lib/ares_free_string.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_free_string.c rename to lib/c-ares-1.19.1/src/lib/ares_free_string.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_freeaddrinfo.c b/lib/c-ares-1.19.1/src/lib/ares_freeaddrinfo.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_freeaddrinfo.c rename to lib/c-ares-1.19.1/src/lib/ares_freeaddrinfo.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_getaddrinfo.c b/lib/c-ares-1.19.1/src/lib/ares_getaddrinfo.c similarity index 96% rename from lib/c-ares-1.19.0/src/lib/ares_getaddrinfo.c rename to lib/c-ares-1.19.1/src/lib/ares_getaddrinfo.c index bc9f19bf849..cb494242f28 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_getaddrinfo.c +++ b/lib/c-ares-1.19.1/src/lib/ares_getaddrinfo.c @@ -430,16 +430,20 @@ static int file_lookup(struct host_query *hquery) FILE *fp; int error; int status; - const char *path_hosts = NULL; + char *path_hosts = NULL; if (hquery->hints.ai_flags & ARES_AI_ENVHOSTS) { - path_hosts = getenv("CARES_HOSTS"); + path_hosts = ares_strdup(getenv("CARES_HOSTS")); + if (!path_hosts) + return ARES_ENOMEM; } if (hquery->channel->hosts_path) { - path_hosts = hquery->channel->hosts_path; + path_hosts = ares_strdup(hquery->channel->hosts_path); + if (!path_hosts) + return ARES_ENOMEM; } if (!path_hosts) @@ -473,15 +477,15 @@ static int file_lookup(struct host_query *hquery) return ARES_ENOTFOUND; strcat(PATH_HOSTS, WIN_PATH_HOSTS); - path_hosts = PATH_HOSTS; - #elif defined(WATT32) const char *PATH_HOSTS = _w32_GetHostsFile(); if (!PATH_HOSTS) return ARES_ENOTFOUND; #endif - path_hosts = PATH_HOSTS; + path_hosts = ares_strdup(PATH_HOSTS); + if (!path_hosts) + return ARES_ENOMEM; } fp = fopen(path_hosts, "r"); @@ -507,6 +511,7 @@ static int file_lookup(struct host_query *hquery) status = ares__readaddrinfo(fp, hquery->name, hquery->port, &hquery->hints, hquery->ai); fclose(fp); } + ares_free(path_hosts); /* RFC6761 section 6.3 #3 states that "Name resolution APIs and libraries * SHOULD recognize localhost names as special and SHOULD always return the @@ -665,26 +670,32 @@ void ares_getaddrinfo(ares_channel channel, { if (hints->ai_flags & ARES_AI_NUMERICSERV) { - port = (unsigned short)strtoul(service, NULL, 0); - if (!port) + unsigned long val; + errno = 0; + val = strtoul(service, NULL, 0); + if ((val == 0 && errno != 0) || val > 65535) { ares_free(alias_name); callback(arg, ARES_ESERVICE, 0, NULL); return; } + port = (unsigned short)val; } else { port = lookup_service(service, 0); if (!port) { - port = (unsigned short)strtoul(service, NULL, 0); - if (!port) + unsigned long val; + errno = 0; + val = strtoul(service, NULL, 0); + if ((val == 0 && errno != 0) || val > 65535) { ares_free(alias_name); callback(arg, ARES_ESERVICE, 0, NULL); return; } + port = (unsigned short)val; } } } diff --git a/lib/c-ares-1.19.0/src/lib/ares_getenv.c b/lib/c-ares-1.19.1/src/lib/ares_getenv.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_getenv.c rename to lib/c-ares-1.19.1/src/lib/ares_getenv.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_getenv.h b/lib/c-ares-1.19.1/src/lib/ares_getenv.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_getenv.h rename to lib/c-ares-1.19.1/src/lib/ares_getenv.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_gethostbyaddr.c b/lib/c-ares-1.19.1/src/lib/ares_gethostbyaddr.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_gethostbyaddr.c rename to lib/c-ares-1.19.1/src/lib/ares_gethostbyaddr.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_gethostbyname.c b/lib/c-ares-1.19.1/src/lib/ares_gethostbyname.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_gethostbyname.c rename to lib/c-ares-1.19.1/src/lib/ares_gethostbyname.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_getnameinfo.c b/lib/c-ares-1.19.1/src/lib/ares_getnameinfo.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_getnameinfo.c rename to lib/c-ares-1.19.1/src/lib/ares_getnameinfo.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_getsock.c b/lib/c-ares-1.19.1/src/lib/ares_getsock.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_getsock.c rename to lib/c-ares-1.19.1/src/lib/ares_getsock.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_inet_net_pton.h b/lib/c-ares-1.19.1/src/lib/ares_inet_net_pton.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_inet_net_pton.h rename to lib/c-ares-1.19.1/src/lib/ares_inet_net_pton.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_init.c b/lib/c-ares-1.19.1/src/lib/ares_init.c similarity index 96% rename from lib/c-ares-1.19.0/src/lib/ares_init.c rename to lib/c-ares-1.19.1/src/lib/ares_init.c index 3f9cec65213..0519f43e561 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_init.c +++ b/lib/c-ares-1.19.1/src/lib/ares_init.c @@ -61,17 +61,6 @@ #undef WIN32 /* Redefined in MingW/MSVC headers */ #endif -/* Define RtlGenRandom = SystemFunction036. This is in advapi32.dll. There is - * no need to dynamically load this, other software used widely does not. - * http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx - * https://docs.microsoft.com/en-us/windows/win32/api/ntsecapi/nf-ntsecapi-rtlgenrandom - */ -#ifdef _WIN32 -BOOLEAN WINAPI SystemFunction036(PVOID RandomBuffer, ULONG RandomBufferLength); -# ifndef RtlGenRandom -# define RtlGenRandom(a,b) SystemFunction036(a,b) -# endif -#endif static int init_by_options(ares_channel channel, const struct ares_options *options, @@ -87,7 +76,6 @@ static int config_nameserver(struct server_state **servers, int *nservers, static int set_search(ares_channel channel, const char *str); static int set_options(ares_channel channel, const char *str); static const char *try_option(const char *p, const char *q, const char *opt); -static int init_id_key(rc4_key* key,int key_data_len); static int config_sortlist(struct apattern **sortlist, int *nsort, const char *str); @@ -165,6 +153,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, channel->sock_func_cb_data = NULL; channel->resolvconf_path = NULL; channel->hosts_path = NULL; + channel->rand_state = NULL; channel->last_server = 0; channel->last_timeout_processed = (time_t)now.tv_sec; @@ -218,9 +207,13 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, /* Generate random key */ if (status == ARES_SUCCESS) { - status = init_id_key(&channel->id_key, ARES_ID_KEY_LEN); + channel->rand_state = ares__init_rand_state(); + if (channel->rand_state == NULL) { + status = ARES_ENOMEM; + } + if (status == ARES_SUCCESS) - channel->next_id = ares__generate_new_id(&channel->id_key); + channel->next_id = ares__generate_new_id(channel->rand_state); else DEBUGF(fprintf(stderr, "Error: init_id_key failed: %s\n", ares_strerror(status))); @@ -242,6 +235,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, ares_free(channel->resolvconf_path); if(channel->hosts_path) ares_free(channel->hosts_path); + if (channel->rand_state) + ares__destroy_rand_state(channel->rand_state); ares_free(channel); return status; } @@ -746,6 +741,17 @@ static ULONG getBestRouteMetric(IF_LUID * const luid, /* Can't be const :( */ const ULONG interfaceMetric) { /* On this interface, get the best route to that destination. */ +#if defined(__WATCOMC__) + /* OpenWatcom's builtin Windows SDK does not have a definition for + * MIB_IPFORWARD_ROW2, and also does not allow the usage of SOCKADDR_INET + * as a variable. Let's work around this by returning the worst possible + * metric, but only when using the OpenWatcom compiler. + * It may be worth investigating using a different version of the Windows + * SDK with OpenWatcom in the future, though this may be fixed in OpenWatcom + * 2.0. + */ + return (ULONG)-1; +#else MIB_IPFORWARD_ROW2 row; SOCKADDR_INET ignored; if(GetBestRoute2(/* The interface to use. The index is ignored since we are @@ -778,6 +784,7 @@ static ULONG getBestRouteMetric(IF_LUID * const luid, /* Can't be const :( */ * which describes the combination as a "sum". */ return row.Metric + interfaceMetric; +#endif /* __WATCOMC__ */ } /* @@ -2170,72 +2177,6 @@ static int sortlist_alloc(struct apattern **sortlist, int *nsort, } -/* initialize an rc4 key. If possible a cryptographically secure random key - is generated using a suitable function otherwise the code defaults to - cross-platform albeit less secure mechanism using rand -*/ -static void randomize_key(unsigned char* key,int key_data_len) -{ - int randomized = 0; - int counter=0; -#ifdef WIN32 - BOOLEAN res; - - res = RtlGenRandom(key, key_data_len); - if (res) - randomized = 1; - -#else /* !WIN32 */ -# ifdef CARES_RANDOM_FILE - FILE *f = fopen(CARES_RANDOM_FILE, "rb"); - if(f) { - setvbuf(f, NULL, _IONBF, 0); - counter = aresx_uztosi(fread(key, 1, key_data_len, f)); - fclose(f); - } -# endif -#endif /* WIN32 */ - - if (!randomized) { - for (;counterstate[0]; - for(counter = 0; counter < 256; counter++) - /* unnecessary AND but it keeps some compilers happier */ - state[counter] = (unsigned char)(counter & 0xff); - randomize_key(key->state,key_data_len); - key->x = 0; - key->y = 0; - index1 = 0; - index2 = 0; - for(counter = 0; counter < 256; counter++) - { - index2 = (unsigned char)((key_data_ptr[index1] + state[counter] + - index2) % 256); - ARES_SWAP_BYTE(&state[counter], &state[index2]); - - index1 = (unsigned char)((index1 + 1) % key_data_len); - } - ares_free(key_data_ptr); - return ARES_SUCCESS; -} - void ares_set_local_ip4(ares_channel channel, unsigned int local_ip) { channel->local_ip4 = local_ip; diff --git a/lib/c-ares-1.19.0/src/lib/ares_iphlpapi.h b/lib/c-ares-1.19.1/src/lib/ares_iphlpapi.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_iphlpapi.h rename to lib/c-ares-1.19.1/src/lib/ares_iphlpapi.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_ipv6.h b/lib/c-ares-1.19.1/src/lib/ares_ipv6.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_ipv6.h rename to lib/c-ares-1.19.1/src/lib/ares_ipv6.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_library_init.c b/lib/c-ares-1.19.1/src/lib/ares_library_init.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_library_init.c rename to lib/c-ares-1.19.1/src/lib/ares_library_init.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_llist.c b/lib/c-ares-1.19.1/src/lib/ares_llist.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_llist.c rename to lib/c-ares-1.19.1/src/lib/ares_llist.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_llist.h b/lib/c-ares-1.19.1/src/lib/ares_llist.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_llist.h rename to lib/c-ares-1.19.1/src/lib/ares_llist.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_mkquery.c b/lib/c-ares-1.19.1/src/lib/ares_mkquery.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_mkquery.c rename to lib/c-ares-1.19.1/src/lib/ares_mkquery.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_nowarn.c b/lib/c-ares-1.19.1/src/lib/ares_nowarn.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_nowarn.c rename to lib/c-ares-1.19.1/src/lib/ares_nowarn.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_nowarn.h b/lib/c-ares-1.19.1/src/lib/ares_nowarn.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_nowarn.h rename to lib/c-ares-1.19.1/src/lib/ares_nowarn.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_options.c b/lib/c-ares-1.19.1/src/lib/ares_options.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_options.c rename to lib/c-ares-1.19.1/src/lib/ares_options.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_a_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_a_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_a_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_a_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_aaaa_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_aaaa_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_aaaa_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_aaaa_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_caa_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_caa_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_caa_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_caa_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_mx_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_mx_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_mx_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_mx_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_naptr_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_naptr_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_naptr_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_naptr_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_ns_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_ns_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_ns_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_ns_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_ptr_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_ptr_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_ptr_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_ptr_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_soa_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_soa_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_soa_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_soa_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_srv_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_srv_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_srv_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_srv_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_txt_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_txt_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_txt_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_txt_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_parse_uri_reply.c b/lib/c-ares-1.19.1/src/lib/ares_parse_uri_reply.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_parse_uri_reply.c rename to lib/c-ares-1.19.1/src/lib/ares_parse_uri_reply.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_platform.c b/lib/c-ares-1.19.1/src/lib/ares_platform.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_platform.c rename to lib/c-ares-1.19.1/src/lib/ares_platform.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_platform.h b/lib/c-ares-1.19.1/src/lib/ares_platform.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_platform.h rename to lib/c-ares-1.19.1/src/lib/ares_platform.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_private.h b/lib/c-ares-1.19.1/src/lib/ares_private.h similarity index 97% rename from lib/c-ares-1.19.0/src/lib/ares_private.h rename to lib/c-ares-1.19.1/src/lib/ares_private.h index 53043a65137..b6eab8a7d9b 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_private.h +++ b/lib/c-ares-1.19.1/src/lib/ares_private.h @@ -101,8 +101,6 @@ W32_FUNC const char *_w32_GetHostsFile (void); #endif -#define ARES_ID_KEY_LEN 31 - #include "ares_ipv6.h" #include "ares_llist.h" @@ -262,12 +260,8 @@ struct apattern { unsigned short type; }; -typedef struct rc4_key -{ - unsigned char state[256]; - unsigned char x; - unsigned char y; -} rc4_key; +struct ares_rand_state; +typedef struct ares_rand_state ares_rand_state; struct ares_channeldata { /* Configuration data */ @@ -302,8 +296,8 @@ struct ares_channeldata { /* ID to use for next query */ unsigned short next_id; - /* key to use when generating new ids */ - rc4_key id_key; + /* random state to use when generating new ids */ + ares_rand_state *rand_state; /* Generation number to use for the next TCP socket open/close */ int tcp_connection_generation; @@ -362,7 +356,10 @@ void ares__close_sockets(ares_channel channel, struct server_state *server); int ares__get_hostent(FILE *fp, int family, struct hostent **host); int ares__read_line(FILE *fp, char **buf, size_t *bufsize); void ares__free_query(struct query *query); -unsigned short ares__generate_new_id(rc4_key* key); + +ares_rand_state *ares__init_rand_state(void); +void ares__destroy_rand_state(ares_rand_state *state); +unsigned short ares__generate_new_id(ares_rand_state *state); struct timeval ares__tvnow(void); int ares__expand_name_validated(const unsigned char *encoded, const unsigned char *abuf, diff --git a/lib/c-ares-1.19.0/src/lib/ares_process.c b/lib/c-ares-1.19.1/src/lib/ares_process.c similarity index 97% rename from lib/c-ares-1.19.0/src/lib/ares_process.c rename to lib/c-ares-1.19.1/src/lib/ares_process.c index d5a6df8ba7c..6cac0a99fdf 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_process.c +++ b/lib/c-ares-1.19.1/src/lib/ares_process.c @@ -470,7 +470,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds, { struct server_state *server; int i; - ares_ssize_t count; + ares_ssize_t read_len; unsigned char buf[MAXENDSSZ + 1]; #ifdef HAVE_RECVFROM ares_socklen_t fromlen; @@ -513,32 +513,41 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds, /* To reduce event loop overhead, read and process as many * packets as we can. */ do { - if (server->udp_socket == ARES_SOCKET_BAD) - count = 0; - - else { - if (server->addr.family == AF_INET) + if (server->udp_socket == ARES_SOCKET_BAD) { + read_len = -1; + } else { + if (server->addr.family == AF_INET) { fromlen = sizeof(from.sa4); - else + } else { fromlen = sizeof(from.sa6); - count = socket_recvfrom(channel, server->udp_socket, (void *)buf, - sizeof(buf), 0, &from.sa, &fromlen); + } + read_len = socket_recvfrom(channel, server->udp_socket, (void *)buf, + sizeof(buf), 0, &from.sa, &fromlen); } - if (count == -1 && try_again(SOCKERRNO)) + if (read_len == 0) { + /* UDP is connectionless, so result code of 0 is a 0-length UDP + * packet, and not an indication the connection is closed like on + * tcp */ continue; - else if (count <= 0) + } else if (read_len < 0) { + if (try_again(SOCKERRNO)) + continue; + handle_error(channel, i, now); + #ifdef HAVE_RECVFROM - else if (!same_address(&from.sa, &server->addr)) + } else if (!same_address(&from.sa, &server->addr)) { /* The address the response comes from does not match the address we * sent the request to. Someone may be attempting to perform a cache * poisoning attack. */ - break; + continue; #endif - else - process_answer(channel, buf, (int)count, i, 0, now); - } while (count > 0); + + } else { + process_answer(channel, buf, (int)read_len, i, 0, now); + } + } while (read_len >= 0); } } @@ -979,6 +988,22 @@ static int setsocknonblock(ares_socket_t sockfd, /* operate on this */ #endif } +#if defined(IPV6_V6ONLY) && defined(WIN32) +/* It makes support for IPv4-mapped IPv6 addresses. + * Linux kernel, NetBSD, FreeBSD and Darwin: default is off; + * Windows Vista and later: default is on; + * DragonFly BSD: acts like off, and dummy setting; + * OpenBSD and earlier Windows: unsupported. + * Linux: controlled by /proc/sys/net/ipv6/bindv6only. + */ +static void set_ipv6_v6only(ares_socket_t sockfd, int on) +{ + (void)setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&on, sizeof(on)); +} +#else +#define set_ipv6_v6only(s,v) +#endif + static int configure_socket(ares_socket_t s, int family, ares_channel channel) { union { @@ -1041,6 +1066,7 @@ static int configure_socket(ares_socket_t s, int family, ares_channel channel) if (bind(s, &local.sa, sizeof(local.sa6)) < 0) return -1; } + set_ipv6_v6only(s, 0); } return 0; diff --git a/lib/c-ares-1.19.0/src/lib/ares_query.c b/lib/c-ares-1.19.1/src/lib/ares_query.c similarity index 84% rename from lib/c-ares-1.19.0/src/lib/ares_query.c rename to lib/c-ares-1.19.1/src/lib/ares_query.c index 508274db36c..42323bec553 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_query.c +++ b/lib/c-ares-1.19.1/src/lib/ares_query.c @@ -33,32 +33,6 @@ struct qquery { static void qcallback(void *arg, int status, int timeouts, unsigned char *abuf, int alen); -static void rc4(rc4_key* key, unsigned char *buffer_ptr, int buffer_len) -{ - unsigned char x; - unsigned char y; - unsigned char* state; - unsigned char xorIndex; - int counter; - - x = key->x; - y = key->y; - - state = &key->state[0]; - for(counter = 0; counter < buffer_len; counter ++) - { - x = (unsigned char)((x + 1) % 256); - y = (unsigned char)((state[x] + y) % 256); - ARES_SWAP_BYTE(&state[x], &state[y]); - - xorIndex = (unsigned char)((state[x] + state[y]) % 256); - - buffer_ptr[counter] = (unsigned char)(buffer_ptr[counter]^state[xorIndex]); - } - key->x = x; - key->y = y; -} - static struct query* find_query_by_id(ares_channel channel, unsigned short id) { unsigned short qid; @@ -78,7 +52,6 @@ static struct query* find_query_by_id(ares_channel channel, unsigned short id) return NULL; } - /* a unique query id is generated using an rc4 key. Since the id may already be used by a running query (as infrequent as it may be), a lookup is performed per id generation. In practice this search should happen only @@ -89,19 +62,12 @@ static unsigned short generate_unique_id(ares_channel channel) unsigned short id; do { - id = ares__generate_new_id(&channel->id_key); + id = ares__generate_new_id(channel->rand_state); } while (find_query_by_id(channel, id)); return (unsigned short)id; } -unsigned short ares__generate_new_id(rc4_key* key) -{ - unsigned short r=0; - rc4(key, (unsigned char *)&r, sizeof(r)); - return r; -} - void ares_query(ares_channel channel, const char *name, int dnsclass, int type, ares_callback callback, void *arg) { diff --git a/lib/c-ares-1.19.1/src/lib/ares_rand.c b/lib/c-ares-1.19.1/src/lib/ares_rand.c new file mode 100644 index 00000000000..766c1e6ea9b --- /dev/null +++ b/lib/c-ares-1.19.1/src/lib/ares_rand.c @@ -0,0 +1,279 @@ +/* Copyright 1998 by the Massachusetts Institute of Technology. + * Copyright (C) 2007-2013 by Daniel Stenberg + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in + * advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" + * without express or implied warranty. + */ + +#include "ares_setup.h" +#include "ares.h" +#include "ares_private.h" +#include "ares_nowarn.h" +#include + +typedef enum { + ARES_RAND_OS = 1, /* OS-provided such as RtlGenRandom or arc4random */ + ARES_RAND_FILE = 2, /* OS file-backed random number generator */ + ARES_RAND_RC4 = 3 /* Internal RC4 based PRNG */ +} ares_rand_backend; + +typedef struct ares_rand_rc4 +{ + unsigned char S[256]; + size_t i; + size_t j; +} ares_rand_rc4; + +struct ares_rand_state +{ + ares_rand_backend type; + union { + FILE *rand_file; + ares_rand_rc4 rc4; + } state; +}; + + +/* Define RtlGenRandom = SystemFunction036. This is in advapi32.dll. There is + * no need to dynamically load this, other software used widely does not. + * http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx + * https://docs.microsoft.com/en-us/windows/win32/api/ntsecapi/nf-ntsecapi-rtlgenrandom + */ +#ifdef _WIN32 +BOOLEAN WINAPI SystemFunction036(PVOID RandomBuffer, ULONG RandomBufferLength); +# ifndef RtlGenRandom +# define RtlGenRandom(a,b) SystemFunction036(a,b) +# endif +#endif + + +#define ARES_RC4_KEY_LEN 32 /* 256 bits */ + +#ifdef _MSC_VER +typedef unsigned __int64 cares_u64; +#else +typedef unsigned long long cares_u64; +#endif + +static unsigned int ares_u32_from_ptr(void *addr) +{ + if (sizeof(void *) == 8) { + return (unsigned int)((((cares_u64)addr >> 32) & 0xFFFFFFFF) | ((cares_u64)addr & 0xFFFFFFFF)); + } + return (unsigned int)((size_t)addr & 0xFFFFFFFF); +} + + +/* initialize an rc4 key as the last possible fallback. */ +static void ares_rc4_generate_key(ares_rand_rc4 *rc4_state, unsigned char *key, size_t key_len) +{ + size_t i; + size_t len = 0; + unsigned int data; + struct timeval tv; + + if (key_len != ARES_RC4_KEY_LEN) + return; + + /* Randomness is hard to come by. Maybe the system randomizes heap and stack addresses. + * Maybe the current timestamp give us some randomness. + * Use rc4_state (heap), &i (stack), and ares__tvnow() + */ + data = ares_u32_from_ptr(rc4_state); + memcpy(key + len, &data, sizeof(data)); + len += sizeof(data); + + data = ares_u32_from_ptr(&i); + memcpy(key + len, &data, sizeof(data)); + len += sizeof(data); + + tv = ares__tvnow(); + data = (unsigned int)((tv.tv_sec | tv.tv_usec) & 0xFFFFFFFF); + memcpy(key + len, &data, sizeof(data)); + len += sizeof(data); + + srand(ares_u32_from_ptr(rc4_state) | ares_u32_from_ptr(&i) | (unsigned int)((tv.tv_sec | tv.tv_usec) & 0xFFFFFFFF)); + + for (i=len; iS); i++) { + rc4_state->S[i] = i & 0xFF; + } + + for(i = 0, j = 0; i < 256; i++) { + j = (j + rc4_state->S[i] + key[i % sizeof(key)]) % 256; + ARES_SWAP_BYTE(&rc4_state->S[i], &rc4_state->S[j]); + } + + rc4_state->i = 0; + rc4_state->j = 0; +} + +/* Just outputs the key schedule, no need to XOR with any data since we have none */ +static void ares_rc4_prng(ares_rand_rc4 *rc4_state, unsigned char *buf, size_t len) +{ + unsigned char *S = rc4_state->S; + size_t i = rc4_state->i; + size_t j = rc4_state->j; + size_t cnt; + + for (cnt=0; cnti = i; + rc4_state->j = j; +} + + +static int ares__init_rand_engine(ares_rand_state *state) +{ + memset(state, 0, sizeof(*state)); + +#if defined(HAVE_ARC4RANDOM_BUF) || defined(_WIN32) + state->type = ARES_RAND_OS; + return 1; +#elif defined(CARES_RANDOM_FILE) + state->type = ARES_RAND_FILE; + state->state.rand_file = fopen(CARES_RANDOM_FILE, "rb"); + if (state->state.rand_file) { + setvbuf(state->state.rand_file, NULL, _IONBF, 0); + return 1; + } + /* Fall-Thru on failure to RC4 */ +#endif + + state->type = ARES_RAND_RC4; + ares_rc4_init(&state->state.rc4); + + /* Currently cannot fail */ + return 1; +} + + +ares_rand_state *ares__init_rand_state() +{ + ares_rand_state *state = NULL; + + state = ares_malloc(sizeof(*state)); + if (!state) + return NULL; + + if (!ares__init_rand_engine(state)) { + ares_free(state); + return NULL; + } + + return state; +} + + +static void ares__clear_rand_state(ares_rand_state *state) +{ + if (!state) + return; + + switch (state->type) { + case ARES_RAND_OS: + break; + case ARES_RAND_FILE: + fclose(state->state.rand_file); + break; + case ARES_RAND_RC4: + break; + } +} + + +static void ares__reinit_rand(ares_rand_state *state) +{ + ares__clear_rand_state(state); + ares__init_rand_engine(state); +} + + +void ares__destroy_rand_state(ares_rand_state *state) +{ + if (!state) + return; + + ares__clear_rand_state(state); + ares_free(state); +} + + +static void ares__rand_bytes(ares_rand_state *state, unsigned char *buf, size_t len) +{ + + while (1) { + size_t bytes_read = 0; + + switch (state->type) { + case ARES_RAND_OS: +#ifdef _WIN32 + RtlGenRandom(buf, len); + return; +#elif defined(HAVE_ARC4RANDOM_BUF) + arc4random_buf(buf, len); + return; +#else + /* Shouldn't be possible to be here */ + break; +#endif + + case ARES_RAND_FILE: + while (1) { + size_t rv = fread(buf + bytes_read, 1, len - bytes_read, state->state.rand_file); + if (rv == 0) + break; /* critical error, will reinit rand state */ + + bytes_read += rv; + if (bytes_read == len) + return; + } + break; + + case ARES_RAND_RC4: + ares_rc4_prng(&state->state.rc4, buf, len); + return; + } + + /* If we didn't return before we got here, that means we had a critical rand + * failure and need to reinitialized */ + ares__reinit_rand(state); + } +} + +unsigned short ares__generate_new_id(ares_rand_state *state) +{ + unsigned short r=0; + + ares__rand_bytes(state, (unsigned char *)&r, sizeof(r)); + return r; +} + diff --git a/lib/c-ares-1.19.0/src/lib/ares_search.c b/lib/c-ares-1.19.1/src/lib/ares_search.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_search.c rename to lib/c-ares-1.19.1/src/lib/ares_search.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_send.c b/lib/c-ares-1.19.1/src/lib/ares_send.c similarity index 99% rename from lib/c-ares-1.19.0/src/lib/ares_send.c rename to lib/c-ares-1.19.1/src/lib/ares_send.c index 75ba9e4cc60..542cf45f11a 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_send.c +++ b/lib/c-ares-1.19.1/src/lib/ares_send.c @@ -39,7 +39,11 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, callback(arg, ARES_EBADQUERY, 0, NULL, 0); return; } - + if (channel->nservers < 1) + { + callback(arg, ARES_ESERVFAIL, 0, NULL, 0); + return; + } /* Allocate space for query and allocated fields. */ query = ares_malloc(sizeof(struct query)); if (!query) @@ -54,12 +58,6 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, callback(arg, ARES_ENOMEM, 0, NULL, 0); return; } - if (channel->nservers < 1) - { - ares_free(query); - callback(arg, ARES_ESERVFAIL, 0, NULL, 0); - return; - } query->server_info = ares_malloc(channel->nservers * sizeof(query->server_info[0])); if (!query->server_info) diff --git a/lib/c-ares-1.19.0/src/lib/ares_setup.h b/lib/c-ares-1.19.1/src/lib/ares_setup.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_setup.h rename to lib/c-ares-1.19.1/src/lib/ares_setup.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_strcasecmp.c b/lib/c-ares-1.19.1/src/lib/ares_strcasecmp.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_strcasecmp.c rename to lib/c-ares-1.19.1/src/lib/ares_strcasecmp.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_strcasecmp.h b/lib/c-ares-1.19.1/src/lib/ares_strcasecmp.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_strcasecmp.h rename to lib/c-ares-1.19.1/src/lib/ares_strcasecmp.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_strdup.c b/lib/c-ares-1.19.1/src/lib/ares_strdup.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_strdup.c rename to lib/c-ares-1.19.1/src/lib/ares_strdup.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_strdup.h b/lib/c-ares-1.19.1/src/lib/ares_strdup.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_strdup.h rename to lib/c-ares-1.19.1/src/lib/ares_strdup.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_strerror.c b/lib/c-ares-1.19.1/src/lib/ares_strerror.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_strerror.c rename to lib/c-ares-1.19.1/src/lib/ares_strerror.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_strsplit.c b/lib/c-ares-1.19.1/src/lib/ares_strsplit.c similarity index 93% rename from lib/c-ares-1.19.0/src/lib/ares_strsplit.c rename to lib/c-ares-1.19.1/src/lib/ares_strsplit.c index 194375c8308..d3e90c4a8f6 100644 --- a/lib/c-ares-1.19.0/src/lib/ares_strsplit.c +++ b/lib/c-ares-1.19.1/src/lib/ares_strsplit.c @@ -18,7 +18,6 @@ #endif #include "ares_setup.h" -#include "ares_strsplit.h" #include "ares.h" #include "ares_private.h" @@ -55,7 +54,7 @@ char **ares__strsplit(const char *in, const char *delms, size_t *num_elm) { count++; p += i; } - } while(*p++ != 0); + } while (*p++ != 0); if (count == 0) return NULL; @@ -69,13 +68,8 @@ char **ares__strsplit(const char *in, const char *delms, size_t *num_elm) { i = strcspn(p, delms); if (i != 0) { for (k = 0; k < j; k++) { -#ifdef WIN32 - if (strnicmp(table[k], p, i) == 0 && table[k][i] == 0) - break; -#else if (strncasecmp(table[k], p, i) == 0 && table[k][i] == 0) break; -#endif } if (k == j) { /* copy unique strings only */ diff --git a/lib/c-ares-1.19.0/src/lib/ares_strsplit.h b/lib/c-ares-1.19.1/src/lib/ares_strsplit.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_strsplit.h rename to lib/c-ares-1.19.1/src/lib/ares_strsplit.h diff --git a/lib/c-ares-1.19.0/src/lib/ares_timeout.c b/lib/c-ares-1.19.1/src/lib/ares_timeout.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_timeout.c rename to lib/c-ares-1.19.1/src/lib/ares_timeout.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_version.c b/lib/c-ares-1.19.1/src/lib/ares_version.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_version.c rename to lib/c-ares-1.19.1/src/lib/ares_version.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_writev.c b/lib/c-ares-1.19.1/src/lib/ares_writev.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_writev.c rename to lib/c-ares-1.19.1/src/lib/ares_writev.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_writev.h b/lib/c-ares-1.19.1/src/lib/ares_writev.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/ares_writev.h rename to lib/c-ares-1.19.1/src/lib/ares_writev.h diff --git a/lib/c-ares-1.19.0/src/lib/bitncmp.c b/lib/c-ares-1.19.1/src/lib/bitncmp.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/bitncmp.c rename to lib/c-ares-1.19.1/src/lib/bitncmp.c diff --git a/lib/c-ares-1.19.0/src/lib/bitncmp.h b/lib/c-ares-1.19.1/src/lib/bitncmp.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/bitncmp.h rename to lib/c-ares-1.19.1/src/lib/bitncmp.h diff --git a/lib/c-ares-1.19.0/src/lib/cares.rc b/lib/c-ares-1.19.1/src/lib/cares.rc similarity index 100% rename from lib/c-ares-1.19.0/src/lib/cares.rc rename to lib/c-ares-1.19.1/src/lib/cares.rc diff --git a/lib/c-ares-1.19.0/src/lib/config-dos.h b/lib/c-ares-1.19.1/src/lib/config-dos.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/config-dos.h rename to lib/c-ares-1.19.1/src/lib/config-dos.h diff --git a/lib/c-ares-1.19.0/src/lib/config-win32.h b/lib/c-ares-1.19.1/src/lib/config-win32.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/config-win32.h rename to lib/c-ares-1.19.1/src/lib/config-win32.h diff --git a/lib/c-ares-1.19.0/src/lib/inet_net_pton.c b/lib/c-ares-1.19.1/src/lib/inet_net_pton.c similarity index 73% rename from lib/c-ares-1.19.0/src/lib/inet_net_pton.c rename to lib/c-ares-1.19.1/src/lib/inet_net_pton.c index 840de506529..7130f0f1e22 100644 --- a/lib/c-ares-1.19.0/src/lib/inet_net_pton.c +++ b/lib/c-ares-1.19.1/src/lib/inet_net_pton.c @@ -1,19 +1,20 @@ /* - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2012 by Gilles Chehade * Copyright (c) 1996,1999 by Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. */ #include "ares_setup.h" @@ -35,9 +36,6 @@ const struct ares_in6_addr ares_in6addr_any = { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }; - -#ifndef HAVE_INET_NET_PTON - /* * static int * inet_net_pton_ipv4(src, dst, size) @@ -60,7 +58,7 @@ const struct ares_in6_addr ares_in6addr_any = { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0, * Paul Vixie (ISC), June 1996 */ static int -inet_net_pton_ipv4(const char *src, unsigned char *dst, size_t size) +ares_inet_net_pton_ipv4(const char *src, unsigned char *dst, size_t size) { static const char xdigits[] = "0123456789abcdef"; static const char digits[] = "0123456789"; @@ -216,64 +214,16 @@ getbits(const char *src, int *bitsp) return (1); } -static int -getv4(const char *src, unsigned char *dst, int *bitsp) -{ - static const char digits[] = "0123456789"; - unsigned char *odst = dst; - int n; - unsigned int val; - char ch; - - val = 0; - n = 0; - while ((ch = *src++) != '\0') { - const char *pch; - - pch = strchr(digits, ch); - if (pch != NULL) { - if (n++ != 0 && val == 0) /* no leading zeros */ - return (0); - val *= 10; - val += aresx_sztoui(pch - digits); - if (val > 255) /* range */ - return (0); - continue; - } - if (ch == '.' || ch == '/') { - if (dst - odst > 3) /* too many octets? */ - return (0); - *dst++ = (unsigned char)val; - if (ch == '/') - return (getbits(src, bitsp)); - val = 0; - n = 0; - continue; - } - return (0); - } - if (n == 0) - return (0); - if (dst - odst > 3) /* too many octets? */ - return (0); - *dst = (unsigned char)val; - return 1; -} static int -inet_net_pton_ipv6(const char *src, unsigned char *dst, size_t size) +ares_inet_pton6(const char *src, unsigned char *dst) { static const char xdigits_l[] = "0123456789abcdef", - xdigits_u[] = "0123456789ABCDEF"; + xdigits_u[] = "0123456789ABCDEF"; unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; const char *xdigits, *curtok; - int ch, saw_xdigit; + int ch, saw_xdigit, count_xdigit; unsigned int val; - int digits; - int bits; - size_t bytes; - int words; - int ipv4; memset((tp = tmp), '\0', NS_IN6ADDRSZ); endp = tp + NS_IN6ADDRSZ; @@ -283,22 +233,22 @@ inet_net_pton_ipv6(const char *src, unsigned char *dst, size_t size) if (*++src != ':') goto enoent; curtok = src; - saw_xdigit = 0; + saw_xdigit = count_xdigit = 0; val = 0; - digits = 0; - bits = -1; - ipv4 = 0; while ((ch = *src++) != '\0') { const char *pch; if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL) pch = strchr((xdigits = xdigits_u), ch); if (pch != NULL) { + if (count_xdigit >= 4) + goto enoent; val <<= 4; - val |= aresx_sztoui(pch - xdigits); - if (++digits > 4) + val |= (unsigned int)(pch - xdigits); + if (val > 0xffff) goto enoent; saw_xdigit = 1; + count_xdigit++; continue; } if (ch == ':') { @@ -308,76 +258,99 @@ inet_net_pton_ipv6(const char *src, unsigned char *dst, size_t size) goto enoent; colonp = tp; continue; - } else if (*src == '\0') + } else if (*src == '\0') { goto enoent; + } if (tp + NS_INT16SZ > endp) - return (0); - *tp++ = (unsigned char)((val >> 8) & 0xff); - *tp++ = (unsigned char)(val & 0xff); + goto enoent; + *tp++ = (unsigned char) (val >> 8) & 0xff; + *tp++ = (unsigned char) val & 0xff; saw_xdigit = 0; - digits = 0; + count_xdigit = 0; val = 0; continue; } if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && - getv4(curtok, tp, &bits) > 0) { + ares_inet_net_pton_ipv4(curtok, tp, NS_INADDRSZ) > 0) { tp += NS_INADDRSZ; saw_xdigit = 0; - ipv4 = 1; break; /* '\0' was seen by inet_pton4(). */ } - if (ch == '/' && getbits(src, &bits) > 0) - break; goto enoent; } if (saw_xdigit) { if (tp + NS_INT16SZ > endp) goto enoent; - *tp++ = (unsigned char)((val >> 8) & 0xff); - *tp++ = (unsigned char)(val & 0xff); + *tp++ = (unsigned char) (val >> 8) & 0xff; + *tp++ = (unsigned char) val & 0xff; } - if (bits == -1) - bits = 128; - - words = (bits + 15) / 16; - if (words < 2) - words = 2; - if (ipv4) - words = 8; - endp = tmp + 2 * words; - if (colonp != NULL) { /* * Since some memmove()'s erroneously fail to handle * overlapping regions, we'll do the shift by hand. */ - const ares_ssize_t n = tp - colonp; - ares_ssize_t i; + const int n = (int)(tp - colonp); + int i; if (tp == endp) goto enoent; for (i = 1; i <= n; i++) { - *(endp - i) = *(colonp + n - i); - *(colonp + n - i) = 0; + endp[- i] = colonp[n - i]; + colonp[n - i] = 0; } tp = endp; } if (tp != endp) goto enoent; - bytes = (bits + 7) / 8; - if (bytes > size) - goto emsgsize; - memcpy(dst, tmp, bytes); - return (bits); + memcpy(dst, tmp, NS_IN6ADDRSZ); + return (1); - enoent: +enoent: SET_ERRNO(ENOENT); return (-1); +} - emsgsize: - SET_ERRNO(EMSGSIZE); - return (-1); +static int +ares_inet_net_pton_ipv6(const char *src, unsigned char *dst, size_t size) +{ + struct ares_in6_addr in6; + int ret; + int bits; + size_t bytes; + char buf[INET6_ADDRSTRLEN + sizeof("/128")]; + char *sep; + + if (strlen(src) >= sizeof buf) { + SET_ERRNO(EMSGSIZE); + return (-1); + } + strncpy(buf, src, sizeof buf); + + sep = strchr(buf, '/'); + if (sep != NULL) + *sep++ = '\0'; + + ret = ares_inet_pton6(buf, (unsigned char *)&in6); + if (ret != 1) + return (-1); + + if (sep == NULL) + bits = 128; + else { + if (!getbits(sep, &bits)) { + SET_ERRNO(ENOENT); + return (-1); + } + } + + bytes = (bits + 7) / 8; + if (bytes > size) { + SET_ERRNO(EMSGSIZE); + return (-1); + } + memcpy(dst, &in6, bytes); + return (bits); } /* @@ -403,18 +376,15 @@ ares_inet_net_pton(int af, const char *src, void *dst, size_t size) { switch (af) { case AF_INET: - return (inet_net_pton_ipv4(src, dst, size)); + return (ares_inet_net_pton_ipv4(src, dst, size)); case AF_INET6: - return (inet_net_pton_ipv6(src, dst, size)); + return (ares_inet_net_pton_ipv6(src, dst, size)); default: SET_ERRNO(EAFNOSUPPORT); return (-1); } } -#endif /* HAVE_INET_NET_PTON */ - -#ifndef HAVE_INET_PTON int ares_inet_pton(int af, const char *src, void *dst) { int result; @@ -434,11 +404,3 @@ int ares_inet_pton(int af, const char *src, void *dst) return 0; return (result > -1 ? 1 : -1); } -#else /* HAVE_INET_PTON */ -int ares_inet_pton(int af, const char *src, void *dst) -{ - /* just relay this to the underlying function */ - return inet_pton(af, src, dst); -} - -#endif diff --git a/lib/c-ares-1.19.0/src/lib/inet_ntop.c b/lib/c-ares-1.19.1/src/lib/inet_ntop.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/inet_ntop.c rename to lib/c-ares-1.19.1/src/lib/inet_ntop.c diff --git a/lib/c-ares-1.19.0/src/lib/setup_once.h b/lib/c-ares-1.19.1/src/lib/setup_once.h similarity index 100% rename from lib/c-ares-1.19.0/src/lib/setup_once.h rename to lib/c-ares-1.19.1/src/lib/setup_once.h diff --git a/lib/c-ares-1.19.0/src/lib/windows_port.c b/lib/c-ares-1.19.1/src/lib/windows_port.c similarity index 100% rename from lib/c-ares-1.19.0/src/lib/windows_port.c rename to lib/c-ares-1.19.1/src/lib/windows_port.c diff --git a/lib/c-ares-1.19.0/src/tools/CMakeLists.txt b/lib/c-ares-1.19.1/src/tools/CMakeLists.txt similarity index 100% rename from lib/c-ares-1.19.0/src/tools/CMakeLists.txt rename to lib/c-ares-1.19.1/src/tools/CMakeLists.txt diff --git a/lib/c-ares-1.19.0/src/tools/Makefile.am b/lib/c-ares-1.19.1/src/tools/Makefile.am similarity index 100% rename from lib/c-ares-1.19.0/src/tools/Makefile.am rename to lib/c-ares-1.19.1/src/tools/Makefile.am diff --git a/lib/c-ares-1.19.0/src/tools/Makefile.in b/lib/c-ares-1.19.1/src/tools/Makefile.in similarity index 99% rename from lib/c-ares-1.19.0/src/tools/Makefile.in rename to lib/c-ares-1.19.1/src/tools/Makefile.in index 709061ec79e..9e64462d591 100644 --- a/lib/c-ares-1.19.0/src/tools/Makefile.in +++ b/lib/c-ares-1.19.1/src/tools/Makefile.in @@ -98,6 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_ac_append_to_file.m4 \ $(top_srcdir)/m4/ax_am_macros_static.m4 \ $(top_srcdir)/m4/ax_check_gnu_make.m4 \ $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_file_escapes.m4 \ $(top_srcdir)/m4/ax_require_defined.m4 \ diff --git a/lib/c-ares-1.19.0/src/tools/Makefile.inc b/lib/c-ares-1.19.1/src/tools/Makefile.inc similarity index 100% rename from lib/c-ares-1.19.0/src/tools/Makefile.inc rename to lib/c-ares-1.19.1/src/tools/Makefile.inc diff --git a/lib/c-ares-1.19.0/src/tools/acountry.c b/lib/c-ares-1.19.1/src/tools/acountry.c similarity index 100% rename from lib/c-ares-1.19.0/src/tools/acountry.c rename to lib/c-ares-1.19.1/src/tools/acountry.c diff --git a/lib/c-ares-1.19.0/src/tools/adig.c b/lib/c-ares-1.19.1/src/tools/adig.c similarity index 100% rename from lib/c-ares-1.19.0/src/tools/adig.c rename to lib/c-ares-1.19.1/src/tools/adig.c diff --git a/lib/c-ares-1.19.0/src/tools/ahost.c b/lib/c-ares-1.19.1/src/tools/ahost.c similarity index 100% rename from lib/c-ares-1.19.0/src/tools/ahost.c rename to lib/c-ares-1.19.1/src/tools/ahost.c diff --git a/lib/c-ares-1.19.0/src/tools/ares_getopt.c b/lib/c-ares-1.19.1/src/tools/ares_getopt.c similarity index 100% rename from lib/c-ares-1.19.0/src/tools/ares_getopt.c rename to lib/c-ares-1.19.1/src/tools/ares_getopt.c diff --git a/lib/c-ares-1.19.0/src/tools/ares_getopt.h b/lib/c-ares-1.19.1/src/tools/ares_getopt.h similarity index 100% rename from lib/c-ares-1.19.0/src/tools/ares_getopt.h rename to lib/c-ares-1.19.1/src/tools/ares_getopt.h diff --git a/lib/c-ares-1.19.0/test/CMakeLists.txt b/lib/c-ares-1.19.1/test/CMakeLists.txt similarity index 100% rename from lib/c-ares-1.19.0/test/CMakeLists.txt rename to lib/c-ares-1.19.1/test/CMakeLists.txt diff --git a/lib/c-ares-1.19.0/test/Makefile.am b/lib/c-ares-1.19.1/test/Makefile.am similarity index 100% rename from lib/c-ares-1.19.0/test/Makefile.am rename to lib/c-ares-1.19.1/test/Makefile.am diff --git a/lib/c-ares-1.19.0/test/Makefile.in b/lib/c-ares-1.19.1/test/Makefile.in similarity index 99% rename from lib/c-ares-1.19.0/test/Makefile.in rename to lib/c-ares-1.19.1/test/Makefile.in index 32af8d2a199..b4c9d24faba 100644 --- a/lib/c-ares-1.19.0/test/Makefile.in +++ b/lib/c-ares-1.19.1/test/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Tue Nov 8 13:43:42 CET 2022 +# from AX_AM_MACROS_STATIC on Mon May 22 13:36:05 CEST 2023 VPATH = @srcdir@ @@ -105,6 +105,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/ax_ac_append_to_file.m4 \ $(top_srcdir)/../m4/ax_check_user_namespace.m4 \ $(top_srcdir)/../m4/ax_check_uts_namespace.m4 \ $(top_srcdir)/../m4/ax_code_coverage.m4 \ + $(top_srcdir)/../m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/../m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/../m4/ax_file_escapes.m4 \ $(top_srcdir)/../m4/ax_pthread.m4 \ @@ -515,6 +516,7 @@ CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ +CPP = @CPP@ # Note use of -isystem to force use of local gMock/gTest even if there's an installed version. CPPFLAGS = @CPPFLAGS@ -I$(ARES_BLD_DIR)/include \ @@ -580,6 +582,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CXX = @PTHREAD_CXX@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ diff --git a/lib/c-ares-1.19.0/test/Makefile.inc b/lib/c-ares-1.19.1/test/Makefile.inc similarity index 100% rename from lib/c-ares-1.19.0/test/Makefile.inc rename to lib/c-ares-1.19.1/test/Makefile.inc diff --git a/lib/c-ares-1.19.0/test/Makefile.m32 b/lib/c-ares-1.19.1/test/Makefile.m32 similarity index 100% rename from lib/c-ares-1.19.0/test/Makefile.m32 rename to lib/c-ares-1.19.1/test/Makefile.m32 diff --git a/lib/c-ares-1.19.0/test/Makefile.msvc b/lib/c-ares-1.19.1/test/Makefile.msvc similarity index 100% rename from lib/c-ares-1.19.0/test/Makefile.msvc rename to lib/c-ares-1.19.1/test/Makefile.msvc diff --git a/lib/c-ares-1.19.0/test/README.md b/lib/c-ares-1.19.1/test/README.md similarity index 100% rename from lib/c-ares-1.19.0/test/README.md rename to lib/c-ares-1.19.1/test/README.md diff --git a/lib/c-ares-1.19.0/test/aclocal.m4 b/lib/c-ares-1.19.1/test/aclocal.m4 similarity index 99% rename from lib/c-ares-1.19.0/test/aclocal.m4 rename to lib/c-ares-1.19.1/test/aclocal.m4 index 3a57c5c2919..7b91744cfcd 100644 --- a/lib/c-ares-1.19.0/test/aclocal.m4 +++ b/lib/c-ares-1.19.1/test/aclocal.m4 @@ -1156,6 +1156,7 @@ m4_include([../m4/ax_check_gnu_make.m4]) m4_include([../m4/ax_check_user_namespace.m4]) m4_include([../m4/ax_check_uts_namespace.m4]) m4_include([../m4/ax_code_coverage.m4]) +m4_include([../m4/ax_cxx_compile_stdcxx.m4]) m4_include([../m4/ax_cxx_compile_stdcxx_11.m4]) m4_include([../m4/ax_file_escapes.m4]) m4_include([../m4/ax_pthread.m4]) diff --git a/lib/c-ares-1.19.0/aminclude_static.am b/lib/c-ares-1.19.1/test/aminclude_static.am similarity index 99% rename from lib/c-ares-1.19.0/aminclude_static.am rename to lib/c-ares-1.19.1/test/aminclude_static.am index aad78eb4b1e..33c6e9f2f34 100644 --- a/lib/c-ares-1.19.0/aminclude_static.am +++ b/lib/c-ares-1.19.1/test/aminclude_static.am @@ -1,6 +1,6 @@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Sat Jan 28 22:07:59 CET 2023 +# from AX_AM_MACROS_STATIC on Mon May 22 13:36:05 CEST 2023 # Code coverage diff --git a/lib/c-ares-1.19.0/test/ares-fuzz.c b/lib/c-ares-1.19.1/test/ares-fuzz.c similarity index 100% rename from lib/c-ares-1.19.0/test/ares-fuzz.c rename to lib/c-ares-1.19.1/test/ares-fuzz.c diff --git a/lib/c-ares-1.19.0/test/ares-test-ai.h b/lib/c-ares-1.19.1/test/ares-test-ai.h similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-ai.h rename to lib/c-ares-1.19.1/test/ares-test-ai.h diff --git a/lib/c-ares-1.19.0/test/ares-test-fuzz-name.c b/lib/c-ares-1.19.1/test/ares-test-fuzz-name.c similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-fuzz-name.c rename to lib/c-ares-1.19.1/test/ares-test-fuzz-name.c diff --git a/lib/c-ares-1.19.0/test/ares-test-fuzz.c b/lib/c-ares-1.19.1/test/ares-test-fuzz.c similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-fuzz.c rename to lib/c-ares-1.19.1/test/ares-test-fuzz.c diff --git a/lib/c-ares-1.19.0/test/ares-test-init.cc b/lib/c-ares-1.19.1/test/ares-test-init.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-init.cc rename to lib/c-ares-1.19.1/test/ares-test-init.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-internal.cc b/lib/c-ares-1.19.1/test/ares-test-internal.cc similarity index 98% rename from lib/c-ares-1.19.0/test/ares-test-internal.cc rename to lib/c-ares-1.19.1/test/ares-test-internal.cc index 1cb7e427dcd..40cc82b86ec 100644 --- a/lib/c-ares-1.19.0/test/ares-test-internal.cc +++ b/lib/c-ares-1.19.1/test/ares-test-internal.cc @@ -123,6 +123,7 @@ TEST_F(LibraryTest, InetPtoN) { EXPECT_EQ(0, ares_inet_net_pton(AF_INET6, "12:34::ff/0", &a6, sizeof(a6))); EXPECT_EQ(16 * 8, ares_inet_net_pton(AF_INET6, "12:34::ffff:0.2", &a6, sizeof(a6))); EXPECT_EQ(16 * 8, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234", &a6, sizeof(a6))); + EXPECT_EQ(2, ares_inet_net_pton(AF_INET6, "0::00:00:00/2", &a6, sizeof(a6))); // Various malformed versions EXPECT_EQ(-1, ares_inet_net_pton(AF_INET, "", &a4, sizeof(a4))); @@ -160,11 +161,9 @@ TEST_F(LibraryTest, InetPtoN) { EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, ":1234:1234:1234:1234:1234:1234:1234:1234", &a6, sizeof(a6))); EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, ":1234:1234:1234:1234:1234:1234:1234:1234:", &a6, sizeof(a6))); EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234:5678", &a6, sizeof(a6))); - // TODO(drysdale): check whether the next two tests should give -1. - EXPECT_EQ(0, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234:5678:5678", &a6, sizeof(a6))); - EXPECT_EQ(0, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234:5678:5678:5678", &a6, sizeof(a6))); + EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234:5678:5678", &a6, sizeof(a6))); + EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234:5678:5678:5678", &a6, sizeof(a6))); EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "12:34::ffff:257.2.3.4", &a6, sizeof(a6))); - EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "12:34::ffff:002.2.3.4", &a6, sizeof(a6))); EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "12:34::ffff:1.2.3.4.5.6", &a6, sizeof(a6))); EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "12:34::ffff:1.2.3.4.5", &a6, sizeof(a6))); EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "12:34::ffff:1.2.3.z", &a6, sizeof(a6))); diff --git a/lib/c-ares-1.19.0/test/ares-test-live.cc b/lib/c-ares-1.19.1/test/ares-test-live.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-live.cc rename to lib/c-ares-1.19.1/test/ares-test-live.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-main.cc b/lib/c-ares-1.19.1/test/ares-test-main.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-main.cc rename to lib/c-ares-1.19.1/test/ares-test-main.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-misc.cc b/lib/c-ares-1.19.1/test/ares-test-misc.cc similarity index 99% rename from lib/c-ares-1.19.0/test/ares-test-misc.cc rename to lib/c-ares-1.19.1/test/ares-test-misc.cc index b11b04babc0..f85a3bf604a 100644 --- a/lib/c-ares-1.19.0/test/ares-test-misc.cc +++ b/lib/c-ares-1.19.1/test/ares-test-misc.cc @@ -298,7 +298,7 @@ TEST_F(DefaultChannelTest, SearchOnionDomain) { } TEST_F(DefaultChannelTest, SendFailure) { - unsigned char buf[2]; + unsigned char buf[2] = {}; SearchResult result; ares_send(channel_, buf, sizeof(buf), SearchCallback, &result); EXPECT_TRUE(result.done_); diff --git a/lib/c-ares-1.19.0/test/ares-test-mock-ai.cc b/lib/c-ares-1.19.1/test/ares-test-mock-ai.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-mock-ai.cc rename to lib/c-ares-1.19.1/test/ares-test-mock-ai.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-mock.cc b/lib/c-ares-1.19.1/test/ares-test-mock.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-mock.cc rename to lib/c-ares-1.19.1/test/ares-test-mock.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-ns.cc b/lib/c-ares-1.19.1/test/ares-test-ns.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-ns.cc rename to lib/c-ares-1.19.1/test/ares-test-ns.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-a.cc b/lib/c-ares-1.19.1/test/ares-test-parse-a.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-a.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-a.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-aaaa.cc b/lib/c-ares-1.19.1/test/ares-test-parse-aaaa.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-aaaa.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-aaaa.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-caa.cc b/lib/c-ares-1.19.1/test/ares-test-parse-caa.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-caa.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-caa.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-mx.cc b/lib/c-ares-1.19.1/test/ares-test-parse-mx.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-mx.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-mx.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-naptr.cc b/lib/c-ares-1.19.1/test/ares-test-parse-naptr.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-naptr.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-naptr.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-ns.cc b/lib/c-ares-1.19.1/test/ares-test-parse-ns.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-ns.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-ns.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-ptr.cc b/lib/c-ares-1.19.1/test/ares-test-parse-ptr.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-ptr.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-ptr.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-soa-any.cc b/lib/c-ares-1.19.1/test/ares-test-parse-soa-any.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-soa-any.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-soa-any.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-soa.cc b/lib/c-ares-1.19.1/test/ares-test-parse-soa.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-soa.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-soa.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-srv.cc b/lib/c-ares-1.19.1/test/ares-test-parse-srv.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-srv.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-srv.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-txt.cc b/lib/c-ares-1.19.1/test/ares-test-parse-txt.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-txt.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-txt.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse-uri.cc b/lib/c-ares-1.19.1/test/ares-test-parse-uri.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse-uri.cc rename to lib/c-ares-1.19.1/test/ares-test-parse-uri.cc diff --git a/lib/c-ares-1.19.0/test/ares-test-parse.cc b/lib/c-ares-1.19.1/test/ares-test-parse.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test-parse.cc rename to lib/c-ares-1.19.1/test/ares-test-parse.cc diff --git a/lib/c-ares-1.19.0/test/ares-test.cc b/lib/c-ares-1.19.1/test/ares-test.cc similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test.cc rename to lib/c-ares-1.19.1/test/ares-test.cc diff --git a/lib/c-ares-1.19.0/test/ares-test.h b/lib/c-ares-1.19.1/test/ares-test.h similarity index 100% rename from lib/c-ares-1.19.0/test/ares-test.h rename to lib/c-ares-1.19.1/test/ares-test.h diff --git a/lib/c-ares-1.19.0/test/buildconf b/lib/c-ares-1.19.1/test/buildconf similarity index 100% rename from lib/c-ares-1.19.0/test/buildconf rename to lib/c-ares-1.19.1/test/buildconf diff --git a/lib/c-ares-1.19.0/test/compile b/lib/c-ares-1.19.1/test/compile similarity index 100% rename from lib/c-ares-1.19.0/test/compile rename to lib/c-ares-1.19.1/test/compile diff --git a/lib/c-ares-1.19.0/test/config.guess b/lib/c-ares-1.19.1/test/config.guess similarity index 100% rename from lib/c-ares-1.19.0/test/config.guess rename to lib/c-ares-1.19.1/test/config.guess diff --git a/lib/c-ares-1.19.0/test/config.h.in b/lib/c-ares-1.19.1/test/config.h.in similarity index 100% rename from lib/c-ares-1.19.0/test/config.h.in rename to lib/c-ares-1.19.1/test/config.h.in diff --git a/lib/c-ares-1.19.0/test/config.sub b/lib/c-ares-1.19.1/test/config.sub similarity index 100% rename from lib/c-ares-1.19.0/test/config.sub rename to lib/c-ares-1.19.1/test/config.sub diff --git a/lib/c-ares-1.19.0/test/configure b/lib/c-ares-1.19.1/test/configure similarity index 95% rename from lib/c-ares-1.19.0/test/configure rename to lib/c-ares-1.19.1/test/configure index 5ad0fb01cb3..b268a43efd9 100755 --- a/lib/c-ares-1.19.0/test/configure +++ b/lib/c-ares-1.19.1/test/configure @@ -676,8 +676,10 @@ CODE_COVERAGE_ENABLED_FALSE CODE_COVERAGE_ENABLED_TRUE PTHREAD_CFLAGS PTHREAD_LIBS +PTHREAD_CXX PTHREAD_CC ax_pthread_config +CPP LIBTOOL_DEPS CXXCPP LT_SYS_LIBRARY_PATH @@ -832,7 +834,8 @@ CCC CC CFLAGS LT_SYS_LIBRARY_PATH -CXXCPP' +CXXCPP +CPP' # Initialize some variables set by options. @@ -1499,6 +1502,7 @@ Some influential environment variables: LT_SYS_LIBRARY_PATH User-defined run-time library search path. CXXCPP C++ preprocessor + CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1886,6 +1890,44 @@ fi } # ac_fn_cxx_try_link +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that @@ -4120,11 +4162,11 @@ if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 printf %s "checking for $CXX option to enable C++11 features... " >&6; } -if test ${ac_cv_prog_cxx_11+y} +if test ${ac_cv_prog_cxx_cxx11+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_prog_cxx_11=no + ac_cv_prog_cxx_cxx11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4166,11 +4208,11 @@ if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 printf %s "checking for $CXX option to enable C++98 features... " >&6; } -if test ${ac_cv_prog_cxx_98+y} +if test ${ac_cv_prog_cxx_cxx98+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_prog_cxx_98=no + ac_cv_prog_cxx_cxx98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4409,144 +4451,323 @@ fi - ax_cxx_compile_cxx11_required=true + ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 -printf %s "checking whether $CXX supports C++11 features by default... " >&6; } -if test ${ax_cv_cxx_compile_cxx11+y} + + + + + + if test x$ac_success = xno; then + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 +printf %s "checking whether $CXX supports C++11 features with $switch... " >&6; } +if eval test \${$cachevar+y} then : printf %s "(cached) " >&6 else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_save_CXX="$CXX" + CXX="$CXX $switch" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - template + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +// MSVC always sets __cplusplus to 199711L in older versions; newer versions +// only set it correctly if /Zc:__cplusplus is specified as well as a +// /std:c++NN switch: +// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ +#elif __cplusplus < 201103L && !defined _MSC_VER + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; - struct Base { - virtual void f() {} + } + + namespace test_final_override + { + + struct Base + { + virtual ~Base() {} + virtual void f() {} }; - struct Child : public Base { - virtual void f() override {} + + struct Derived : public Base + { + virtual ~Derived() override {} + virtual void f() override {} }; - typedef check> right_angle_brackets; + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; - int a; - decltype(a) b; + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; - typedef check check_type; - check_type c; - check_type&& cr = static_cast(c); + } - auto d = a; - auto l = [](){}; + namespace test_decltype + { - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this - namespace test_template_alias_sfinae { - struct foo {}; + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } - template - using member = typename T::member_type; + } - template - void func(...) {} + namespace test_type_deduction + { - template - void func(member*) {} + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; - void test(); + template < typename T > + struct is_same + { + static const bool value = true; + }; - void test() { - func(0); - } + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; } -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ax_cv_cxx_compile_cxx11=yes -else $as_nop - ax_cv_cxx_compile_cxx11=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 -printf "%s\n" "$ax_cv_cxx_compile_cxx11" >&6; } - if test x$ax_cv_cxx_compile_cxx11 = xyes; then - ac_success=yes - fi + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + } + namespace test_noexcept + { - if test x$ac_success = xno; then - for switch in -std=c++11 -std=c++0x; do - cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 -printf %s "checking whether $CXX supports C++11 features with $switch... " >&6; } -if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $switch" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + int f() { return 0; } + int g() noexcept { return 0; } - template - struct check + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; }; - struct Base { - virtual void f() {} + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; }; - struct Child : public Base { - virtual void f() override {} + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; }; - typedef check> right_angle_brackets; + template <> + struct sum<> + { + static constexpr auto value = 0; + }; - int a; - decltype(a) b; + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - typedef check check_type; - check_type c; - check_type&& cr = static_cast(c); + } - auto d = a; - auto l = [](){}; + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this - namespace test_template_alias_sfinae { - struct foo {}; + struct foo {}; - template - using member = typename T::member_type; + template + using member = typename T::member_type; - template - void func(...) {} + template + void func(...) {} - template - void func(member*) {} + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L - void test(); - void test() { - func(0); - } - } _ACEOF if ac_fn_cxx_try_compile "$LINENO" @@ -4556,14 +4777,21 @@ else $as_nop eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CXXFLAGS="$ac_save_CXXFLAGS" + CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } - if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" - ac_success=yes + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + if test x$ac_success = xyes; then break fi done @@ -4578,21 +4806,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x$ac_success = xno; then as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 fi - else - if test x$ac_success = xno; then - HAVE_CXX11=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 + fi + if test x$ac_success = xno; then + HAVE_CXX11=0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 printf "%s\n" "$as_me: No compiler with C++11 support was found" >&6;} - else - HAVE_CXX11=1 + else + HAVE_CXX11=1 printf "%s\n" "#define HAVE_CXX11 1" >>confdefs.h - fi - - fi + case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -17051,6 +17277,141 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + ac_ext=c @@ -17062,19 +17423,28 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). +# requires special compiler flags (e.g. on Tru64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + if test "x$PTHREAD_CC" != "x" +then : + CC="$PTHREAD_CC" +fi + if test "x$PTHREAD_CXX" != "x" +then : + CXX="$PTHREAD_CXX" +fi CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -printf %s "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 +printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17098,12 +17468,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 printf "%s\n" "$ax_pthread_ok" >&6; } - if test x"$ax_pthread_ok" = xno; then + if test "x$ax_pthread_ok" = "xno"; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" fi # We must check for the threads library under a number of different @@ -17111,12 +17482,14 @@ fi # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: @@ -17125,83 +17498,178 @@ ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) -case ${host_os} in +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1 +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 +printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} +fi +rm -rf conftest* + + ;; + solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). - darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" ;; esac -# Clang doesn't consider unrecognized options an error unless we specify -# -Werror. We throw in some extra Clang-specific options to ensure that -# this doesn't happen for GCC, which also accepts -Werror. +# Are we compiling with Clang? -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5 -printf %s "checking if compiler needs -Werror to reject unknown flags... " >&6; } -save_CFLAGS="$CFLAGS" -ax_pthread_extra_flags="-Werror" -CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 +printf %s "checking whether $CC is Clang... " >&6; } +if test ${ax_cv_PTHREAD_CLANG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void); -int -main (void) -{ -foo() - ; - return 0; -} +/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + _ACEOF -if ac_fn_c_try_compile "$LINENO" +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1 then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + ax_cv_PTHREAD_CLANG=yes +fi +rm -rf conftest* + + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 +printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; } +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + +if test "x$GCC" = "xyes" +then : + ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags" +fi + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +if test "x$ax_pthread_clang" = "xyes" +then : + ax_pthread_flags="-pthread,-lpthread -pthread" +fi + + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + + *) + ax_pthread_check_macro="--" + ;; +esac +if test "x$ax_pthread_check_macro" = "x--" +then : + ax_pthread_check_cond=0 else $as_nop - ax_pthread_extra_flags= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + ax_pthread_check_cond="!defined($ax_pthread_check_macro)" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -CFLAGS="$save_CFLAGS" -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - case $flag in +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 printf %s "checking whether pthreads work without any flags... " >&6; } ;; + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5 +printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; } + ;; + -*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 -printf %s "checking whether pthreads work with $flag... " >&6; } - PTHREAD_CFLAGS="$flag" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 +printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } + PTHREAD_CFLAGS="$ax_pthread_try_flag" ;; pthread-config) @@ -17248,22 +17716,25 @@ printf "%s\n" "no" >&6; } fi - if test x"$ax_pthread_config" = xno; then continue; fi + if test "x$ax_pthread_config" = "xno" +then : + continue +fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 -printf %s "checking for the pthreads library -l$flag... " >&6; } - PTHREAD_LIBS="-l$flag" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 +printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } + PTHREAD_LIBS="-l$ax_pthread_try_flag" ;; esac - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we @@ -17274,10 +17745,20 @@ printf %s "checking for the pthreads library -l$flag... " >&6; } # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - static void routine(void *a) { a = 0; } +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } static void *start_routine(void *a) { return a; } int main (void) @@ -17299,78 +17780,195 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 printf "%s\n" "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = xyes; then - break; - fi + if test "x$ax_pthread_ok" = "xyes" +then : + break +fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 +printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } +if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + if test "x$ax_pthread_try" = "xunknown" +then : + break +fi + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void){return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_link="$ax_pthread_2step_ac_link" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(void){return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + if test "x$ax_pthread_try" = "x" +then : + ax_pthread_try=no +fi + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 +printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + + + # Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 printf %s "checking for joinable pthread attribute... " >&6; } - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { -int attr = $attr; return attr /* ; */ +int attr = $ax_pthread_attr; return attr /* ; */ ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - attr_name=$attr; break + ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 -printf "%s\n" "$attr_name" >&6; } - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + done -printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $attr_name" >>confdefs.h +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 +printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } + if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes" +then : - fi +printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 -printf %s "checking if more special flags are required for pthreads... " >&6; } - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - # TODO: What about Clang on Solaris? - flag="-mt -D_REENTRANT" - fi - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flag" >&5 -printf "%s\n" "$flag" >&6; } - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi + ax_pthread_joinable_attr_defined=yes + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 +printf %s "checking whether more special flags are required for pthreads... " >&6; } +if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 +printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } + if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes" +then : + PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes +fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } @@ -17378,14 +17976,14 @@ if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} then : printf %s "(cached) " >&6 else $as_nop - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int i = PTHREAD_PRIO_INHERIT; + return i; ; return 0; } @@ -17402,31 +18000,44 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } - if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes" then : printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h + ax_pthread_prio_inherit_defined=yes + fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then + if test "x$GCC" != "xyes"; then case $host_os in aix*) case "x/$CC" in #( x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : #handle absolute path differently from PATH based program lookup - case "x$CC" in #( + case "x$CC" in #( x/*) : - if as_fn_executable_p ${CC}_r + + if as_fn_executable_p ${CC}_r then : PTHREAD_CC="${CC}_r" -fi ;; #( +fi + if test "x${CXX}" != "x" +then : + if as_fn_executable_p ${CXX}_r +then : + PTHREAD_CXX="${CXX}_r" +fi +fi + ;; #( *) : - for ac_prog in ${CC}_r + + for ac_prog in ${CC}_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -17473,8 +18084,62 @@ fi test -n "$PTHREAD_CC" && break done test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - ;; -esac ;; #( + + if test "x${CXX}" != "x" +then : + for ac_prog in ${CXX}_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PTHREAD_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$PTHREAD_CXX"; then + ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_PTHREAD_CXX="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX +if test -n "$PTHREAD_CXX"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5 +printf "%s\n" "$PTHREAD_CXX" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$PTHREAD_CXX" && break +done +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" + +fi + + ;; +esac + ;; #( *) : ;; esac @@ -17484,13 +18149,15 @@ esac fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" + # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then +if test "x$ax_pthread_ok" = "xyes"; then printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h diff --git a/lib/c-ares-1.19.0/test/configure.ac b/lib/c-ares-1.19.1/test/configure.ac similarity index 100% rename from lib/c-ares-1.19.0/test/configure.ac rename to lib/c-ares-1.19.1/test/configure.ac diff --git a/lib/c-ares-1.19.0/test/depcomp b/lib/c-ares-1.19.1/test/depcomp similarity index 100% rename from lib/c-ares-1.19.0/test/depcomp rename to lib/c-ares-1.19.1/test/depcomp diff --git a/lib/c-ares-1.19.0/test/dns-dump.cc b/lib/c-ares-1.19.1/test/dns-dump.cc similarity index 100% rename from lib/c-ares-1.19.0/test/dns-dump.cc rename to lib/c-ares-1.19.1/test/dns-dump.cc diff --git a/lib/c-ares-1.19.0/test/dns-proto-test.cc b/lib/c-ares-1.19.1/test/dns-proto-test.cc similarity index 100% rename from lib/c-ares-1.19.0/test/dns-proto-test.cc rename to lib/c-ares-1.19.1/test/dns-proto-test.cc diff --git a/lib/c-ares-1.19.0/test/dns-proto.cc b/lib/c-ares-1.19.1/test/dns-proto.cc similarity index 100% rename from lib/c-ares-1.19.0/test/dns-proto.cc rename to lib/c-ares-1.19.1/test/dns-proto.cc diff --git a/lib/c-ares-1.19.0/test/dns-proto.h b/lib/c-ares-1.19.1/test/dns-proto.h similarity index 100% rename from lib/c-ares-1.19.0/test/dns-proto.h rename to lib/c-ares-1.19.1/test/dns-proto.h diff --git a/lib/c-ares-1.19.0/test/fuzzcheck.sh b/lib/c-ares-1.19.1/test/fuzzcheck.sh similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzcheck.sh rename to lib/c-ares-1.19.1/test/fuzzcheck.sh diff --git a/lib/c-ares-1.19.0/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529 b/lib/c-ares-1.19.1/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529 rename to lib/c-ares-1.19.1/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/00539467ca159b36aea95e61f9729115 b/lib/c-ares-1.19.1/test/fuzzinput/00539467ca159b36aea95e61f9729115 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/00539467ca159b36aea95e61f9729115 rename to lib/c-ares-1.19.1/test/fuzzinput/00539467ca159b36aea95e61f9729115 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e b/lib/c-ares-1.19.1/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e rename to lib/c-ares-1.19.1/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e diff --git a/lib/c-ares-1.19.0/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3 b/lib/c-ares-1.19.1/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3 rename to lib/c-ares-1.19.1/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65 b/lib/c-ares-1.19.1/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65 rename to lib/c-ares-1.19.1/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd b/lib/c-ares-1.19.1/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd rename to lib/c-ares-1.19.1/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd diff --git a/lib/c-ares-1.19.0/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4 b/lib/c-ares-1.19.1/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4 rename to lib/c-ares-1.19.1/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8 b/lib/c-ares-1.19.1/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8 rename to lib/c-ares-1.19.1/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8 b/lib/c-ares-1.19.1/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8 rename to lib/c-ares-1.19.1/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc b/lib/c-ares-1.19.1/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc rename to lib/c-ares-1.19.1/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc diff --git a/lib/c-ares-1.19.0/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa b/lib/c-ares-1.19.1/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa rename to lib/c-ares-1.19.1/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa diff --git a/lib/c-ares-1.19.0/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca b/lib/c-ares-1.19.1/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca rename to lib/c-ares-1.19.1/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca diff --git a/lib/c-ares-1.19.0/test/fuzzinput/06d47d3681493f1b1d41236f460d896f b/lib/c-ares-1.19.1/test/fuzzinput/06d47d3681493f1b1d41236f460d896f similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/06d47d3681493f1b1d41236f460d896f rename to lib/c-ares-1.19.1/test/fuzzinput/06d47d3681493f1b1d41236f460d896f diff --git a/lib/c-ares-1.19.0/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064 b/lib/c-ares-1.19.1/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064 rename to lib/c-ares-1.19.1/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede b/lib/c-ares-1.19.1/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede rename to lib/c-ares-1.19.1/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede diff --git a/lib/c-ares-1.19.0/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e b/lib/c-ares-1.19.1/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e rename to lib/c-ares-1.19.1/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e diff --git a/lib/c-ares-1.19.0/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7 b/lib/c-ares-1.19.1/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7 rename to lib/c-ares-1.19.1/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528 b/lib/c-ares-1.19.1/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528 rename to lib/c-ares-1.19.1/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7 b/lib/c-ares-1.19.1/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7 rename to lib/c-ares-1.19.1/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf b/lib/c-ares-1.19.1/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf rename to lib/c-ares-1.19.1/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf diff --git a/lib/c-ares-1.19.0/test/fuzzinput/182cad2a342ed7317b7c21a5d17020d1 b/lib/c-ares-1.19.1/test/fuzzinput/182cad2a342ed7317b7c21a5d17020d1 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/182cad2a342ed7317b7c21a5d17020d1 rename to lib/c-ares-1.19.1/test/fuzzinput/182cad2a342ed7317b7c21a5d17020d1 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238 b/lib/c-ares-1.19.1/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238 rename to lib/c-ares-1.19.1/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5 b/lib/c-ares-1.19.1/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5 rename to lib/c-ares-1.19.1/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/21199be504fcfece5c7096ee0dbba507 b/lib/c-ares-1.19.1/test/fuzzinput/21199be504fcfece5c7096ee0dbba507 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/21199be504fcfece5c7096ee0dbba507 rename to lib/c-ares-1.19.1/test/fuzzinput/21199be504fcfece5c7096ee0dbba507 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/21891480074b5635dbbe7137bdcabccd b/lib/c-ares-1.19.1/test/fuzzinput/21891480074b5635dbbe7137bdcabccd similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/21891480074b5635dbbe7137bdcabccd rename to lib/c-ares-1.19.1/test/fuzzinput/21891480074b5635dbbe7137bdcabccd diff --git a/lib/c-ares-1.19.0/test/fuzzinput/233aea42e15aa73e131eefabf16088c9 b/lib/c-ares-1.19.1/test/fuzzinput/233aea42e15aa73e131eefabf16088c9 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/233aea42e15aa73e131eefabf16088c9 rename to lib/c-ares-1.19.1/test/fuzzinput/233aea42e15aa73e131eefabf16088c9 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb b/lib/c-ares-1.19.1/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb rename to lib/c-ares-1.19.1/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb diff --git a/lib/c-ares-1.19.0/test/fuzzinput/25589deb55c08429345f289d1c9b0254 b/lib/c-ares-1.19.1/test/fuzzinput/25589deb55c08429345f289d1c9b0254 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/25589deb55c08429345f289d1c9b0254 rename to lib/c-ares-1.19.1/test/fuzzinput/25589deb55c08429345f289d1c9b0254 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26 b/lib/c-ares-1.19.1/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26 rename to lib/c-ares-1.19.1/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/276f12da56866273e76059ad0e7be97e b/lib/c-ares-1.19.1/test/fuzzinput/276f12da56866273e76059ad0e7be97e similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/276f12da56866273e76059ad0e7be97e rename to lib/c-ares-1.19.1/test/fuzzinput/276f12da56866273e76059ad0e7be97e diff --git a/lib/c-ares-1.19.0/test/fuzzinput/29198a2e380cb19babec9e02116d213e b/lib/c-ares-1.19.1/test/fuzzinput/29198a2e380cb19babec9e02116d213e similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/29198a2e380cb19babec9e02116d213e rename to lib/c-ares-1.19.1/test/fuzzinput/29198a2e380cb19babec9e02116d213e diff --git a/lib/c-ares-1.19.0/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363 b/lib/c-ares-1.19.1/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363 rename to lib/c-ares-1.19.1/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1 b/lib/c-ares-1.19.1/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1 rename to lib/c-ares-1.19.1/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992 b/lib/c-ares-1.19.1/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992 rename to lib/c-ares-1.19.1/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75 b/lib/c-ares-1.19.1/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75 rename to lib/c-ares-1.19.1/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf b/lib/c-ares-1.19.1/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf rename to lib/c-ares-1.19.1/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf diff --git a/lib/c-ares-1.19.0/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3 b/lib/c-ares-1.19.1/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3 rename to lib/c-ares-1.19.1/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da b/lib/c-ares-1.19.1/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da rename to lib/c-ares-1.19.1/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da diff --git a/lib/c-ares-1.19.0/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a b/lib/c-ares-1.19.1/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a rename to lib/c-ares-1.19.1/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a diff --git a/lib/c-ares-1.19.0/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47 b/lib/c-ares-1.19.1/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47 rename to lib/c-ares-1.19.1/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df b/lib/c-ares-1.19.1/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df rename to lib/c-ares-1.19.1/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df diff --git a/lib/c-ares-1.19.0/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a b/lib/c-ares-1.19.1/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a rename to lib/c-ares-1.19.1/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a diff --git a/lib/c-ares-1.19.0/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b b/lib/c-ares-1.19.1/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b rename to lib/c-ares-1.19.1/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b diff --git a/lib/c-ares-1.19.0/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33 b/lib/c-ares-1.19.1/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33 rename to lib/c-ares-1.19.1/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e b/lib/c-ares-1.19.1/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e rename to lib/c-ares-1.19.1/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e diff --git a/lib/c-ares-1.19.0/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5 b/lib/c-ares-1.19.1/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5 rename to lib/c-ares-1.19.1/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/7f1567733711ffb61839621af0cbfa33 b/lib/c-ares-1.19.1/test/fuzzinput/7f1567733711ffb61839621af0cbfa33 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/7f1567733711ffb61839621af0cbfa33 rename to lib/c-ares-1.19.1/test/fuzzinput/7f1567733711ffb61839621af0cbfa33 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5 b/lib/c-ares-1.19.1/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5 rename to lib/c-ares-1.19.1/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34 b/lib/c-ares-1.19.1/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34 rename to lib/c-ares-1.19.1/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/a9135cdc7151d023300ff194bad90af9 b/lib/c-ares-1.19.1/test/fuzzinput/a9135cdc7151d023300ff194bad90af9 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/a9135cdc7151d023300ff194bad90af9 rename to lib/c-ares-1.19.1/test/fuzzinput/a9135cdc7151d023300ff194bad90af9 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a b/lib/c-ares-1.19.1/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a rename to lib/c-ares-1.19.1/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a diff --git a/lib/c-ares-1.19.0/test/fuzzinput/answer_a b/lib/c-ares-1.19.1/test/fuzzinput/answer_a similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/answer_a rename to lib/c-ares-1.19.1/test/fuzzinput/answer_a diff --git a/lib/c-ares-1.19.0/test/fuzzinput/answer_aaaa b/lib/c-ares-1.19.1/test/fuzzinput/answer_aaaa similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/answer_aaaa rename to lib/c-ares-1.19.1/test/fuzzinput/answer_aaaa diff --git a/lib/c-ares-1.19.0/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249 b/lib/c-ares-1.19.1/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249 rename to lib/c-ares-1.19.1/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8 b/lib/c-ares-1.19.1/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8 rename to lib/c-ares-1.19.1/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945 b/lib/c-ares-1.19.1/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945 rename to lib/c-ares-1.19.1/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5637790584012800 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5637790584012800 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5637790584012800 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5637790584012800 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5650695891451904 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5650695891451904 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5650695891451904 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5650695891451904 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5651369832218624 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5651369832218624 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5651369832218624 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5651369832218624 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5674462260756480 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5674462260756480 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5674462260756480 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5674462260756480 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5680630672654336 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5680630672654336 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5680630672654336 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5680630672654336 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5683497160671232 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5683497160671232 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5683497160671232 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5683497160671232 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5687310655422464 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5687310655422464 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5687310655422464 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5687310655422464 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5695341573177344 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5695341573177344 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5695341573177344 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5695341573177344 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5697835103682560 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5697835103682560 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5697835103682560 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5697835103682560 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5728518081609728 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5728518081609728 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5728518081609728 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5728518081609728 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5732960017317888 b/lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5732960017317888 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5732960017317888 rename to lib/c-ares-1.19.1/test/fuzzinput/clusterfuzz-5732960017317888 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 b/lib/c-ares-1.19.1/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 rename to lib/c-ares-1.19.1/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5 b/lib/c-ares-1.19.1/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5 rename to lib/c-ares-1.19.1/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/f1b900d50806021953321c3b604ee497 b/lib/c-ares-1.19.1/test/fuzzinput/f1b900d50806021953321c3b604ee497 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/f1b900d50806021953321c3b604ee497 rename to lib/c-ares-1.19.1/test/fuzzinput/f1b900d50806021953321c3b604ee497 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/f6606f624be8c628328cea01d2cd07a9 b/lib/c-ares-1.19.1/test/fuzzinput/f6606f624be8c628328cea01d2cd07a9 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/f6606f624be8c628328cea01d2cd07a9 rename to lib/c-ares-1.19.1/test/fuzzinput/f6606f624be8c628328cea01d2cd07a9 diff --git a/lib/c-ares-1.19.0/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce b/lib/c-ares-1.19.1/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce rename to lib/c-ares-1.19.1/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce diff --git a/lib/c-ares-1.19.0/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d b/lib/c-ares-1.19.1/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d rename to lib/c-ares-1.19.1/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d diff --git a/lib/c-ares-1.19.0/test/fuzzinput/multi-indir b/lib/c-ares-1.19.1/test/fuzzinput/multi-indir similarity index 100% rename from lib/c-ares-1.19.0/test/fuzzinput/multi-indir rename to lib/c-ares-1.19.1/test/fuzzinput/multi-indir diff --git a/lib/c-ares-1.19.0/test/fuzznames/name01 b/lib/c-ares-1.19.1/test/fuzznames/name01 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzznames/name01 rename to lib/c-ares-1.19.1/test/fuzznames/name01 diff --git a/lib/c-ares-1.19.0/test/fuzznames/name02 b/lib/c-ares-1.19.1/test/fuzznames/name02 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzznames/name02 rename to lib/c-ares-1.19.1/test/fuzznames/name02 diff --git a/lib/c-ares-1.19.0/test/fuzznames/name03 b/lib/c-ares-1.19.1/test/fuzznames/name03 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzznames/name03 rename to lib/c-ares-1.19.1/test/fuzznames/name03 diff --git a/lib/c-ares-1.19.0/test/fuzznames/name04 b/lib/c-ares-1.19.1/test/fuzznames/name04 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzznames/name04 rename to lib/c-ares-1.19.1/test/fuzznames/name04 diff --git a/lib/c-ares-1.19.0/test/fuzznames/name05 b/lib/c-ares-1.19.1/test/fuzznames/name05 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzznames/name05 rename to lib/c-ares-1.19.1/test/fuzznames/name05 diff --git a/lib/c-ares-1.19.0/test/fuzznames/name06 b/lib/c-ares-1.19.1/test/fuzznames/name06 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzznames/name06 rename to lib/c-ares-1.19.1/test/fuzznames/name06 diff --git a/lib/c-ares-1.19.0/test/fuzznames/name07 b/lib/c-ares-1.19.1/test/fuzznames/name07 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzznames/name07 rename to lib/c-ares-1.19.1/test/fuzznames/name07 diff --git a/lib/c-ares-1.19.0/test/fuzznames/name08 b/lib/c-ares-1.19.1/test/fuzznames/name08 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzznames/name08 rename to lib/c-ares-1.19.1/test/fuzznames/name08 diff --git a/lib/c-ares-1.19.0/test/fuzznames/name09 b/lib/c-ares-1.19.1/test/fuzznames/name09 similarity index 100% rename from lib/c-ares-1.19.0/test/fuzznames/name09 rename to lib/c-ares-1.19.1/test/fuzznames/name09 diff --git a/lib/c-ares-1.19.0/test/gmock-1.11.0/gmock-gtest-all.cc b/lib/c-ares-1.19.1/test/gmock-1.11.0/gmock-gtest-all.cc similarity index 100% rename from lib/c-ares-1.19.0/test/gmock-1.11.0/gmock-gtest-all.cc rename to lib/c-ares-1.19.1/test/gmock-1.11.0/gmock-gtest-all.cc diff --git a/lib/c-ares-1.19.0/test/gmock-1.11.0/gmock/gmock.h b/lib/c-ares-1.19.1/test/gmock-1.11.0/gmock/gmock.h similarity index 100% rename from lib/c-ares-1.19.0/test/gmock-1.11.0/gmock/gmock.h rename to lib/c-ares-1.19.1/test/gmock-1.11.0/gmock/gmock.h diff --git a/lib/c-ares-1.19.0/test/gmock-1.11.0/gtest/gtest.h b/lib/c-ares-1.19.1/test/gmock-1.11.0/gtest/gtest.h similarity index 100% rename from lib/c-ares-1.19.0/test/gmock-1.11.0/gtest/gtest.h rename to lib/c-ares-1.19.1/test/gmock-1.11.0/gtest/gtest.h diff --git a/lib/c-ares-1.19.0/test/install-sh b/lib/c-ares-1.19.1/test/install-sh similarity index 100% rename from lib/c-ares-1.19.0/test/install-sh rename to lib/c-ares-1.19.1/test/install-sh diff --git a/lib/c-ares-1.19.0/test/ltmain.sh b/lib/c-ares-1.19.1/test/ltmain.sh similarity index 100% rename from lib/c-ares-1.19.0/test/ltmain.sh rename to lib/c-ares-1.19.1/test/ltmain.sh diff --git a/lib/c-ares-1.19.0/test/missing b/lib/c-ares-1.19.1/test/missing similarity index 100% rename from lib/c-ares-1.19.0/test/missing rename to lib/c-ares-1.19.1/test/missing diff --git a/lib/c-ares-1.19.0/test/test-driver b/lib/c-ares-1.19.1/test/test-driver similarity index 100% rename from lib/c-ares-1.19.0/test/test-driver rename to lib/c-ares-1.19.1/test/test-driver