From c6886803877a0d4a99405eefc9011358e74e2601 Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Mon, 5 Feb 2024 20:18:16 +0200 Subject: [PATCH] deps: update c-ares to 1.26.0 PR-URL: https://github.com/nodejs/node/pull/51582 Reviewed-By: Luigi Pinca Reviewed-By: Marco Ippolito Reviewed-By: Rafael Gonzaga --- deps/cares/CHANGES | 206 ++- deps/cares/CMakeLists.txt | 33 +- deps/cares/Makefile.am | 2 +- deps/cares/Makefile.in | 4 +- deps/cares/RELEASE-NOTES | 47 - deps/cares/RELEASE-NOTES.md | 38 + deps/cares/aminclude_static.am | 2 +- deps/cares/cares.gyp | 10 + deps/cares/config/aix/ares_config.h | 566 +++---- deps/cares/config/android/ares_config.h | 390 +++-- deps/cares/config/darwin/ares_config.h | 555 ++++--- deps/cares/config/freebsd/ares_config.h | 562 +++---- deps/cares/config/linux/ares_config.h | 559 ++++--- deps/cares/config/netbsd/ares_config.h | 572 +++---- deps/cares/config/openbsd/ares_config.h | 572 +++---- deps/cares/config/sunos/ares_config.h | 572 +++---- deps/cares/configure | 1327 +++++++++++------ deps/cares/configure.ac | 224 +-- deps/cares/docs/Makefile.in | 2 + deps/cares/docs/ares_dns_record.3 | 22 + deps/cares/docs/ares_fds.3 | 45 +- deps/cares/docs/ares_getaddrinfo.3 | 27 +- deps/cares/docs/ares_gethostbyaddr.3 | 27 +- deps/cares/docs/ares_gethostbyname.3 | 27 +- deps/cares/docs/ares_getnameinfo.3 | 27 +- deps/cares/docs/ares_getsock.3 | 19 +- deps/cares/docs/ares_init_options.3 | 26 + deps/cares/docs/ares_send.3 | 32 +- .../docs/ares_set_socket_configure_callback.3 | 6 +- deps/cares/docs/ares_set_socket_functions.3 | 2 + deps/cares/docs/ares_threadsafety.3 | 6 +- deps/cares/include/Makefile.in | 2 + deps/cares/include/ares.h | 18 + deps/cares/include/ares_build.h.cmake | 5 - deps/cares/include/ares_build.h.in | 5 - deps/cares/include/ares_dns_record.h | 14 +- deps/cares/include/ares_version.h | 4 +- deps/cares/src/Makefile.in | 2 + deps/cares/src/lib/CMakeLists.txt | 4 +- deps/cares/src/lib/Makefile.am | 8 +- deps/cares/src/lib/Makefile.in | 117 +- deps/cares/src/lib/Makefile.inc | 10 + deps/cares/src/lib/ares__htable.c | 29 + deps/cares/src/lib/ares__htable.h | 12 + deps/cares/src/lib/ares__htable_asvp.c | 33 + deps/cares/src/lib/ares__htable_asvp.h | 9 + .../cares/src/lib/ares__parse_into_addrinfo.c | 18 +- deps/cares/src/lib/ares__socket.c | 6 + deps/cares/src/lib/ares__threads.c | 200 ++- deps/cares/src/lib/ares__threads.h | 45 + deps/cares/src/lib/ares_config.h.cmake | 39 + deps/cares/src/lib/ares_config.h.in | 115 +- deps/cares/src/lib/ares_destroy.c | 5 + deps/cares/src/lib/ares_dns_parse.c | 19 +- deps/cares/src/lib/ares_event.h | 174 +++ deps/cares/src/lib/ares_event_epoll.c | 198 +++ deps/cares/src/lib/ares_event_kqueue.c | 249 ++++ deps/cares/src/lib/ares_event_poll.c | 137 ++ deps/cares/src/lib/ares_event_select.c | 150 ++ deps/cares/src/lib/ares_event_thread.c | 447 ++++++ deps/cares/src/lib/ares_event_wake_pipe.c | 166 +++ deps/cares/src/lib/ares_event_win32.c | 601 ++++++++ deps/cares/src/lib/ares_event_win32.h | 119 ++ deps/cares/src/lib/ares_init.c | 8 + deps/cares/src/lib/ares_options.c | 15 + deps/cares/src/lib/ares_parse_ptr_reply.c | 26 +- deps/cares/src/lib/ares_private.h | 12 +- deps/cares/src/lib/ares_process.c | 2 - deps/cares/src/lib/ares_rand.c | 7 + deps/cares/src/lib/setup_once.h | 4 - deps/cares/src/tools/CMakeLists.txt | 4 +- deps/cares/src/tools/Makefile.am | 8 +- deps/cares/src/tools/Makefile.in | 19 +- deps/cares/src/tools/adig.c | 9 +- deps/cares/src/tools/ahost.c | 2 +- 75 files changed, 6673 insertions(+), 2912 deletions(-) delete mode 100644 deps/cares/RELEASE-NOTES create mode 100644 deps/cares/RELEASE-NOTES.md create mode 100644 deps/cares/src/lib/ares__threads.h create mode 100644 deps/cares/src/lib/ares_event.h create mode 100644 deps/cares/src/lib/ares_event_epoll.c create mode 100644 deps/cares/src/lib/ares_event_kqueue.c create mode 100644 deps/cares/src/lib/ares_event_poll.c create mode 100644 deps/cares/src/lib/ares_event_select.c create mode 100644 deps/cares/src/lib/ares_event_thread.c create mode 100644 deps/cares/src/lib/ares_event_wake_pipe.c create mode 100644 deps/cares/src/lib/ares_event_win32.c create mode 100644 deps/cares/src/lib/ares_event_win32.h diff --git a/deps/cares/CHANGES b/deps/cares/CHANGES index a132e0ffe2b2ee..a6481e71ac39bd 100644 --- a/deps/cares/CHANGES +++ b/deps/cares/CHANGES @@ -1,5 +1,143 @@ Changelog for the c-ares project. Generated with git2changes.pl +Version 1.26.0 (25 Jan 2024) + +Brad House (25 Jan 2024) +- clusterfuzz: enforce maximum DNS packet size due to long parser time + +GitHub (24 Jan 2024) +- [Brad House brought this change] + + Release prep for c-ares 1.26.0 (#698) + + release prep + +Brad House (24 Jan 2024) +- adig: Differentiate between internal and server error + + Should not output "Got answer" if there was no answer from the + server, instead should just output the internal error. + + Fix By: Gisle Vanem (@gvanem) + +GitHub (24 Jan 2024) +- [Brad House brought this change] + + Event Subsystem: No longer require integrators to have their own (#696) + + This PR implements an event thread to process all events on file descriptors registered by c-ares. Prior to this feature, integrators were required to understand the internals of c-ares and how to monitor file descriptors and timeouts and process events. + + Implements OS-specific efficient polling such as epoll(), kqueue(), or IOCP, and falls back to poll() or select() if otherwise unsupported. At this point, it depends on basic threading primitives such as pthreads or windows threads. + + If enabled via the ARES_OPT_EVENT_THREAD option passed to ares_init_options(), then socket callbacks cannot be used. + + Fixes Bug: #611 + Fix By: Brad House (@bradh352) + +- [Erik Lax brought this change] + + Added flags to are_dns_parse to force RAW packet parsing (#693) + + This pull request adds six flags to instruct the parser under various circumstances to skip parsing of the returned RR records so the raw data can be retrieved. + + Fixes Bug: #686 + Fix By: Erik Lax (@eriklax) + +- [Brad House brought this change] + + Autotools allow make to override CFLAGS/CPPFLAGS/CXXFLAGS (#695) + + The previous build system allowed overwriting of CFLAGS/CPPFLAGS/CXXFLAGS on the make command line. Switch to using AM_CFLAGS/AM_CPPFLAGS/AM_CXXFLAGS when we set our own flags for building which ensures they are kept even when a user tries to override. + + Fixes Bug: #694 + Fix By: Brad House (@bradh352) + +Brad House (16 Jan 2024) +- fix doxygen typo + +GitHub (16 Jan 2024) +- [Brad House brought this change] + + man ares_fds(3): mark as deprecated and add explanation (#691) + + ares_fds(3) is not safe to use, mark as deprecated. + + Fixes Issue: #687 + Fix By: Brad House (@bradh352) + +- [Brad House brought this change] + + autotools: fix building for 32bit windows due to stdcall symbol mangling (#689) + + Use AC_CHECK_DECL not AC_CHECK_FUNCS, while this doesn't do a linkage test, it just makes sure the headers define it, this is the only thing without a complex workaround on Windows that will do what we need. + + See: + + https://github.com/msys2/msys2/wiki/Porting/f87a222118b1008ebc166ad237f04edb759c8f4c#calling-conventions-stdcall-and-autotools + + and + + https://lists.gnu.org/archive/html/autoconf/2013-05/msg00085.html + + and for a more complex workaround, we'd need to use AC_LINK_IFELSE like: + + https://mailman.videolan.org/pipermail/vlc-devel/2015-March/101802.html + + which would require we check each individually and provide function arguments for the test. I don't think that is worthwhile. + + Fixes Issue: #688 + Fix By: Brad House (@bradh352) + +- [Brad House brought this change] + + Do not sanity check RR Name vs Question (#685) + + It appears as though we should never sanity check the RR name vs the question name as some DNS servers may return results for alias records. + + Fixes Bug: #683 + Fix By: Brad House (@bradh352) + +- [Brad House brought this change] + + no reason to include sys/random.h all the time (#684) + + External integrations don't need sys/random.h in order to compile, remove the dependency. Try to fix building on legacy MacOS versions. + + Fixes Issue: #682 + Fix By: Brad House (@bradh352) + +- [Gregor Jasny brought this change] + + cmake: improve some include related code (#680) + + * cmake: avoid warning about non-existing include dir + + In the Debian build logs I noticed the following warning: + cc1: warning: /build/c-ares-1.25.0/test/include: No such file or directory [-Wmissing-include-dirs] + + This happened because ${CMAKE_INSTALL_INCLUDEDIR} had been added to + caresinternal. I believe it has been copied from the "real" lib + where it's used in the INSTALL_INTERFACE context. But because + caresinternal is never installed we don't need that include here. + + * cmake: drop CARES_TOPLEVEL_DIR variable + + The CARES_TOPLEVEL_DIR variable is the same as the automatically + created PROJECT_SOURCE_DIR variable. Let's stick to the official + one. Also because it is already used at places where CARES_TOPLEVEL_DIR + is used as well. + + Fix By: Gregor Jasny (@gjasny) + +Brad House (5 Jan 2024) +- test: fix outdated license headers + +- RELEASE-NOTES -> RELEASE-NOTES.md + +- update format slightly + +- update release notes format + Version 1.25.0 (2 Jan 2024) GitHub (2 Jan 2024) @@ -6007,71 +6145,3 @@ Yang Tse (30 Jan 2013) Some HP-UX system headers require TRUE defined to 1 and FALSE to 0. - ares_timeout.c: fix compiler warning - -- ares_create_query.c: IRIX compilation fix - -- c-ares/nameser.h: add some T_* defines for ns_t_* values - -Daniel Stenberg (7 Nov 2012) -- Revert "ares_parse_aaaa_reply: fix memory leak" - - This reverts commit 50f25d8a4b2d16f4c5e0ef620238688b7a315c7a. - -- ares_parse_aaaa_reply: fix memory leak - - an allocated buffer was not freed in the successful case. - -- [Gisle Vanem brought this change] - - adig: perror() doesn't work for socket errors on windows - - ... so print the SOCKERRNO instead - -- get_DNS_AdaptersAddresses: fix IPv6 parsing - - Use of the wrong define made the function not parse IPv6 addresses - properly. - - Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-06/0028.shtml - Reported by: Saúl Ibarra Corretgé - -- version: bumped to 1.10.0 - - Due to the newly added function: ares_create_query() - -- AUTHORS: synced with 83093ac450 - - Added 21 authors since this document was last updated - -- ares_create_query.3: mention when this is added - -- [hpopescu@ixiacom.com brought this change] - - Added new feature (rfc2671) - -- code police: fix indents, < 80 columns, reflowed comments - -Guenter Knauf (11 Jul 2012) -- Cleaned up version awk script. - -Daniel Stenberg (30 Jun 2012) -- [Gisle Vanem brought this change] - - read_udp_packets: bail out loop on bad sockets - - I can see that recvfrom() in ares_process.c many times is called with - 'udp_socket' == ARES_SOCKET_BAD. The code takes care not to call - recv/recvfrom with ARES_SOCKET_BAD in the outer-loop. So should the - inner-loop. - -Yang Tse (29 Jun 2012) -- cares-compilers.m4: remove -Wstrict-aliasing=3 from clang - - Currently it is unknown if there is any version of clang that - actually supports -Wstrict-aliasing. What is known is that there - are several that don't support it. - -- cares-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds - -Daniel Stenberg (18 Jun 2012) -- version: work towards 1.9.2 (at least) diff --git a/deps/cares/CMakeLists.txt b/deps/cares/CMakeLists.txt index b552b66ac63ac0..24d1b41fb7001e 100644 --- a/deps/cares/CMakeLists.txt +++ b/deps/cares/CMakeLists.txt @@ -12,10 +12,10 @@ INCLUDE (CheckCSourceCompiles) INCLUDE (CheckStructHasMember) INCLUDE (CheckLibraryExists) -PROJECT (c-ares LANGUAGES C VERSION "1.25.0" ) +PROJECT (c-ares LANGUAGES C VERSION "1.26.0" ) # Set this version before release -SET (CARES_VERSION "1.25.0") +SET (CARES_VERSION "1.26.0") INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are wrong. @@ -30,7 +30,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 "12:1:10") +SET (CARES_LIB_VERSIONINFO "13:0:11") OPTION (CARES_STATIC "Build as a static library" OFF) @@ -186,6 +186,7 @@ CARES_FUNCTION_IN_LIBRARY (clock_gettime rt HAVE_LIBRT) # Look for necessary includes +CHECK_INCLUDE_FILES (AvailabilityMacros.h HAVE_AVAILABILITYMACROS_H) CHECK_INCLUDE_FILES (sys/types.h HAVE_SYS_TYPES_H) CHECK_INCLUDE_FILES (sys/random.h HAVE_SYS_RANDOM_H) CHECK_INCLUDE_FILES (sys/socket.h HAVE_SYS_SOCKET_H) @@ -223,8 +224,11 @@ CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H) CHECK_INCLUDE_FILES (sys/time.h HAVE_SYS_TIME_H) CHECK_INCLUDE_FILES (sys/uio.h HAVE_SYS_UIO_H) CHECK_INCLUDE_FILES (sys/random.h HAVE_SYS_RANDOM_H) +CHECK_INCLUDE_FILES (sys/event.h HAVE_SYS_EVENT_H) +CHECK_INCLUDE_FILES (sys/epoll.h HAVE_SYS_EPOLL_H) CHECK_INCLUDE_FILES (ifaddrs.h HAVE_IFADDRS_H) CHECK_INCLUDE_FILES (time.h HAVE_TIME_H) +CHECK_INCLUDE_FILES (poll.h HAVE_POLL_H) CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H) CHECK_INCLUDE_FILES (unistd.h HAVE_UNISTD_H) # On OpenBSD, you must include sys/types.h before netinet/tcp.h @@ -242,8 +246,14 @@ CHECK_INCLUDE_FILES ("winsock2.h;windows.h" HAVE_WINSOCK2_H) CHECK_INCLUDE_FILES ("winsock2.h;ws2tcpip.h;windows.h" HAVE_WS2TCPIP_H) CHECK_INCLUDE_FILES ("winsock2.h;iphlpapi.h;windows.h" HAVE_IPHLPAPI_H) CHECK_INCLUDE_FILES ("winsock2.h;netioapi.h;windows.h" HAVE_NETIOAPI_H) +CHECK_INCLUDE_FILES ("winsock2.h;mswsock.h;windows.h" HAVE_MSWSOCK_H) CHECK_INCLUDE_FILES ("winsock.h;windows.h" HAVE_WINSOCK_H) CHECK_INCLUDE_FILES (windows.h HAVE_WINDOWS_H) +CHECK_INCLUDE_FILES ("windows.h;winternl.h" HAVE_WINTERNL_H) +CHECK_INCLUDE_FILES ("windows.h;ntdef.h" HAVE_NTDEF_H) +CHECK_INCLUDE_FILES ("windows.h;ntdef.h;ntstatus.h" HAVE_NTSTATUS_H) + + ENDIF () # Set system-specific compiler flags @@ -300,6 +310,7 @@ MACRO (CARES_EXTRAINCLUDE_IFSET var include) ENDIF () ENDMACRO () +CARES_EXTRAINCLUDE_IFSET (HAVE_AVAILABILITYMACROS_H AvailabilityMacros.h) CARES_EXTRAINCLUDE_IFSET (HAVE_STDBOOL_H stdbool.h) CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_TYPES_H sys/types.h) CARES_EXTRAINCLUDE_IFSET (HAVE_ARPA_INET_H arpa/inet.h) @@ -322,7 +333,10 @@ CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_TIME_H sys/time.h) CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_STAT_H sys/stat.h) CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_UIO_H sys/uio.h) CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_RANDOM_H sys/random.h) +CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_EVENT_H sys/event.h) +CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_EPOLL_H sys/epoll.h) CARES_EXTRAINCLUDE_IFSET (HAVE_TIME_H time.h) +CARES_EXTRAINCLUDE_IFSET (HAVE_POLL_H poll.h) CARES_EXTRAINCLUDE_IFSET (HAVE_FCNTL_H fcntl.h) CARES_EXTRAINCLUDE_IFSET (HAVE_UNISTD_H unistd.h) CARES_EXTRAINCLUDE_IFSET (HAVE_WINSOCK2_H winsock2.h) @@ -429,6 +443,12 @@ CHECK_SYMBOL_EXISTS (writev "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_WRITEV) CHECK_SYMBOL_EXISTS (arc4random_buf "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_ARC4RANDOM_BUF) CHECK_SYMBOL_EXISTS (stat "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STAT) CHECK_SYMBOL_EXISTS (getifaddrs "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_GETIFADDRS) +CHECK_SYMBOL_EXISTS (poll "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_POLL) +CHECK_SYMBOL_EXISTS (pipe "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_PIPE) +CHECK_SYMBOL_EXISTS (pipe2 "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_PIPE2) +CHECK_SYMBOL_EXISTS (kqueue "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_KQUEUE) +CHECK_SYMBOL_EXISTS (epoll_create1 "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_EPOLL) + # 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. @@ -633,9 +653,6 @@ ENDIF () IF (HAVE_SYS_TYPES_H) SET (CARES_HAVE_SYS_TYPES_H 1) ENDIF () -IF (HAVE_SYS_RANDOM_H) - SET (CARES_HAVE_SYS_RANDOM_H 1) -ENDIF() IF (HAVE_SYS_SOCKET_H) SET (CARES_HAVE_SYS_SOCKET_H 1) ENDIF() @@ -655,10 +672,6 @@ IF (HAVE_ARPA_NAMESER_COMPAT_H) SET (CARES_HAVE_ARPA_NAMESER_COMPAT_H 1) ENDIF() -# Record toplevel CMakeLists.txt path -set(CARES_TOPLEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}") - - # TRANSFORM_MAKEFILE_INC # # This function consumes the "Makefile.inc" autotools file, and converts it into diff --git a/deps/cares/Makefile.am b/deps/cares/Makefile.am index d1ab53cb3407bd..a545f8e374f7c0 100644 --- a/deps/cares/Makefile.am +++ b/deps/cares/Makefile.am @@ -26,7 +26,7 @@ MSVCFILES = msvc_ver.inc buildconf.bat # adig and ahost are just sample programs and thus not mentioned with the # regular sources and headers -EXTRA_DIST = AUTHORS CHANGES README.cares $(man_MANS) RELEASE-NOTES \ +EXTRA_DIST = AUTHORS CHANGES README.cares $(man_MANS) RELEASE-NOTES.md \ c-ares-config.cmake.in libcares.pc.cmake libcares.pc.in buildconf get_ver.awk \ maketgz TODO README.msvc $(MSVCFILES) INSTALL.md README.md LICENSE.md \ CMakeLists.txt Makefile.dj Makefile.m32 Makefile.netware Makefile.msvc \ diff --git a/deps/cares/Makefile.in b/deps/cares/Makefile.in index b1a6b381520f9e..d1c663d5488366 100644 --- a/deps/cares/Makefile.in +++ b/deps/cares/Makefile.in @@ -281,6 +281,8 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ +AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ @@ -438,7 +440,7 @@ MSVCFILES = msvc_ver.inc buildconf.bat # adig and ahost are just sample programs and thus not mentioned with the # regular sources and headers -EXTRA_DIST = AUTHORS CHANGES README.cares $(man_MANS) RELEASE-NOTES \ +EXTRA_DIST = AUTHORS CHANGES README.cares $(man_MANS) RELEASE-NOTES.md \ c-ares-config.cmake.in libcares.pc.cmake libcares.pc.in buildconf get_ver.awk \ maketgz TODO README.msvc $(MSVCFILES) INSTALL.md README.md LICENSE.md \ CMakeLists.txt Makefile.dj Makefile.m32 Makefile.netware Makefile.msvc \ diff --git a/deps/cares/RELEASE-NOTES b/deps/cares/RELEASE-NOTES deleted file mode 100644 index b662cb47b16d77..00000000000000 --- a/deps/cares/RELEASE-NOTES +++ /dev/null @@ -1,47 +0,0 @@ -c-ares version 1.25.0 - -This is a maintenance release. - -Changes: - o AutoTools: rewrite build system to be lighter weight and fix issues in some - semi-modern systems. It is likely this has broken building on some less - common and legacy OSs, please report issues. [1] - o Rewrite ares_strsplit() as a wrapper for ares__buf_split() for memory - safety reasons. [4] - o The ahost utility now uses ares_getaddrinfo() and returns both IPv4 and - IPv6 addresses by default. [6] - o OpenBSD: Add SOCK_DNS flag when creating socket. [12] - -Bug Fixes: - o Tests: Live reverse lookups for Google's public DNS servers no longer - return results, replace with CloudFlare pubic DNS servers. [2] - o MacOS legacy SDKs require sys/socket.h before net/if.h [3] - o Connection failures should increment the server failure count first or a - retry might be enqueued to the same server. [5] - o On systems that don't implement the ability to enumerate network interfaces - the stubs used the wrong prototype. [7] - o Fix minor warnings and documentation typos. [8] - o Fix support for older GoogleTest versions. [9] - o getrandom() may require sys/random.h on some systems. [10] - o Fix building tests with symbol hiding enabled. [11] - -Thanks go to these friendly people for their efforts and contributions: - Brad House (@bradh352) - Daniel Stenberg (@bagder) - Gregor Jasny (@gjasny) - Martin Chang (@marty1885) -(4 contributors) - -References to bug reports and discussions on issues: - [1] = https://github.com/c-ares/c-ares/pull/674 - [2] = https://github.com/c-ares/c-ares/commit/1231aa7 - [3] = https://github.com/c-ares/c-ares/pull/673 - [4] = https://github.com/c-ares/c-ares/commit/88c444d - [5] = https://github.com/c-ares/c-ares/commit/05181a6 - [6] = https://github.com/c-ares/c-ares/pull/669 - [7] = https://github.com/c-ares/c-ares/commit/eebfe0c - [8] = https://github.com/c-ares/c-ares/pull/666 - [9] = https://github.com/c-ares/c-ares/commit/d186f11 - [10] = https://github.com/c-ares/c-ares/issues/665 - [11] = https://github.com/c-ares/c-ares/issues/664 - [12] = https://github.com/c-ares/c-ares/pull/659 diff --git a/deps/cares/RELEASE-NOTES.md b/deps/cares/RELEASE-NOTES.md new file mode 100644 index 00000000000000..4dddfe0f4452c4 --- /dev/null +++ b/deps/cares/RELEASE-NOTES.md @@ -0,0 +1,38 @@ +## c-ares version 1.26.0 - Jan 26 2024 + +This is a feature and bugfix release. + +Features: + +* Event Thread support. Integrators are no longer requried to monitor the + file descriptors registered by c-ares for events and call `ares_process()` + when enabling the event thread feature via `ARES_OPT_EVENT_THREAD` passed + to `ares_init_options()`. [PR #696](https://github.com/c-ares/c-ares/pull/696) +* Added flags to `are_dns_parse()` to force RAW packet parsing. + [PR #693](https://github.com/c-ares/c-ares/pull/693) + +Changes: + +* Mark `ares_fds()` as deprected. + [PR #691](https://github.com/c-ares/c-ares/pull/691) + +Bugfixes: + +* `adig`: Differentiate between internal and server errors. + [e10b16a](https://github.com/c-ares/c-ares/commit/e10b16a) +* Autotools allow make to override CFLAGS/CPPFLAGS/CXXFLAGS. + [PR #695](https://github.com/c-ares/c-ares/pull/695) +* Autotools: fix building for 32bit windows due to stdcall symbol mangling. + [PR #689](https://github.com/c-ares/c-ares/pull/689) +* RR Name should not be sanity checked against the Question. + [PR #685](https://github.com/c-ares/c-ares/pull/685) + +Thanks go to these friendly people for their efforts and contributions for this release: + +* Brad House (@bradh352) +* Daniel Stenberg (@bagder) +* Erik Lax (@eriklax) +* Gisle Vanem (@gvanem) + + + diff --git a/deps/cares/aminclude_static.am b/deps/cares/aminclude_static.am index 14de87e452aaa5..fd5cb10ee9c9b1 100644 --- a/deps/cares/aminclude_static.am +++ b/deps/cares/aminclude_static.am @@ -1,6 +1,6 @@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Wed Jan 3 09:44:48 CET 2024 +# from AX_AM_MACROS_STATIC on Fri Jan 26 17:16:23 CET 2024 # Code coverage diff --git a/deps/cares/cares.gyp b/deps/cares/cares.gyp index 6963a1c9479f29..e8ac0b75796e72 100644 --- a/deps/cares/cares.gyp +++ b/deps/cares/cares.gyp @@ -32,6 +32,7 @@ 'src/lib/ares__socket.c', 'src/lib/ares__sortaddrinfo.c', 'src/lib/ares__threads.c', + 'src/lib/ares__threads.h', 'src/lib/ares__timeval.c', 'src/lib/ares_android.c', 'src/lib/ares_android.h', @@ -46,6 +47,15 @@ 'src/lib/ares_dns_record.c', 'src/lib/ares_dns_private.h', 'src/lib/ares_dns_write.c', + 'src/lib/ares_event.h', + 'src/lib/ares_event_win32.h', + 'src/lib/ares_event_epoll.c', + 'src/lib/ares_event_kqueue.c', + 'src/lib/ares_event_poll.c', + 'src/lib/ares_event_select.c', + 'src/lib/ares_event_thread.c', + 'src/lib/ares_event_wake_pipe.c', + 'src/lib/ares_event_win32.c', 'src/lib/ares_expand_name.c', 'src/lib/ares_expand_string.c', 'src/lib/ares_fds.c', diff --git a/deps/cares/config/aix/ares_config.h b/deps/cares/config/aix/ares_config.h index de536cd4673611..55a219b0533bf0 100644 --- a/deps/cares/config/aix/ares_config.h +++ b/deps/cares/config/aix/ares_config.h @@ -1,60 +1,51 @@ -/* ares_config.h. Generated from ares_config.h.in by configure. */ -/* ares_config.h.in. Generated from configure.ac by autoheader. */ +/* src/lib/ares_config.h. Generated from ares_config.h.in by configure. */ +/* src/lib/ares_config.h.in. Generated from configure.ac by autoheader. */ -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* define this if ares is built for a big endian system */ -#define ARES_BIG_ENDIAN 1 - -/* when building as static part of libcurl */ -/* #undef BUILDING_LIBCURL */ +/* a suitable file/device to read random data from */ +#define CARES_RANDOM_FILE "/dev/urandom" -/* Defined for build that exposes internal static functions for testing. */ -/* #undef CARES_EXPOSE_STATICS */ +/* Set to 1 if non-pubilc shared library symbols are hidden */ +#define CARES_SYMBOL_HIDING 1 -/* Defined for build with symbol hiding. */ -/* #undef CARES_SYMBOL_HIDING */ +/* Threading enabled */ +#define CARES_THREADS 1 /* the signed version of size_t */ #define CARES_TYPEOF_ARES_SSIZE_T ssize_t -/* Definition to make a library symbol externally visible. */ -/* #undef CARES_SYMBOL_SCOPE_EXTERN */ - /* Use resolver library to configure cares */ /* #undef CARES_USE_LIBRESOLV */ /* if a /etc/inet dir is being used */ /* #undef ETC_INET */ -/* Define to the type of arg 2 for gethostname. */ -#define GETHOSTNAME_TYPE_ARG2 size_t - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const +/* gethostname() arg2 type */ +#define GETHOSTNAME_TYPE_ARG2 size_t -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * +/* getnameinfo() arg1 type */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t +/* getnameinfo() arg2 type */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 size_t +/* getnameinfo() arg4 and 6 type */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int +/* getnameinfo() arg7 type */ +#define GETNAMEINFO_TYPE_ARG7 int -/* Specifies the number of arguments to getservbyport_r */ -#define GETSERVBYPORT_R_ARGS 4 +/* number of arguments for getservbyname_r() */ +/* #undef GETSERVBYNAME_R_ARGS */ -/* Specifies the size of the buffer to pass to getservbyport_r */ -#define GETSERVBYPORT_R_BUFSIZE sizeof(struct servent_data) +/* number of arguments for getservbyport_r() */ +#define GETSERVBYPORT_R_ARGS 4 -/* Define to 1 if you have AF_INET6. */ +/* Define to 1 if you have AF_INET6 */ #define HAVE_AF_INET6 1 +/* Define to 1 if you have `arc4random_buf` */ +/* #undef HAVE_ARC4RANDOM_BUF */ + /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 @@ -67,129 +58,131 @@ /* Define to 1 if you have the header file. */ #define HAVE_ASSERT_H 1 -/* Define to 1 if you have the `bitncmp' function. */ -/* #undef HAVE_BITNCMP */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AVAILABILITYMACROS_H */ -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 +/* Define to 1 if you have `clock_gettime` */ +#define HAVE_CLOCK_GETTIME 1 -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -#define HAVE_CLOCK_GETTIME_MONOTONIC 1 +/* clock_gettime() with CLOCK_MONOTONIC support */ +#define HAVE_CLOCK_GETTIME_MONOTONIC 1 -/* Define to 1 if you have the closesocket function. */ +/* Define to 1 if you have `closesocket` */ /* #undef HAVE_CLOSESOCKET */ -/* Define to 1 if you have the CloseSocket camel case function. */ +/* Define to 1 if you have `CloseSocket` */ /* #undef HAVE_CLOSESOCKET_CAMEL */ -/* Define to 1 if you have the connect function. */ +/* Define to 1 if you have `connect` */ #define HAVE_CONNECT 1 -/* define if the compiler supports basic C++11 syntax */ -#define HAVE_CXX11 1 +/* Define to 1 if you have `ConvertInterfaceIndexToLuid` */ +/* #undef HAVE_CONVERTINTERFACEINDEXTOLUID */ + +/* Define to 1 if you have `ConvertInterfaceLuidToNameA` */ +/* #undef HAVE_CONVERTINTERFACELUIDTONAMEA */ + +/* define if the compiler supports basic C++14 syntax */ +#define HAVE_CXX14 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 +/* Define to 1 if you have `epoll_{create1,ctl,wait}` */ +/* #undef HAVE_EPOLL */ + /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 -/* Define to 1 if you have the fcntl function. */ +/* Define to 1 if you have `fcntl` */ #define HAVE_FCNTL 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 +/* fcntl() with O_NONBLOCK support */ +#define HAVE_FCNTL_O_NONBLOCK 1 -/* Define to 1 if the getaddrinfo function is threadsafe. */ -#define HAVE_GETADDRINFO_THREADSAFE 1 - -/* Define to 1 if you have the getenv function. */ +/* Define to 1 if you have `getenv` */ #define HAVE_GETENV 1 -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostname function. */ +/* Define to 1 if you have `gethostname` */ #define HAVE_GETHOSTNAME 1 -/* Define to 1 if you have the getnameinfo function. */ +/* Define to 1 if you have `getifaddrs` */ +/* #undef HAVE_GETIFADDRS */ + +/* Define to 1 if you have `getnameinfo` */ #define HAVE_GETNAMEINFO 1 -/* Define to 1 if you have the getservbyport_r function. */ +/* Define to 1 if you have `getrandom` */ +/* #undef HAVE_GETRANDOM */ + +/* Define to 1 if you have `getservbyport_r` */ #define HAVE_GETSERVBYPORT_R 1 -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have `gettimeofday` */ #define HAVE_GETTIMEOFDAY 1 -/* Define to 1 if you have the `if_indextoname' function. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IFADDRS_H */ + +/* Define to 1 if you have `if_indextoname` */ #define HAVE_IF_INDEXTONAME 1 -/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ -/* #undef HAVE_INET_NET_PTON */ +/* Define to 1 if you have `if_nametoindex` */ +#define HAVE_IF_NAMETOINDEX 1 -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +/* Define to 1 if you have `inet_net_pton` */ +#define HAVE_INET_NET_PTON 1 + +/* Define to 1 if you have `inet_ntop` */ #define HAVE_INET_NTOP 1 -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +/* Define to 1 if you have `inet_pton` */ #define HAVE_INET_PTON 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define to 1 if you have the ioctl function. */ +/* Define to 1 if you have `ioctl` */ #define HAVE_IOCTL 1 -/* Define to 1 if you have the ioctlsocket function. */ +/* Define to 1 if you have `ioctlsocket` */ /* #undef HAVE_IOCTLSOCKET */ -/* Define to 1 if you have the IoctlSocket camel case function. */ +/* Define to 1 if you have `IoctlSocket` */ /* #undef HAVE_IOCTLSOCKET_CAMEL */ -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* ioctlsocket() with FIONBIO support */ /* #undef HAVE_IOCTLSOCKET_FIONBIO */ -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 +/* ioctl() with FIONBIO support */ +#define HAVE_IOCTL_FIONBIO 1 -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IPHLPAPI_H */ -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ +/* Define to 1 if you have `kqueue` */ +/* #undef HAVE_KQUEUE */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 -/* if your compiler supports LL */ -#define HAVE_LL 1 - /* Define to 1 if the compiler supports the 'long long' data type. */ #define HAVE_LONGLONG 1 -/* Define to 1 if you have the malloc.h header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1 -/* Define to 1 if you have the memory.h header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -#define HAVE_MSG_NOSIGNAL 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MSWSOCK_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETDB_H 1 @@ -200,64 +193,88 @@ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_TCP_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETIOAPI_H */ + /* Define to 1 if you have the header file. */ #define HAVE_NET_IF_H 1 -/* Define to 1 if you have PF_INET6. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTDEF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTSTATUS_H */ + +/* Define to 1 if you have PF_INET6 */ #define HAVE_PF_INET6 1 -/* Define to 1 if you have the recv function. */ +/* Define to 1 if you have `pipe` */ +#define HAVE_PIPE 1 + +/* Define to 1 if you have `pipe2` */ +/* #undef HAVE_PIPE2 */ + +/* Define to 1 if you have `poll` */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PTHREAD_NP_H */ + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have `recv` */ #define HAVE_RECV 1 -/* Define to 1 if you have the recvfrom function. */ +/* Define to 1 if you have `recvfrom` */ #define HAVE_RECVFROM 1 -/* Define to 1 if you have the send function. */ +/* Define to 1 if you have `send` */ #define HAVE_SEND 1 -/* Define to 1 if you have the setsockopt function. */ +/* Define to 1 if you have `setsockopt` */ #define HAVE_SETSOCKOPT 1 -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* setsockopt() with SO_NONBLOCK support */ /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the socket function. */ +/* Define to 1 if you have `socket` */ #define HAVE_SOCKET 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SOCKET_H */ +/* socklen_t */ +#define HAVE_SOCKLEN_T /**/ + +/* Define to 1 if you have `stat` */ +#define HAVE_STAT 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 -/* Define to 1 if you have the strcasecmp function. */ +/* Define to 1 if you have `strcasecmp` */ #define HAVE_STRCASECMP 1 -/* Define to 1 if you have the strcmpi function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the strdup function. */ +/* Define to 1 if you have `strdup` */ #define HAVE_STRDUP 1 -/* Define to 1 if you have the stricmp function. */ +/* Define to 1 if you have `stricmp` */ /* #undef HAVE_STRICMP */ /* Define to 1 if you have the header file. */ @@ -266,39 +283,54 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the strncasecmp function. */ +/* Define to 1 if you have `strncasecmp` */ #define HAVE_STRNCASECMP 1 -/* Define to 1 if you have the strncmpi function. */ +/* Define to 1 if you have `strncmpi` */ /* #undef HAVE_STRNCMPI */ -/* Define to 1 if you have the strnicmp function. */ +/* Define to 1 if you have `strnicmp` */ /* #undef HAVE_STRNICMP */ -/* Define to 1 if you have the header file. */ -#define HAVE_STROPTS_H 1 - -/* Define to 1 if you have struct addrinfo. */ +/* Define to 1 if the system has the type `struct addrinfo'. */ #define HAVE_STRUCT_ADDRINFO 1 -/* Define to 1 if you have struct in6_addr. */ +/* Define to 1 if `ai_flags' is a member of `struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO_AI_FLAGS 1 + +/* Define to 1 if the system has the type `struct in6_addr'. */ #define HAVE_STRUCT_IN6_ADDR 1 -/* Define to 1 if you have struct sockaddr_in6. */ +/* Define to 1 if the system has the type `struct sockaddr_in6'. */ #define HAVE_STRUCT_SOCKADDR_IN6 1 -/* if struct sockaddr_storage is defined */ +/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */ +#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE 1 -/* Define to 1 if you have the timeval struct. */ +/* Define to 1 if the system has the type `struct timeval'. */ #define HAVE_STRUCT_TIMEVAL 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_EPOLL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_EVENT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_FILIO_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_RANDOM_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 @@ -323,50 +355,50 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define to 1 if you have the windows.h header file. */ +/* Whether user namespaces are available */ +/* #undef HAVE_USER_NAMESPACE */ + +/* Whether UTS namespaces are available */ +/* #undef HAVE_UTS_NAMESPACE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the winsock2.h header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINSOCK2_H */ -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINTERNL_H */ -/* Define to 1 if you have the writev function. */ +/* Define to 1 if you have `writev` */ #define HAVE_WRITEV 1 -/* Define to 1 if you have the ws2tcpip.h header file. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2IPDEF_H */ + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WS2TCPIP_H */ +/* Define to 1 if you have `__system_property_get` */ +/* #undef HAVE___SYSTEM_PROPERTY_GET */ + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if you need the memory.h header file even with stdlib.h */ -/* #undef NEED_MEMORY_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -#define NEED_THREAD_SAFE 1 - -/* cpu-machine-OS */ -#define OS "powerpc-ibm-aix6.1.9.0" - /* Name of package */ #define PACKAGE "c-ares" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares" +#define PACKAGE_BUGREPORT "c-ares mailing list: http://lists.haxx.se/listinfo/c-ares" /* Define to the full name of this package. */ #define PACKAGE_NAME "c-ares" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "c-ares 1.13.0" +#define PACKAGE_STRING "c-ares 1.26.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "c-ares" @@ -375,116 +407,161 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.13.0" - -/* a suitable file/device to read random data from */ -#define CARES_RANDOM_FILE "/dev/urandom" +#define PACKAGE_VERSION "1.26.0" -/* Define to the type qualifier pointed by arg 5 for recvfrom. */ -#define RECVFROM_QUAL_ARG5 +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int +/* recvfrom() arg5 qualifier */ +#define RECVFROM_QUAL_ARG5 -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void +/* recvfrom() arg1 type */ +#define RECVFROM_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID 1 +/* recvfrom() arg2 type */ +#define RECVFROM_TYPE_ARG2 void * -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 size_t +/* recvfrom() arg3 type */ +#define RECVFROM_TYPE_ARG3 size_t -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int +/* recvfrom() arg4 type */ +#define RECVFROM_TYPE_ARG4 int -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr +/* recvfrom() arg5 type */ +#define RECVFROM_TYPE_ARG5 struct sockaddr * -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ +/* recvfrom() return value */ +#define RECVFROM_TYPE_RETV ssize_t -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 socklen_t +/* recv() arg1 type */ +#define RECV_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ +/* recv() arg2 type */ +#define RECV_TYPE_ARG2 void * -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV ssize_t +/* recv() arg3 type */ +#define RECV_TYPE_ARG3 size_t -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int +/* recv() arg4 type */ +#define RECV_TYPE_ARG4 int -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * +/* recv() return value */ +#define RECV_TYPE_RETV ssize_t -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t +/* send() arg2 qualifier */ +#define SEND_QUAL_ARG2 -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int +/* send() arg1 type */ +#define SEND_TYPE_ARG1 int -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV ssize_t +/* send() arg2 type */ +#define SEND_TYPE_ARG2 void * -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void +/* send() arg3 type */ +#define SEND_TYPE_ARG3 size_t -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const +/* send() arg4 type */ +#define SEND_TYPE_ARG4 int -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int +/* send() return value */ +#define SEND_TYPE_RETV ssize_t -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV ssize_t - -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* Version number of package */ -#define VERSION "1.13.0" - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if OS is AIX. */ +/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 +# define _ALL_SOURCE 1 #endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 #endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Version number of package */ +#define VERSION "1.26.0" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -492,14 +569,5 @@ /* Define for large files, on AIX-style hosts. */ #define _LARGE_FILES 1 -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ - /* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ +/* #undef size_t */ \ No newline at end of file diff --git a/deps/cares/config/android/ares_config.h b/deps/cares/config/android/ares_config.h index 28b3e76a80f49b..d09f6af1627395 100644 --- a/deps/cares/config/android/ares_config.h +++ b/deps/cares/config/android/ares_config.h @@ -1,38 +1,26 @@ -/* ares_config.h. Generated from ares_config.h.in by configure. */ -/* ares_config.h.in. Generated from configure.ac by autoheader. */ +/* Copyright (C) The c-ares project and its contributors + * SPDX-License-Identifier: MIT + */ -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* define this if ares is built for a big endian system */ -/* #undef ARES_BIG_ENDIAN */ +/* Generated from ares_config.h.cmake */ -/* when building as static part of libcurl */ -/* #undef BUILDING_LIBCURL */ - -/* Defined for build that exposes internal static functions for testing. */ -/* #undef CARES_EXPOSE_STATICS */ +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD /* Defined for build with symbol hiding. */ -#define CARES_SYMBOL_HIDING 1 - -/* Definition to make a library symbol externally visible. */ -#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default"))) - -/* the signed version of size_t */ -#define CARES_TYPEOF_ARES_SSIZE_T ssize_t +/* #undef CARES_SYMBOL_HIDING */ /* Use resolver library to configure cares */ /* #undef CARES_USE_LIBRESOLV */ /* if a /etc/inet dir is being used */ -/* #undef ETC_INET */ +#undef ETC_INET /* Define to the type of arg 2 for gethostname. */ #define GETHOSTNAME_TYPE_ARG2 size_t /* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const +#define GETNAMEINFO_QUAL_ARG1 /* Define to the type of arg 1 for getnameinfo. */ #define GETNAMEINFO_TYPE_ARG1 struct sockaddr * @@ -47,34 +35,28 @@ #define GETNAMEINFO_TYPE_ARG7 int /* Specifies the number of arguments to getservbyport_r */ -#define GETSERVBYPORT_R_ARGS 6 +#define GETSERVBYPORT_R_ARGS -/* Specifies the size of the buffer to pass to getservbyport_r */ -#define GETSERVBYPORT_R_BUFSIZE 4096 +/* Specifies the number of arguments to getservbyname_r */ +#define GETSERVBYNAME_R_ARGS /* Define to 1 if you have AF_INET6. */ -#define HAVE_AF_INET6 1 +#define HAVE_AF_INET6 /* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 +#define HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ -//#define HAVE_ARPA_NAMESER_COMPAT_H 1 +#define HAVE_ARPA_NAMESER_COMPAT_H /* Define to 1 if you have the header file. */ -//#define HAVE_ARPA_NAMESER_H 1 +#define HAVE_ARPA_NAMESER_H /* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the `bitncmp' function. */ -/* #undef HAVE_BITNCMP */ - -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 +#define HAVE_ASSERT_H /* Define to 1 if you have the clock_gettime function and monotonic timer. */ -#define HAVE_CLOCK_GETTIME_MONOTONIC 1 +#define HAVE_CLOCK_GETTIME_MONOTONIC /* Define to 1 if you have the closesocket function. */ /* #undef HAVE_CLOSESOCKET */ @@ -83,79 +65,100 @@ /* #undef HAVE_CLOSESOCKET_CAMEL */ /* Define to 1 if you have the connect function. */ -#define HAVE_CONNECT 1 +#define HAVE_CONNECT /* define if the compiler supports basic C++11 syntax */ -#define HAVE_CXX11 1 +/* #undef HAVE_CXX11 */ /* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 +#define HAVE_DLFCN_H /* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 +#define HAVE_ERRNO_H + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H + +/* Define to 1 if you have the poll function. */ +#define HAVE_POLL + +/* Define to 1 if you have the pipe function. */ +#define HAVE_PIPE + +/* Define to 1 if you have the pipe2 function. */ +/* #undef HAVE_PIPE2 */ + +/* Define to 1 if you have the kqueue function. */ +/* #undef HAVE_KQUEUE */ + +/* Define to 1 if you have the epoll{_create,ctl,wait} functions. */ +#define HAVE_EPOLL /* Define to 1 if you have the fcntl function. */ -#define HAVE_FCNTL 1 +#define HAVE_FCNTL /* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 +#define HAVE_FCNTL_H /* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 +#define HAVE_FCNTL_O_NONBLOCK /* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 +#define HAVE_FREEADDRINFO /* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 +#define HAVE_GETADDRINFO /* Define to 1 if the getaddrinfo function is threadsafe. */ -#define HAVE_GETADDRINFO_THREADSAFE 1 +/* #undef HAVE_GETADDRINFO_THREADSAFE */ /* Define to 1 if you have the getenv function. */ -#define HAVE_GETENV 1 - -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 +#define HAVE_GETENV /* Define to 1 if you have the gethostname function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define to 1 if you have the getifaddrs function. */ -#define HAVE_GETIFADDRS 1 +#define HAVE_GETHOSTNAME /* Define to 1 if you have the getnameinfo function. */ -#define HAVE_GETNAMEINFO 1 +#define HAVE_GETNAMEINFO + +/* Define to 1 if you have the getrandom function. */ +#define HAVE_GETRANDOM /* Define to 1 if you have the getservbyport_r function. */ /* #undef HAVE_GETSERVBYPORT_R */ -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 +/* Define to 1 if you have the getservbyname_r function. */ +/* #undef HAVE_GETSERVBYNAME_R */ -/* Define to 1 if you have the header file. */ -#define HAVE_IFADDRS_H 1 +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY /* Define to 1 if you have the `if_indextoname' function. */ -#define HAVE_IF_INDEXTONAME 1 +#define HAVE_IF_INDEXTONAME + +/* Define to 1 if you have the `if_nametoindex' function. */ +#define HAVE_IF_NAMETOINDEX + +/* Define to 1 if you have the `ConvertInterfaceIndexToLuid' function. */ +/* #undef HAVE_CONVERTINTERFACEINDEXTOLUID */ + +/* Define to 1 if you have the `ConvertInterfaceLuidToNameA' function. */ +/* #undef HAVE_CONVERTINTERFACELUIDTONAMEA */ /* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ /* #undef HAVE_INET_NET_PTON */ /* Define to 1 if you have a IPv6 capable working inet_ntop function. */ -#define HAVE_INET_NTOP 1 +#define HAVE_INET_NTOP /* Define to 1 if you have a IPv6 capable working inet_pton function. */ -#define HAVE_INET_PTON 1 +#define HAVE_INET_PTON /* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 +#define HAVE_INTTYPES_H /* Define to 1 if you have the ioctl function. */ -#define HAVE_IOCTL 1 +/* #undef HAVE_IOCTL */ /* Define to 1 if you have the ioctlsocket function. */ /* #undef HAVE_IOCTLSOCKET */ @@ -171,109 +174,109 @@ /* #undef HAVE_IOCTLSOCKET_FIONBIO */ /* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 +/* #undef HAVE_IOCTL_FIONBIO */ /* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR 1 +#define HAVE_IOCTL_SIOCGIFADDR /* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ +/* #undef HAVE_LIBRESOLV */ -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 +/* Define to 1 if you have iphlpapi.h */ +/* #undef HAVE_IPHLPAPI_H */ + +/* Define to 1 if you have netioapi.h */ +/* #undef HAVE_NETIOAPI_H */ -/* if your compiler supports LL */ -#define HAVE_LL 1 +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H /* Define to 1 if the compiler supports the 'long long' data type. */ -#define HAVE_LONGLONG 1 +#define HAVE_LONGLONG /* Define to 1 if you have the malloc.h header file. */ -#define HAVE_MALLOC_H 1 +#define HAVE_MALLOC_H /* Define to 1 if you have the memory.h header file. */ -#define HAVE_MEMORY_H 1 +#define HAVE_MEMORY_H + +/* Define to 1 if you have the AvailabilityMacros.h header file. */ +/* #undef HAVE_AVAILABILITYMACROS_H */ /* Define to 1 if you have the MSG_NOSIGNAL flag. */ -#define HAVE_MSG_NOSIGNAL 1 +#define HAVE_MSG_NOSIGNAL /* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 +#define HAVE_NETDB_H /* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 +#define HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ -#define HAVE_NETINET_TCP_H 1 +#define HAVE_NETINET_TCP_H /* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 +#define HAVE_NET_IF_H /* Define to 1 if you have PF_INET6. */ -#define HAVE_PF_INET6 1 +#define HAVE_PF_INET6 /* Define to 1 if you have the recv function. */ -#define HAVE_RECV 1 +#define HAVE_RECV /* Define to 1 if you have the recvfrom function. */ -#define HAVE_RECVFROM 1 +#define HAVE_RECVFROM /* Define to 1 if you have the send function. */ -#define HAVE_SEND 1 +#define HAVE_SEND /* Define to 1 if you have the setsockopt function. */ -#define HAVE_SETSOCKOPT 1 +#define HAVE_SETSOCKOPT /* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ /* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ +#define HAVE_SIGNAL_H /* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 +#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID /* Define to 1 if you have the socket function. */ -#define HAVE_SOCKET 1 +#define HAVE_SOCKET /* Define to 1 if you have the header file. */ /* #undef HAVE_SOCKET_H */ /* Define to 1 if you have the header file. */ -#define HAVE_STDBOOL_H 1 +#define HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 +#define HAVE_STDINT_H /* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 +#define HAVE_STDLIB_H /* Define to 1 if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 +#define HAVE_STRCASECMP /* Define to 1 if you have the strcmpi function. */ /* #undef HAVE_STRCMPI */ /* Define to 1 if you have the strdup function. */ -#define HAVE_STRDUP 1 +#define HAVE_STRDUP /* Define to 1 if you have the stricmp function. */ /* #undef HAVE_STRICMP */ /* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 +#define HAVE_STRINGS_H /* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 +#define HAVE_STRING_H /* Define to 1 if you have the strncasecmp function. */ -#define HAVE_STRNCASECMP 1 +#define HAVE_STRNCASECMP /* Define to 1 if you have the strncmpi function. */ /* #undef HAVE_STRNCMPI */ @@ -282,52 +285,64 @@ /* #undef HAVE_STRNICMP */ /* Define to 1 if you have the header file. */ -#define HAVE_STROPTS_H 1 +/* #undef HAVE_STROPTS_H */ /* Define to 1 if you have struct addrinfo. */ -#define HAVE_STRUCT_ADDRINFO 1 +#define HAVE_STRUCT_ADDRINFO /* Define to 1 if you have struct in6_addr. */ -#define HAVE_STRUCT_IN6_ADDR 1 +#define HAVE_STRUCT_IN6_ADDR /* Define to 1 if you have struct sockaddr_in6. */ -#define HAVE_STRUCT_SOCKADDR_IN6 1 +#define HAVE_STRUCT_SOCKADDR_IN6 /* if struct sockaddr_storage is defined */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +#define HAVE_STRUCT_SOCKADDR_STORAGE /* Define to 1 if you have the timeval struct. */ -#define HAVE_STRUCT_TIMEVAL 1 +#define HAVE_STRUCT_TIMEVAL /* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RANDOM_H + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_EVENT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_EPOLL_H /* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ -#define HAVE_SYS_UIO_H 1 +#define HAVE_SYS_UIO_H /* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 +#define HAVE_TIME_H + +/* Define to 1 if you have the header file. */ +#define HAVE_IFADDRS_H /* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 +#define HAVE_UNISTD_H /* Define to 1 if you have the windows.h header file. */ /* #undef HAVE_WINDOWS_H */ @@ -338,14 +353,26 @@ /* Define to 1 if you have the winsock.h header file. */ /* #undef HAVE_WINSOCK_H */ +/* Define to 1 if you have the mswsock.h header file. */ +/* #undef HAVE_MSWSOCK_H */ + +/* Define to 1 if you have the winternl.h header file. */ +/* #undef HAVE_WINTERNL_H */ + +/* Define to 1 if you have the ntstatus.h header file. */ +/* #undef HAVE_NTSTATUS_H */ + +/* Define to 1 if you have the ntdef.h header file. */ +/* #undef HAVE_NTDEF_H */ + /* Define to 1 if you have the writev function. */ -#define HAVE_WRITEV 1 +#define HAVE_WRITEV /* Define to 1 if you have the ws2tcpip.h header file. */ /* #undef HAVE_WS2TCPIP_H */ -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" +/* Define to 1 if you have the __system_property_get function */ +#define HAVE___SYSTEM_PROPERTY_GET /* Define to 1 if you need the malloc.h header file even with stdlib.h */ /* #undef NEED_MALLOC_H */ @@ -353,50 +380,29 @@ /* Define to 1 if you need the memory.h header file even with stdlib.h */ /* #undef NEED_MEMORY_H */ -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -/* #undef NEED_THREAD_SAFE */ +/* Define if have arc4random_buf() */ +#define HAVE_ARC4RANDOM_BUF -/* cpu-machine-OS */ -#define OS "i686-pc-linux-gnu" +/* Define if have getifaddrs() */ +#define HAVE_GETIFADDRS -/* Name of package */ -#define PACKAGE "c-ares" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "c-ares" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "c-ares 1.13.0" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "c-ares" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.13.0" +/* Define if have stat() */ +#define HAVE_STAT /* a suitable file/device to read random data from */ #define CARES_RANDOM_FILE "/dev/urandom" /* Define to the type qualifier pointed by arg 5 for recvfrom. */ -#define RECVFROM_QUAL_ARG5 +#define RECVFROM_QUAL_ARG5 /* Define to the type of arg 1 for recvfrom. */ #define RECVFROM_TYPE_ARG1 int /* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void +#define RECVFROM_TYPE_ARG2 void * /* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID 1 +#define RECVFROM_TYPE_ARG2_IS_VOID 0 /* Define to the type of arg 3 for recvfrom. */ #define RECVFROM_TYPE_ARG3 size_t @@ -405,16 +411,16 @@ #define RECVFROM_TYPE_ARG4 int /* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr +#define RECVFROM_TYPE_ARG5 struct sockaddr * /* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ +#define RECVFROM_TYPE_ARG5_IS_VOID 0 /* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 socklen_t +#define RECVFROM_TYPE_ARG6 socklen_t * /* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ +#define RECVFROM_TYPE_ARG6_IS_VOID 0 /* Define to the function return type for recvfrom. */ #define RECVFROM_TYPE_RETV ssize_t @@ -434,11 +440,8 @@ /* Define to the function return type for recv. */ #define RECV_TYPE_RETV ssize_t -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - /* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const +#define SEND_QUAL_ARG2 /* Define to the type of arg 1 for send. */ #define SEND_TYPE_ARG1 int @@ -455,57 +458,22 @@ /* Define to the function return type for send. */ #define SEND_TYPE_RETV ssize_t -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 +/* Define to disable non-blocking sockets. */ +#undef USE_BLOCKING_SOCKETS -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 +/* Define to avoid automatic inclusion of winsock.h */ +#undef WIN32_LEAN_AND_MEAN -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ +/* Define to 1 if you have the pthread.h header file. */ +#define HAVE_PTHREAD_H -/* Version number of package */ -#define VERSION "1.13.0" +/* Define to 1 if you have the pthread_np.h header file. */ +/* #undef HAVE_PTHREAD_NP_H */ -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if OS is AIX. */ -#ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ -#endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ +/* Define to 1 if threads are enabled */ +#define CARES_THREADS + +/* Define to 1 if pthread_init() exists */ +/* #undef HAVE_PTHREAD_INIT */ + + diff --git a/deps/cares/config/darwin/ares_config.h b/deps/cares/config/darwin/ares_config.h index 42b1c07dac7e66..6187024a3a17ef 100644 --- a/deps/cares/config/darwin/ares_config.h +++ b/deps/cares/config/darwin/ares_config.h @@ -1,23 +1,14 @@ -/* ares_config.h. Generated from ares_config.h.in by configure. */ -/* ares_config.h.in. Generated from configure.ac by autoheader. */ +/* src/lib/ares_config.h. Generated from ares_config.h.in by configure. */ +/* src/lib/ares_config.h.in. Generated from configure.ac by autoheader. */ -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* define this if ares is built for a big endian system */ -/* #undef ARES_BIG_ENDIAN */ - -/* when building as static part of libcurl */ -/* #undef BUILDING_LIBCURL */ - -/* Defined for build that exposes internal static functions for testing. */ -/* #undef CARES_EXPOSE_STATICS */ +/* a suitable file/device to read random data from */ +#define CARES_RANDOM_FILE "/dev/urandom" -/* Defined for build with symbol hiding. */ -#define CARES_SYMBOL_HIDING 1 +/* Set to 1 if non-pubilc shared library symbols are hidden */ +#define CARES_SYMBOL_HIDING 1 -/* Definition to make a library symbol externally visible. */ -#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default"))) +/* Threading enabled */ +#define CARES_THREADS 1 /* the signed version of size_t */ #define CARES_TYPEOF_ARES_SSIZE_T ssize_t @@ -28,33 +19,33 @@ /* if a /etc/inet dir is being used */ /* #undef ETC_INET */ -/* Define to the type of arg 2 for gethostname. */ -#define GETHOSTNAME_TYPE_ARG2 size_t +/* gethostname() arg2 type */ +#define GETHOSTNAME_TYPE_ARG2 size_t -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const +/* getnameinfo() arg1 type */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * +/* getnameinfo() arg2 type */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t +/* getnameinfo() arg4 and 6 type */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 socklen_t +/* getnameinfo() arg7 type */ +#define GETNAMEINFO_TYPE_ARG7 int -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int +/* number of arguments for getservbyname_r() */ +/* #undef GETSERVBYNAME_R_ARGS */ -/* Specifies the number of arguments to getservbyport_r */ +/* number of arguments for getservbyport_r() */ /* #undef GETSERVBYPORT_R_ARGS */ -/* Specifies the size of the buffer to pass to getservbyport_r */ -/* #undef GETSERVBYPORT_R_BUFSIZE */ - -/* Define to 1 if you have AF_INET6. */ +/* Define to 1 if you have AF_INET6 */ #define HAVE_AF_INET6 1 +/* Define to 1 if you have `arc4random_buf` */ +#define HAVE_ARC4RANDOM_BUF 1 + /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 @@ -67,135 +58,131 @@ /* Define to 1 if you have the header file. */ #define HAVE_ASSERT_H 1 -/* Define to 1 if you have the `bitncmp' function. */ -/* #undef HAVE_BITNCMP */ +/* Define to 1 if you have the header file. */ +#define HAVE_AVAILABILITYMACROS_H 1 -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 +/* Define to 1 if you have `clock_gettime` */ +#define HAVE_CLOCK_GETTIME 1 -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -/* #undef HAVE_CLOCK_GETTIME_MONOTONIC */ +/* clock_gettime() with CLOCK_MONOTONIC support */ +#define HAVE_CLOCK_GETTIME_MONOTONIC 1 -/* Define to 1 if you have the closesocket function. */ +/* Define to 1 if you have `closesocket` */ /* #undef HAVE_CLOSESOCKET */ -/* Define to 1 if you have the CloseSocket camel case function. */ +/* Define to 1 if you have `CloseSocket` */ /* #undef HAVE_CLOSESOCKET_CAMEL */ -/* Define to 1 if you have the connect function. */ +/* Define to 1 if you have `connect` */ #define HAVE_CONNECT 1 -/* define if the compiler supports basic C++11 syntax */ -#define HAVE_CXX11 1 +/* Define to 1 if you have `ConvertInterfaceIndexToLuid` */ +/* #undef HAVE_CONVERTINTERFACEINDEXTOLUID */ + +/* Define to 1 if you have `ConvertInterfaceLuidToNameA` */ +/* #undef HAVE_CONVERTINTERFACELUIDTONAMEA */ + +/* define if the compiler supports basic C++14 syntax */ +#define HAVE_CXX14 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 +/* Define to 1 if you have `epoll_{create1,ctl,wait}` */ +/* #undef HAVE_EPOLL */ + /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 -/* Define to 1 if you have the fcntl function. */ +/* Define to 1 if you have `fcntl` */ #define HAVE_FCNTL 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 +/* fcntl() with O_NONBLOCK support */ +#define HAVE_FCNTL_O_NONBLOCK 1 -/* Define to 1 if the getaddrinfo function is threadsafe. */ -#define HAVE_GETADDRINFO_THREADSAFE 1 - -/* Define to 1 if you have the getenv function. */ +/* Define to 1 if you have `getenv` */ #define HAVE_GETENV 1 -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostname function. */ +/* Define to 1 if you have `gethostname` */ #define HAVE_GETHOSTNAME 1 -/* Define to 1 if you have the getifaddrs function. */ +/* Define to 1 if you have `getifaddrs` */ #define HAVE_GETIFADDRS 1 -/* Define to 1 if you have the getnameinfo function. */ +/* Define to 1 if you have `getnameinfo` */ #define HAVE_GETNAMEINFO 1 -/* Define to 1 if you have the getservbyport_r function. */ +/* Define to 1 if you have `getrandom` */ +/* #undef HAVE_GETRANDOM */ + +/* Define to 1 if you have `getservbyport_r` */ /* #undef HAVE_GETSERVBYPORT_R */ -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have `gettimeofday` */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the header file. */ #define HAVE_IFADDRS_H 1 -/* Define to 1 if you have the `if_indextoname' function. */ +/* Define to 1 if you have `if_indextoname` */ #define HAVE_IF_INDEXTONAME 1 -/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ +/* Define to 1 if you have `if_nametoindex` */ +#define HAVE_IF_NAMETOINDEX 1 + +/* Define to 1 if you have `inet_net_pton` */ #define HAVE_INET_NET_PTON 1 -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +/* Define to 1 if you have `inet_ntop` */ #define HAVE_INET_NTOP 1 -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +/* Define to 1 if you have `inet_pton` */ #define HAVE_INET_PTON 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define to 1 if you have the ioctl function. */ +/* Define to 1 if you have `ioctl` */ #define HAVE_IOCTL 1 -/* Define to 1 if you have the ioctlsocket function. */ +/* Define to 1 if you have `ioctlsocket` */ /* #undef HAVE_IOCTLSOCKET */ -/* Define to 1 if you have the IoctlSocket camel case function. */ +/* Define to 1 if you have `IoctlSocket` */ /* #undef HAVE_IOCTLSOCKET_CAMEL */ -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* ioctlsocket() with FIONBIO support */ /* #undef HAVE_IOCTLSOCKET_FIONBIO */ -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 +/* ioctl() with FIONBIO support */ +#define HAVE_IOCTL_FIONBIO 1 -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IPHLPAPI_H */ -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ +/* Define to 1 if you have `kqueue` */ +#define HAVE_KQUEUE 1 /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 -/* if your compiler supports LL */ -#define HAVE_LL 1 - /* Define to 1 if the compiler supports the 'long long' data type. */ #define HAVE_LONGLONG 1 -/* Define to 1 if you have the malloc.h header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_MALLOC_H */ -/* Define to 1 if you have the memory.h header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -/* #undef HAVE_MSG_NOSIGNAL */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MSWSOCK_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETDB_H 1 @@ -206,64 +193,88 @@ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_TCP_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETIOAPI_H */ + /* Define to 1 if you have the header file. */ #define HAVE_NET_IF_H 1 -/* Define to 1 if you have PF_INET6. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTDEF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTSTATUS_H */ + +/* Define to 1 if you have PF_INET6 */ #define HAVE_PF_INET6 1 -/* Define to 1 if you have the recv function. */ +/* Define to 1 if you have `pipe` */ +#define HAVE_PIPE 1 + +/* Define to 1 if you have `pipe2` */ +/* #undef HAVE_PIPE2 */ + +/* Define to 1 if you have `poll` */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PTHREAD_NP_H */ + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have `recv` */ #define HAVE_RECV 1 -/* Define to 1 if you have the recvfrom function. */ +/* Define to 1 if you have `recvfrom` */ #define HAVE_RECVFROM 1 -/* Define to 1 if you have the send function. */ +/* Define to 1 if you have `send` */ #define HAVE_SEND 1 -/* Define to 1 if you have the setsockopt function. */ +/* Define to 1 if you have `setsockopt` */ #define HAVE_SETSOCKOPT 1 -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* setsockopt() with SO_NONBLOCK support */ /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the socket function. */ +/* Define to 1 if you have `socket` */ #define HAVE_SOCKET 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SOCKET_H */ +/* socklen_t */ +#define HAVE_SOCKLEN_T /**/ + +/* Define to 1 if you have `stat` */ +#define HAVE_STAT 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 -/* Define to 1 if you have the strcasecmp function. */ +/* Define to 1 if you have `strcasecmp` */ #define HAVE_STRCASECMP 1 -/* Define to 1 if you have the strcmpi function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the strdup function. */ +/* Define to 1 if you have `strdup` */ #define HAVE_STRDUP 1 -/* Define to 1 if you have the stricmp function. */ +/* Define to 1 if you have `stricmp` */ /* #undef HAVE_STRICMP */ /* Define to 1 if you have the header file. */ @@ -272,39 +283,54 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the strncasecmp function. */ +/* Define to 1 if you have `strncasecmp` */ #define HAVE_STRNCASECMP 1 -/* Define to 1 if you have the strncmpi function. */ +/* Define to 1 if you have `strncmpi` */ /* #undef HAVE_STRNCMPI */ -/* Define to 1 if you have the strnicmp function. */ +/* Define to 1 if you have `strnicmp` */ /* #undef HAVE_STRNICMP */ -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STROPTS_H */ - -/* Define to 1 if you have struct addrinfo. */ +/* Define to 1 if the system has the type `struct addrinfo'. */ #define HAVE_STRUCT_ADDRINFO 1 -/* Define to 1 if you have struct in6_addr. */ +/* Define to 1 if `ai_flags' is a member of `struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO_AI_FLAGS 1 + +/* Define to 1 if the system has the type `struct in6_addr'. */ #define HAVE_STRUCT_IN6_ADDR 1 -/* Define to 1 if you have struct sockaddr_in6. */ +/* Define to 1 if the system has the type `struct sockaddr_in6'. */ #define HAVE_STRUCT_SOCKADDR_IN6 1 -/* if struct sockaddr_storage is defined */ +/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */ +#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE 1 -/* Define to 1 if you have the timeval struct. */ +/* Define to 1 if the system has the type `struct timeval'. */ #define HAVE_STRUCT_TIMEVAL 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_EPOLL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_EVENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RANDOM_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 @@ -329,50 +355,50 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define to 1 if you have the windows.h header file. */ +/* Whether user namespaces are available */ +/* #undef HAVE_USER_NAMESPACE */ + +/* Whether UTS namespaces are available */ +/* #undef HAVE_UTS_NAMESPACE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the winsock2.h header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINSOCK2_H */ -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINTERNL_H */ -/* Define to 1 if you have the writev function. */ +/* Define to 1 if you have `writev` */ #define HAVE_WRITEV 1 -/* Define to 1 if you have the ws2tcpip.h header file. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2IPDEF_H */ + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WS2TCPIP_H */ +/* Define to 1 if you have `__system_property_get` */ +/* #undef HAVE___SYSTEM_PROPERTY_GET */ + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if you need the memory.h header file even with stdlib.h */ -/* #undef NEED_MEMORY_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -/* #undef NEED_THREAD_SAFE */ - -/* cpu-machine-OS */ -#define OS "x86_64-apple-darwin16.7.0" - /* Name of package */ #define PACKAGE "c-ares" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares" +#define PACKAGE_BUGREPORT "c-ares mailing list: http://lists.haxx.se/listinfo/c-ares" /* Define to the full name of this package. */ #define PACKAGE_NAME "c-ares" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "c-ares 1.13.0" +#define PACKAGE_STRING "c-ares 1.26.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "c-ares" @@ -381,128 +407,167 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.13.0" - -/* a suitable file/device to read random data from */ -#define CARES_RANDOM_FILE "/dev/urandom" +#define PACKAGE_VERSION "1.26.0" -/* Define to the type qualifier pointed by arg 5 for recvfrom. */ -#define RECVFROM_QUAL_ARG5 +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int +/* recvfrom() arg5 qualifier */ +#define RECVFROM_QUAL_ARG5 -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void +/* recvfrom() arg1 type */ +#define RECVFROM_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID 1 +/* recvfrom() arg2 type */ +#define RECVFROM_TYPE_ARG2 void * -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 size_t +/* recvfrom() arg3 type */ +#define RECVFROM_TYPE_ARG3 size_t -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int +/* recvfrom() arg4 type */ +#define RECVFROM_TYPE_ARG4 int -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr +/* recvfrom() arg5 type */ +#define RECVFROM_TYPE_ARG5 struct sockaddr * -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ +/* recvfrom() return value */ +#define RECVFROM_TYPE_RETV ssize_t -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 socklen_t +/* recv() arg1 type */ +#define RECV_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ +/* recv() arg2 type */ +#define RECV_TYPE_ARG2 void * -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV ssize_t +/* recv() arg3 type */ +#define RECV_TYPE_ARG3 size_t -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int +/* recv() arg4 type */ +#define RECV_TYPE_ARG4 int -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * +/* recv() return value */ +#define RECV_TYPE_RETV ssize_t -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t +/* send() arg2 qualifier */ +#define SEND_QUAL_ARG2 -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int +/* send() arg1 type */ +#define SEND_TYPE_ARG1 int -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV ssize_t +/* send() arg2 type */ +#define SEND_TYPE_ARG2 void * -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void +/* send() arg3 type */ +#define SEND_TYPE_ARG3 size_t -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const +/* send() arg4 type */ +#define SEND_TYPE_ARG4 int -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int +/* send() return value */ +#define SEND_TYPE_RETV ssize_t -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV ssize_t - -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* Version number of package */ -#define VERSION "1.13.0" - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if OS is AIX. */ +/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ +# define _ALL_SOURCE 1 #endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ #endif + +/* Version number of package */ +#define VERSION "1.26.0" + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ - /* Define to `unsigned int' if does not define. */ -/* #undef size_t */ +/* #undef size_t */ \ No newline at end of file diff --git a/deps/cares/config/freebsd/ares_config.h b/deps/cares/config/freebsd/ares_config.h index 7b151404d60f1d..35acf50d385e50 100644 --- a/deps/cares/config/freebsd/ares_config.h +++ b/deps/cares/config/freebsd/ares_config.h @@ -1,23 +1,14 @@ -/* ares_config.h. Generated from ares_config.h.in by configure. */ -/* ares_config.h.in. Generated from configure.ac by autoheader. */ +/* src/lib/ares_config.h. Generated from ares_config.h.in by configure. */ +/* src/lib/ares_config.h.in. Generated from configure.ac by autoheader. */ -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* define this if ares is built for a big endian system */ -/* #undef ARES_BIG_ENDIAN */ - -/* when building as static part of libcurl */ -/* #undef BUILDING_LIBCURL */ - -/* Defined for build that exposes internal static functions for testing. */ -/* #undef CARES_EXPOSE_STATICS */ +/* a suitable file/device to read random data from */ +#define CARES_RANDOM_FILE "/dev/urandom" -/* Defined for build with symbol hiding. */ -#define CARES_SYMBOL_HIDING 1 +/* Set to 1 if non-pubilc shared library symbols are hidden */ +#define CARES_SYMBOL_HIDING 1 -/* Definition to make a library symbol externally visible. */ -#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default"))) +/* Threading enabled */ +#define CARES_THREADS 1 /* the signed version of size_t */ #define CARES_TYPEOF_ARES_SSIZE_T ssize_t @@ -28,33 +19,33 @@ /* if a /etc/inet dir is being used */ /* #undef ETC_INET */ -/* Define to the type of arg 2 for gethostname. */ -#define GETHOSTNAME_TYPE_ARG2 size_t - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const +/* gethostname() arg2 type */ +#define GETHOSTNAME_TYPE_ARG2 size_t -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * +/* getnameinfo() arg1 type */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t +/* getnameinfo() arg2 type */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 size_t +/* getnameinfo() arg4 and 6 type */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int +/* getnameinfo() arg7 type */ +#define GETNAMEINFO_TYPE_ARG7 int -/* Specifies the number of arguments to getservbyport_r */ -#define GETSERVBYPORT_R_ARGS 6 +/* number of arguments for getservbyname_r() */ +/* #undef GETSERVBYNAME_R_ARGS */ -/* Specifies the size of the buffer to pass to getservbyport_r */ -#define GETSERVBYPORT_R_BUFSIZE 4096 +/* number of arguments for getservbyport_r() */ +#define GETSERVBYPORT_R_ARGS 6 -/* Define to 1 if you have AF_INET6. */ +/* Define to 1 if you have AF_INET6 */ #define HAVE_AF_INET6 1 +/* Define to 1 if you have `arc4random_buf` */ +#define HAVE_ARC4RANDOM_BUF 1 + /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 @@ -67,135 +58,131 @@ /* Define to 1 if you have the header file. */ #define HAVE_ASSERT_H 1 -/* Define to 1 if you have the `bitncmp' function. */ -/* #undef HAVE_BITNCMP */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AVAILABILITYMACROS_H */ -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 +/* Define to 1 if you have `clock_gettime` */ +#define HAVE_CLOCK_GETTIME 1 -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -#define HAVE_CLOCK_GETTIME_MONOTONIC 1 +/* clock_gettime() with CLOCK_MONOTONIC support */ +#define HAVE_CLOCK_GETTIME_MONOTONIC 1 -/* Define to 1 if you have the closesocket function. */ +/* Define to 1 if you have `closesocket` */ /* #undef HAVE_CLOSESOCKET */ -/* Define to 1 if you have the CloseSocket camel case function. */ +/* Define to 1 if you have `CloseSocket` */ /* #undef HAVE_CLOSESOCKET_CAMEL */ -/* Define to 1 if you have the connect function. */ +/* Define to 1 if you have `connect` */ #define HAVE_CONNECT 1 -/* define if the compiler supports basic C++11 syntax */ -#define HAVE_CXX11 1 +/* Define to 1 if you have `ConvertInterfaceIndexToLuid` */ +/* #undef HAVE_CONVERTINTERFACEINDEXTOLUID */ + +/* Define to 1 if you have `ConvertInterfaceLuidToNameA` */ +/* #undef HAVE_CONVERTINTERFACELUIDTONAMEA */ + +/* define if the compiler supports basic C++14 syntax */ +#define HAVE_CXX14 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 +/* Define to 1 if you have `epoll_{create1,ctl,wait}` */ +/* #undef HAVE_EPOLL */ + /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 -/* Define to 1 if you have the fcntl function. */ +/* Define to 1 if you have `fcntl` */ #define HAVE_FCNTL 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 +/* fcntl() with O_NONBLOCK support */ +#define HAVE_FCNTL_O_NONBLOCK 1 -/* Define to 1 if the getaddrinfo function is threadsafe. */ -#define HAVE_GETADDRINFO_THREADSAFE 1 - -/* Define to 1 if you have the getenv function. */ +/* Define to 1 if you have `getenv` */ #define HAVE_GETENV 1 -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostname function. */ +/* Define to 1 if you have `gethostname` */ #define HAVE_GETHOSTNAME 1 -/* Define to 1 if you have the getifaddrs function. */ +/* Define to 1 if you have `getifaddrs` */ #define HAVE_GETIFADDRS 1 -/* Define to 1 if you have the getnameinfo function. */ +/* Define to 1 if you have `getnameinfo` */ #define HAVE_GETNAMEINFO 1 -/* Define to 1 if you have the getservbyport_r function. */ +/* Define to 1 if you have `getrandom` */ +#define HAVE_GETRANDOM 1 + +/* Define to 1 if you have `getservbyport_r` */ #define HAVE_GETSERVBYPORT_R 1 -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have `gettimeofday` */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the header file. */ #define HAVE_IFADDRS_H 1 -/* Define to 1 if you have the `if_indextoname' function. */ +/* Define to 1 if you have `if_indextoname` */ #define HAVE_IF_INDEXTONAME 1 -/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ +/* Define to 1 if you have `if_nametoindex` */ +#define HAVE_IF_NAMETOINDEX 1 + +/* Define to 1 if you have `inet_net_pton` */ #define HAVE_INET_NET_PTON 1 -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +/* Define to 1 if you have `inet_ntop` */ #define HAVE_INET_NTOP 1 -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +/* Define to 1 if you have `inet_pton` */ #define HAVE_INET_PTON 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define to 1 if you have the ioctl function. */ +/* Define to 1 if you have `ioctl` */ #define HAVE_IOCTL 1 -/* Define to 1 if you have the ioctlsocket function. */ +/* Define to 1 if you have `ioctlsocket` */ /* #undef HAVE_IOCTLSOCKET */ -/* Define to 1 if you have the IoctlSocket camel case function. */ +/* Define to 1 if you have `IoctlSocket` */ /* #undef HAVE_IOCTLSOCKET_CAMEL */ -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* ioctlsocket() with FIONBIO support */ /* #undef HAVE_IOCTLSOCKET_FIONBIO */ -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 +/* ioctl() with FIONBIO support */ +#define HAVE_IOCTL_FIONBIO 1 -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IPHLPAPI_H */ -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ +/* Define to 1 if you have `kqueue` */ +#define HAVE_KQUEUE 1 /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 -/* if your compiler supports LL */ -#define HAVE_LL 1 - /* Define to 1 if the compiler supports the 'long long' data type. */ #define HAVE_LONGLONG 1 -/* Define to 1 if you have the malloc.h header file. */ -/* #undef HAVE_MALLOC_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_MALLOC_H 1 -/* Define to 1 if you have the memory.h header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -#define HAVE_MSG_NOSIGNAL 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MSWSOCK_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETDB_H 1 @@ -206,64 +193,88 @@ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_TCP_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETIOAPI_H */ + /* Define to 1 if you have the header file. */ #define HAVE_NET_IF_H 1 -/* Define to 1 if you have PF_INET6. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTDEF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTSTATUS_H */ + +/* Define to 1 if you have PF_INET6 */ #define HAVE_PF_INET6 1 -/* Define to 1 if you have the recv function. */ +/* Define to 1 if you have `pipe` */ +#define HAVE_PIPE 1 + +/* Define to 1 if you have `pipe2` */ +#define HAVE_PIPE2 1 + +/* Define to 1 if you have `poll` */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_NP_H 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have `recv` */ #define HAVE_RECV 1 -/* Define to 1 if you have the recvfrom function. */ +/* Define to 1 if you have `recvfrom` */ #define HAVE_RECVFROM 1 -/* Define to 1 if you have the send function. */ +/* Define to 1 if you have `send` */ #define HAVE_SEND 1 -/* Define to 1 if you have the setsockopt function. */ +/* Define to 1 if you have `setsockopt` */ #define HAVE_SETSOCKOPT 1 -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* setsockopt() with SO_NONBLOCK support */ /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the socket function. */ +/* Define to 1 if you have `socket` */ #define HAVE_SOCKET 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SOCKET_H */ +/* socklen_t */ +#define HAVE_SOCKLEN_T /**/ + +/* Define to 1 if you have `stat` */ +#define HAVE_STAT 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 -/* Define to 1 if you have the strcasecmp function. */ +/* Define to 1 if you have `strcasecmp` */ #define HAVE_STRCASECMP 1 -/* Define to 1 if you have the strcmpi function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the strdup function. */ +/* Define to 1 if you have `strdup` */ #define HAVE_STRDUP 1 -/* Define to 1 if you have the stricmp function. */ +/* Define to 1 if you have `stricmp` */ /* #undef HAVE_STRICMP */ /* Define to 1 if you have the header file. */ @@ -272,39 +283,54 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the strncasecmp function. */ +/* Define to 1 if you have `strncasecmp` */ #define HAVE_STRNCASECMP 1 -/* Define to 1 if you have the strncmpi function. */ +/* Define to 1 if you have `strncmpi` */ /* #undef HAVE_STRNCMPI */ -/* Define to 1 if you have the strnicmp function. */ +/* Define to 1 if you have `strnicmp` */ /* #undef HAVE_STRNICMP */ -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STROPTS_H */ - -/* Define to 1 if you have struct addrinfo. */ +/* Define to 1 if the system has the type `struct addrinfo'. */ #define HAVE_STRUCT_ADDRINFO 1 -/* Define to 1 if you have struct in6_addr. */ +/* Define to 1 if `ai_flags' is a member of `struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO_AI_FLAGS 1 + +/* Define to 1 if the system has the type `struct in6_addr'. */ #define HAVE_STRUCT_IN6_ADDR 1 -/* Define to 1 if you have struct sockaddr_in6. */ +/* Define to 1 if the system has the type `struct sockaddr_in6'. */ #define HAVE_STRUCT_SOCKADDR_IN6 1 -/* if struct sockaddr_storage is defined */ +/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */ +#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE 1 -/* Define to 1 if you have the timeval struct. */ +/* Define to 1 if the system has the type `struct timeval'. */ #define HAVE_STRUCT_TIMEVAL 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_EPOLL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_EVENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RANDOM_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 @@ -329,50 +355,50 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define to 1 if you have the windows.h header file. */ +/* Whether user namespaces are available */ +/* #undef HAVE_USER_NAMESPACE */ + +/* Whether UTS namespaces are available */ +/* #undef HAVE_UTS_NAMESPACE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the winsock2.h header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINSOCK2_H */ -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINTERNL_H */ -/* Define to 1 if you have the writev function. */ +/* Define to 1 if you have `writev` */ #define HAVE_WRITEV 1 -/* Define to 1 if you have the ws2tcpip.h header file. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2IPDEF_H */ + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WS2TCPIP_H */ +/* Define to 1 if you have `__system_property_get` */ +/* #undef HAVE___SYSTEM_PROPERTY_GET */ + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if you need the memory.h header file even with stdlib.h */ -/* #undef NEED_MEMORY_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -/* #undef NEED_THREAD_SAFE */ - -/* cpu-machine-OS */ -#define OS "x86_64-unknown-freebsd10.3" - /* Name of package */ #define PACKAGE "c-ares" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares" +#define PACKAGE_BUGREPORT "c-ares mailing list: http://lists.haxx.se/listinfo/c-ares" /* Define to the full name of this package. */ #define PACKAGE_NAME "c-ares" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "c-ares 1.13.0" +#define PACKAGE_STRING "c-ares 1.26.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "c-ares" @@ -381,116 +407,161 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.13.0" - -/* a suitable file/device to read random data from */ -#define CARES_RANDOM_FILE "/dev/urandom" - -/* Define to the type qualifier pointed by arg 5 for recvfrom. */ -#define RECVFROM_QUAL_ARG5 +#define PACKAGE_VERSION "1.26.0" -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void +/* recvfrom() arg5 qualifier */ +#define RECVFROM_QUAL_ARG5 -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID 1 +/* recvfrom() arg1 type */ +#define RECVFROM_TYPE_ARG1 int -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 size_t +/* recvfrom() arg2 type */ +#define RECVFROM_TYPE_ARG2 void * -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int +/* recvfrom() arg3 type */ +#define RECVFROM_TYPE_ARG3 size_t -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr +/* recvfrom() arg4 type */ +#define RECVFROM_TYPE_ARG4 int -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ +/* recvfrom() arg5 type */ +#define RECVFROM_TYPE_ARG5 struct sockaddr * -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 socklen_t +/* recvfrom() return value */ +#define RECVFROM_TYPE_RETV ssize_t -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ +/* recv() arg1 type */ +#define RECV_TYPE_ARG1 int -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV ssize_t +/* recv() arg2 type */ +#define RECV_TYPE_ARG2 void * -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int +/* recv() arg3 type */ +#define RECV_TYPE_ARG3 size_t -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * +/* recv() arg4 type */ +#define RECV_TYPE_ARG4 int -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t +/* recv() return value */ +#define RECV_TYPE_RETV ssize_t -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int +/* send() arg2 qualifier */ +#define SEND_QUAL_ARG2 -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV ssize_t +/* send() arg1 type */ +#define SEND_TYPE_ARG1 int -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void +/* send() arg2 type */ +#define SEND_TYPE_ARG2 void * -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const +/* send() arg3 type */ +#define SEND_TYPE_ARG3 size_t -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int +/* send() arg4 type */ +#define SEND_TYPE_ARG4 int -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * +/* send() return value */ +#define SEND_TYPE_RETV ssize_t -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV ssize_t - -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* Version number of package */ -#define VERSION "1.13.0" - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if OS is AIX. */ +/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ +# define _ALL_SOURCE 1 #endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 #endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Version number of package */ +#define VERSION "1.26.0" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ @@ -498,14 +569,5 @@ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ - /* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ +/* #undef size_t */ \ No newline at end of file diff --git a/deps/cares/config/linux/ares_config.h b/deps/cares/config/linux/ares_config.h index 45fb0153fcac4a..3cb135a35ca62b 100644 --- a/deps/cares/config/linux/ares_config.h +++ b/deps/cares/config/linux/ares_config.h @@ -1,23 +1,14 @@ -/* ares_config.h. Generated from ares_config.h.in by configure. */ -/* ares_config.h.in. Generated from configure.ac by autoheader. */ +/* src/lib/ares_config.h. Generated from ares_config.h.in by configure. */ +/* src/lib/ares_config.h.in. Generated from configure.ac by autoheader. */ -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* define this if ares is built for a big endian system */ -/* #undef ARES_BIG_ENDIAN */ - -/* when building as static part of libcurl */ -/* #undef BUILDING_LIBCURL */ - -/* Defined for build that exposes internal static functions for testing. */ -/* #undef CARES_EXPOSE_STATICS */ +/* a suitable file/device to read random data from */ +#define CARES_RANDOM_FILE "/dev/urandom" -/* Defined for build with symbol hiding. */ -#define CARES_SYMBOL_HIDING 1 +/* Set to 1 if non-pubilc shared library symbols are hidden */ +#define CARES_SYMBOL_HIDING 1 -/* Definition to make a library symbol externally visible. */ -#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default"))) +/* Threading enabled */ +#define CARES_THREADS 1 /* the signed version of size_t */ #define CARES_TYPEOF_ARES_SSIZE_T ssize_t @@ -28,33 +19,33 @@ /* if a /etc/inet dir is being used */ /* #undef ETC_INET */ -/* Define to the type of arg 2 for gethostname. */ -#define GETHOSTNAME_TYPE_ARG2 size_t - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const +/* gethostname() arg2 type */ +#define GETHOSTNAME_TYPE_ARG2 size_t -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * +/* getnameinfo() arg1 type */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t +/* getnameinfo() arg2 type */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 socklen_t +/* getnameinfo() arg4 and 6 type */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int +/* getnameinfo() arg7 type */ +#define GETNAMEINFO_TYPE_ARG7 int -/* Specifies the number of arguments to getservbyport_r */ -#define GETSERVBYPORT_R_ARGS 6 +/* number of arguments for getservbyname_r() */ +/* #undef GETSERVBYNAME_R_ARGS */ -/* Specifies the size of the buffer to pass to getservbyport_r */ -#define GETSERVBYPORT_R_BUFSIZE 4096 +/* number of arguments for getservbyport_r() */ +#define GETSERVBYPORT_R_ARGS 6 -/* Define to 1 if you have AF_INET6. */ +/* Define to 1 if you have AF_INET6 */ #define HAVE_AF_INET6 1 +/* Define to 1 if you have `arc4random_buf` */ +/* #undef HAVE_ARC4RANDOM_BUF */ + /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 @@ -67,135 +58,131 @@ /* Define to 1 if you have the header file. */ #define HAVE_ASSERT_H 1 -/* Define to 1 if you have the `bitncmp' function. */ -/* #undef HAVE_BITNCMP */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AVAILABILITYMACROS_H */ -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 +/* Define to 1 if you have `clock_gettime` */ +#define HAVE_CLOCK_GETTIME 1 -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -#define HAVE_CLOCK_GETTIME_MONOTONIC 1 +/* clock_gettime() with CLOCK_MONOTONIC support */ +#define HAVE_CLOCK_GETTIME_MONOTONIC 1 -/* Define to 1 if you have the closesocket function. */ +/* Define to 1 if you have `closesocket` */ /* #undef HAVE_CLOSESOCKET */ -/* Define to 1 if you have the CloseSocket camel case function. */ +/* Define to 1 if you have `CloseSocket` */ /* #undef HAVE_CLOSESOCKET_CAMEL */ -/* Define to 1 if you have the connect function. */ +/* Define to 1 if you have `connect` */ #define HAVE_CONNECT 1 -/* define if the compiler supports basic C++11 syntax */ -#define HAVE_CXX11 1 +/* Define to 1 if you have `ConvertInterfaceIndexToLuid` */ +/* #undef HAVE_CONVERTINTERFACEINDEXTOLUID */ + +/* Define to 1 if you have `ConvertInterfaceLuidToNameA` */ +/* #undef HAVE_CONVERTINTERFACELUIDTONAMEA */ + +/* define if the compiler supports basic C++14 syntax */ +#define HAVE_CXX14 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 +/* Define to 1 if you have `epoll_{create1,ctl,wait}` */ +#define HAVE_EPOLL 1 + /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 -/* Define to 1 if you have the fcntl function. */ +/* Define to 1 if you have `fcntl` */ #define HAVE_FCNTL 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 +/* fcntl() with O_NONBLOCK support */ +#define HAVE_FCNTL_O_NONBLOCK 1 -/* Define to 1 if the getaddrinfo function is threadsafe. */ -#define HAVE_GETADDRINFO_THREADSAFE 1 - -/* Define to 1 if you have the getenv function. */ +/* Define to 1 if you have `getenv` */ #define HAVE_GETENV 1 -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostname function. */ +/* Define to 1 if you have `gethostname` */ #define HAVE_GETHOSTNAME 1 -/* Define to 1 if you have the getifaddrs function. */ +/* Define to 1 if you have `getifaddrs` */ #define HAVE_GETIFADDRS 1 -/* Define to 1 if you have the getnameinfo function. */ +/* Define to 1 if you have `getnameinfo` */ #define HAVE_GETNAMEINFO 1 -/* Define to 1 if you have the getservbyport_r function. */ +/* Define to 1 if you have `getrandom` */ +#define HAVE_GETRANDOM 1 + +/* Define to 1 if you have `getservbyport_r` */ #define HAVE_GETSERVBYPORT_R 1 -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have `gettimeofday` */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the header file. */ #define HAVE_IFADDRS_H 1 -/* Define to 1 if you have the `if_indextoname' function. */ +/* Define to 1 if you have `if_indextoname` */ #define HAVE_IF_INDEXTONAME 1 -/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ -/* #undef HAVE_INET_NET_PTON */ +/* Define to 1 if you have `if_nametoindex` */ +#define HAVE_IF_NAMETOINDEX 1 + +/* Define to 1 if you have `inet_net_pton` */ +#define HAVE_INET_NET_PTON 1 -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +/* Define to 1 if you have `inet_ntop` */ #define HAVE_INET_NTOP 1 -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +/* Define to 1 if you have `inet_pton` */ #define HAVE_INET_PTON 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define to 1 if you have the ioctl function. */ +/* Define to 1 if you have `ioctl` */ #define HAVE_IOCTL 1 -/* Define to 1 if you have the ioctlsocket function. */ +/* Define to 1 if you have `ioctlsocket` */ /* #undef HAVE_IOCTLSOCKET */ -/* Define to 1 if you have the IoctlSocket camel case function. */ +/* Define to 1 if you have `IoctlSocket` */ /* #undef HAVE_IOCTLSOCKET_CAMEL */ -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* ioctlsocket() with FIONBIO support */ /* #undef HAVE_IOCTLSOCKET_FIONBIO */ -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 +/* ioctl() with FIONBIO support */ +#define HAVE_IOCTL_FIONBIO 1 -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IPHLPAPI_H */ -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ +/* Define to 1 if you have `kqueue` */ +/* #undef HAVE_KQUEUE */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 -/* if your compiler supports LL */ -#define HAVE_LL 1 - /* Define to 1 if the compiler supports the 'long long' data type. */ #define HAVE_LONGLONG 1 -/* Define to 1 if you have the malloc.h header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1 -/* Define to 1 if you have the memory.h header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -#define HAVE_MSG_NOSIGNAL 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MSWSOCK_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETDB_H 1 @@ -206,64 +193,88 @@ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_TCP_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETIOAPI_H */ + /* Define to 1 if you have the header file. */ #define HAVE_NET_IF_H 1 -/* Define to 1 if you have PF_INET6. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTDEF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTSTATUS_H */ + +/* Define to 1 if you have PF_INET6 */ #define HAVE_PF_INET6 1 -/* Define to 1 if you have the recv function. */ +/* Define to 1 if you have `pipe` */ +#define HAVE_PIPE 1 + +/* Define to 1 if you have `pipe2` */ +#define HAVE_PIPE2 1 + +/* Define to 1 if you have `poll` */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PTHREAD_NP_H */ + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have `recv` */ #define HAVE_RECV 1 -/* Define to 1 if you have the recvfrom function. */ +/* Define to 1 if you have `recvfrom` */ #define HAVE_RECVFROM 1 -/* Define to 1 if you have the send function. */ +/* Define to 1 if you have `send` */ #define HAVE_SEND 1 -/* Define to 1 if you have the setsockopt function. */ +/* Define to 1 if you have `setsockopt` */ #define HAVE_SETSOCKOPT 1 -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* setsockopt() with SO_NONBLOCK support */ /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the socket function. */ +/* Define to 1 if you have `socket` */ #define HAVE_SOCKET 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SOCKET_H */ +/* socklen_t */ +#define HAVE_SOCKLEN_T /**/ + +/* Define to 1 if you have `stat` */ +#define HAVE_STAT 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 -/* Define to 1 if you have the strcasecmp function. */ +/* Define to 1 if you have `strcasecmp` */ #define HAVE_STRCASECMP 1 -/* Define to 1 if you have the strcmpi function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the strdup function. */ +/* Define to 1 if you have `strdup` */ #define HAVE_STRDUP 1 -/* Define to 1 if you have the stricmp function. */ +/* Define to 1 if you have `stricmp` */ /* #undef HAVE_STRICMP */ /* Define to 1 if you have the header file. */ @@ -272,39 +283,54 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the strncasecmp function. */ +/* Define to 1 if you have `strncasecmp` */ #define HAVE_STRNCASECMP 1 -/* Define to 1 if you have the strncmpi function. */ +/* Define to 1 if you have `strncmpi` */ /* #undef HAVE_STRNCMPI */ -/* Define to 1 if you have the strnicmp function. */ +/* Define to 1 if you have `strnicmp` */ /* #undef HAVE_STRNICMP */ -/* Define to 1 if you have the header file. */ -#define HAVE_STROPTS_H 1 - -/* Define to 1 if you have struct addrinfo. */ +/* Define to 1 if the system has the type `struct addrinfo'. */ #define HAVE_STRUCT_ADDRINFO 1 -/* Define to 1 if you have struct in6_addr. */ +/* Define to 1 if `ai_flags' is a member of `struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO_AI_FLAGS 1 + +/* Define to 1 if the system has the type `struct in6_addr'. */ #define HAVE_STRUCT_IN6_ADDR 1 -/* Define to 1 if you have struct sockaddr_in6. */ +/* Define to 1 if the system has the type `struct sockaddr_in6'. */ #define HAVE_STRUCT_SOCKADDR_IN6 1 -/* if struct sockaddr_storage is defined */ +/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */ +#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE 1 -/* Define to 1 if you have the timeval struct. */ +/* Define to 1 if the system has the type `struct timeval'. */ #define HAVE_STRUCT_TIMEVAL 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_EPOLL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_EVENT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_FILIO_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RANDOM_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 @@ -329,50 +355,50 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define to 1 if you have the windows.h header file. */ +/* Whether user namespaces are available */ +#define HAVE_USER_NAMESPACE 1 + +/* Whether UTS namespaces are available */ +#define HAVE_UTS_NAMESPACE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the winsock2.h header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINSOCK2_H */ -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINTERNL_H */ -/* Define to 1 if you have the writev function. */ +/* Define to 1 if you have `writev` */ #define HAVE_WRITEV 1 -/* Define to 1 if you have the ws2tcpip.h header file. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2IPDEF_H */ + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WS2TCPIP_H */ +/* Define to 1 if you have `__system_property_get` */ +/* #undef HAVE___SYSTEM_PROPERTY_GET */ + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if you need the memory.h header file even with stdlib.h */ -/* #undef NEED_MEMORY_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -/* #undef NEED_THREAD_SAFE */ - -/* cpu-machine-OS */ -#define OS "x86_64-pc-linux-gnu" - /* Name of package */ #define PACKAGE "c-ares" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares" +#define PACKAGE_BUGREPORT "c-ares mailing list: http://lists.haxx.se/listinfo/c-ares" /* Define to the full name of this package. */ #define PACKAGE_NAME "c-ares" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "c-ares 1.13.0" +#define PACKAGE_STRING "c-ares 1.26.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "c-ares" @@ -381,128 +407,167 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.13.0" - -/* a suitable file/device to read random data from */ -#define CARES_RANDOM_FILE "/dev/urandom" +#define PACKAGE_VERSION "1.26.0" -/* Define to the type qualifier pointed by arg 5 for recvfrom. */ -#define RECVFROM_QUAL_ARG5 +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int +/* recvfrom() arg5 qualifier */ +#define RECVFROM_QUAL_ARG5 -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void +/* recvfrom() arg1 type */ +#define RECVFROM_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID 1 +/* recvfrom() arg2 type */ +#define RECVFROM_TYPE_ARG2 void * -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 size_t +/* recvfrom() arg3 type */ +#define RECVFROM_TYPE_ARG3 size_t -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int +/* recvfrom() arg4 type */ +#define RECVFROM_TYPE_ARG4 int -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr +/* recvfrom() arg5 type */ +#define RECVFROM_TYPE_ARG5 struct sockaddr * -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ +/* recvfrom() return value */ +#define RECVFROM_TYPE_RETV ssize_t -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 socklen_t +/* recv() arg1 type */ +#define RECV_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ +/* recv() arg2 type */ +#define RECV_TYPE_ARG2 void * -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV ssize_t +/* recv() arg3 type */ +#define RECV_TYPE_ARG3 size_t -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int +/* recv() arg4 type */ +#define RECV_TYPE_ARG4 int -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * +/* recv() return value */ +#define RECV_TYPE_RETV ssize_t -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t +/* send() arg2 qualifier */ +#define SEND_QUAL_ARG2 -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int +/* send() arg1 type */ +#define SEND_TYPE_ARG1 int -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV ssize_t +/* send() arg2 type */ +#define SEND_TYPE_ARG2 void * -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void +/* send() arg3 type */ +#define SEND_TYPE_ARG3 size_t -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const +/* send() arg4 type */ +#define SEND_TYPE_ARG4 int -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int +/* send() return value */ +#define SEND_TYPE_RETV ssize_t -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV ssize_t - -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* Version number of package */ -#define VERSION "1.13.0" - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if OS is AIX. */ +/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ +# define _ALL_SOURCE 1 #endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ #endif + +/* Version number of package */ +#define VERSION "1.26.0" + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ - /* Define to `unsigned int' if does not define. */ -/* #undef size_t */ +/* #undef size_t */ \ No newline at end of file diff --git a/deps/cares/config/netbsd/ares_config.h b/deps/cares/config/netbsd/ares_config.h index fe157318a8ea87..4efcd2d1a5ddc0 100644 --- a/deps/cares/config/netbsd/ares_config.h +++ b/deps/cares/config/netbsd/ares_config.h @@ -1,60 +1,51 @@ -/* ares_config.h. Generated from ares_config.h.in by configure. */ -/* ares_config.h.in. Generated from configure.ac by autoheader. */ +/* src/lib/ares_config.h. Generated from ares_config.h.in by configure. */ +/* src/lib/ares_config.h.in. Generated from configure.ac by autoheader. */ -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* define this if ares is built for a big endian system */ -/* #undef ARES_BIG_ENDIAN */ - -/* when building as static part of libcurl */ -/* #undef BUILDING_LIBCURL */ +/* a suitable file/device to read random data from */ +#define CARES_RANDOM_FILE "/dev/urandom" -/* Defined for build that exposes internal static functions for testing. */ -/* #undef CARES_EXPOSE_STATICS */ +/* Set to 1 if non-pubilc shared library symbols are hidden */ +#define CARES_SYMBOL_HIDING 1 -/* Defined for build with symbol hiding. */ -/* #undef CARES_SYMBOL_HIDING */ +/* Threading enabled */ +#define CARES_THREADS 1 /* the signed version of size_t */ #define CARES_TYPEOF_ARES_SSIZE_T ssize_t -/* Definition to make a library symbol externally visible. */ -/* #undef CARES_SYMBOL_SCOPE_EXTERN */ - /* Use resolver library to configure cares */ /* #undef CARES_USE_LIBRESOLV */ /* if a /etc/inet dir is being used */ /* #undef ETC_INET */ -/* Define to the type of arg 2 for gethostname. */ -#define GETHOSTNAME_TYPE_ARG2 size_t - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const +/* gethostname() arg2 type */ +#define GETHOSTNAME_TYPE_ARG2 size_t -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * +/* getnameinfo() arg1 type */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t +/* getnameinfo() arg2 type */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 size_t +/* getnameinfo() arg4 and 6 type */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int +/* getnameinfo() arg7 type */ +#define GETNAMEINFO_TYPE_ARG7 int -/* Specifies the number of arguments to getservbyport_r */ -#define GETSERVBYPORT_R_ARGS 4 +/* number of arguments for getservbyname_r() */ +/* #undef GETSERVBYNAME_R_ARGS */ -/* Specifies the size of the buffer to pass to getservbyport_r */ -#define GETSERVBYPORT_R_BUFSIZE sizeof(struct servent_data) +/* number of arguments for getservbyport_r() */ +#define GETSERVBYPORT_R_ARGS 4 -/* Define to 1 if you have AF_INET6. */ +/* Define to 1 if you have AF_INET6 */ #define HAVE_AF_INET6 1 +/* Define to 1 if you have `arc4random_buf` */ +#define HAVE_ARC4RANDOM_BUF 1 + /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 @@ -67,135 +58,131 @@ /* Define to 1 if you have the header file. */ #define HAVE_ASSERT_H 1 -/* Define to 1 if you have the `bitncmp' function. */ -/* #undef HAVE_BITNCMP */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AVAILABILITYMACROS_H */ -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 +/* Define to 1 if you have `clock_gettime` */ +#define HAVE_CLOCK_GETTIME 1 -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -#define HAVE_CLOCK_GETTIME_MONOTONIC 1 +/* clock_gettime() with CLOCK_MONOTONIC support */ +#define HAVE_CLOCK_GETTIME_MONOTONIC 1 -/* Define to 1 if you have the closesocket function. */ +/* Define to 1 if you have `closesocket` */ /* #undef HAVE_CLOSESOCKET */ -/* Define to 1 if you have the CloseSocket camel case function. */ +/* Define to 1 if you have `CloseSocket` */ /* #undef HAVE_CLOSESOCKET_CAMEL */ -/* Define to 1 if you have the connect function. */ +/* Define to 1 if you have `connect` */ #define HAVE_CONNECT 1 -/* define if the compiler supports basic C++11 syntax */ -#define HAVE_CXX11 1 +/* Define to 1 if you have `ConvertInterfaceIndexToLuid` */ +/* #undef HAVE_CONVERTINTERFACEINDEXTOLUID */ + +/* Define to 1 if you have `ConvertInterfaceLuidToNameA` */ +/* #undef HAVE_CONVERTINTERFACELUIDTONAMEA */ + +/* define if the compiler supports basic C++14 syntax */ +#define HAVE_CXX14 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 +/* Define to 1 if you have `epoll_{create1,ctl,wait}` */ +/* #undef HAVE_EPOLL */ + /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 -/* Define to 1 if you have the fcntl function. */ +/* Define to 1 if you have `fcntl` */ #define HAVE_FCNTL 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 +/* fcntl() with O_NONBLOCK support */ +#define HAVE_FCNTL_O_NONBLOCK 1 -/* Define to 1 if the getaddrinfo function is threadsafe. */ -/* #undef HAVE_GETADDRINFO_THREADSAFE */ - -/* Define to 1 if you have the getenv function. */ +/* Define to 1 if you have `getenv` */ #define HAVE_GETENV 1 -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostname function. */ +/* Define to 1 if you have `gethostname` */ #define HAVE_GETHOSTNAME 1 -/* Define to 1 if you have the getifaddrs function. */ +/* Define to 1 if you have `getifaddrs` */ #define HAVE_GETIFADDRS 1 -/* Define to 1 if you have the getnameinfo function. */ +/* Define to 1 if you have `getnameinfo` */ #define HAVE_GETNAMEINFO 1 -/* Define to 1 if you have the getservbyport_r function. */ +/* Define to 1 if you have `getrandom` */ +/* #undef HAVE_GETRANDOM */ + +/* Define to 1 if you have `getservbyport_r` */ #define HAVE_GETSERVBYPORT_R 1 -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have `gettimeofday` */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the header file. */ #define HAVE_IFADDRS_H 1 -/* Define to 1 if you have the `if_indextoname' function. */ +/* Define to 1 if you have `if_indextoname` */ #define HAVE_IF_INDEXTONAME 1 -/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ +/* Define to 1 if you have `if_nametoindex` */ +#define HAVE_IF_NAMETOINDEX 1 + +/* Define to 1 if you have `inet_net_pton` */ #define HAVE_INET_NET_PTON 1 -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +/* Define to 1 if you have `inet_ntop` */ #define HAVE_INET_NTOP 1 -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +/* Define to 1 if you have `inet_pton` */ #define HAVE_INET_PTON 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define to 1 if you have the ioctl function. */ +/* Define to 1 if you have `ioctl` */ #define HAVE_IOCTL 1 -/* Define to 1 if you have the ioctlsocket function. */ +/* Define to 1 if you have `ioctlsocket` */ /* #undef HAVE_IOCTLSOCKET */ -/* Define to 1 if you have the IoctlSocket camel case function. */ +/* Define to 1 if you have `IoctlSocket` */ /* #undef HAVE_IOCTLSOCKET_CAMEL */ -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* ioctlsocket() with FIONBIO support */ /* #undef HAVE_IOCTLSOCKET_FIONBIO */ -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 +/* ioctl() with FIONBIO support */ +#define HAVE_IOCTL_FIONBIO 1 -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IPHLPAPI_H */ -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ +/* Define to 1 if you have `kqueue` */ +#define HAVE_KQUEUE 1 /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 -/* if your compiler supports LL */ -#define HAVE_LL 1 - /* Define to 1 if the compiler supports the 'long long' data type. */ #define HAVE_LONGLONG 1 -/* Define to 1 if you have the malloc.h header file. */ -#define HAVE_MALLOC_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_H */ -/* Define to 1 if you have the memory.h header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -/* #undef HAVE_MSG_NOSIGNAL */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MSWSOCK_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETDB_H 1 @@ -206,64 +193,88 @@ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_TCP_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETIOAPI_H */ + /* Define to 1 if you have the header file. */ #define HAVE_NET_IF_H 1 -/* Define to 1 if you have PF_INET6. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTDEF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTSTATUS_H */ + +/* Define to 1 if you have PF_INET6 */ #define HAVE_PF_INET6 1 -/* Define to 1 if you have the recv function. */ +/* Define to 1 if you have `pipe` */ +#define HAVE_PIPE 1 + +/* Define to 1 if you have `pipe2` */ +#define HAVE_PIPE2 1 + +/* Define to 1 if you have `poll` */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_NP_H 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have `recv` */ #define HAVE_RECV 1 -/* Define to 1 if you have the recvfrom function. */ +/* Define to 1 if you have `recvfrom` */ #define HAVE_RECVFROM 1 -/* Define to 1 if you have the send function. */ +/* Define to 1 if you have `send` */ #define HAVE_SEND 1 -/* Define to 1 if you have the setsockopt function. */ +/* Define to 1 if you have `setsockopt` */ #define HAVE_SETSOCKOPT 1 -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* setsockopt() with SO_NONBLOCK support */ /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the socket function. */ +/* Define to 1 if you have `socket` */ #define HAVE_SOCKET 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SOCKET_H */ +/* socklen_t */ +#define HAVE_SOCKLEN_T /**/ + +/* Define to 1 if you have `stat` */ +#define HAVE_STAT 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 -/* Define to 1 if you have the strcasecmp function. */ +/* Define to 1 if you have `strcasecmp` */ #define HAVE_STRCASECMP 1 -/* Define to 1 if you have the strcmpi function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the strdup function. */ +/* Define to 1 if you have `strdup` */ #define HAVE_STRDUP 1 -/* Define to 1 if you have the stricmp function. */ +/* Define to 1 if you have `stricmp` */ /* #undef HAVE_STRICMP */ /* Define to 1 if you have the header file. */ @@ -272,39 +283,54 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the strncasecmp function. */ +/* Define to 1 if you have `strncasecmp` */ #define HAVE_STRNCASECMP 1 -/* Define to 1 if you have the strncmpi function. */ +/* Define to 1 if you have `strncmpi` */ /* #undef HAVE_STRNCMPI */ -/* Define to 1 if you have the strnicmp function. */ +/* Define to 1 if you have `strnicmp` */ /* #undef HAVE_STRNICMP */ -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STROPTS_H */ - -/* Define to 1 if you have struct addrinfo. */ +/* Define to 1 if the system has the type 'struct addrinfo'. */ #define HAVE_STRUCT_ADDRINFO 1 -/* Define to 1 if you have struct in6_addr. */ +/* Define to 1 if 'ai_flags' is a member of 'struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO_AI_FLAGS 1 + +/* Define to 1 if the system has the type 'struct in6_addr'. */ #define HAVE_STRUCT_IN6_ADDR 1 -/* Define to 1 if you have struct sockaddr_in6. */ +/* Define to 1 if the system has the type 'struct sockaddr_in6'. */ #define HAVE_STRUCT_SOCKADDR_IN6 1 -/* if struct sockaddr_storage is defined */ +/* Define to 1 if 'sin6_scope_id' is a member of 'struct sockaddr_in6'. */ +#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 + +/* Define to 1 if the system has the type 'struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE 1 -/* Define to 1 if you have the timeval struct. */ +/* Define to 1 if the system has the type 'struct timeval'. */ #define HAVE_STRUCT_TIMEVAL 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_EPOLL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_EVENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_RANDOM_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 @@ -329,50 +355,50 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define to 1 if you have the windows.h header file. */ +/* Whether user namespaces are available */ +/* #undef HAVE_USER_NAMESPACE */ + +/* Whether UTS namespaces are available */ +/* #undef HAVE_UTS_NAMESPACE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the winsock2.h header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINSOCK2_H */ -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINTERNL_H */ -/* Define to 1 if you have the writev function. */ +/* Define to 1 if you have `writev` */ #define HAVE_WRITEV 1 -/* Define to 1 if you have the ws2tcpip.h header file. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2IPDEF_H */ + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WS2TCPIP_H */ +/* Define to 1 if you have `__system_property_get` */ +/* #undef HAVE___SYSTEM_PROPERTY_GET */ + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if you need the memory.h header file even with stdlib.h */ -/* #undef NEED_MEMORY_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -/* #undef NEED_THREAD_SAFE */ - -/* cpu-machine-OS */ -#define OS "x86_64-unknown-freebsd10.3" - /* Name of package */ #define PACKAGE "c-ares" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares" +#define PACKAGE_BUGREPORT "c-ares mailing list: http://lists.haxx.se/listinfo/c-ares" /* Define to the full name of this package. */ #define PACKAGE_NAME "c-ares" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "c-ares 1.13.0" +#define PACKAGE_STRING "c-ares 1.26.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "c-ares" @@ -381,131 +407,177 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.13.0" - -/* a suitable file/device to read random data from */ -#define CARES_RANDOM_FILE "/dev/urandom" +#define PACKAGE_VERSION "1.26.0" -/* Define to the type qualifier pointed by arg 5 for recvfrom. */ -#define RECVFROM_QUAL_ARG5 +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int +/* recvfrom() arg5 qualifier */ +#define RECVFROM_QUAL_ARG5 -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void +/* recvfrom() arg1 type */ +#define RECVFROM_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID 1 +/* recvfrom() arg2 type */ +#define RECVFROM_TYPE_ARG2 void * -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 size_t +/* recvfrom() arg3 type */ +#define RECVFROM_TYPE_ARG3 size_t -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int +/* recvfrom() arg4 type */ +#define RECVFROM_TYPE_ARG4 int -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr +/* recvfrom() arg5 type */ +#define RECVFROM_TYPE_ARG5 struct sockaddr * -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ +/* recvfrom() return value */ +#define RECVFROM_TYPE_RETV ssize_t -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 socklen_t +/* recv() arg1 type */ +#define RECV_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ +/* recv() arg2 type */ +#define RECV_TYPE_ARG2 void * -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV ssize_t +/* recv() arg3 type */ +#define RECV_TYPE_ARG3 size_t -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int +/* recv() arg4 type */ +#define RECV_TYPE_ARG4 int -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * +/* recv() return value */ +#define RECV_TYPE_RETV ssize_t -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t +/* send() arg2 qualifier */ +#define SEND_QUAL_ARG2 -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int +/* send() arg1 type */ +#define SEND_TYPE_ARG1 int -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV ssize_t +/* send() arg2 type */ +#define SEND_TYPE_ARG2 void * -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void +/* send() arg3 type */ +#define SEND_TYPE_ARG3 size_t -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const +/* send() arg4 type */ +#define SEND_TYPE_ARG4 int -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int +/* send() return value */ +#define SEND_TYPE_RETV ssize_t -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV ssize_t - -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* Version number of package */ -#define VERSION "1.13.0" - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if OS is AIX. */ +/* Enable extensions on AIX, Interix, z/OS. */ #ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ +# define _ALL_SOURCE 1 #endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# define __STDC_WANT_IEC_60559_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ #endif + +/* Version number of package */ +#define VERSION "1.26.0" + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ -/* Define for large files, on AIX-style hosts. */ +/* Define to 1 on platforms where this makes off_t a 64-bit type. */ /* #undef _LARGE_FILES */ -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ +/* Number of bits in time_t, on hosts where this is settable. */ +/* #undef _TIME_BITS */ -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ +/* Define to 1 on platforms where this makes time_t a 64-bit type. */ +/* #undef __MINGW_USE_VC2005_COMPAT */ -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ +/* Define as 'unsigned int' if doesn't define. */ +/* #undef size_t */ \ No newline at end of file diff --git a/deps/cares/config/openbsd/ares_config.h b/deps/cares/config/openbsd/ares_config.h index fe157318a8ea87..4efcd2d1a5ddc0 100644 --- a/deps/cares/config/openbsd/ares_config.h +++ b/deps/cares/config/openbsd/ares_config.h @@ -1,60 +1,51 @@ -/* ares_config.h. Generated from ares_config.h.in by configure. */ -/* ares_config.h.in. Generated from configure.ac by autoheader. */ +/* src/lib/ares_config.h. Generated from ares_config.h.in by configure. */ +/* src/lib/ares_config.h.in. Generated from configure.ac by autoheader. */ -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* define this if ares is built for a big endian system */ -/* #undef ARES_BIG_ENDIAN */ - -/* when building as static part of libcurl */ -/* #undef BUILDING_LIBCURL */ +/* a suitable file/device to read random data from */ +#define CARES_RANDOM_FILE "/dev/urandom" -/* Defined for build that exposes internal static functions for testing. */ -/* #undef CARES_EXPOSE_STATICS */ +/* Set to 1 if non-pubilc shared library symbols are hidden */ +#define CARES_SYMBOL_HIDING 1 -/* Defined for build with symbol hiding. */ -/* #undef CARES_SYMBOL_HIDING */ +/* Threading enabled */ +#define CARES_THREADS 1 /* the signed version of size_t */ #define CARES_TYPEOF_ARES_SSIZE_T ssize_t -/* Definition to make a library symbol externally visible. */ -/* #undef CARES_SYMBOL_SCOPE_EXTERN */ - /* Use resolver library to configure cares */ /* #undef CARES_USE_LIBRESOLV */ /* if a /etc/inet dir is being used */ /* #undef ETC_INET */ -/* Define to the type of arg 2 for gethostname. */ -#define GETHOSTNAME_TYPE_ARG2 size_t - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const +/* gethostname() arg2 type */ +#define GETHOSTNAME_TYPE_ARG2 size_t -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * +/* getnameinfo() arg1 type */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t +/* getnameinfo() arg2 type */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 size_t +/* getnameinfo() arg4 and 6 type */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int +/* getnameinfo() arg7 type */ +#define GETNAMEINFO_TYPE_ARG7 int -/* Specifies the number of arguments to getservbyport_r */ -#define GETSERVBYPORT_R_ARGS 4 +/* number of arguments for getservbyname_r() */ +/* #undef GETSERVBYNAME_R_ARGS */ -/* Specifies the size of the buffer to pass to getservbyport_r */ -#define GETSERVBYPORT_R_BUFSIZE sizeof(struct servent_data) +/* number of arguments for getservbyport_r() */ +#define GETSERVBYPORT_R_ARGS 4 -/* Define to 1 if you have AF_INET6. */ +/* Define to 1 if you have AF_INET6 */ #define HAVE_AF_INET6 1 +/* Define to 1 if you have `arc4random_buf` */ +#define HAVE_ARC4RANDOM_BUF 1 + /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 @@ -67,135 +58,131 @@ /* Define to 1 if you have the header file. */ #define HAVE_ASSERT_H 1 -/* Define to 1 if you have the `bitncmp' function. */ -/* #undef HAVE_BITNCMP */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AVAILABILITYMACROS_H */ -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 +/* Define to 1 if you have `clock_gettime` */ +#define HAVE_CLOCK_GETTIME 1 -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -#define HAVE_CLOCK_GETTIME_MONOTONIC 1 +/* clock_gettime() with CLOCK_MONOTONIC support */ +#define HAVE_CLOCK_GETTIME_MONOTONIC 1 -/* Define to 1 if you have the closesocket function. */ +/* Define to 1 if you have `closesocket` */ /* #undef HAVE_CLOSESOCKET */ -/* Define to 1 if you have the CloseSocket camel case function. */ +/* Define to 1 if you have `CloseSocket` */ /* #undef HAVE_CLOSESOCKET_CAMEL */ -/* Define to 1 if you have the connect function. */ +/* Define to 1 if you have `connect` */ #define HAVE_CONNECT 1 -/* define if the compiler supports basic C++11 syntax */ -#define HAVE_CXX11 1 +/* Define to 1 if you have `ConvertInterfaceIndexToLuid` */ +/* #undef HAVE_CONVERTINTERFACEINDEXTOLUID */ + +/* Define to 1 if you have `ConvertInterfaceLuidToNameA` */ +/* #undef HAVE_CONVERTINTERFACELUIDTONAMEA */ + +/* define if the compiler supports basic C++14 syntax */ +#define HAVE_CXX14 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 +/* Define to 1 if you have `epoll_{create1,ctl,wait}` */ +/* #undef HAVE_EPOLL */ + /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 -/* Define to 1 if you have the fcntl function. */ +/* Define to 1 if you have `fcntl` */ #define HAVE_FCNTL 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 +/* fcntl() with O_NONBLOCK support */ +#define HAVE_FCNTL_O_NONBLOCK 1 -/* Define to 1 if the getaddrinfo function is threadsafe. */ -/* #undef HAVE_GETADDRINFO_THREADSAFE */ - -/* Define to 1 if you have the getenv function. */ +/* Define to 1 if you have `getenv` */ #define HAVE_GETENV 1 -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostname function. */ +/* Define to 1 if you have `gethostname` */ #define HAVE_GETHOSTNAME 1 -/* Define to 1 if you have the getifaddrs function. */ +/* Define to 1 if you have `getifaddrs` */ #define HAVE_GETIFADDRS 1 -/* Define to 1 if you have the getnameinfo function. */ +/* Define to 1 if you have `getnameinfo` */ #define HAVE_GETNAMEINFO 1 -/* Define to 1 if you have the getservbyport_r function. */ +/* Define to 1 if you have `getrandom` */ +/* #undef HAVE_GETRANDOM */ + +/* Define to 1 if you have `getservbyport_r` */ #define HAVE_GETSERVBYPORT_R 1 -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have `gettimeofday` */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the header file. */ #define HAVE_IFADDRS_H 1 -/* Define to 1 if you have the `if_indextoname' function. */ +/* Define to 1 if you have `if_indextoname` */ #define HAVE_IF_INDEXTONAME 1 -/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ +/* Define to 1 if you have `if_nametoindex` */ +#define HAVE_IF_NAMETOINDEX 1 + +/* Define to 1 if you have `inet_net_pton` */ #define HAVE_INET_NET_PTON 1 -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +/* Define to 1 if you have `inet_ntop` */ #define HAVE_INET_NTOP 1 -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +/* Define to 1 if you have `inet_pton` */ #define HAVE_INET_PTON 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define to 1 if you have the ioctl function. */ +/* Define to 1 if you have `ioctl` */ #define HAVE_IOCTL 1 -/* Define to 1 if you have the ioctlsocket function. */ +/* Define to 1 if you have `ioctlsocket` */ /* #undef HAVE_IOCTLSOCKET */ -/* Define to 1 if you have the IoctlSocket camel case function. */ +/* Define to 1 if you have `IoctlSocket` */ /* #undef HAVE_IOCTLSOCKET_CAMEL */ -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* ioctlsocket() with FIONBIO support */ /* #undef HAVE_IOCTLSOCKET_FIONBIO */ -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 +/* ioctl() with FIONBIO support */ +#define HAVE_IOCTL_FIONBIO 1 -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IPHLPAPI_H */ -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ +/* Define to 1 if you have `kqueue` */ +#define HAVE_KQUEUE 1 /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 -/* if your compiler supports LL */ -#define HAVE_LL 1 - /* Define to 1 if the compiler supports the 'long long' data type. */ #define HAVE_LONGLONG 1 -/* Define to 1 if you have the malloc.h header file. */ -#define HAVE_MALLOC_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_H */ -/* Define to 1 if you have the memory.h header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -/* #undef HAVE_MSG_NOSIGNAL */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MSWSOCK_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETDB_H 1 @@ -206,64 +193,88 @@ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_TCP_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETIOAPI_H */ + /* Define to 1 if you have the header file. */ #define HAVE_NET_IF_H 1 -/* Define to 1 if you have PF_INET6. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTDEF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTSTATUS_H */ + +/* Define to 1 if you have PF_INET6 */ #define HAVE_PF_INET6 1 -/* Define to 1 if you have the recv function. */ +/* Define to 1 if you have `pipe` */ +#define HAVE_PIPE 1 + +/* Define to 1 if you have `pipe2` */ +#define HAVE_PIPE2 1 + +/* Define to 1 if you have `poll` */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_NP_H 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have `recv` */ #define HAVE_RECV 1 -/* Define to 1 if you have the recvfrom function. */ +/* Define to 1 if you have `recvfrom` */ #define HAVE_RECVFROM 1 -/* Define to 1 if you have the send function. */ +/* Define to 1 if you have `send` */ #define HAVE_SEND 1 -/* Define to 1 if you have the setsockopt function. */ +/* Define to 1 if you have `setsockopt` */ #define HAVE_SETSOCKOPT 1 -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* setsockopt() with SO_NONBLOCK support */ /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the socket function. */ +/* Define to 1 if you have `socket` */ #define HAVE_SOCKET 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SOCKET_H */ +/* socklen_t */ +#define HAVE_SOCKLEN_T /**/ + +/* Define to 1 if you have `stat` */ +#define HAVE_STAT 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 -/* Define to 1 if you have the strcasecmp function. */ +/* Define to 1 if you have `strcasecmp` */ #define HAVE_STRCASECMP 1 -/* Define to 1 if you have the strcmpi function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the strdup function. */ +/* Define to 1 if you have `strdup` */ #define HAVE_STRDUP 1 -/* Define to 1 if you have the stricmp function. */ +/* Define to 1 if you have `stricmp` */ /* #undef HAVE_STRICMP */ /* Define to 1 if you have the header file. */ @@ -272,39 +283,54 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the strncasecmp function. */ +/* Define to 1 if you have `strncasecmp` */ #define HAVE_STRNCASECMP 1 -/* Define to 1 if you have the strncmpi function. */ +/* Define to 1 if you have `strncmpi` */ /* #undef HAVE_STRNCMPI */ -/* Define to 1 if you have the strnicmp function. */ +/* Define to 1 if you have `strnicmp` */ /* #undef HAVE_STRNICMP */ -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STROPTS_H */ - -/* Define to 1 if you have struct addrinfo. */ +/* Define to 1 if the system has the type 'struct addrinfo'. */ #define HAVE_STRUCT_ADDRINFO 1 -/* Define to 1 if you have struct in6_addr. */ +/* Define to 1 if 'ai_flags' is a member of 'struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO_AI_FLAGS 1 + +/* Define to 1 if the system has the type 'struct in6_addr'. */ #define HAVE_STRUCT_IN6_ADDR 1 -/* Define to 1 if you have struct sockaddr_in6. */ +/* Define to 1 if the system has the type 'struct sockaddr_in6'. */ #define HAVE_STRUCT_SOCKADDR_IN6 1 -/* if struct sockaddr_storage is defined */ +/* Define to 1 if 'sin6_scope_id' is a member of 'struct sockaddr_in6'. */ +#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 + +/* Define to 1 if the system has the type 'struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE 1 -/* Define to 1 if you have the timeval struct. */ +/* Define to 1 if the system has the type 'struct timeval'. */ #define HAVE_STRUCT_TIMEVAL 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_EPOLL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_EVENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_RANDOM_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 @@ -329,50 +355,50 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define to 1 if you have the windows.h header file. */ +/* Whether user namespaces are available */ +/* #undef HAVE_USER_NAMESPACE */ + +/* Whether UTS namespaces are available */ +/* #undef HAVE_UTS_NAMESPACE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the winsock2.h header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINSOCK2_H */ -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINTERNL_H */ -/* Define to 1 if you have the writev function. */ +/* Define to 1 if you have `writev` */ #define HAVE_WRITEV 1 -/* Define to 1 if you have the ws2tcpip.h header file. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2IPDEF_H */ + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WS2TCPIP_H */ +/* Define to 1 if you have `__system_property_get` */ +/* #undef HAVE___SYSTEM_PROPERTY_GET */ + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if you need the memory.h header file even with stdlib.h */ -/* #undef NEED_MEMORY_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -/* #undef NEED_THREAD_SAFE */ - -/* cpu-machine-OS */ -#define OS "x86_64-unknown-freebsd10.3" - /* Name of package */ #define PACKAGE "c-ares" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares" +#define PACKAGE_BUGREPORT "c-ares mailing list: http://lists.haxx.se/listinfo/c-ares" /* Define to the full name of this package. */ #define PACKAGE_NAME "c-ares" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "c-ares 1.13.0" +#define PACKAGE_STRING "c-ares 1.26.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "c-ares" @@ -381,131 +407,177 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.13.0" - -/* a suitable file/device to read random data from */ -#define CARES_RANDOM_FILE "/dev/urandom" +#define PACKAGE_VERSION "1.26.0" -/* Define to the type qualifier pointed by arg 5 for recvfrom. */ -#define RECVFROM_QUAL_ARG5 +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int +/* recvfrom() arg5 qualifier */ +#define RECVFROM_QUAL_ARG5 -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void +/* recvfrom() arg1 type */ +#define RECVFROM_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID 1 +/* recvfrom() arg2 type */ +#define RECVFROM_TYPE_ARG2 void * -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 size_t +/* recvfrom() arg3 type */ +#define RECVFROM_TYPE_ARG3 size_t -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int +/* recvfrom() arg4 type */ +#define RECVFROM_TYPE_ARG4 int -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr +/* recvfrom() arg5 type */ +#define RECVFROM_TYPE_ARG5 struct sockaddr * -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ +/* recvfrom() return value */ +#define RECVFROM_TYPE_RETV ssize_t -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 socklen_t +/* recv() arg1 type */ +#define RECV_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ +/* recv() arg2 type */ +#define RECV_TYPE_ARG2 void * -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV ssize_t +/* recv() arg3 type */ +#define RECV_TYPE_ARG3 size_t -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int +/* recv() arg4 type */ +#define RECV_TYPE_ARG4 int -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * +/* recv() return value */ +#define RECV_TYPE_RETV ssize_t -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t +/* send() arg2 qualifier */ +#define SEND_QUAL_ARG2 -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int +/* send() arg1 type */ +#define SEND_TYPE_ARG1 int -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV ssize_t +/* send() arg2 type */ +#define SEND_TYPE_ARG2 void * -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void +/* send() arg3 type */ +#define SEND_TYPE_ARG3 size_t -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const +/* send() arg4 type */ +#define SEND_TYPE_ARG4 int -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int +/* send() return value */ +#define SEND_TYPE_RETV ssize_t -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV ssize_t - -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* Version number of package */ -#define VERSION "1.13.0" - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if OS is AIX. */ +/* Enable extensions on AIX, Interix, z/OS. */ #ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ +# define _ALL_SOURCE 1 #endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# define __STDC_WANT_IEC_60559_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ #endif + +/* Version number of package */ +#define VERSION "1.26.0" + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ -/* Define for large files, on AIX-style hosts. */ +/* Define to 1 on platforms where this makes off_t a 64-bit type. */ /* #undef _LARGE_FILES */ -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ +/* Number of bits in time_t, on hosts where this is settable. */ +/* #undef _TIME_BITS */ -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ +/* Define to 1 on platforms where this makes time_t a 64-bit type. */ +/* #undef __MINGW_USE_VC2005_COMPAT */ -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ +/* Define as 'unsigned int' if doesn't define. */ +/* #undef size_t */ \ No newline at end of file diff --git a/deps/cares/config/sunos/ares_config.h b/deps/cares/config/sunos/ares_config.h index 2436a44e277d59..861e66a2e2a677 100644 --- a/deps/cares/config/sunos/ares_config.h +++ b/deps/cares/config/sunos/ares_config.h @@ -1,23 +1,14 @@ -/* ares_config.h. Generated from ares_config.h.in by configure. */ -/* ares_config.h.in. Generated from configure.ac by autoheader. */ +/* src/lib/ares_config.h. Generated from ares_config.h.in by configure. */ +/* src/lib/ares_config.h.in. Generated from configure.ac by autoheader. */ -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* define this if ares is built for a big endian system */ -/* #undef ARES_BIG_ENDIAN */ - -/* when building as static part of libcurl */ -/* #undef BUILDING_LIBCURL */ - -/* Defined for build that exposes internal static functions for testing. */ -/* #undef CARES_EXPOSE_STATICS */ +/* a suitable file/device to read random data from */ +#define CARES_RANDOM_FILE "/dev/urandom" -/* Defined for build with symbol hiding. */ -#define CARES_SYMBOL_HIDING 1 +/* Set to 1 if non-pubilc shared library symbols are hidden */ +#define CARES_SYMBOL_HIDING 1 -/* Definition to make a library symbol externally visible. */ -#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default"))) +/* Threading enabled */ +#define CARES_THREADS 1 /* the signed version of size_t */ #define CARES_TYPEOF_ARES_SSIZE_T ssize_t @@ -28,33 +19,33 @@ /* if a /etc/inet dir is being used */ #define ETC_INET 1 -/* Define to the type of arg 2 for gethostname. */ -#define GETHOSTNAME_TYPE_ARG2 int - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const +/* gethostname() arg2 type */ +#define GETHOSTNAME_TYPE_ARG2 size_t -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * +/* getnameinfo() arg1 type */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t +/* getnameinfo() arg2 type */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 size_t +/* getnameinfo() arg4 and 6 type */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int +/* getnameinfo() arg7 type */ +#define GETNAMEINFO_TYPE_ARG7 int -/* Specifies the number of arguments to getservbyport_r */ -#define GETSERVBYPORT_R_ARGS 5 +/* number of arguments for getservbyname_r() */ +/* #undef GETSERVBYNAME_R_ARGS */ -/* Specifies the size of the buffer to pass to getservbyport_r */ -#define GETSERVBYPORT_R_BUFSIZE 4096 +/* number of arguments for getservbyport_r() */ +#define GETSERVBYPORT_R_ARGS 5 -/* Define to 1 if you have AF_INET6. */ +/* Define to 1 if you have AF_INET6 */ #define HAVE_AF_INET6 1 +/* Define to 1 if you have `arc4random_buf` */ +#define HAVE_ARC4RANDOM_BUF 1 + /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 @@ -67,135 +58,131 @@ /* Define to 1 if you have the header file. */ #define HAVE_ASSERT_H 1 -/* Define to 1 if you have the `bitncmp' function. */ -/* #undef HAVE_BITNCMP */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AVAILABILITYMACROS_H */ -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 +/* Define to 1 if you have `clock_gettime` */ +#define HAVE_CLOCK_GETTIME 1 -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -#define HAVE_CLOCK_GETTIME_MONOTONIC 1 +/* clock_gettime() with CLOCK_MONOTONIC support */ +#define HAVE_CLOCK_GETTIME_MONOTONIC 1 -/* Define to 1 if you have the closesocket function. */ +/* Define to 1 if you have `closesocket` */ /* #undef HAVE_CLOSESOCKET */ -/* Define to 1 if you have the CloseSocket camel case function. */ +/* Define to 1 if you have `CloseSocket` */ /* #undef HAVE_CLOSESOCKET_CAMEL */ -/* Define to 1 if you have the connect function. */ +/* Define to 1 if you have `connect` */ #define HAVE_CONNECT 1 -/* define if the compiler supports basic C++11 syntax */ -#define HAVE_CXX11 1 +/* Define to 1 if you have `ConvertInterfaceIndexToLuid` */ +/* #undef HAVE_CONVERTINTERFACEINDEXTOLUID */ + +/* Define to 1 if you have `ConvertInterfaceLuidToNameA` */ +/* #undef HAVE_CONVERTINTERFACELUIDTONAMEA */ + +/* define if the compiler supports basic C++14 syntax */ +#define HAVE_CXX14 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 +/* Define to 1 if you have `epoll_{create1,ctl,wait}` */ +#define HAVE_EPOLL 1 + /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 -/* Define to 1 if you have the fcntl function. */ +/* Define to 1 if you have `fcntl` */ #define HAVE_FCNTL 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 +/* fcntl() with O_NONBLOCK support */ +#define HAVE_FCNTL_O_NONBLOCK 1 -/* Define to 1 if the getaddrinfo function is threadsafe. */ -#define HAVE_GETADDRINFO_THREADSAFE 1 - -/* Define to 1 if you have the getenv function. */ +/* Define to 1 if you have `getenv` */ #define HAVE_GETENV 1 -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostname function. */ +/* Define to 1 if you have `gethostname` */ #define HAVE_GETHOSTNAME 1 -/* Define to 1 if you have the getifaddrs function. */ +/* Define to 1 if you have `getifaddrs` */ #define HAVE_GETIFADDRS 1 -/* Define to 1 if you have the getnameinfo function. */ +/* Define to 1 if you have `getnameinfo` */ #define HAVE_GETNAMEINFO 1 -/* Define to 1 if you have the getservbyport_r function. */ +/* Define to 1 if you have `getrandom` */ +#define HAVE_GETRANDOM 1 + +/* Define to 1 if you have `getservbyport_r` */ #define HAVE_GETSERVBYPORT_R 1 -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have `gettimeofday` */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the header file. */ #define HAVE_IFADDRS_H 1 -/* Define to 1 if you have the `if_indextoname' function. */ +/* Define to 1 if you have `if_indextoname` */ #define HAVE_IF_INDEXTONAME 1 -/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ -/* #undef HAVE_INET_NET_PTON */ +/* Define to 1 if you have `if_nametoindex` */ +#define HAVE_IF_NAMETOINDEX 1 + +/* Define to 1 if you have `inet_net_pton` */ +#define HAVE_INET_NET_PTON 1 -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +/* Define to 1 if you have `inet_ntop` */ #define HAVE_INET_NTOP 1 -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +/* Define to 1 if you have `inet_pton` */ #define HAVE_INET_PTON 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define to 1 if you have the ioctl function. */ +/* Define to 1 if you have `ioctl` */ #define HAVE_IOCTL 1 -/* Define to 1 if you have the ioctlsocket function. */ +/* Define to 1 if you have `ioctlsocket` */ /* #undef HAVE_IOCTLSOCKET */ -/* Define to 1 if you have the IoctlSocket camel case function. */ +/* Define to 1 if you have `IoctlSocket` */ /* #undef HAVE_IOCTLSOCKET_CAMEL */ -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* ioctlsocket() with FIONBIO support */ /* #undef HAVE_IOCTLSOCKET_FIONBIO */ -/* Define to 1 if you have a working ioctl FIONBIO function. */ -/* #undef HAVE_IOCTL_FIONBIO */ +/* ioctl() with FIONBIO support */ +#define HAVE_IOCTL_FIONBIO 1 -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -/* #undef HAVE_IOCTL_SIOCGIFADDR */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IPHLPAPI_H */ -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ +/* Define to 1 if you have `kqueue` */ +/* #undef HAVE_KQUEUE */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 -/* if your compiler supports LL */ -#define HAVE_LL 1 - /* Define to 1 if the compiler supports the 'long long' data type. */ #define HAVE_LONGLONG 1 -/* Define to 1 if you have the malloc.h header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1 -/* Define to 1 if you have the memory.h header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -/* #undef HAVE_MSG_NOSIGNAL */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MSWSOCK_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETDB_H 1 @@ -206,64 +193,88 @@ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_TCP_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETIOAPI_H */ + /* Define to 1 if you have the header file. */ #define HAVE_NET_IF_H 1 -/* Define to 1 if you have PF_INET6. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTDEF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NTSTATUS_H */ + +/* Define to 1 if you have PF_INET6 */ #define HAVE_PF_INET6 1 -/* Define to 1 if you have the recv function. */ +/* Define to 1 if you have `pipe` */ +#define HAVE_PIPE 1 + +/* Define to 1 if you have `pipe2` */ +#define HAVE_PIPE2 1 + +/* Define to 1 if you have `poll` */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PTHREAD_NP_H */ + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have `recv` */ #define HAVE_RECV 1 -/* Define to 1 if you have the recvfrom function. */ +/* Define to 1 if you have `recvfrom` */ #define HAVE_RECVFROM 1 -/* Define to 1 if you have the send function. */ +/* Define to 1 if you have `send` */ #define HAVE_SEND 1 -/* Define to 1 if you have the setsockopt function. */ +/* Define to 1 if you have `setsockopt` */ #define HAVE_SETSOCKOPT 1 -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* setsockopt() with SO_NONBLOCK support */ /* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the socket function. */ +/* Define to 1 if you have `socket` */ #define HAVE_SOCKET 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SOCKET_H */ +/* socklen_t */ +#define HAVE_SOCKLEN_T /**/ + +/* Define to 1 if you have `stat` */ +#define HAVE_STAT 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 -/* Define to 1 if you have the strcasecmp function. */ +/* Define to 1 if you have `strcasecmp` */ #define HAVE_STRCASECMP 1 -/* Define to 1 if you have the strcmpi function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the strdup function. */ +/* Define to 1 if you have `strdup` */ #define HAVE_STRDUP 1 -/* Define to 1 if you have the stricmp function. */ +/* Define to 1 if you have `stricmp` */ /* #undef HAVE_STRICMP */ /* Define to 1 if you have the header file. */ @@ -272,39 +283,54 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the strncasecmp function. */ +/* Define to 1 if you have `strncasecmp` */ #define HAVE_STRNCASECMP 1 -/* Define to 1 if you have the strncmpi function. */ +/* Define to 1 if you have `strncmpi` */ /* #undef HAVE_STRNCMPI */ -/* Define to 1 if you have the strnicmp function. */ +/* Define to 1 if you have `strnicmp` */ /* #undef HAVE_STRNICMP */ -/* Define to 1 if you have the header file. */ -#define HAVE_STROPTS_H 1 - -/* Define to 1 if you have struct addrinfo. */ +/* Define to 1 if the system has the type 'struct addrinfo'. */ #define HAVE_STRUCT_ADDRINFO 1 -/* Define to 1 if you have struct in6_addr. */ +/* Define to 1 if 'ai_flags' is a member of 'struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO_AI_FLAGS 1 + +/* Define to 1 if the system has the type 'struct in6_addr'. */ #define HAVE_STRUCT_IN6_ADDR 1 -/* Define to 1 if you have struct sockaddr_in6. */ +/* Define to 1 if the system has the type 'struct sockaddr_in6'. */ #define HAVE_STRUCT_SOCKADDR_IN6 1 -/* if struct sockaddr_storage is defined */ +/* Define to 1 if 'sin6_scope_id' is a member of 'struct sockaddr_in6'. */ +#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 + +/* Define to 1 if the system has the type 'struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE 1 -/* Define to 1 if you have the timeval struct. */ +/* Define to 1 if the system has the type 'struct timeval'. */ #define HAVE_STRUCT_TIMEVAL 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_EPOLL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_EVENT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RANDOM_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 @@ -329,50 +355,50 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define to 1 if you have the windows.h header file. */ +/* Whether user namespaces are available */ +/* #undef HAVE_USER_NAMESPACE */ + +/* Whether UTS namespaces are available */ +/* #undef HAVE_UTS_NAMESPACE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ -/* Define to 1 if you have the winsock2.h header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_WINSOCK2_H */ -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINTERNL_H */ -/* Define to 1 if you have the writev function. */ +/* Define to 1 if you have `writev` */ #define HAVE_WRITEV 1 -/* Define to 1 if you have the ws2tcpip.h header file. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2IPDEF_H */ + +/* Define to 1 if you have the header file. */ /* #undef HAVE_WS2TCPIP_H */ +/* Define to 1 if you have `__system_property_get` */ +/* #undef HAVE___SYSTEM_PROPERTY_GET */ + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if you need the memory.h header file even with stdlib.h */ -/* #undef NEED_MEMORY_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -#define NEED_REENTRANT 1 - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -/* #undef NEED_THREAD_SAFE */ - -/* cpu-machine-OS */ -#define OS "i386-pc-solaris2.11" - /* Name of package */ #define PACKAGE "c-ares" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares" +#define PACKAGE_BUGREPORT "c-ares mailing list: http://lists.haxx.se/listinfo/c-ares" /* Define to the full name of this package. */ #define PACKAGE_NAME "c-ares" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "c-ares 1.13.0" +#define PACKAGE_STRING "c-ares 1.26.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "c-ares" @@ -381,131 +407,177 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.13.0" - -/* a suitable file/device to read random data from */ -#define CARES_RANDOM_FILE "/dev/urandom" +#define PACKAGE_VERSION "1.26.0" -/* Define to the type qualifier pointed by arg 5 for recvfrom. */ -#define RECVFROM_QUAL_ARG5 +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int +/* recvfrom() arg5 qualifier */ +#define RECVFROM_QUAL_ARG5 -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void +/* recvfrom() arg1 type */ +#define RECVFROM_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID 1 +/* recvfrom() arg2 type */ +#define RECVFROM_TYPE_ARG2 void * -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 size_t +/* recvfrom() arg3 type */ +#define RECVFROM_TYPE_ARG3 size_t -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int +/* recvfrom() arg4 type */ +#define RECVFROM_TYPE_ARG4 int -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr +/* recvfrom() arg5 type */ +#define RECVFROM_TYPE_ARG5 struct sockaddr * -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ +/* recvfrom() return value */ +#define RECVFROM_TYPE_RETV ssize_t -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 void +/* recv() arg1 type */ +#define RECV_TYPE_ARG1 int -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG6_IS_VOID 1 +/* recv() arg2 type */ +#define RECV_TYPE_ARG2 void * -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV int +/* recv() arg3 type */ +#define RECV_TYPE_ARG3 size_t -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int +/* recv() arg4 type */ +#define RECV_TYPE_ARG4 int -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * +/* recv() return value */ +#define RECV_TYPE_RETV ssize_t -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t +/* send() arg2 qualifier */ +#define SEND_QUAL_ARG2 -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int +/* send() arg1 type */ +#define SEND_TYPE_ARG1 int -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV int +/* send() arg2 type */ +#define SEND_TYPE_ARG2 void * -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void +/* send() arg3 type */ +#define SEND_TYPE_ARG3 size_t -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const +/* send() arg4 type */ +#define SEND_TYPE_ARG4 int -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int +/* send() return value */ +#define SEND_TYPE_RETV ssize_t -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV int - -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* Version number of package */ -#define VERSION "1.13.0" - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if OS is AIX. */ +/* Enable extensions on AIX, Interix, z/OS. */ #ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ +# define _ALL_SOURCE 1 #endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# define __STDC_WANT_IEC_60559_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ #endif + +/* Version number of package */ +#define VERSION "1.26.0" + /* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS 64 +/* #undef _FILE_OFFSET_BITS */ -/* Define for large files, on AIX-style hosts. */ +/* Define to 1 on platforms where this makes off_t a 64-bit type. */ /* #undef _LARGE_FILES */ -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ +/* Number of bits in time_t, on hosts where this is settable. */ +/* #undef _TIME_BITS */ -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ +/* Define to 1 on platforms where this makes time_t a 64-bit type. */ +/* #undef __MINGW_USE_VC2005_COMPAT */ -/* Define to `unsigned int' if does not define. */ +/* Define as 'unsigned int' if doesn't define. */ /* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ diff --git a/deps/cares/configure b/deps/cares/configure index 05756e70c70fed..8892c7827e3386 100755 --- a/deps/cares/configure +++ b/deps/cares/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.25.0. +# Generated by GNU Autoconf 2.71 for c-ares 1.26.0. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='c-ares' PACKAGE_TARNAME='c-ares' -PACKAGE_VERSION='1.25.0' -PACKAGE_STRING='c-ares 1.25.0' +PACKAGE_VERSION='1.26.0' +PACKAGE_STRING='c-ares 1.26.0' PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares' PACKAGE_URL='' @@ -664,6 +664,8 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS BUILD_SUBDIRS +AM_CPPFLAGS +AM_CFLAGS BUILD_TESTS_FALSE BUILD_TESTS_TRUE GMOCK_LIBS @@ -1417,7 +1419,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.25.0 to adapt to many kinds of systems. +\`configure' configures c-ares 1.26.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1488,7 +1490,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of c-ares 1.25.0:";; + short | recursive ) echo "Configuration of c-ares 1.26.0:";; esac cat <<\_ACEOF @@ -1624,7 +1626,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -c-ares configure 1.25.0 +c-ares configure 1.26.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2248,7 +2250,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.25.0, which was +It was created by c-ares $as_me 1.26.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3222,7 +3224,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -CARES_VERSION_INFO="12:1:10" +CARES_VERSION_INFO="13:0:11" @@ -5904,7 +5906,7 @@ fi # Define the identity of the package. PACKAGE='c-ares' - VERSION='1.25.0' + VERSION='1.26.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -6265,38 +6267,6 @@ END fi fi -# Check whether --enable-shared was given. -if test ${enable_shared+y} -then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - enable_shared=yes -fi - - - - - - - - - case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -10434,6 +10404,37 @@ test -z "$OBJDUMP" && OBJDUMP=objdump + # Check whether --enable-shared was given. +if test ${enable_shared+y} +then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else $as_nop + enable_shared=yes +fi + + + + + + + + # Check whether --enable-static was given. if test ${enable_static+y} @@ -19032,6 +19033,120 @@ fi printf "%s\n" "$ax_cv_c_compiler_vendor" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this is native windows" >&5 +printf %s "checking whether this is native windows... " >&6; } +ac_cv_native_windows=no +ac_cv_windows=no +case $host_os in + mingw*) + ac_cv_native_windows=yes + ac_cv_windows=yes + ;; + cygwin*) + ac_cv_windows=yes + ;; +esac +if test "$ax_cv_c_compiler_vendor" = "microsoft" ; then + ac_cv_native_windows=yes + ac_cv_windows=yes +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_native_windows" >&5 +printf "%s\n" "$ac_cv_native_windows" >&6; } + + +# Check whether --enable-shared was given. +if test ${enable_shared+y} +then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else $as_nop + enable_shared=yes +fi + + + + + + + +if test "x$ac_cv_windows" = "xyes" +then : + # Check whether --enable-static was given. +if test ${enable_static+y} +then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else $as_nop + enable_static=no +fi + + + + + + +else $as_nop + # Check whether --enable-static was given. +if test ${enable_static+y} +then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else $as_nop + enable_static=yes +fi + + + + + + +fi + # Check whether --enable-warnings was given. if test ${enable_warnings+y} then : @@ -20048,87 +20163,39 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this is native windows" >&5 -printf %s "checking whether this is native windows... " >&6; } -ac_cv_native_windows=no -ac_cv_windows=no -case $host_os in - mingw*) - ac_cv_native_windows=yes - ac_cv_windows=yes - ;; - cygwin*) - ac_cv_windows=yes - ;; -esac -if test "$ax_cv_c_compiler_vendor" = "microsoft" ; then - ac_cv_native_windows=yes - ac_cv_windows=yes -fi if test "$ac_cv_native_windows" = "yes" ; then - CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0602 -DWIN32_LEAN_AND_MEAN" + AM_CPPFLAGS="$AM_CPPFLAGS -D_WIN32_WINNT=0x0602 -DWIN32_LEAN_AND_MEAN" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_native_windows" >&5 -printf "%s\n" "$ac_cv_native_windows" >&6; } - -if test "x$ac_cv_windows" = "xyes" ; then - # Check whether --enable-static was given. -if test ${enable_static+y} -then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - enable_static=no -fi - - - - - +if test "$ac_cv_native_windows" = "yes" -a "x$enable_shared" = "xyes" -a "x$enable_static" = "xyes" ; then + as_fn_error $? "Windows cannot build both static and shared simultaneously, specify --disable-shared or --disable-static" "$LINENO" 5 fi - if test "x$enable_shared" = "xno" -a "x$enable_static" = "xyes" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need CARES_STATICLIB definition" >&5 printf %s "checking whether we need CARES_STATICLIB definition... " >&6; } if test "$ac_cv_native_windows" = "yes" ; then - if test ${CPPFLAGS+y} + if test ${AM_CPPFLAGS+y} then : - case " $CPPFLAGS " in + case " $AM_CPPFLAGS " in *" -DCARES_STATICLIB "*) - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -DCARES_STATICLIB"; } >&5 - (: CPPFLAGS already contains -DCARES_STATICLIB) 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_CPPFLAGS already contains -DCARES_STATICLIB"; } >&5 + (: AM_CPPFLAGS already contains -DCARES_STATICLIB) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; *) - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS -DCARES_STATICLIB\""; } >&5 - (: CPPFLAGS="$CPPFLAGS -DCARES_STATICLIB") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_CPPFLAGS=\"\$AM_CPPFLAGS -DCARES_STATICLIB\""; } >&5 + (: AM_CPPFLAGS="$AM_CPPFLAGS -DCARES_STATICLIB") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - CPPFLAGS="$CPPFLAGS -DCARES_STATICLIB" + AM_CPPFLAGS="$AM_CPPFLAGS -DCARES_STATICLIB" ;; esac else $as_nop - CPPFLAGS="-DCARES_STATICLIB" + AM_CPPFLAGS="-DCARES_STATICLIB" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -20428,27 +20495,27 @@ eval ac_res=\$$as_CACHEVAR printf "%s\n" "$ac_res" >&6; } if test x"`eval 'as_val=${'$as_CACHEVAR'};printf "%s\n" "$as_val"'`" = xyes then : - if test ${CFLAGS+y} + if test ${AM_CFLAGS+y} then : - case " $CFLAGS " in + case " $AM_CFLAGS " in *" $flag "*) - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 - (: CFLAGS already contains $flag) 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS already contains \$flag"; } >&5 + (: AM_CFLAGS already contains $flag) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } ;; *) - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 - (: CFLAGS="$CFLAGS $flag") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS=\"\$AM_CFLAGS \$flag\""; } >&5 + (: AM_CFLAGS="$AM_CFLAGS $flag") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - CFLAGS="$CFLAGS $flag" + AM_CFLAGS="$AM_CFLAGS $flag" ;; esac else $as_nop - CFLAGS="$flag" + AM_CFLAGS="$flag" fi else $as_nop @@ -20460,37 +20527,103 @@ done fi if test "$ax_cv_c_compiler_vendor" = "intel"; then - CFLAGS="$CFLAGS -shared-intel" -fi -if test "$ac_cv_native_windows" = "yes" ; then - 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} +for flag in -shared-intel; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+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. + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};printf "%s\n" "$as_val"'`" = xyes +then : + if test ${AM_CFLAGS+y} +then : + case " $AM_CFLAGS " in + *" $flag "*) + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS already contains \$flag"; } >&5 + (: AM_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS=\"\$AM_CFLAGS \$flag\""; } >&5 + (: AM_CFLAGS="$AM_CFLAGS $flag") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + AM_CFLAGS="$AM_CFLAGS $flag" + ;; + esac +else $as_nop + AM_CFLAGS="$flag" +fi + +else $as_nop + : +fi + +done + +fi + +if test "$ac_cv_native_windows" = "yes" ; then + + 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 @@ -20633,6 +20766,30 @@ if test "x$ac_cv_header_ws2ipdef_h" = xyes then : printf "%s\n" "#define HAVE_WS2IPDEF_H 1" >>confdefs.h +fi +ac_fn_c_check_header_preproc "$LINENO" "winternl.h" "ac_cv_header_winternl_h" +if test "x$ac_cv_header_winternl_h" = xyes +then : + printf "%s\n" "#define HAVE_WINTERNL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_preproc "$LINENO" "ntdef.h" "ac_cv_header_ntdef_h" +if test "x$ac_cv_header_ntdef_h" = xyes +then : + printf "%s\n" "#define HAVE_NTDEF_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_preproc "$LINENO" "ntstatus.h" "ac_cv_header_ntstatus_h" +if test "x$ac_cv_header_ntstatus_h" = xyes +then : + printf "%s\n" "#define HAVE_NTSTATUS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_preproc "$LINENO" "mswsock.h" "ac_cv_header_mswsock_h" +if test "x$ac_cv_header_mswsock_h" = xyes +then : + printf "%s\n" "#define HAVE_MSWSOCK_H 1" >>confdefs.h + fi @@ -21097,6 +21254,31 @@ if test "x$ac_cv_header_memory_h" = xyes then : printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_ARPA_NAMESER_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif + + +" +if test "x$ac_cv_header_AvailabilityMacros_h" = xyes +then : + printf "%s\n" "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" " #ifdef HAVE_SYS_TYPES_H @@ -21322,6 +21504,56 @@ if test "x$ac_cv_header_sys_random_h" = xyes then : printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_ARPA_NAMESER_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif + + +" +if test "x$ac_cv_header_sys_event_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_EVENT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_ARPA_NAMESER_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif + + +" +if test "x$ac_cv_header_sys_epoll_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_EPOLL_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "assert.h" "ac_cv_header_assert_h" " #ifdef HAVE_SYS_TYPES_H @@ -21672,6 +21904,31 @@ if test "x$ac_cv_header_time_h" = xyes then : printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_ARPA_NAMESER_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif + + +" +if test "x$ac_cv_header_poll_h" = xyes +then : + printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" " #ifdef HAVE_SYS_TYPES_H @@ -21779,6 +22036,9 @@ fi cares_all_includes=" #include #include +#ifdef HAVE_AVAILABILITYMACROS_H +# include +#endif #ifdef HAVE_SYS_UIO_H # include #endif @@ -21797,12 +22057,33 @@ cares_all_includes=" #ifdef HAVE_UNISTD_H # include #endif +#ifdef HAVE_STRING_H +# include +#endif #ifdef HAVE_STRINGS_H # include #endif +#ifdef HAVE_TIME_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif #ifdef HAVE_SYS_TYPES_H # include #endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_SYS_RANDOM_H +# include +#endif +#ifdef HAVE_SYS_EVENT_H +# include +#endif +#ifdef HAVE_SYS_EPOLL_H +# include +#endif #ifdef HAVE_SYS_SOCKET_H # include #endif @@ -21812,6 +22093,9 @@ cares_all_includes=" #ifdef HAVE_FCNTL_H # include #endif +#ifdef HAVE_POLL_H +# include +#endif #ifdef HAVE_NET_IF_H # include #endif @@ -21937,107 +22221,481 @@ ac_fn_check_decl "$LINENO" "HAVE_ARPA_NAMESER_H" "ac_cv_have_decl_HAVE_ARPA_NAME if test "x$ac_cv_have_decl_HAVE_ARPA_NAMESER_H" = xyes then : -cat >>confdefs.h <<_EOF -#define CARES_HAVE_ARPA_NAMESER_H 1 -_EOF +cat >>confdefs.h <<_EOF +#define CARES_HAVE_ARPA_NAMESER_H 1 +_EOF + +fi +ac_fn_check_decl "$LINENO" "HAVE_ARPA_NAMESER_COMPAT_H" "ac_cv_have_decl_HAVE_ARPA_NAMESER_COMPAT_H" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_HAVE_ARPA_NAMESER_COMPAT_H" = xyes +then : + +cat >>confdefs.h <<_EOF +#define CARES_HAVE_ARPA_NAMESER_COMPAT_H 1 +_EOF + +fi +ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" +if test "x$ac_cv_type_long_long" = xyes +then : + +printf "%s\n" "#define HAVE_LONGLONG 1" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes +then : + CARES_TYPEOF_ARES_SSIZE_T=ssize_t +else $as_nop + CARES_TYPEOF_ARES_SSIZE_T=int +fi + + +printf "%s\n" "#define CARES_TYPEOF_ARES_SSIZE_T ${CARES_TYPEOF_ARES_SSIZE_T}" >>confdefs.h + + +ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$cares_all_includes + +" +if test "x$ac_cv_type_socklen_t" = xyes +then : + + +printf "%s\n" "#define HAVE_SOCKLEN_T /**/" >>confdefs.h + + +cat >>confdefs.h <<_EOF +#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t +_EOF + + +else $as_nop + +cat >>confdefs.h <<_EOF +#define CARES_TYPEOF_ARES_SOCKLEN_T int +_EOF + +fi + + +ac_fn_c_check_type "$LINENO" "SOCKET" "ac_cv_type_SOCKET" "$cares_all_includes +" +if test "x$ac_cv_type_SOCKET" = xyes +then : + +fi + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 +printf %s "checking for library containing clock_gettime... " >&6; } +if test ${ac_cv_search_clock_gettime+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* 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. */ +char clock_gettime (); +int +main (void) +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt posix4 +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_clock_gettime=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_clock_gettime+y} +then : + break +fi +done +if test ${ac_cv_search_clock_gettime+y} +then : + +else $as_nop + ac_cv_search_clock_gettime=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 +printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } +ac_res=$ac_cv_search_clock_gettime +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + + +ac_fn_check_decl "$LINENO" "recv" "ac_cv_have_decl_recv" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_recv" = xyes +then : + +printf "%s\n" "#define HAVE_RECV 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "recvfrom" "ac_cv_have_decl_recvfrom" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_recvfrom" = xyes +then : + +printf "%s\n" "#define HAVE_RECVFROM 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "send" "ac_cv_have_decl_send" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_send" = xyes +then : + +printf "%s\n" "#define HAVE_SEND 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "getnameinfo" "ac_cv_have_decl_getnameinfo" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_getnameinfo" = xyes +then : + +printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "gethostname" "ac_cv_have_decl_gethostname" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_gethostname" = xyes +then : + +printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "connect" "ac_cv_have_decl_connect" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_connect" = xyes +then : + +printf "%s\n" "#define HAVE_CONNECT 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "closesocket" "ac_cv_have_decl_closesocket" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_closesocket" = xyes +then : + +printf "%s\n" "#define HAVE_CLOSESOCKET 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "CloseSocket" "ac_cv_have_decl_CloseSocket" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_CloseSocket" = xyes +then : + +printf "%s\n" "#define HAVE_CLOSESOCKET_CAMEL 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "fcntl" "ac_cv_have_decl_fcntl" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_fcntl" = xyes +then : + +printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_getenv" = xyes +then : + +printf "%s\n" "#define HAVE_GETENV 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "gethostname" "ac_cv_have_decl_gethostname" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_gethostname" = xyes +then : + +printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "getrandom" "ac_cv_have_decl_getrandom" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_getrandom" = xyes +then : + +printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "getservbyport_r" "ac_cv_have_decl_getservbyport_r" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_getservbyport_r" = xyes +then : + +printf "%s\n" "#define HAVE_GETSERVBYPORT_R 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "inet_net_pton" "ac_cv_have_decl_inet_net_pton" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_inet_net_pton" = xyes +then : + +printf "%s\n" "#define HAVE_INET_NET_PTON 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_inet_ntop" = xyes +then : + +printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_inet_pton" = xyes +then : + +printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "ioctl" "ac_cv_have_decl_ioctl" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_ioctl" = xyes +then : + +printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "ioctlsocket" "ac_cv_have_decl_ioctlsocket" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_ioctlsocket" = xyes +then : + +printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "IoctlSocket" "ac_cv_have_decl_IoctlSocket" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_IoctlSocket" = xyes +then : + +printf "%s\n" "#define HAVE_IOCTLSOCKET_CAMEL 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "setsockopt" "ac_cv_have_decl_setsockopt" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_setsockopt" = xyes +then : + +printf "%s\n" "#define HAVE_SETSOCKOPT 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "socket" "ac_cv_have_decl_socket" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_socket" = xyes +then : + +printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "strcasecmp" "ac_cv_have_decl_strcasecmp" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strcasecmp" = xyes +then : + +printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strdup" = xyes +then : + +printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "stricmp" "ac_cv_have_decl_stricmp" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_stricmp" = xyes +then : + +printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strncasecmp" = xyes +then : + +printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h + +fi +ac_fn_check_decl "$LINENO" "strncmpi" "ac_cv_have_decl_strncmpi" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strncmpi" = xyes +then : + +printf "%s\n" "#define HAVE_STRNCMPI 1" >>confdefs.h fi -ac_fn_check_decl "$LINENO" "HAVE_ARPA_NAMESER_COMPAT_H" "ac_cv_have_decl_HAVE_ARPA_NAMESER_COMPAT_H" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_HAVE_ARPA_NAMESER_COMPAT_H" = xyes +ac_fn_check_decl "$LINENO" "strnicmp" "ac_cv_have_decl_strnicmp" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strnicmp" = xyes then : -cat >>confdefs.h <<_EOF -#define CARES_HAVE_ARPA_NAMESER_COMPAT_H 1 -_EOF +printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h fi -ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" -if test "x$ac_cv_type_long_long" = xyes +ac_fn_check_decl "$LINENO" "writev" "ac_cv_have_decl_writev" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_writev" = xyes then : -printf "%s\n" "#define HAVE_LONGLONG 1" >>confdefs.h +printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h fi - -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes +ac_fn_check_decl "$LINENO" "arc4random_buf" "ac_cv_have_decl_arc4random_buf" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_arc4random_buf" = xyes then : - CARES_TYPEOF_ARES_SSIZE_T=ssize_t -else $as_nop - CARES_TYPEOF_ARES_SSIZE_T=int -fi - -printf "%s\n" "#define CARES_TYPEOF_ARES_SSIZE_T ${CARES_TYPEOF_ARES_SSIZE_T}" >>confdefs.h +printf "%s\n" "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h +fi +ac_fn_check_decl "$LINENO" "stat" "ac_cv_have_decl_stat" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_stat" = xyes +then : -ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$cares_all_includes +printf "%s\n" "#define HAVE_STAT 1" >>confdefs.h -" -if test "x$ac_cv_type_socklen_t" = xyes +fi +ac_fn_check_decl "$LINENO" "gettimeofday" "ac_cv_have_decl_gettimeofday" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_gettimeofday" = xyes then : +printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h -printf "%s\n" "#define HAVE_SOCKLEN_T /**/" >>confdefs.h +fi +ac_fn_check_decl "$LINENO" "clock_gettime" "ac_cv_have_decl_clock_gettime" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_clock_gettime" = xyes +then : +printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h -cat >>confdefs.h <<_EOF -#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t -_EOF +fi +ac_fn_check_decl "$LINENO" "if_indextoname" "ac_cv_have_decl_if_indextoname" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_if_indextoname" = xyes +then : +printf "%s\n" "#define HAVE_IF_INDEXTONAME 1" >>confdefs.h -else $as_nop +fi +ac_fn_check_decl "$LINENO" "if_nametoindex" "ac_cv_have_decl_if_nametoindex" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_if_nametoindex" = xyes +then : -cat >>confdefs.h <<_EOF -#define CARES_TYPEOF_ARES_SOCKLEN_T int -_EOF +printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h fi +ac_fn_check_decl "$LINENO" "getifaddrs" "ac_cv_have_decl_getifaddrs" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_getifaddrs" = xyes +then : +printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h -ac_fn_c_check_type "$LINENO" "SOCKET" "ac_cv_type_SOCKET" "$cares_all_includes -" -if test "x$ac_cv_type_SOCKET" = xyes +fi +ac_fn_check_decl "$LINENO" "poll" "ac_cv_have_decl_poll" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_poll" = xyes then : -fi +printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h +fi +ac_fn_check_decl "$LINENO" "pipe" "ac_cv_have_decl_pipe" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_pipe" = xyes +then : +printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h +fi +ac_fn_check_decl "$LINENO" "pipe2" "ac_cv_have_decl_pipe2" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_pipe2" = xyes +then : +printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h -ac_fn_c_check_func "$LINENO" "recv" "ac_cv_func_recv" -if test "x$ac_cv_func_recv" = xyes +fi +ac_fn_check_decl "$LINENO" "kqueue" "ac_cv_have_decl_kqueue" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_kqueue" = xyes then : - printf "%s\n" "#define HAVE_RECV 1" >>confdefs.h + +printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "recvfrom" "ac_cv_func_recvfrom" -if test "x$ac_cv_func_recvfrom" = xyes +ac_fn_check_decl "$LINENO" "epoll_create1" "ac_cv_have_decl_epoll_create1" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_epoll_create1" = xyes then : - printf "%s\n" "#define HAVE_RECVFROM 1" >>confdefs.h + +printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "send" "ac_cv_func_send" -if test "x$ac_cv_func_send" = xyes +ac_fn_check_decl "$LINENO" "ConvertInterfaceIndexToLuid" "ac_cv_have_decl_ConvertInterfaceIndexToLuid" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_ConvertInterfaceIndexToLuid" = xyes then : - printf "%s\n" "#define HAVE_SEND 1" >>confdefs.h + +printf "%s\n" "#define HAVE_CONVERTINTERFACEINDEXTOLUID 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" -if test "x$ac_cv_func_getnameinfo" = xyes +ac_fn_check_decl "$LINENO" "ConvertInterfaceLuidToNameA" "ac_cv_have_decl_ConvertInterfaceLuidToNameA" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_ConvertInterfaceLuidToNameA" = xyes then : - printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h + +printf "%s\n" "#define HAVE_CONVERTINTERFACELUIDTONAMEA 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" -if test "x$ac_cv_func_gethostname" = xyes +ac_fn_check_decl "$LINENO" "__system_property_get" "ac_cv_have_decl___system_property_get" "$cares_all_includes +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl___system_property_get" = xyes then : - printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h + +printf "%s\n" "#define HAVE___SYSTEM_PROPERTY_GET 1" >>confdefs.h fi + if test "x$ac_cv_type_ssize_t" = "xyes" -a "x$ac_cv_type_socklen_t" = "xyes" -a "x$ac_cv_native_windows" != "xyes" ; then recvfrom_type_retv="ssize_t" recvfrom_type_arg3="size_t" @@ -22161,270 +22819,7 @@ printf "%s\n" "#define GETHOSTNAME_TYPE_ARG2 ${gethostname_type_arg2} " >>confd - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -printf %s "checking for library containing clock_gettime... " >&6; } -if test ${ac_cv_search_clock_gettime+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* 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. */ -char clock_gettime (); -int -main (void) -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt posix4 -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_clock_gettime=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_clock_gettime+y} -then : - break -fi -done -if test ${ac_cv_search_clock_gettime+y} -then : - -else $as_nop - ac_cv_search_clock_gettime=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } -ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = xyes -then : - printf "%s\n" "#define HAVE_CONNECT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "closesocket" "ac_cv_func_closesocket" -if test "x$ac_cv_func_closesocket" = xyes -then : - printf "%s\n" "#define HAVE_CLOSESOCKET 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "CloseSocket" "ac_cv_func_CloseSocket" -if test "x$ac_cv_func_CloseSocket" = xyes -then : - printf "%s\n" "#define HAVE_CLOSESOCKET 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" -if test "x$ac_cv_func_fcntl" = xyes -then : - printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv" -if test "x$ac_cv_func_getenv" = xyes -then : - printf "%s\n" "#define HAVE_GETENV 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" -if test "x$ac_cv_func_gethostname" = xyes -then : - printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom" -if test "x$ac_cv_func_getrandom" = xyes -then : - printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getservbyport_r" "ac_cv_func_getservbyport_r" -if test "x$ac_cv_func_getservbyport_r" = xyes -then : - printf "%s\n" "#define HAVE_GETSERVBYPORT_R 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "inet_net_pton" "ac_cv_func_inet_net_pton" -if test "x$ac_cv_func_inet_net_pton" = xyes -then : - printf "%s\n" "#define HAVE_INET_NET_PTON 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" -if test "x$ac_cv_func_inet_ntop" = xyes -then : - printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" -if test "x$ac_cv_func_inet_pton" = xyes -then : - printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl" -if test "x$ac_cv_func_ioctl" = xyes -then : - printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "IoctlSocket" "ac_cv_func_IoctlSocket" -if test "x$ac_cv_func_IoctlSocket" = xyes -then : - printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ioctlsocket" "ac_cv_func_ioctlsocket" -if test "x$ac_cv_func_ioctlsocket" = xyes -then : - printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt" -if test "x$ac_cv_func_setsockopt" = xyes -then : - printf "%s\n" "#define HAVE_SETSOCKOPT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = xyes -then : - printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" -if test "x$ac_cv_func_strcasecmp" = xyes -then : - printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" -if test "x$ac_cv_func_strdup" = xyes -then : - printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp" -if test "x$ac_cv_func_stricmp" = xyes -then : - printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" -if test "x$ac_cv_func_strncasecmp" = xyes -then : - printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "strncmpi" "ac_cv_func_strncmpi" -if test "x$ac_cv_func_strncmpi" = xyes -then : - printf "%s\n" "#define HAVE_STRNCMPI 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp" -if test "x$ac_cv_func_strnicmp" = xyes -then : - printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev" -if test "x$ac_cv_func_writev" = xyes -then : - printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf" -if test "x$ac_cv_func_arc4random_buf" = xyes -then : - printf "%s\n" "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "stat" "ac_cv_func_stat" -if test "x$ac_cv_func_stat" = xyes -then : - printf "%s\n" "#define HAVE_STAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = xyes -then : - printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes -then : - printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "if_indextoname" "ac_cv_func_if_indextoname" -if test "x$ac_cv_func_if_indextoname" = xyes -then : - printf "%s\n" "#define HAVE_IF_INDEXTONAME 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex" -if test "x$ac_cv_func_if_nametoindex" = xyes -then : - printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ConvertInterfaceIndexToLuid" "ac_cv_func_ConvertInterfaceIndexToLuid" -if test "x$ac_cv_func_ConvertInterfaceIndexToLuid" = xyes -then : - printf "%s\n" "#define HAVE_CONVERTINTERFACEINDEXTOLUID 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ConvertInterfaceLuidToNameA" "ac_cv_func_ConvertInterfaceLuidToNameA" -if test "x$ac_cv_func_ConvertInterfaceLuidToNameA" = xyes -then : - printf "%s\n" "#define HAVE_CONVERTINTERFACELUIDTONAMEA 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" -if test "x$ac_cv_func_getifaddrs" = xyes -then : - printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "__system_property_get" "ac_cv_func___system_property_get" -if test "x$ac_cv_func___system_property_get" = xyes -then : - printf "%s\n" "#define HAVE___SYSTEM_PROPERTY_GET 1" >>confdefs.h - -fi - - - -if test "$ac_cv_func_getservbyport_r" = "yes" ; then +if test "$ac_cv_have_decl_getservbyport_r" = "yes" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments for getservbyport_r()" >&5 printf %s "checking number of arguments for getservbyport_r()... " >&6; } getservbyport_r_args=6 @@ -22443,7 +22838,7 @@ printf "%s\n" "#define GETSERVBYPORT_R_ARGS $getservbyport_r_args " >>confdefs. fi -if test "$ac_cv_func_getservbyname_r" = "yes" ; then +if test "$ac_cv_have_decl_getservbyname_r" = "yes" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments for getservbyname_r()" >&5 printf %s "checking number of arguments for getservbyname_r()... " >&6; } getservbyname_r_args=6 @@ -22589,28 +22984,28 @@ then : fi -if test "$ac_cv_have_decl_CLOCK_MONOTONIC" = "yes" -a "$ac_cv_func_clock_gettime" = "yes" ; then +if test "$ac_cv_have_decl_CLOCK_MONOTONIC" = "yes" -a "$ac_cv_have_decl_clock_gettime" = "yes" ; then printf "%s\n" "#define HAVE_CLOCK_GETTIME_MONOTONIC 1 " >>confdefs.h fi -if test "$ac_cv_have_decl_FIONBIO" = "yes" -a "$ac_cv_func_ioctl" = "yes" ; then +if test "$ac_cv_have_decl_FIONBIO" = "yes" -a "$ac_cv_have_decl_ioctl" = "yes" ; then printf "%s\n" "#define HAVE_IOCTL_FIONBIO 1 " >>confdefs.h fi -if test "$ac_cv_have_decl_FIONBIO" = "yes" -a "$ac_cv_func_ioctlsocket" = "yes" ; then +if test "$ac_cv_have_decl_FIONBIO" = "yes" -a "$ac_cv_have_decl_ioctlsocket" = "yes" ; then printf "%s\n" "#define HAVE_IOCTLSOCKET_FIONBIO 1 " >>confdefs.h fi -if test "$ac_cv_have_decl_SO_NONBLOCK" = "yes" -a "$ac_cv_func_setsockopt" = "yes" ; then +if test "$ac_cv_have_decl_SO_NONBLOCK" = "yes" -a "$ac_cv_have_decl_setsockopt" = "yes" ; then printf "%s\n" "#define HAVE_SETSOCKOPT_SO_NONBLOCK 1 " >>confdefs.h fi -if test "$ac_cv_have_decl_O_NONBLOCK" = "yes" -a "$ac_cv_func_fcntl" = "yes" ; then +if test "$ac_cv_have_decl_O_NONBLOCK" = "yes" -a "$ac_cv_have_decl_fcntl" = "yes" ; then printf "%s\n" "#define HAVE_FCNTL_O_NONBLOCK 1 " >>confdefs.h @@ -22622,13 +23017,6 @@ cat >>confdefs.h <<_EOF #define CARES_HAVE_SYS_TYPES_H 1 _EOF -fi -if test "x$ac_cv_header_sys_random_h" = "xyes" ; then - -cat >>confdefs.h <<_EOF -#define CARES_HAVE_SYS_RANDOM_H 1 -_EOF - fi if test "x$ac_cv_header_sys_socket_h" = "xyes" ; then @@ -23457,7 +23845,7 @@ then : fi LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS" CC="$PTHREAD_CC" CXX="$PTHREAD_CXX" fi @@ -24973,7 +25361,6 @@ printf %s "checking whether to build tests... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $build_tests" >&5 printf "%s\n" "$build_tests" >&6; } - if test "x$build_tests" = "xyes"; then BUILD_TESTS_TRUE= BUILD_TESTS_FALSE='#' @@ -24985,6 +25372,8 @@ fi + + ac_config_files="$ac_config_files Makefile include/Makefile src/Makefile src/lib/Makefile src/tools/Makefile docs/Makefile libcares.pc" if test -z "$BUILD_TESTS_TRUE"; then : @@ -25539,7 +25928,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.25.0, which was +This file was extended by c-ares $as_me 1.26.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25607,7 +25996,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.25.0 +c-ares config.status 1.26.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -25736,12 +26125,12 @@ AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' @@ -26875,9 +27264,6 @@ available_tags='CXX ' # ### BEGIN LIBTOOL CONFIG -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision @@ -26891,6 +27277,9 @@ DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + # Whether or not to build static libraries. build_old_libs=$enable_static diff --git a/deps/cares/configure.ac b/deps/cares/configure.ac index 9a119e04c1736e..f820d37dd035b0 100644 --- a/deps/cares/configure.ac +++ b/deps/cares/configure.ac @@ -2,10 +2,10 @@ dnl Copyright (C) The c-ares project and its contributors dnl SPDX-License-Identifier: MIT AC_PREREQ([2.69]) -AC_INIT([c-ares], [1.25.0], +AC_INIT([c-ares], [1.26.0], [c-ares mailing list: http://lists.haxx.se/listinfo/c-ares]) -CARES_VERSION_INFO="12:1:10" +CARES_VERSION_INFO="13:0:11" 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. @@ -42,8 +42,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_USE_SYSTEM_EXTENSIONS AX_CXX_COMPILE_STDCXX_14([noext],[optional]) AM_INIT_AUTOMAKE([foreign subdir-objects 1.9.6]) -AC_ENABLE_SHARED -LT_INIT([win32-dll,shared,pic,disable-fast-install,aix-soname=svr4]) +LT_INIT([win32-dll,pic,disable-fast-install,aix-soname=svr4]) AC_LANG([C]) AC_PROG_CC AM_PROG_CC_C_O @@ -52,6 +51,31 @@ AC_PROG_INSTALL AC_CANONICAL_HOST AX_COMPILER_VENDOR +AC_MSG_CHECKING([whether this is native windows]) +ac_cv_native_windows=no +ac_cv_windows=no +case $host_os in + mingw*) + ac_cv_native_windows=yes + ac_cv_windows=yes + ;; + cygwin*) + ac_cv_windows=yes + ;; +esac +if test "$ax_cv_c_compiler_vendor" = "microsoft" ; then + ac_cv_native_windows=yes + ac_cv_windows=yes +fi +AC_MSG_RESULT($ac_cv_native_windows) + + +AC_ENABLE_SHARED + +dnl Disable static builds by default on Windows unless overwritten since Windows +dnl can't simultaneously build shared and static with autotools. +AS_IF([test "x$ac_cv_windows" = "xyes"], [AC_DISABLE_STATIC], [AC_ENABLE_STATIC]) + AC_ARG_ENABLE(warnings, AS_HELP_STRING([--disable-warnings],[Disable strict compiler warnings]), [ enable_warnings=${enableval} ], @@ -162,39 +186,20 @@ esac AM_CONDITIONAL([CARES_USE_NO_UNDEFINED], [test "$cares_use_no_undefined" = 'yes']) -AC_MSG_CHECKING([whether this is native windows]) -ac_cv_native_windows=no -ac_cv_windows=no -case $host_os in - mingw*) - ac_cv_native_windows=yes - ac_cv_windows=yes - ;; - cygwin*) - ac_cv_windows=yes - ;; -esac -if test "$ax_cv_c_compiler_vendor" = "microsoft" ; then - ac_cv_native_windows=yes - ac_cv_windows=yes -fi if test "$ac_cv_native_windows" = "yes" ; then - CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0602 -DWIN32_LEAN_AND_MEAN" + AM_CPPFLAGS="$AM_CPPFLAGS -D_WIN32_WINNT=0x0602 -DWIN32_LEAN_AND_MEAN" fi -AC_MSG_RESULT($ac_cv_native_windows) -dnl Disable static builds by default on Windows unless overwritten since Windows -dnl can't simultaneously build shared and static with autotools. -if test "x$ac_cv_windows" = "xyes" ; then - AC_DISABLE_STATIC +dnl Windows can only build shared or static, not both at the same time +if test "$ac_cv_native_windows" = "yes" -a "x$enable_shared" = "xyes" -a "x$enable_static" = "xyes" ; then + AC_MSG_ERROR([Windows cannot build both static and shared simultaneously, specify --disable-shared or --disable-static]) fi - dnl Only windows requires CARES_STATICLIB definition if test "x$enable_shared" = "xno" -a "x$enable_static" = "xyes" ; then AC_MSG_CHECKING([whether we need CARES_STATICLIB definition]) if test "$ac_cv_native_windows" = "yes" ; then - AX_APPEND_FLAG([-DCARES_STATICLIB], [CPPFLAGS]) + AX_APPEND_FLAG([-DCARES_STATICLIB], [AM_CPPFLAGS]) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -274,11 +279,11 @@ if test "$enable_warnings" = "yes"; then -Werror=implicit-int \ -Werror=implicit-function-declaration \ -Werror=partial-availability \ - ], [CFLAGS], [-Werror]) + ], [AM_CFLAGS], [-Werror]) fi if test "$ax_cv_c_compiler_vendor" = "intel"; then - CFLAGS="$CFLAGS -shared-intel" + AX_APPEND_COMPILE_FLAGS([-shared-intel], [AM_CFLAGS]) fi if test "$ac_cv_native_windows" = "yes" ; then @@ -294,7 +299,11 @@ if test "$ac_cv_native_windows" = "yes" ; then ws2tcpip.h \ iphlpapi.h \ netioapi.h \ - ws2ipdef.h, + ws2ipdef.h \ + winternl.h \ + ntdef.h \ + ntstatus.h \ + mswsock.h, [], [], [-]) dnl Windows builds require linking to iphlpapi @@ -409,6 +418,7 @@ dnl check for a few basic system headers we need AC_CHECK_HEADERS( malloc.h \ memory.h \ + AvailabilityMacros.h \ sys/types.h \ sys/time.h \ sys/select.h \ @@ -418,6 +428,8 @@ AC_CHECK_HEADERS( sys/param.h \ sys/uio.h \ sys/random.h \ + sys/event.h \ + sys/epoll.h \ assert.h \ iphlpapi.h \ netioapi.h \ @@ -432,6 +444,7 @@ AC_CHECK_HEADERS( strings.h \ stdbool.h \ time.h \ + poll.h \ limits.h \ arpa/nameser.h \ arpa/nameser_compat.h \ @@ -469,6 +482,9 @@ dnl *Sigh* these are needed in order for net/if.h to get properly detected. cares_all_includes=" #include #include +#ifdef HAVE_AVAILABILITYMACROS_H +# include +#endif #ifdef HAVE_SYS_UIO_H # include #endif @@ -487,12 +503,33 @@ cares_all_includes=" #ifdef HAVE_UNISTD_H # include #endif +#ifdef HAVE_STRING_H +# include +#endif #ifdef HAVE_STRINGS_H # include #endif +#ifdef HAVE_TIME_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif #ifdef HAVE_SYS_TYPES_H # include #endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_SYS_RANDOM_H +# include +#endif +#ifdef HAVE_SYS_EVENT_H +# include +#endif +#ifdef HAVE_SYS_EPOLL_H +# include +#endif #ifdef HAVE_SYS_SOCKET_H # include #endif @@ -502,6 +539,9 @@ cares_all_includes=" #ifdef HAVE_FCNTL_H # include #endif +#ifdef HAVE_POLL_H +# include +#endif #ifdef HAVE_NET_IF_H # include #endif @@ -560,14 +600,70 @@ AC_CHECK_TYPE(socklen_t, AC_CHECK_TYPE(SOCKET, [], [], $cares_all_includes) +dnl ############################################################################### + +dnl clock_gettime might require an external library +AC_SEARCH_LIBS([clock_gettime], [rt posix4]) + +dnl Use AC_CHECK_DECL not AC_CHECK_FUNCS, while this doesn't do a linkage test, +dnl it just makes sure the headers define it, this is the only thing without +dnl a complex workaround on Windows that will do what we need. See: +dnl https://github.com/msys2/msys2/wiki/Porting/f87a222118b1008ebc166ad237f04edb759c8f4c#calling-conventions-stdcall-and-autotools +dnl https://lists.gnu.org/archive/html/autoconf/2013-05/msg00085.html +dnl and for a more complex workaround, we'd need to use AC_LINK_IFELSE like: +dnl https://mailman.videolan.org/pipermail/vlc-devel/2015-March/101802.html +dnl which would require we check each individually and provide function arguments +dnl for the test. + +AC_CHECK_DECL(recv, [AC_DEFINE([HAVE_RECV], 1, [Define to 1 if you have `recv`] )], [], $cares_all_includes) +AC_CHECK_DECL(recvfrom, [AC_DEFINE([HAVE_RECVFROM], 1, [Define to 1 if you have `recvfrom`] )], [], $cares_all_includes) +AC_CHECK_DECL(send, [AC_DEFINE([HAVE_SEND], 1, [Define to 1 if you have `send`] )], [], $cares_all_includes) +AC_CHECK_DECL(getnameinfo, [AC_DEFINE([HAVE_GETNAMEINFO], 1, [Define to 1 if you have `getnameinfo`] )], [], $cares_all_includes) +AC_CHECK_DECL(gethostname, [AC_DEFINE([HAVE_GETHOSTNAME], 1, [Define to 1 if you have `gethostname`] )], [], $cares_all_includes) +AC_CHECK_DECL(connect, [AC_DEFINE([HAVE_CONNECT], 1, [Define to 1 if you have `connect`] )], [], $cares_all_includes) +AC_CHECK_DECL(closesocket, [AC_DEFINE([HAVE_CLOSESOCKET], 1, [Define to 1 if you have `closesocket`] )], [], $cares_all_includes) +AC_CHECK_DECL(CloseSocket, [AC_DEFINE([HAVE_CLOSESOCKET_CAMEL], 1, [Define to 1 if you have `CloseSocket`] )], [], $cares_all_includes) +AC_CHECK_DECL(fcntl, [AC_DEFINE([HAVE_FCNTL], 1, [Define to 1 if you have `fcntl`] )], [], $cares_all_includes) +AC_CHECK_DECL(getenv, [AC_DEFINE([HAVE_GETENV], 1, [Define to 1 if you have `getenv`] )], [], $cares_all_includes) +AC_CHECK_DECL(gethostname, [AC_DEFINE([HAVE_GETHOSTNAME], 1, [Define to 1 if you have `gethostname`] )], [], $cares_all_includes) +AC_CHECK_DECL(getrandom, [AC_DEFINE([HAVE_GETRANDOM], 1, [Define to 1 if you have `getrandom`] )], [], $cares_all_includes) +AC_CHECK_DECL(getservbyport_r, [AC_DEFINE([HAVE_GETSERVBYPORT_R], 1, [Define to 1 if you have `getservbyport_r`])], [], $cares_all_includes) +AC_CHECK_DECL(inet_net_pton, [AC_DEFINE([HAVE_INET_NET_PTON], 1, [Define to 1 if you have `inet_net_pton`] )], [], $cares_all_includes) +AC_CHECK_DECL(inet_ntop, [AC_DEFINE([HAVE_INET_NTOP], 1, [Define to 1 if you have `inet_ntop`] )], [], $cares_all_includes) +AC_CHECK_DECL(inet_pton, [AC_DEFINE([HAVE_INET_PTON], 1, [Define to 1 if you have `inet_pton`] )], [], $cares_all_includes) +AC_CHECK_DECL(ioctl, [AC_DEFINE([HAVE_IOCTL], 1, [Define to 1 if you have `ioctl`] )], [], $cares_all_includes) +AC_CHECK_DECL(ioctlsocket, [AC_DEFINE([HAVE_IOCTLSOCKET], 1, [Define to 1 if you have `ioctlsocket`] )], [], $cares_all_includes) +AC_CHECK_DECL(IoctlSocket, [AC_DEFINE([HAVE_IOCTLSOCKET_CAMEL], 1, [Define to 1 if you have `IoctlSocket`] )], [], $cares_all_includes) +AC_CHECK_DECL(setsockopt, [AC_DEFINE([HAVE_SETSOCKOPT], 1, [Define to 1 if you have `setsockopt`] )], [], $cares_all_includes) +AC_CHECK_DECL(socket, [AC_DEFINE([HAVE_SOCKET], 1, [Define to 1 if you have `socket`] )], [], $cares_all_includes) +AC_CHECK_DECL(strcasecmp, [AC_DEFINE([HAVE_STRCASECMP], 1, [Define to 1 if you have `strcasecmp`] )], [], $cares_all_includes) +AC_CHECK_DECL(strdup, [AC_DEFINE([HAVE_STRDUP], 1, [Define to 1 if you have `strdup`] )], [], $cares_all_includes) +AC_CHECK_DECL(stricmp, [AC_DEFINE([HAVE_STRICMP], 1, [Define to 1 if you have `stricmp`] )], [], $cares_all_includes) +AC_CHECK_DECL(strncasecmp, [AC_DEFINE([HAVE_STRNCASECMP], 1, [Define to 1 if you have `strncasecmp`] )], [], $cares_all_includes) +AC_CHECK_DECL(strncmpi, [AC_DEFINE([HAVE_STRNCMPI], 1, [Define to 1 if you have `strncmpi`] )], [], $cares_all_includes) +AC_CHECK_DECL(strnicmp, [AC_DEFINE([HAVE_STRNICMP], 1, [Define to 1 if you have `strnicmp`] )], [], $cares_all_includes) +AC_CHECK_DECL(writev, [AC_DEFINE([HAVE_WRITEV], 1, [Define to 1 if you have `writev`] )], [], $cares_all_includes) +AC_CHECK_DECL(arc4random_buf, [AC_DEFINE([HAVE_ARC4RANDOM_BUF], 1, [Define to 1 if you have `arc4random_buf`] )], [], $cares_all_includes) +AC_CHECK_DECL(stat, [AC_DEFINE([HAVE_STAT], 1, [Define to 1 if you have `stat`] )], [], $cares_all_includes) +AC_CHECK_DECL(gettimeofday, [AC_DEFINE([HAVE_GETTIMEOFDAY], 1, [Define to 1 if you have `gettimeofday`] )], [], $cares_all_includes) +AC_CHECK_DECL(clock_gettime, [AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [Define to 1 if you have `clock_gettime`] )], [], $cares_all_includes) +AC_CHECK_DECL(if_indextoname, [AC_DEFINE([HAVE_IF_INDEXTONAME], 1, [Define to 1 if you have `if_indextoname`] )], [], $cares_all_includes) +AC_CHECK_DECL(if_nametoindex, [AC_DEFINE([HAVE_IF_NAMETOINDEX], 1, [Define to 1 if you have `if_nametoindex`] )], [], $cares_all_includes) +AC_CHECK_DECL(getifaddrs, [AC_DEFINE([HAVE_GETIFADDRS], 1, [Define to 1 if you have `getifaddrs`] )], [], $cares_all_includes) +AC_CHECK_DECL(poll, [AC_DEFINE([HAVE_POLL], 1, [Define to 1 if you have `poll`] )], [], $cares_all_includes) +AC_CHECK_DECL(pipe, [AC_DEFINE([HAVE_PIPE], 1, [Define to 1 if you have `pipe`] )], [], $cares_all_includes) +AC_CHECK_DECL(pipe2, [AC_DEFINE([HAVE_PIPE2], 1, [Define to 1 if you have `pipe2`] )], [], $cares_all_includes) +AC_CHECK_DECL(kqueue, [AC_DEFINE([HAVE_KQUEUE], 1, [Define to 1 if you have `kqueue`] )], [], $cares_all_includes) +AC_CHECK_DECL(epoll_create1, [AC_DEFINE([HAVE_EPOLL], 1, [Define to 1 if you have `epoll_{create1,ctl,wait}`])], [], $cares_all_includes) +AC_CHECK_DECL(ConvertInterfaceIndexToLuid, [AC_DEFINE([HAVE_CONVERTINTERFACEINDEXTOLUID], 1, [Define to 1 if you have `ConvertInterfaceIndexToLuid`])], [], $cares_all_includes) +AC_CHECK_DECL(ConvertInterfaceLuidToNameA, [AC_DEFINE([HAVE_CONVERTINTERFACELUIDTONAMEA], 1, [Define to 1 if you have `ConvertInterfaceLuidToNameA`])], [], $cares_all_includes) +AC_CHECK_DECL(__system_property_get, [AC_DEFINE([HAVE___SYSTEM_PROPERTY_GET], 1, [Define to 1 if you have `__system_property_get`] )], [], $cares_all_includes) dnl ############################################################################### dnl recv, recvfrom, send, getnameinfo, gethostname dnl ARGUMENTS AND RETURN VALUES -AC_CHECK_FUNCS([recv recvfrom send getnameinfo gethostname]) - if test "x$ac_cv_type_ssize_t" = "xyes" -a "x$ac_cv_type_socklen_t" = "xyes" -a "x$ac_cv_native_windows" != "xyes" ; then recvfrom_type_retv="ssize_t" recvfrom_type_arg3="size_t" @@ -646,50 +742,10 @@ AC_DEFINE_UNQUOTED([GETNAMEINFO_TYPE_ARG7], [ ${getnameinfo_type_arg7} ], [ ge AC_DEFINE_UNQUOTED([GETNAMEINFO_TYPE_ARG46], [ ${getnameinfo_type_arg46} ], [ getnameinfo() arg4 and 6 type ]) AC_DEFINE_UNQUOTED([GETHOSTNAME_TYPE_ARG2], [ ${gethostname_type_arg2} ], [ gethostname() arg2 type ]) - - - dnl ############################################################################### -dnl clock_gettime might require an external library -AC_SEARCH_LIBS([clock_gettime], [rt posix4]) -AC_CHECK_FUNCS(connect \ - closesocket \ - CloseSocket \ - fcntl \ - getenv \ - gethostname \ - getrandom \ - getservbyport_r \ - inet_net_pton \ - inet_ntop \ - inet_pton \ - ioctl \ - IoctlSocket \ - ioctlsocket \ - setsockopt \ - socket \ - strcasecmp \ - strdup \ - stricmp \ - strncasecmp \ - strncmpi \ - strnicmp \ - writev \ - arc4random_buf \ - stat \ - gettimeofday \ - clock_gettime \ - if_indextoname \ - if_nametoindex \ - ConvertInterfaceIndexToLuid \ - ConvertInterfaceLuidToNameA \ - getifaddrs \ - __system_property_get) - - -if test "$ac_cv_func_getservbyport_r" = "yes" ; then +if test "$ac_cv_have_decl_getservbyport_r" = "yes" ; then AC_MSG_CHECKING([number of arguments for getservbyport_r()]) getservbyport_r_args=6 case $host_os in @@ -704,7 +760,7 @@ if test "$ac_cv_func_getservbyport_r" = "yes" ; then AC_DEFINE_UNQUOTED([GETSERVBYPORT_R_ARGS], [ $getservbyport_r_args ], [ number of arguments for getservbyport_r() ]) fi -if test "$ac_cv_func_getservbyname_r" = "yes" ; then +if test "$ac_cv_have_decl_getservbyname_r" = "yes" ; then AC_MSG_CHECKING([number of arguments for getservbyname_r()]) getservbyname_r_args=6 case $host_os in @@ -735,20 +791,20 @@ AC_CHECK_DECL(SO_NONBLOCK, [], [], $cares_all_includes) AC_CHECK_DECL(MSG_NOSIGNAL, [], [], $cares_all_includes) AC_CHECK_DECL(CLOCK_MONOTONIC, [], [], $cares_all_includes) -if test "$ac_cv_have_decl_CLOCK_MONOTONIC" = "yes" -a "$ac_cv_func_clock_gettime" = "yes" ; then +if test "$ac_cv_have_decl_CLOCK_MONOTONIC" = "yes" -a "$ac_cv_have_decl_clock_gettime" = "yes" ; then AC_DEFINE([HAVE_CLOCK_GETTIME_MONOTONIC], [ 1 ], [ clock_gettime() with CLOCK_MONOTONIC support ]) fi -if test "$ac_cv_have_decl_FIONBIO" = "yes" -a "$ac_cv_func_ioctl" = "yes" ; then +if test "$ac_cv_have_decl_FIONBIO" = "yes" -a "$ac_cv_have_decl_ioctl" = "yes" ; then AC_DEFINE([HAVE_IOCTL_FIONBIO], [ 1 ], [ ioctl() with FIONBIO support ]) fi -if test "$ac_cv_have_decl_FIONBIO" = "yes" -a "$ac_cv_func_ioctlsocket" = "yes" ; then +if test "$ac_cv_have_decl_FIONBIO" = "yes" -a "$ac_cv_have_decl_ioctlsocket" = "yes" ; then AC_DEFINE([HAVE_IOCTLSOCKET_FIONBIO], [ 1 ], [ ioctlsocket() with FIONBIO support ]) fi -if test "$ac_cv_have_decl_SO_NONBLOCK" = "yes" -a "$ac_cv_func_setsockopt" = "yes" ; then +if test "$ac_cv_have_decl_SO_NONBLOCK" = "yes" -a "$ac_cv_have_decl_setsockopt" = "yes" ; then AC_DEFINE([HAVE_SETSOCKOPT_SO_NONBLOCK], [ 1 ], [ setsockopt() with SO_NONBLOCK support ]) fi -if test "$ac_cv_have_decl_O_NONBLOCK" = "yes" -a "$ac_cv_func_fcntl" = "yes" ; then +if test "$ac_cv_have_decl_O_NONBLOCK" = "yes" -a "$ac_cv_have_decl_fcntl" = "yes" ; then AC_DEFINE([HAVE_FCNTL_O_NONBLOCK], [ 1 ], [ fcntl() with O_NONBLOCK support ]) fi @@ -756,9 +812,6 @@ dnl ares_build.h.in specific defines if test "x$ac_cv_header_sys_types_h" = "xyes" ; then CARES_DEFINE_UNQUOTED([CARES_HAVE_SYS_TYPES_H],[1]) fi -if test "x$ac_cv_header_sys_random_h" = "xyes" ; then - CARES_DEFINE_UNQUOTED([CARES_HAVE_SYS_RANDOM_H],[1]) -fi if test "x$ac_cv_header_sys_socket_h" = "xyes" ; then CARES_DEFINE_UNQUOTED([CARES_HAVE_SYS_SOCKET_H],[1]) fi @@ -791,7 +844,7 @@ if test "${CARES_THREADS}" = "yes" -a "x${ac_cv_native_windows}" != "xyes" ; the if test "${CARES_THREADS}" = "yes" ; then AC_CHECK_HEADERS([pthread.h pthread_np.h]) LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS" CC="$PTHREAD_CC" CXX="$PTHREAD_CXX" fi @@ -849,9 +902,10 @@ fi AC_MSG_CHECKING([whether to build tests]) AC_MSG_RESULT([$build_tests]) - AM_CONDITIONAL(BUILD_TESTS, test "x$build_tests" = "xyes") +AC_SUBST(AM_CFLAGS) +AC_SUBST(AM_CPPFLAGS) AC_SUBST(BUILD_SUBDIRS) AC_CONFIG_FILES([Makefile \ diff --git a/deps/cares/docs/Makefile.in b/deps/cares/docs/Makefile.in index 7b5eefa97750f9..4f5bb62409c7ab 100644 --- a/deps/cares/docs/Makefile.in +++ b/deps/cares/docs/Makefile.in @@ -180,6 +180,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ +AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ diff --git a/deps/cares/docs/ares_dns_record.3 b/deps/cares/docs/ares_dns_record.3 index 39232417d09b86..fe23b5eece60e5 100644 --- a/deps/cares/docs/ares_dns_record.3 +++ b/deps/cares/docs/ares_dns_record.3 @@ -252,6 +252,28 @@ zone denoted by the Zone Section. .br .RE +.B ares_dns_parse_flags_t - +Flags for altering \fIares_dns_parse(3)\fP behaviour: +.RS 4 +.B ARES_DNS_PARSE_AN_BASE_RAW +- Parse Answer Section from RFC 1035 that allow name compression as RAW RR type +.br +.B ARES_DNS_PARSE_NS_BASE_RAW +- Parse Authority Section from RFC 1035 that allow name compression as RAW RR type +.br +.B ARES_DNS_PARSE_AR_BASE_RAW +- Parse Additional Section from RFC 1035 that allow name compression as RAW RR type +.br +.B ARES_DNS_PARSE_AN_EXT_RAW +- Parse Answer Section from later RFCs (no name compression) as RAW RR type +.br +.B ARES_DNS_PARSE_NS_EXT_RAW +- Parse Authority Section from later RFCs (no name compression) as RAW RR type +.br +.B ARES_DNS_PARSE_AR_EXT_RAW +- Parse Additional Section from later RFCs (no name compression) as RAW RR type +.br +.RE .SH DESCRIPTION diff --git a/deps/cares/docs/ares_fds.3 b/deps/cares/docs/ares_fds.3 index bbb6b2e8abe0df..5871be5af6a201 100644 --- a/deps/cares/docs/ares_fds.3 +++ b/deps/cares/docs/ares_fds.3 @@ -1,36 +1,26 @@ .\" .\" Copyright 1998 by the Massachusetts Institute of Technology. -.\" -.\" 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. -.\" .\" SPDX-License-Identifier: MIT .\" .TH ARES_FDS 3 "23 July 1998" .SH NAME -ares_fds \- return file descriptors to select on +ares_fds \- return file descriptors to select on (deprecated) .SH SYNOPSIS .nf #include int ares_fds(ares_channel_t *\fIchannel\fP, fd_set *\fIread_fds\fP, - fd_set *\fIwrite_fds\fP) + fd_set *\fIwrite_fds\fP) .fi .SH DESCRIPTION +See the \fBNOTES\fP section on issues with this function and alternatives. + The \fBares_fds(3)\fP function retrieves the set of file descriptors which the -calling application should select on for reading and writing for the +calling application should \fBselect(2)\fP on for reading and writing for the processing of name service queries pending on the name service channel -identified by \fIchannel\fP. +identified by \fIchannel\fP. Should not be used with \fBARES_OPT_EVENT_THREAD\fP +is passed to \fIares_init_options(3)\fP. File descriptors will be set in the file descriptor sets pointed to by \fIread_fds\fP and \fIwrite_fds\fP as appropriate. File descriptors already @@ -41,7 +31,28 @@ caller. \fBares_fds(3)\fP returns a value that is one greater than the number of the highest socket set in either \fIread_fds\fP or \fIwrite_fds\fP. If no queries are active, \fBares_fds(3)\fP returns 0. + +.SH NOTES +The \fBselect(2)\fP call which takes the \fIfd_set\fP parameter has significant +limitations which can impact modern systems. The limitations can vary from +system to system, but in general if the file descriptor value itself is greater +than 1024 (not the count but the actual value), this can lead to +\fBares_fds(3)\fP writing out of bounds which will cause a system crash. In +modern networking clients, it is not unusual to have file descriptor values +above 1024, especially when a library is pulled in as a dependency into a larger +project. + +c-ares does not attempt to detect this condition to prevent crashes due to both +implementation-defined behavior in the OS as well as integrator-controllable +tunables which may impact the limits. + +It is recommended to use \fBARES_OPT_EVENT_THREAD\fP passed to +\fIares_init_options(3)\fP, or socket state callbacks +(\fBARES_OPT_SOCK_STATE_CB\fP) registered via \fIares_init_options(3)\fP and use +more modern methods to check for socket readable/writable state such as +\fIpoll(2)\fP, \fIepoll(2)\fP, or \fIkqueue(2)\fP. .SH SEE ALSO +.BR ares_init_options (3), .BR ares_timeout (3), .BR ares_process (3) .SH AUTHOR diff --git a/deps/cares/docs/ares_getaddrinfo.3 b/deps/cares/docs/ares_getaddrinfo.3 index 27585aa3d5426a..234e6568879b7c 100644 --- a/deps/cares/docs/ares_getaddrinfo.3 +++ b/deps/cares/docs/ares_getaddrinfo.3 @@ -1,18 +1,5 @@ .\" .\" Copyright 1998 by the Massachusetts Institute of Technology. -.\" -.\" 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. -.\" .\" SPDX-License-Identifier: MIT .\" .TH ARES_GETADDRINFO 3 "4 November 2018" @@ -91,11 +78,15 @@ Completion or failure of the query may happen immediately, or may happen during a later call to \fIares_process(3)\fP, \fIares_destroy(3)\fP or \fIares_cancel(3)\fP. .PP -If this is called from a thread other than which the main program event loop is -running, care needs to be taken to ensure any file descriptor lists are updated -immediately within the eventloop. When the associated callback is called, -it is called with a channel lock so care must be taken to ensure any processing -is minimal to prevent DNS channel stalls. +When the associated callback is called, it is called with a channel lock so care +must be taken to ensure any processing is minimal to prevent DNS channel stalls. + +The callback may be triggered from a different thread than the one which +called \fIares_getaddrinfo(3)\fP. + +For integrators running their own event loops and not using \fBARES_OPT_EVENT_THREAD\fP, +care needs to be taken to ensure any file descriptor lists are updated immediately +within the eventloop when notified. .PP The callback argument .I arg diff --git a/deps/cares/docs/ares_gethostbyaddr.3 b/deps/cares/docs/ares_gethostbyaddr.3 index 4a250505281661..8d79d903a5715d 100644 --- a/deps/cares/docs/ares_gethostbyaddr.3 +++ b/deps/cares/docs/ares_gethostbyaddr.3 @@ -1,18 +1,5 @@ .\" .\" Copyright 1998 by the Massachusetts Institute of Technology. -.\" -.\" 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. -.\" .\" SPDX-License-Identifier: MIT .\" .TH ARES_GETHOSTBYADDR 3 "24 July 1998" @@ -99,11 +86,15 @@ did not complete successfully, will be .BR NULL . .PP -If this is called from a thread other than which the main program event loop is -running, care needs to be taken to ensure any file descriptor lists are updated -immediately within the eventloop. When the associated callback is called, -it is called with a channel lock so care must be taken to ensure any processing -is minimal to prevent DNS channel stalls. +When the associated callback is called, it is called with a channel lock so care +must be taken to ensure any processing is minimal to prevent DNS channel stalls. + +The callback may be triggered from a different thread than the one which +called \fIares_gethostbyaddr(3)\fP. + +For integrators running their own event loops and not using \fBARES_OPT_EVENT_THREAD\fP, +care needs to be taken to ensure any file descriptor lists are updated immediately +within the eventloop when notified. .SH SEE ALSO .BR ares_process (3), .BR ares_gethostbyname (3) diff --git a/deps/cares/docs/ares_gethostbyname.3 b/deps/cares/docs/ares_gethostbyname.3 index e6d302d0c7fdf2..1067ac11006ecb 100644 --- a/deps/cares/docs/ares_gethostbyname.3 +++ b/deps/cares/docs/ares_gethostbyname.3 @@ -1,18 +1,5 @@ .\" .\" Copyright 1998 by the Massachusetts Institute of Technology. -.\" -.\" 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. -.\" .\" SPDX-License-Identifier: MIT .\" .TH ARES_GETHOSTBYNAME 3 "25 July 1998" @@ -107,11 +94,15 @@ did not complete successfully, will be .BR NULL . .PP -If this is called from a thread other than which the main program event loop is -running, care needs to be taken to ensure any file descriptor lists are updated -immediately within the eventloop. When the associated callback is called, -it is called with a channel lock so care must be taken to ensure any processing -is minimal to prevent DNS channel stalls. +When the associated callback is called, it is called with a channel lock so care +must be taken to ensure any processing is minimal to prevent DNS channel stalls. + +The callback may be triggered from a different thread than the one which +called \fIares_gethostbyname(3)\fP. + +For integrators running their own event loops and not using \fBARES_OPT_EVENT_THREAD\fP, +care needs to be taken to ensure any file descriptor lists are updated immediately +within the eventloop when notified. .SH SEE ALSO .BR ares_process (3), .BR ares_gethostbyaddr (3) diff --git a/deps/cares/docs/ares_getnameinfo.3 b/deps/cares/docs/ares_getnameinfo.3 index c941a68f655906..b4161d4000f6ff 100644 --- a/deps/cares/docs/ares_getnameinfo.3 +++ b/deps/cares/docs/ares_getnameinfo.3 @@ -1,18 +1,5 @@ .\" .\" Copyright 2005 by Dominick Meglio. -.\" -.\" 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. -.\" .\" SPDX-License-Identifier: MIT .\" .TH ARES_GETNAMEINFO 3 "1 May 2009" @@ -86,11 +73,15 @@ failed, the ares library will invoke \fIcallback\fP. Completion or failure of the query may happen immediately, or may happen during a later call to \fIares_process(3)\fP, \fIares_destroy(3)\fP or \fIares_cancel(3)\fP. .PP -If this is called from a thread other than which the main program event loop is -running, care needs to be taken to ensure any file descriptor lists are updated -immediately within the eventloop. When the associated callback is called, -it is called with a channel lock so care must be taken to ensure any processing -is minimal to prevent DNS channel stalls. +When the associated callback is called, it is called with a channel lock so care +must be taken to ensure any processing is minimal to prevent DNS channel stalls. + +The callback may be triggered from a different thread than the one which +called \fIares_getnameinfo(3)\fP. + +For integrators running their own event loops and not using \fBARES_OPT_EVENT_THREAD\fP, +care needs to be taken to ensure any file descriptor lists are updated immediately +within the eventloop when notified. .PP The callback argument .I arg diff --git a/deps/cares/docs/ares_getsock.3 b/deps/cares/docs/ares_getsock.3 index 6d040c0330c4d0..126d7de69c038d 100644 --- a/deps/cares/docs/ares_getsock.3 +++ b/deps/cares/docs/ares_getsock.3 @@ -1,18 +1,5 @@ .\" .\" Copyright 1998 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. -.\" .\" SPDX-License-Identifier: MIT .\" .TH ARES_GETSOCK 3 "11 March 2010" @@ -56,9 +43,11 @@ This function was added in c-ares 1.3.1 and deprecated in c-ares 1.20.0 due to the implementation of \fBARES_OPT_MAX_UDP_QUERIES\fP which makes it likely to exceed 16 open file descriptors. -It is recommended to use socket state callbacks (\fBARES_OPT_SOCK_STATE_CB\fP) -registered via \fBares_init_options(3)\fP. +It is recommended to use \fBARES_OPT_EVENT_THREAD\fP passed to +\fIares_init_options(3)\fP or to use socket state callbacks +(\fBARES_OPT_SOCK_STATE_CB\fP) registered via \fBares_init_options(3)\fP. .SH SEE ALSO +.BR ares_init_options (3), .BR ares_timeout (3), .BR ares_fds (3), .BR ares_process (3) diff --git a/deps/cares/docs/ares_init_options.3 b/deps/cares/docs/ares_init_options.3 index 942c1462783063..7700defd8f4dc8 100644 --- a/deps/cares/docs/ares_init_options.3 +++ b/deps/cares/docs/ares_init_options.3 @@ -35,6 +35,7 @@ struct ares_options { int udp_max_queries; int maxtimeout; /* in milliseconds */ unsigned int qcache_max_ttl; /* in seconds */ + ares_evsys_t evsys; }; int ares_init_options(ares_channel_t **\fIchannelptr\fP, @@ -217,6 +218,8 @@ The value of will be passed as the .I data argument. + +Cannot be used with \fBARES_OPT_EVENT_THREAD\fP. .TP 18 .B ARES_OPT_SORTLIST .B struct apattern *\fIsortlist\fP; @@ -286,6 +289,29 @@ message. This must be a non-zero value otherwise the cache will be disabled. Choose a reasonable value for your application such as 300 (5 minutes) or 3600 (1 hour). .br +.TP 18 +.B ARES_OPT_EVENT_THREAD +.B ares_evsys_t \fIevsys\fP; +.br +Enable the built-in event thread (Recommended). Introduced in c-ares 1.26.0. +Set the \fIevsys\fP parameter to \fBARES_EVSYS_DEFAULT\fP (0). Other values are +reserved for testing and should not be used by integrators. + +This option cannot be used with the \fBARES_OPT_SOCK_STATE_CB\fP option, nor the +\fIares_set_socket_functions(3)\fP or +\fIares_set_socket_configure_callback(3)\fP functions. + +When enabled, the integrator is no longer responsible for notifying c-ares of +any events on the file descriptors, so \fIares_process(3)\fP nor +\fIares_process_fd(3)\fP should ever be called when this option is enabled. + +Use \fIares_threadsafety(3)\fP to determine if this option is available to be +used. + +Returns \fBARES_ENOTIMP\fP if this option is passed but not available, and +\fBARES_ESERVFAIL\fP if there is a critical failure during initialization of +the event thread. +.br .PP The \fIoptmask\fP parameter also includes options without a corresponding field in the diff --git a/deps/cares/docs/ares_send.3 b/deps/cares/docs/ares_send.3 index 83ddb7ee5fa5c0..8126647f4b7fcb 100644 --- a/deps/cares/docs/ares_send.3 +++ b/deps/cares/docs/ares_send.3 @@ -1,18 +1,5 @@ .\" .\" Copyright 1998 by the Massachusetts Institute of Technology. -.\" -.\" 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. -.\" .\" SPDX-License-Identifier: MIT .\" .TH ARES_SEND 3 "25 July 1998" @@ -44,16 +31,17 @@ to the DNS protocol. When the query is complete or has failed, the ares library will invoke .IR callback . Completion or failure of the query may happen immediately, or may -happen during a later call to -.BR ares_process (3) -or -.BR ares_destroy (3). +happen later as network events are processed. .PP -If this is called from a thread other than which the main program event loop is -running, care needs to be taken to ensure any file descriptor lists are updated -immediately within the eventloop. When the associated callback is called, -it is called with a channel lock so care must be taken to ensure any processing -is minimal to prevent DNS channel stalls. +When the associated callback is called, it is called with a channel lock so care +must be taken to ensure any processing is minimal to prevent DNS channel stalls. + +The callback may be triggered from a different thread than the one which +called \fIares_send(3)\fP. + +For integrators running their own event loops and not using \fBARES_OPT_EVENT_THREAD\fP, +care needs to be taken to ensure any file descriptor lists are updated immediately +within the eventloop when notified. .PP The callback argument .I arg diff --git a/deps/cares/docs/ares_set_socket_configure_callback.3 b/deps/cares/docs/ares_set_socket_configure_callback.3 index 1f44ae3c08b47f..f5d7bb5d507d2f 100644 --- a/deps/cares/docs/ares_set_socket_configure_callback.3 +++ b/deps/cares/docs/ares_set_socket_configure_callback.3 @@ -18,8 +18,10 @@ void ares_set_socket_configure_callback(ares_channel_t *\fIchannel\fP, .fi .SH DESCRIPTION .PP -This function sets a \fIcallback\fP in the given ares channel handle. This -callback function will be invoked after the socket has been created, but +This function sets a \fIcallback\fP in the given ares channel handle. Cannot be +used when \fBARES_OPT_EVENT_THREAD\fP is passed to \fIares_init_options(3)\fP. + +This callback function will be invoked after the socket has been created, but before it has been connected to the remote server, which is an ideal time to configure various socket options. The callback must return ARES_SUCCESS if things are fine, or return -1 to signal an error. A returned error will diff --git a/deps/cares/docs/ares_set_socket_functions.3 b/deps/cares/docs/ares_set_socket_functions.3 index a1d9f7741ffba0..c92934ba82e5e3 100644 --- a/deps/cares/docs/ares_set_socket_functions.3 +++ b/deps/cares/docs/ares_set_socket_functions.3 @@ -23,6 +23,8 @@ void ares_set_socket_functions(ares_channel_t *\fIchannel\fP, .SH DESCRIPTION .PP This function sets a set of callback \fIfunctions\fP in the given ares channel handle. +Cannot be used when \fBARES_OPT_EVENT_THREAD\fP is passed to \fIares_init_options(3)\fP. + These callback functions will be invoked to create/destroy socket objects and perform io, instead of the normal system calls. A client application can override normal network operation fully through this functionality, and provide its own transport layer. You diff --git a/deps/cares/docs/ares_threadsafety.3 b/deps/cares/docs/ares_threadsafety.3 index 782893a5b4b039..119c79ff5aa709 100644 --- a/deps/cares/docs/ares_threadsafety.3 +++ b/deps/cares/docs/ares_threadsafety.3 @@ -17,8 +17,10 @@ thread safety enabled or not. As of c-ares 1.23.0, this simply means that every public function which references an \fIares_channel_t\fP object will lock the channel on entry and release the lock on exit of the function. This will prevent concurrent -thread access to the channel, thus ensuring no corruption can occur. Future -versions will likely implement more threading-specific features. +thread access to the channel, thus ensuring no corruption can occur. + +As of c-ares 1.26.0, this also indicates if \fBARES_OPT_EVENT_THREAD\fP can +be passed to \fIares_init_options(3)\fP. .SH RETURN VALUES \fIares_threadsafety(3)\fP can return any of the following values: diff --git a/deps/cares/include/Makefile.in b/deps/cares/include/Makefile.in index f96424170c3362..cf8cb55170cc8b 100644 --- a/deps/cares/include/Makefile.in +++ b/deps/cares/include/Makefile.in @@ -191,6 +191,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/ares_build.h.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ +AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ diff --git a/deps/cares/include/ares.h b/deps/cares/include/ares.h index f0b3add591dc1b..99c4ec5081b64e 100644 --- a/deps/cares/include/ares.h +++ b/deps/cares/include/ares.h @@ -170,6 +170,22 @@ typedef enum { ARES_TRUE = 1 } ares_bool_t; +/*! Values for ARES_OPT_EVENT_THREAD */ +typedef enum { + /*! Default (best choice) event system */ + ARES_EVSYS_DEFAULT = 0, + /*! Win32 IOCP/AFD_POLL event system */ + ARES_EVSYS_WIN32 = 1, + /*! Linux epoll */ + ARES_EVSYS_EPOLL = 2, + /*! BSD/MacOS kqueue */ + ARES_EVSYS_KQUEUE = 3, + /*! POSIX poll() */ + ARES_EVSYS_POLL = 4, + /*! last fallback on Unix-like systems, select() */ + ARES_EVSYS_SELECT = 5 +} ares_evsys_t; + /* Flag values */ #define ARES_FLAG_USEVC (1 << 0) #define ARES_FLAG_PRIMARY (1 << 1) @@ -204,6 +220,7 @@ typedef enum { #define ARES_OPT_UDP_MAX_QUERIES (1 << 19) #define ARES_OPT_MAXTIMEOUTMS (1 << 20) #define ARES_OPT_QUERY_CACHE (1 << 21) +#define ARES_OPT_EVENT_THREAD (1 << 22) /* Nameinfo flag values */ #define ARES_NI_NOFQDN (1 << 0) @@ -316,6 +333,7 @@ struct ares_options { int udp_max_queries; int maxtimeout; /* in milliseconds */ unsigned int qcache_max_ttl; /* Maximum TTL for query cache, 0=disabled */ + ares_evsys_t evsys; }; struct hostent; diff --git a/deps/cares/include/ares_build.h.cmake b/deps/cares/include/ares_build.h.cmake index e2ab7173bf8fde..da8a7e064c0a45 100644 --- a/deps/cares/include/ares_build.h.cmake +++ b/deps/cares/include/ares_build.h.cmake @@ -12,7 +12,6 @@ * files. We need to include some dependent headers that may be system specific * for C-Ares */ #cmakedefine CARES_HAVE_SYS_TYPES_H -#cmakedefine CARES_HAVE_SYS_RANDOM_H #cmakedefine CARES_HAVE_SYS_SOCKET_H #cmakedefine CARES_HAVE_WINDOWS_H #cmakedefine CARES_HAVE_WS2TCPIP_H @@ -25,10 +24,6 @@ # include #endif -#ifdef CARES_HAVE_SYS_RANDOM_H -# include -#endif - #ifdef CARES_HAVE_SYS_SOCKET_H # include #endif diff --git a/deps/cares/include/ares_build.h.in b/deps/cares/include/ares_build.h.in index b4a26d891e46f1..e55b39b0e3e5bd 100644 --- a/deps/cares/include/ares_build.h.in +++ b/deps/cares/include/ares_build.h.in @@ -12,7 +12,6 @@ * files. We need to include some dependent headers that may be system specific * for C-Ares */ #undef CARES_HAVE_SYS_TYPES_H -#undef CARES_HAVE_SYS_RANDOM_H #undef CARES_HAVE_SYS_SOCKET_H #undef CARES_HAVE_WINDOWS_H #undef CARES_HAVE_WS2TCPIP_H @@ -25,10 +24,6 @@ # include #endif -#ifdef CARES_HAVE_SYS_RANDOM_H -# include -#endif - #ifdef CARES_HAVE_SYS_SOCKET_H # include #endif diff --git a/deps/cares/include/ares_dns_record.h b/deps/cares/include/ares_dns_record.h index 2cc16982ba4f1e..8a6d7781bf50dd 100644 --- a/deps/cares/include/ares_dns_record.h +++ b/deps/cares/include/ares_dns_record.h @@ -384,6 +384,16 @@ typedef enum { ARES_OPT_DATATYPE_NAME = 11 } ares_dns_opt_datatype_t; +/*! Data type for flags to ares_dns_parse() */ +typedef enum { + ARES_DNS_PARSE_AN_BASE_RAW = 1 << 0, /*!< Parse Answers from RFC 1035 that allow name compression as RAW */ + ARES_DNS_PARSE_NS_BASE_RAW = 1 << 1, /*!< Parse Authority from RFC 1035 that allow name compression as RAW */ + ARES_DNS_PARSE_AR_BASE_RAW = 1 << 2, /*!< Parse Additional from RFC 1035 that allow name compression as RAW */ + ARES_DNS_PARSE_AN_EXT_RAW = 1 << 3, /*!< Parse Answers from later RFCs (no name compression) RAW */ + ARES_DNS_PARSE_NS_EXT_RAW = 1 << 4, /*!< Parse Authority from later RFCs (no name compression) as RAW */ + ARES_DNS_PARSE_AR_EXT_RAW = 1 << 5, /*!< Parse Additional from later RFCs (no name compression) as RAW */ +} ares_dns_parse_flags_t; + /*! String representation of DNS Record Type * * \param[in] type DNS Record Type @@ -430,7 +440,7 @@ CARES_EXTERN ares_bool_t ares_dns_class_fromstr(ares_dns_class_t *qclass, /*! Convert DNS record type as string to ares_dns_rec_type_t * - * \param[out] qclass Pointer passed by reference to write record type + * \param[out] qtype Pointer passed by reference to write record type * \param[in] str String to convert * \return ARES_TRUE on success */ @@ -926,7 +936,7 @@ CARES_EXTERN ares_bool_t ares_dns_rr_get_opt_byid(const ares_dns_rr_t *dns_rr * * \param[in] buf pointer to bytes to be parsed * \param[in] buf_len Length of buf provided - * \param[in] flags Flags dictating how the message should be parsed. TBD. + * \param[in] flags Flags dictating how the message should be parsed. * \param[out] dnsrec Pointer passed by reference for a new DNS record object * that must be ares_dns_record_destroy()'d by caller. * \return ARES_SUCCESS on success diff --git a/deps/cares/include/ares_version.h b/deps/cares/include/ares_version.h index 97f92c796f0dd0..6768a33e0814d8 100644 --- a/deps/cares/include/ares_version.h +++ b/deps/cares/include/ares_version.h @@ -31,12 +31,12 @@ #define ARES_COPYRIGHT "2004 - 2024 Daniel Stenberg, ." #define ARES_VERSION_MAJOR 1 -#define ARES_VERSION_MINOR 25 +#define ARES_VERSION_MINOR 26 #define ARES_VERSION_PATCH 0 #define ARES_VERSION \ ((ARES_VERSION_MAJOR << 16) | (ARES_VERSION_MINOR << 8) | \ (ARES_VERSION_PATCH)) -#define ARES_VERSION_STR "1.25.0" +#define ARES_VERSION_STR "1.26.0" #if (ARES_VERSION >= 0x010700) # define CARES_HAVE_ARES_LIBRARY_INIT 1 diff --git a/deps/cares/src/Makefile.in b/deps/cares/src/Makefile.in index ce26e84e6db715..040373fe95a247 100644 --- a/deps/cares/src/Makefile.in +++ b/deps/cares/src/Makefile.in @@ -202,6 +202,8 @@ am__relativize = \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ +AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ diff --git a/deps/cares/src/lib/CMakeLists.txt b/deps/cares/src/lib/CMakeLists.txt index ce3b5a9b7cc70d..015e57f8193ebd 100644 --- a/deps/cares/src/lib/CMakeLists.txt +++ b/deps/cares/src/lib/CMakeLists.txt @@ -47,7 +47,7 @@ IF (CARES_SHARED) TARGET_INCLUDE_DIRECTORIES (${PROJECT_NAME} PUBLIC "$" "$" - "$" + "$" "$" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" ) @@ -99,7 +99,7 @@ IF (CARES_STATIC) TARGET_INCLUDE_DIRECTORIES (${LIBNAME} PUBLIC "$" "$" - "$" + "$" "$" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" ) diff --git a/deps/cares/src/lib/Makefile.am b/deps/cares/src/lib/Makefile.am index 39f28578390123..44e04bd35ccf7d 100644 --- a/deps/cares/src/lib/Makefile.am +++ b/deps/cares/src/lib/Makefile.am @@ -8,10 +8,10 @@ ACLOCAL_AMFLAGS = -I m4 --install # being currently built and tested are searched before the library which # might possibly already be installed in the system. -AM_CPPFLAGS = -I$(top_builddir)/include \ - -I$(top_builddir)/src/lib \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/lib +AM_CPPFLAGS += -I$(top_builddir)/include \ + -I$(top_builddir)/src/lib \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src/lib lib_LTLIBRARIES = libcares.la diff --git a/deps/cares/src/lib/Makefile.in b/deps/cares/src/lib/Makefile.in index 03da5ff0cf88a6..c516cba2cf46d2 100644 --- a/deps/cares/src/lib/Makefile.in +++ b/deps/cares/src/lib/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Wed Jan 3 09:43:05 CET 2024 +# from AX_AM_MACROS_STATIC on Fri Jan 26 17:16:19 CET 2024 # Copyright (C) The c-ares project and its contributors # SPDX-License-Identifier: MIT @@ -176,7 +176,14 @@ am__objects_1 = libcares_la-ares__addrinfo2hostent.lo \ libcares_la-ares_data.lo libcares_la-ares_destroy.lo \ libcares_la-ares_dns_mapping.lo libcares_la-ares_dns_name.lo \ libcares_la-ares_dns_parse.lo libcares_la-ares_dns_record.lo \ - libcares_la-ares_dns_write.lo libcares_la-ares_expand_name.lo \ + libcares_la-ares_dns_write.lo libcares_la-ares_event_epoll.lo \ + libcares_la-ares_event_kqueue.lo \ + libcares_la-ares_event_poll.lo \ + libcares_la-ares_event_select.lo \ + libcares_la-ares_event_thread.lo \ + libcares_la-ares_event_wake_pipe.lo \ + libcares_la-ares_event_win32.lo \ + libcares_la-ares_expand_name.lo \ libcares_la-ares_expand_string.lo libcares_la-ares_fds.lo \ libcares_la-ares_free_hostent.lo \ libcares_la-ares_free_string.lo \ @@ -263,6 +270,13 @@ am__depfiles_remade = \ ./$(DEPDIR)/libcares_la-ares_dns_parse.Plo \ ./$(DEPDIR)/libcares_la-ares_dns_record.Plo \ ./$(DEPDIR)/libcares_la-ares_dns_write.Plo \ + ./$(DEPDIR)/libcares_la-ares_event_epoll.Plo \ + ./$(DEPDIR)/libcares_la-ares_event_kqueue.Plo \ + ./$(DEPDIR)/libcares_la-ares_event_poll.Plo \ + ./$(DEPDIR)/libcares_la-ares_event_select.Plo \ + ./$(DEPDIR)/libcares_la-ares_event_thread.Plo \ + ./$(DEPDIR)/libcares_la-ares_event_wake_pipe.Plo \ + ./$(DEPDIR)/libcares_la-ares_event_win32.Plo \ ./$(DEPDIR)/libcares_la-ares_expand_name.Plo \ ./$(DEPDIR)/libcares_la-ares_expand_string.Plo \ ./$(DEPDIR)/libcares_la-ares_fds.Plo \ @@ -401,6 +415,15 @@ am__relativize = \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ + +# Specify our include paths here, and do it relative to $(top_srcdir) and +# $(top_builddir), to ensure that these paths which belong to the library +# being currently built and tested are searched before the library which +# might possibly already be installed in the system. +AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_builddir)/include \ + -I$(top_builddir)/src/lib -I$(top_srcdir)/include \ + -I$(top_srcdir)/src/lib AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ @@ -557,16 +580,6 @@ top_srcdir = @top_srcdir@ # SPDX-License-Identifier: MIT AUTOMAKE_OPTIONS = foreign subdir-objects nostdinc 1.9.6 ACLOCAL_AMFLAGS = -I m4 --install - -# Specify our include paths here, and do it relative to $(top_srcdir) and -# $(top_builddir), to ensure that these paths which belong to the library -# being currently built and tested are searched before the library which -# might possibly already be installed in the system. -AM_CPPFLAGS = -I$(top_builddir)/include \ - -I$(top_builddir)/src/lib \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/lib - lib_LTLIBRARIES = libcares.la man_MANS = $(MANPAGES) @@ -630,6 +643,13 @@ CSOURCES = ares__addrinfo2hostent.c \ ares_dns_parse.c \ ares_dns_record.c \ ares_dns_write.c \ + ares_event_epoll.c \ + ares_event_kqueue.c \ + ares_event_poll.c \ + ares_event_select.c \ + ares_event_thread.c \ + ares_event_wake_pipe.c \ + ares_event_win32.c \ ares_expand_name.c \ ares_expand_string.c \ ares_fds.c \ @@ -687,9 +707,12 @@ HHEADERS = ares__buf.h \ ares__iface_ips.h \ ares__llist.h \ ares__slist.h \ + ares__threads.h \ ares_android.h \ ares_data.h \ ares_dns_private.h \ + ares_event.h \ + ares_event_win32.h \ ares_getenv.h \ ares_inet_net_pton.h \ ares_ipv6.h \ @@ -827,6 +850,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_dns_parse.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_dns_record.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_dns_write.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_event_epoll.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_event_kqueue.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_event_poll.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_event_select.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_event_thread.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_event_wake_pipe.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_event_win32.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_expand_name.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_expand_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcares_la-ares_fds.Plo@am__quote@ # am--include-marker @@ -1094,6 +1124,55 @@ libcares_la-ares_dns_write.lo: ares_dns_write.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_dns_write.lo `test -f 'ares_dns_write.c' || echo '$(srcdir)/'`ares_dns_write.c +libcares_la-ares_event_epoll.lo: ares_event_epoll.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_event_epoll.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_event_epoll.Tpo -c -o libcares_la-ares_event_epoll.lo `test -f 'ares_event_epoll.c' || echo '$(srcdir)/'`ares_event_epoll.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcares_la-ares_event_epoll.Tpo $(DEPDIR)/libcares_la-ares_event_epoll.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ares_event_epoll.c' object='libcares_la-ares_event_epoll.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_event_epoll.lo `test -f 'ares_event_epoll.c' || echo '$(srcdir)/'`ares_event_epoll.c + +libcares_la-ares_event_kqueue.lo: ares_event_kqueue.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_event_kqueue.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_event_kqueue.Tpo -c -o libcares_la-ares_event_kqueue.lo `test -f 'ares_event_kqueue.c' || echo '$(srcdir)/'`ares_event_kqueue.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcares_la-ares_event_kqueue.Tpo $(DEPDIR)/libcares_la-ares_event_kqueue.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ares_event_kqueue.c' object='libcares_la-ares_event_kqueue.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_event_kqueue.lo `test -f 'ares_event_kqueue.c' || echo '$(srcdir)/'`ares_event_kqueue.c + +libcares_la-ares_event_poll.lo: ares_event_poll.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_event_poll.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_event_poll.Tpo -c -o libcares_la-ares_event_poll.lo `test -f 'ares_event_poll.c' || echo '$(srcdir)/'`ares_event_poll.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcares_la-ares_event_poll.Tpo $(DEPDIR)/libcares_la-ares_event_poll.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ares_event_poll.c' object='libcares_la-ares_event_poll.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_event_poll.lo `test -f 'ares_event_poll.c' || echo '$(srcdir)/'`ares_event_poll.c + +libcares_la-ares_event_select.lo: ares_event_select.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_event_select.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_event_select.Tpo -c -o libcares_la-ares_event_select.lo `test -f 'ares_event_select.c' || echo '$(srcdir)/'`ares_event_select.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcares_la-ares_event_select.Tpo $(DEPDIR)/libcares_la-ares_event_select.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ares_event_select.c' object='libcares_la-ares_event_select.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_event_select.lo `test -f 'ares_event_select.c' || echo '$(srcdir)/'`ares_event_select.c + +libcares_la-ares_event_thread.lo: ares_event_thread.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_event_thread.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_event_thread.Tpo -c -o libcares_la-ares_event_thread.lo `test -f 'ares_event_thread.c' || echo '$(srcdir)/'`ares_event_thread.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcares_la-ares_event_thread.Tpo $(DEPDIR)/libcares_la-ares_event_thread.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ares_event_thread.c' object='libcares_la-ares_event_thread.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_event_thread.lo `test -f 'ares_event_thread.c' || echo '$(srcdir)/'`ares_event_thread.c + +libcares_la-ares_event_wake_pipe.lo: ares_event_wake_pipe.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_event_wake_pipe.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_event_wake_pipe.Tpo -c -o libcares_la-ares_event_wake_pipe.lo `test -f 'ares_event_wake_pipe.c' || echo '$(srcdir)/'`ares_event_wake_pipe.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcares_la-ares_event_wake_pipe.Tpo $(DEPDIR)/libcares_la-ares_event_wake_pipe.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ares_event_wake_pipe.c' object='libcares_la-ares_event_wake_pipe.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_event_wake_pipe.lo `test -f 'ares_event_wake_pipe.c' || echo '$(srcdir)/'`ares_event_wake_pipe.c + +libcares_la-ares_event_win32.lo: ares_event_win32.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_event_win32.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_event_win32.Tpo -c -o libcares_la-ares_event_win32.lo `test -f 'ares_event_win32.c' || echo '$(srcdir)/'`ares_event_win32.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcares_la-ares_event_win32.Tpo $(DEPDIR)/libcares_la-ares_event_win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ares_event_win32.c' object='libcares_la-ares_event_win32.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_event_win32.lo `test -f 'ares_event_win32.c' || echo '$(srcdir)/'`ares_event_win32.c + libcares_la-ares_expand_name.lo: ares_expand_name.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_expand_name.lo -MD -MP -MF $(DEPDIR)/libcares_la-ares_expand_name.Tpo -c -o libcares_la-ares_expand_name.lo `test -f 'ares_expand_name.c' || echo '$(srcdir)/'`ares_expand_name.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcares_la-ares_expand_name.Tpo $(DEPDIR)/libcares_la-ares_expand_name.Plo @@ -1665,6 +1744,13 @@ distclean: distclean-recursive -rm -f ./$(DEPDIR)/libcares_la-ares_dns_parse.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_dns_record.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_dns_write.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_epoll.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_kqueue.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_poll.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_select.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_thread.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_wake_pipe.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_win32.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_expand_name.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_expand_string.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_fds.Plo @@ -1785,6 +1871,13 @@ maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/libcares_la-ares_dns_parse.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_dns_record.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_dns_write.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_epoll.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_kqueue.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_poll.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_select.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_thread.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_wake_pipe.Plo + -rm -f ./$(DEPDIR)/libcares_la-ares_event_win32.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_expand_name.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_expand_string.Plo -rm -f ./$(DEPDIR)/libcares_la-ares_fds.Plo diff --git a/deps/cares/src/lib/Makefile.inc b/deps/cares/src/lib/Makefile.inc index f178f1ffbbffd0..29a65fd35b1dd0 100644 --- a/deps/cares/src/lib/Makefile.inc +++ b/deps/cares/src/lib/Makefile.inc @@ -28,6 +28,13 @@ CSOURCES = ares__addrinfo2hostent.c \ ares_dns_parse.c \ ares_dns_record.c \ ares_dns_write.c \ + ares_event_epoll.c \ + ares_event_kqueue.c \ + ares_event_poll.c \ + ares_event_select.c \ + ares_event_thread.c \ + ares_event_wake_pipe.c \ + ares_event_win32.c \ ares_expand_name.c \ ares_expand_string.c \ ares_fds.c \ @@ -85,9 +92,12 @@ HHEADERS = ares__buf.h \ ares__iface_ips.h \ ares__llist.h \ ares__slist.h \ + ares__threads.h \ ares_android.h \ ares_data.h \ ares_dns_private.h \ + ares_event.h \ + ares_event_win32.h \ ares_getenv.h \ ares_inet_net_pton.h \ ares_ipv6.h \ diff --git a/deps/cares/src/lib/ares__htable.c b/deps/cares/src/lib/ares__htable.c index 47d0c98e51e319..04bd8fdf7fd889 100644 --- a/deps/cares/src/lib/ares__htable.c +++ b/deps/cares/src/lib/ares__htable.c @@ -135,6 +135,35 @@ ares__htable_t *ares__htable_create(ares__htable_hashfunc_t hash_func, return NULL; } + +const void **ares__htable_all_buckets(const ares__htable_t *htable, size_t *num) +{ + const void **out = NULL; + size_t cnt = 0; + size_t i; + + if (htable == NULL || num == NULL) + return NULL; + + *num = 0; + + out = ares_malloc_zero(sizeof(*out) * htable->num_keys); + if (out == NULL) + return NULL; + + for (i=0; isize; i++) { + ares__llist_node_t *node; + for (node = ares__llist_node_first(htable->buckets[i]); node != NULL; + node = ares__llist_node_next(node)) { + out[cnt++] = ares__llist_node_val(node); + } + } + + *num = cnt; + return out; +} + + /*! Grabs the Hashtable index from the key and length. The h index is * the hash of the function reduced to the size of the bucket list. * We are doing "hash & (size - 1)" since we are guaranteeing a power of diff --git a/deps/cares/src/lib/ares__htable.h b/deps/cares/src/lib/ares__htable.h index 89103bdd5d8f75..0e83c24ef72eff 100644 --- a/deps/cares/src/lib/ares__htable.h +++ b/deps/cares/src/lib/ares__htable.h @@ -110,6 +110,18 @@ ares__htable_t *ares__htable_create(ares__htable_hashfunc_t hash_func, */ size_t ares__htable_num_keys(const ares__htable_t *htable); +/*! Retrieve an array of buckets from the hashtable. This is mainly used as + * a helper for retrieving an array of keys. + * + * \param[in] htable Initialized hashtable + * \param[out] num Count of returned buckets + * \return Array of pointers to the buckets. These are internal pointers + * to data within the hashtable, so if the key is removed, there + * will be a dangling pointer. It is expected wrappers will make + * such values safe by duplicating them. + */ +const void **ares__htable_all_buckets(const ares__htable_t *htable, size_t *num); + /*! Insert bucket into hashtable * * \param[in] htable Initialized hashtable. diff --git a/deps/cares/src/lib/ares__htable_asvp.c b/deps/cares/src/lib/ares__htable_asvp.c index f6991c3b1b80ad..66c9955f0f2199 100644 --- a/deps/cares/src/lib/ares__htable_asvp.c +++ b/deps/cares/src/lib/ares__htable_asvp.c @@ -112,6 +112,39 @@ ares__htable_asvp_t * return NULL; } +ares_socket_t *ares__htable_asvp_keys(const ares__htable_asvp_t *htable, size_t *num) +{ + const void **buckets = NULL; + size_t cnt = 0; + ares_socket_t *out = NULL; + size_t i; + + if (htable == NULL || num == NULL) + return NULL; + + *num = 0; + + buckets = ares__htable_all_buckets(htable->hash, &cnt); + if (buckets == NULL || cnt == 0) { + return NULL; + } + + out = ares_malloc_zero(sizeof(*out) * cnt); + if (out == NULL) { + ares_free(buckets); + return NULL; + } + + for (i=0; ikey; + } + + ares_free(buckets); + *num = cnt; + return out; +} + + ares_bool_t ares__htable_asvp_insert(ares__htable_asvp_t *htable, ares_socket_t key, void *val) { diff --git a/deps/cares/src/lib/ares__htable_asvp.h b/deps/cares/src/lib/ares__htable_asvp.h index 1ee505a2f0ba7c..9de81c0993718a 100644 --- a/deps/cares/src/lib/ares__htable_asvp.h +++ b/deps/cares/src/lib/ares__htable_asvp.h @@ -68,6 +68,15 @@ void ares__htable_asvp_destroy(ares__htable_asvp_t *htable); ares__htable_asvp_t * ares__htable_asvp_create(ares__htable_asvp_val_free_t val_free); +/*! Retrieve an array of keys from the hashtable. + * + * \param[in] htable Initialized hashtable + * \param[out] num_keys Count of returned keys + * \return Array of keys in the hashtable. Must be free'd with ares_free(). + */ +ares_socket_t *ares__htable_asvp_keys(const ares__htable_asvp_t *htable, size_t *num); + + /*! Insert key/value into hash table * * \param[in] htable Initialized hash table diff --git a/deps/cares/src/lib/ares__parse_into_addrinfo.c b/deps/cares/src/lib/ares__parse_into_addrinfo.c index 308cc21458b63f..a5ce0c594fc3be 100644 --- a/deps/cares/src/lib/ares__parse_into_addrinfo.c +++ b/deps/cares/src/lib/ares__parse_into_addrinfo.c @@ -81,7 +81,6 @@ ares_status_t ares__parse_into_addrinfo(const unsigned char *abuf, size_t alen, } for (i = 0; i < ancount; i++) { - const char *rname = NULL; ares_dns_rec_type_t rtype; const ares_dns_rr_t *rr = ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); @@ -91,13 +90,18 @@ ares_status_t ares__parse_into_addrinfo(const unsigned char *abuf, size_t alen, } rtype = ares_dns_rr_get_type(rr); - rname = ares_dns_rr_get_name(rr); - /* Old code did this hostname sanity check */ - if ((rtype == ARES_REC_TYPE_A || rtype == ARES_REC_TYPE_AAAA) && - strcasecmp(rname, hostname) != 0) { - continue; - } + /* Issue #683 + * Old code did this hostname sanity check, however it appears this is + * flawed logic. Other resolvers don't do this sanity check. Leaving + * this code commented out for future reference. + * + * rname = ares_dns_rr_get_name(rr); + * if ((rtype == ARES_REC_TYPE_A || rtype == ARES_REC_TYPE_AAAA) && + * strcasecmp(rname, hostname) != 0) { + * continue; + * } + */ if (rtype == ARES_REC_TYPE_CNAME) { struct ares_addrinfo_cname *cname; diff --git a/deps/cares/src/lib/ares__socket.c b/deps/cares/src/lib/ares__socket.c index c379f6059557de..ec6b745cbf724b 100644 --- a/deps/cares/src/lib/ares__socket.c +++ b/deps/cares/src/lib/ares__socket.c @@ -450,6 +450,8 @@ ares_ssize_t ares__socket_write(ares_channel_t *channel, ares_socket_t s, void ares_set_socket_callback(ares_channel_t *channel, ares_sock_create_callback cb, void *data) { + if (channel == NULL) + return; channel->sock_create_cb = cb; channel->sock_create_cb_data = data; } @@ -458,6 +460,8 @@ void ares_set_socket_configure_callback(ares_channel_t *channel, ares_sock_config_callback cb, void *data) { + if (channel == NULL || channel->optmask & ARES_OPT_EVENT_THREAD) + return; channel->sock_config_cb = cb; channel->sock_config_cb_data = data; } @@ -466,6 +470,8 @@ void ares_set_socket_functions(ares_channel_t *channel, const struct ares_socket_functions *funcs, void *data) { + if (channel == NULL || channel->optmask & ARES_OPT_EVENT_THREAD) + return; channel->sock_funcs = funcs; channel->sock_func_cb_data = data; } diff --git a/deps/cares/src/lib/ares__threads.c b/deps/cares/src/lib/ares__threads.c index fe924785787654..d5182535b2aa97 100644 --- a/deps/cares/src/lib/ares__threads.c +++ b/deps/cares/src/lib/ares__threads.c @@ -34,7 +34,7 @@ struct ares__thread_mutex { CRITICAL_SECTION mutex; }; -static ares__thread_mutex_t *ares__thread_mutex_create(void) +ares__thread_mutex_t *ares__thread_mutex_create(void) { ares__thread_mutex_t *mut = ares_malloc_zero(sizeof(*mut)); if (mut == NULL) { @@ -45,7 +45,7 @@ static ares__thread_mutex_t *ares__thread_mutex_create(void) return mut; } -static void ares__thread_mutex_destroy(ares__thread_mutex_t *mut) +void ares__thread_mutex_destroy(ares__thread_mutex_t *mut) { if (mut == NULL) { return; @@ -54,7 +54,7 @@ static void ares__thread_mutex_destroy(ares__thread_mutex_t *mut) ares_free(mut); } -static void ares__thread_mutex_lock(ares__thread_mutex_t *mut) +void ares__thread_mutex_lock(ares__thread_mutex_t *mut) { if (mut == NULL) { return; @@ -62,7 +62,7 @@ static void ares__thread_mutex_lock(ares__thread_mutex_t *mut) EnterCriticalSection(&mut->mutex); } -static void ares__thread_mutex_unlock(ares__thread_mutex_t *mut) +void ares__thread_mutex_unlock(ares__thread_mutex_t *mut) { if (mut == NULL) { return; @@ -70,14 +70,80 @@ static void ares__thread_mutex_unlock(ares__thread_mutex_t *mut) LeaveCriticalSection(&mut->mutex); } -# else +struct ares__thread { + HANDLE thread; + DWORD id; + + void *(*func)(void *arg); + void *arg; + void *rv; +}; + +/* Wrap for pthread compatibility */ +static DWORD WINAPI ares__thread_func(LPVOID lpParameter) +{ + ares__thread_t *thread = lpParameter; + + thread->rv = thread->func(thread->arg); + return 0; +} + +ares_status_t ares__thread_create(ares__thread_t **thread, + ares__thread_func_t func, void *arg) +{ + ares__thread_t *thr = NULL; + + if (func == NULL || thread == NULL) { + return ARES_EFORMERR; + } + + thr = ares_malloc_zero(sizeof(*thr)); + if (thr == NULL) { + return ARES_ENOMEM; + } + + thr->func = func; + thr->arg = arg; + thr->thread = CreateThread(NULL, 0, ares__thread_func, thr, 0, &thr->id); + if (thr->thread == NULL) { + ares_free(thr); + return ARES_ESERVFAIL; + } + + *thread = thr; + return ARES_SUCCESS; +} + +ares_status_t ares__thread_join(ares__thread_t *thread, void **rv) +{ + ares_status_t status = ARES_SUCCESS; + + if (thread == NULL) { + return ARES_EFORMERR; + } + + if (WaitForSingleObject(thread->thread, INFINITE) != WAIT_OBJECT_0) { + status = ARES_ENOTFOUND; + } else { + CloseHandle(thread->thread); + } + + if (status == ARES_SUCCESS && rv != NULL) { + *rv = thread->rv; + } + ares_free(thread); + + return status; +} + +# else /* !WIN32 == PTHREAD */ # include struct ares__thread_mutex { pthread_mutex_t mutex; }; -static ares__thread_mutex_t *ares__thread_mutex_create(void) +ares__thread_mutex_t *ares__thread_mutex_create(void) { pthread_mutexattr_t attr; ares__thread_mutex_t *mut = ares_malloc_zero(sizeof(*mut)); @@ -107,7 +173,7 @@ static ares__thread_mutex_t *ares__thread_mutex_create(void) return NULL; } -static void ares__thread_mutex_destroy(ares__thread_mutex_t *mut) +void ares__thread_mutex_destroy(ares__thread_mutex_t *mut) { if (mut == NULL) { return; @@ -116,7 +182,7 @@ static void ares__thread_mutex_destroy(ares__thread_mutex_t *mut) ares_free(mut); } -static void ares__thread_mutex_lock(ares__thread_mutex_t *mut) +void ares__thread_mutex_lock(ares__thread_mutex_t *mut) { if (mut == NULL) { return; @@ -124,66 +190,104 @@ static void ares__thread_mutex_lock(ares__thread_mutex_t *mut) pthread_mutex_lock(&mut->mutex); } -static void ares__thread_mutex_unlock(ares__thread_mutex_t *mut) +void ares__thread_mutex_unlock(ares__thread_mutex_t *mut) { if (mut == NULL) { return; } pthread_mutex_unlock(&mut->mutex); } -# endif -ares_status_t ares__channel_threading_init(ares_channel_t *channel) +struct ares__thread { + pthread_t thread; +}; + +ares_status_t ares__thread_create(ares__thread_t **thread, + ares__thread_func_t func, void *arg) { - channel->lock = ares__thread_mutex_create(); - if (channel->lock == NULL) { + ares__thread_t *thr = NULL; + + if (func == NULL || thread == NULL) { + return ARES_EFORMERR; + } + + thr = ares_malloc_zero(sizeof(*thr)); + if (thr == NULL) { return ARES_ENOMEM; } + if (pthread_create(&thr->thread, NULL, func, arg) != 0) { + ares_free(thr); + return ARES_ESERVFAIL; + } + + *thread = thr; return ARES_SUCCESS; } -void ares__channel_threading_destroy(ares_channel_t *channel) +ares_status_t ares__thread_join(ares__thread_t *thread, void **rv) { - ares__thread_mutex_destroy(channel->lock); - channel->lock = NULL; + void *ret = NULL; + ares_status_t status = ARES_SUCCESS; + + if (thread == NULL) { + return ARES_EFORMERR; + } + + if (pthread_join(thread->thread, &ret) != 0) { + status = ARES_ENOTFOUND; + } + ares_free(thread); + + if (status == ARES_SUCCESS && rv != NULL) { + *rv = ret; + } + return status; } -void ares__channel_lock(ares_channel_t *channel) +# endif + +ares_bool_t ares_threadsafety(void) { - ares__thread_mutex_lock(channel->lock); + return ARES_TRUE; } -void ares__channel_unlock(ares_channel_t *channel) +#else /* !CARES_THREADS */ + +/* NoOp */ +ares__thread_mutex_t *ares__thread_mutex_create(void) { - ares__thread_mutex_unlock(channel->lock); + return NULL; } -ares_bool_t ares_threadsafety(void) +void ares__thread_mutex_destroy(ares__thread_mutex_t *mut) { - return ARES_TRUE; + (void)mut; } -#else -/* NoOp */ -ares_status_t ares__channel_threading_init(ares_channel_t *channel) +void ares__thread_mutex_lock(ares__thread_mutex_t *mut) { - (void)channel; - return ARES_SUCCESS; + (void)mut; } -void ares__channel_threading_destroy(ares_channel_t *channel) +void ares__thread_mutex_unlock(ares__thread_mutex_t *mut) { - (void)channel; + (void)mut; } -void ares__channel_lock(ares_channel_t *channel) +ares_status_t ares__thread_create(ares__thread_t **thread, + ares__thread_func_t func, void *arg) { - (void)channel; + (void)thread; + (void)func; + (void)arg; + return ARES_ENOTIMP; } -void ares__channel_unlock(ares_channel_t *channel) +ares_status_t ares__thread_join(ares__thread_t *thread, void **rv) { - (void)channel; + (void)thread; + (void)rv; + return ARES_ENOTIMP; } ares_bool_t ares_threadsafety(void) @@ -191,3 +295,33 @@ ares_bool_t ares_threadsafety(void) return ARES_FALSE; } #endif + + +ares_status_t ares__channel_threading_init(ares_channel_t *channel) +{ + if (!ares_threadsafety()) { + return ARES_ENOTIMP; + } + + channel->lock = ares__thread_mutex_create(); + if (channel->lock == NULL) { + return ARES_ENOMEM; + } + return ARES_SUCCESS; +} + +void ares__channel_threading_destroy(ares_channel_t *channel) +{ + ares__thread_mutex_destroy(channel->lock); + channel->lock = NULL; +} + +void ares__channel_lock(ares_channel_t *channel) +{ + ares__thread_mutex_lock(channel->lock); +} + +void ares__channel_unlock(ares_channel_t *channel) +{ + ares__thread_mutex_unlock(channel->lock); +} diff --git a/deps/cares/src/lib/ares__threads.h b/deps/cares/src/lib/ares__threads.h new file mode 100644 index 00000000000000..03f67f08e6593b --- /dev/null +++ b/deps/cares/src/lib/ares__threads.h @@ -0,0 +1,45 @@ +/* MIT License + * + * Copyright (c) 2023 Brad House + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * SPDX-License-Identifier: MIT + */ +#ifndef __ARES__THREADS_H +#define __ARES__THREADS_H + +struct ares__thread_mutex; +typedef struct ares__thread_mutex ares__thread_mutex_t; + +ares__thread_mutex_t *ares__thread_mutex_create(void); +void ares__thread_mutex_destroy(ares__thread_mutex_t *mut); +void ares__thread_mutex_lock(ares__thread_mutex_t *mut); +void ares__thread_mutex_unlock(ares__thread_mutex_t *mut); + +struct ares__thread; +typedef struct ares__thread ares__thread_t; + +typedef void *(*ares__thread_func_t)(void *arg); +ares_status_t ares__thread_create(ares__thread_t **thread, + ares__thread_func_t func, void *arg); +ares_status_t ares__thread_join(ares__thread_t *thread, void **rv); + +#endif diff --git a/deps/cares/src/lib/ares_config.h.cmake b/deps/cares/src/lib/ares_config.h.cmake index 4529eb948b695b..01dcccaa17c2b4 100644 --- a/deps/cares/src/lib/ares_config.h.cmake +++ b/deps/cares/src/lib/ares_config.h.cmake @@ -76,6 +76,24 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_ERRNO_H +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_POLL_H + +/* Define to 1 if you have the poll function. */ +#cmakedefine HAVE_POLL + +/* Define to 1 if you have the pipe function. */ +#cmakedefine HAVE_PIPE + +/* Define to 1 if you have the pipe2 function. */ +#cmakedefine HAVE_PIPE2 + +/* Define to 1 if you have the kqueue function. */ +#cmakedefine HAVE_KQUEUE + +/* Define to 1 if you have the epoll{_create,ctl,wait} functions. */ +#cmakedefine HAVE_EPOLL + /* Define to 1 if you have the fcntl function. */ #cmakedefine HAVE_FCNTL @@ -182,6 +200,9 @@ /* Define to 1 if you have the memory.h header file. */ #cmakedefine HAVE_MEMORY_H +/* Define to 1 if you have the AvailabilityMacros.h header file. */ +#cmakedefine HAVE_AVAILABILITYMACROS_H + /* Define to 1 if you have the MSG_NOSIGNAL flag. */ #cmakedefine HAVE_MSG_NOSIGNAL @@ -290,6 +311,12 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_RANDOM_H +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_EVENT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_EPOLL_H + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_SELECT_H @@ -326,6 +353,18 @@ /* Define to 1 if you have the winsock.h header file. */ #cmakedefine HAVE_WINSOCK_H +/* Define to 1 if you have the mswsock.h header file. */ +#cmakedefine HAVE_MSWSOCK_H + +/* Define to 1 if you have the winternl.h header file. */ +#cmakedefine HAVE_WINTERNL_H + +/* Define to 1 if you have the ntstatus.h header file. */ +#cmakedefine HAVE_NTSTATUS_H + +/* Define to 1 if you have the ntdef.h header file. */ +#cmakedefine HAVE_NTDEF_H + /* Define to 1 if you have the writev function. */ #cmakedefine HAVE_WRITEV diff --git a/deps/cares/src/lib/ares_config.h.in b/deps/cares/src/lib/ares_config.h.in index 0d772fb282a81c..4e07e58473a009 100644 --- a/deps/cares/src/lib/ares_config.h.in +++ b/deps/cares/src/lib/ares_config.h.in @@ -42,7 +42,7 @@ /* Define to 1 if you have AF_INET6 */ #undef HAVE_AF_INET6 -/* Define to 1 if you have the `arc4random_buf' function. */ +/* Define to 1 if you have `arc4random_buf` */ #undef HAVE_ARC4RANDOM_BUF /* Define to 1 if you have the header file. */ @@ -57,22 +57,28 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ASSERT_H -/* Define to 1 if you have the `clock_gettime' function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_AVAILABILITYMACROS_H + +/* Define to 1 if you have `clock_gettime` */ #undef HAVE_CLOCK_GETTIME /* clock_gettime() with CLOCK_MONOTONIC support */ #undef HAVE_CLOCK_GETTIME_MONOTONIC -/* Define to 1 if you have the `CloseSocket' function. */ +/* Define to 1 if you have `closesocket` */ #undef HAVE_CLOSESOCKET -/* Define to 1 if you have the `connect' function. */ +/* Define to 1 if you have `CloseSocket` */ +#undef HAVE_CLOSESOCKET_CAMEL + +/* Define to 1 if you have `connect` */ #undef HAVE_CONNECT -/* Define to 1 if you have the `ConvertInterfaceIndexToLuid' function. */ +/* Define to 1 if you have `ConvertInterfaceIndexToLuid` */ #undef HAVE_CONVERTINTERFACEINDEXTOLUID -/* Define to 1 if you have the `ConvertInterfaceLuidToNameA' function. */ +/* Define to 1 if you have `ConvertInterfaceLuidToNameA` */ #undef HAVE_CONVERTINTERFACELUIDTONAMEA /* define if the compiler supports basic C++14 syntax */ @@ -81,10 +87,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have `epoll_{create1,ctl,wait}` */ +#undef HAVE_EPOLL + /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H -/* Define to 1 if you have the `fcntl' function. */ +/* Define to 1 if you have `fcntl` */ #undef HAVE_FCNTL /* Define to 1 if you have the header file. */ @@ -93,54 +102,57 @@ /* fcntl() with O_NONBLOCK support */ #undef HAVE_FCNTL_O_NONBLOCK -/* Define to 1 if you have the `getenv' function. */ +/* Define to 1 if you have `getenv` */ #undef HAVE_GETENV -/* Define to 1 if you have the `gethostname' function. */ +/* Define to 1 if you have `gethostname` */ #undef HAVE_GETHOSTNAME -/* Define to 1 if you have the `getifaddrs' function. */ +/* Define to 1 if you have `getifaddrs` */ #undef HAVE_GETIFADDRS -/* Define to 1 if you have the `getnameinfo' function. */ +/* Define to 1 if you have `getnameinfo` */ #undef HAVE_GETNAMEINFO -/* Define to 1 if you have the `getrandom' function. */ +/* Define to 1 if you have `getrandom` */ #undef HAVE_GETRANDOM -/* Define to 1 if you have the `getservbyport_r' function. */ +/* Define to 1 if you have `getservbyport_r` */ #undef HAVE_GETSERVBYPORT_R -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have `gettimeofday` */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_IFADDRS_H -/* Define to 1 if you have the `if_indextoname' function. */ +/* Define to 1 if you have `if_indextoname` */ #undef HAVE_IF_INDEXTONAME -/* Define to 1 if you have the `if_nametoindex' function. */ +/* Define to 1 if you have `if_nametoindex` */ #undef HAVE_IF_NAMETOINDEX -/* Define to 1 if you have the `inet_net_pton' function. */ +/* Define to 1 if you have `inet_net_pton` */ #undef HAVE_INET_NET_PTON -/* Define to 1 if you have the `inet_ntop' function. */ +/* Define to 1 if you have `inet_ntop` */ #undef HAVE_INET_NTOP -/* Define to 1 if you have the `inet_pton' function. */ +/* Define to 1 if you have `inet_pton` */ #undef HAVE_INET_PTON /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `ioctl' function. */ +/* Define to 1 if you have `ioctl` */ #undef HAVE_IOCTL -/* Define to 1 if you have the `ioctlsocket' function. */ +/* Define to 1 if you have `ioctlsocket` */ #undef HAVE_IOCTLSOCKET +/* Define to 1 if you have `IoctlSocket` */ +#undef HAVE_IOCTLSOCKET_CAMEL + /* ioctlsocket() with FIONBIO support */ #undef HAVE_IOCTLSOCKET_FIONBIO @@ -150,6 +162,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_IPHLPAPI_H +/* Define to 1 if you have `kqueue` */ +#undef HAVE_KQUEUE + /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H @@ -165,6 +180,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MSWSOCK_H + /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H @@ -180,9 +198,27 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NTDEF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NTSTATUS_H + /* Define to 1 if you have PF_INET6 */ #undef HAVE_PF_INET6 +/* Define to 1 if you have `pipe` */ +#undef HAVE_PIPE + +/* Define to 1 if you have `pipe2` */ +#undef HAVE_PIPE2 + +/* Define to 1 if you have `poll` */ +#undef HAVE_POLL + +/* Define to 1 if you have the header file. */ +#undef HAVE_POLL_H + /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H @@ -192,22 +228,22 @@ /* Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT -/* Define to 1 if you have the `recv' function. */ +/* Define to 1 if you have `recv` */ #undef HAVE_RECV -/* Define to 1 if you have the `recvfrom' function. */ +/* Define to 1 if you have `recvfrom` */ #undef HAVE_RECVFROM -/* Define to 1 if you have the `send' function. */ +/* Define to 1 if you have `send` */ #undef HAVE_SEND -/* Define to 1 if you have the `setsockopt' function. */ +/* Define to 1 if you have `setsockopt` */ #undef HAVE_SETSOCKOPT /* setsockopt() with SO_NONBLOCK support */ #undef HAVE_SETSOCKOPT_SO_NONBLOCK -/* Define to 1 if you have the `socket' function. */ +/* Define to 1 if you have `socket` */ #undef HAVE_SOCKET /* Define to 1 if you have the header file. */ @@ -216,7 +252,7 @@ /* socklen_t */ #undef HAVE_SOCKLEN_T -/* Define to 1 if you have the `stat' function. */ +/* Define to 1 if you have `stat` */ #undef HAVE_STAT /* Define to 1 if you have the header file. */ @@ -231,13 +267,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the `strcasecmp' function. */ +/* Define to 1 if you have `strcasecmp` */ #undef HAVE_STRCASECMP -/* Define to 1 if you have the `strdup' function. */ +/* Define to 1 if you have `strdup` */ #undef HAVE_STRDUP -/* Define to 1 if you have the `stricmp' function. */ +/* Define to 1 if you have `stricmp` */ #undef HAVE_STRICMP /* Define to 1 if you have the header file. */ @@ -246,13 +282,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strncasecmp' function. */ +/* Define to 1 if you have `strncasecmp` */ #undef HAVE_STRNCASECMP -/* Define to 1 if you have the `strncmpi' function. */ +/* Define to 1 if you have `strncmpi` */ #undef HAVE_STRNCMPI -/* Define to 1 if you have the `strnicmp' function. */ +/* Define to 1 if you have `strnicmp` */ #undef HAVE_STRNICMP /* Define to 1 if the system has the type `struct addrinfo'. */ @@ -276,6 +312,12 @@ /* Define to 1 if the system has the type `struct timeval'. */ #undef HAVE_STRUCT_TIMEVAL +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_EPOLL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_EVENT_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILIO_H @@ -327,7 +369,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK2_H -/* Define to 1 if you have the `writev' function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_WINTERNL_H + +/* Define to 1 if you have `writev` */ #undef HAVE_WRITEV /* Define to 1 if you have the header file. */ @@ -336,7 +381,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WS2TCPIP_H -/* Define to 1 if you have the `__system_property_get' function. */ +/* Define to 1 if you have `__system_property_get` */ #undef HAVE___SYSTEM_PROPERTY_GET /* Define to the sub-directory where libtool stores uninstalled libraries. */ diff --git a/deps/cares/src/lib/ares_destroy.c b/deps/cares/src/lib/ares_destroy.c index d7cfb3bb08facd..f2f0d9a7a8109c 100644 --- a/deps/cares/src/lib/ares_destroy.c +++ b/deps/cares/src/lib/ares_destroy.c @@ -75,6 +75,11 @@ void ares_destroy(ares_channel_t *channel) /* No more callbacks will be triggered after this point, unlock */ ares__channel_unlock(channel); + /* Shut down the event thread */ + if (channel->optmask & ARES_OPT_EVENT_THREAD) { + ares_event_thread_destroy(channel); + } + if (channel->domains) { for (i = 0; i < channel->ndomains; i++) { ares_free(channel->domains[i]); diff --git a/deps/cares/src/lib/ares_dns_parse.c b/deps/cares/src/lib/ares_dns_parse.c index da26ffdc0595fd..a201529165d915 100644 --- a/deps/cares/src/lib/ares_dns_parse.c +++ b/deps/cares/src/lib/ares_dns_parse.c @@ -1003,8 +1003,7 @@ static ares_status_t ares_dns_parse_rr(ares__buf_t *buf, unsigned int flags, ares_dns_rr_t *rr = NULL; size_t remaining_len = 0; size_t processed_len = 0; - - (void)flags; /* currently unused */ + ares_bool_t namecomp; /* All RRs have the same top level format shown below: * 1 1 1 1 1 1 @@ -1067,6 +1066,17 @@ static ares_status_t ares_dns_parse_rr(ares__buf_t *buf, unsigned int flags, type = ARES_REC_TYPE_RAW_RR; } + namecomp = ares_dns_rec_type_allow_name_compression(type); + if (sect == ARES_SECTION_ANSWER && (flags & (namecomp ? ARES_DNS_PARSE_AN_BASE_RAW : ARES_DNS_PARSE_AN_EXT_RAW))) { + type = ARES_REC_TYPE_RAW_RR; + } + if (sect == ARES_SECTION_AUTHORITY && (flags & (namecomp ? ARES_DNS_PARSE_NS_BASE_RAW : ARES_DNS_PARSE_NS_EXT_RAW))) { + type = ARES_REC_TYPE_RAW_RR; + } + if (sect == ARES_SECTION_ADDITIONAL && (flags & (namecomp ? ARES_DNS_PARSE_AR_BASE_RAW : ARES_DNS_PARSE_AR_EXT_RAW))) { + type = ARES_REC_TYPE_RAW_RR; + } + /* Pull into another buffer for safety */ if (rdlength > ares__buf_len(buf)) { status = ARES_EBADRESP; @@ -1128,6 +1138,11 @@ static ares_status_t ares_dns_parse_buf(ares__buf_t *buf, unsigned int flags, return ARES_EFORMERR; } + /* Maximum DNS packet size is 64k, even over TCP */ + if (ares__buf_len(buf) > 0xFFFF) { + return ARES_EFORMERR; + } + /* All communications inside of the domain protocol are carried in a single * format called a message. The top level format of message is divided * into 5 sections (some of which are empty in certain cases) shown below: diff --git a/deps/cares/src/lib/ares_event.h b/deps/cares/src/lib/ares_event.h new file mode 100644 index 00000000000000..9d01d75f372afe --- /dev/null +++ b/deps/cares/src/lib/ares_event.h @@ -0,0 +1,174 @@ +/* MIT License + * + * Copyright (c) 2023 Brad House + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * SPDX-License-Identifier: MIT + */ +#ifndef __ARES__EVENT_H +#define __ARES__EVENT_H + +#include "ares_setup.h" + +struct ares_event; +typedef struct ares_event ares_event_t; + +typedef enum { + ARES_EVENT_FLAG_NONE = 0, + ARES_EVENT_FLAG_READ = 1 << 0, + ARES_EVENT_FLAG_WRITE = 1 << 1, + ARES_EVENT_FLAG_OTHER = 1 << 2 +} ares_event_flags_t; + +typedef void (*ares_event_cb_t)(ares_event_thread_t *e, ares_socket_t fd, + void *data, ares_event_flags_t flags); + +typedef void (*ares_event_free_data_t)(void *data); + +typedef void (*ares_event_signal_cb_t)(const ares_event_t *event); + +struct ares_event { + /*! Registered event thread this event is bound to */ + ares_event_thread_t *e; + /*! Flags to monitor. OTHER is only allowed if the socket is ARES_SOCKET_BAD. + */ + ares_event_flags_t flags; + /*! Callback to be called when event is triggered */ + ares_event_cb_t cb; + /*! Socket to monitor, allowed to be ARES_SOCKET_BAD if not monitoring a + * socket. */ + ares_socket_t fd; + /*! Data associated with event handle that will be passed to the callback. + * Typically OS/event subsystem specific data. + * Optional, may be NULL. */ + /*! Data to be passed to callback. Optional, may be NULL. */ + void *data; + /*! When cleaning up the registered event (either when removed or during + * shutdown), this function will be called to clean up the user-supplied + * data. Optional, May be NULL. */ + ares_event_free_data_t free_data_cb; + /*! Callback to call to trigger an event. */ + ares_event_signal_cb_t signal_cb; +}; + +typedef struct { + const char *name; + ares_bool_t (*init)(ares_event_thread_t *e); + void (*destroy)(ares_event_thread_t *e); + ares_bool_t (*event_add)(ares_event_t *event); + void (*event_del)(ares_event_t *event); + void (*event_mod)(ares_event_t *event, ares_event_flags_t new_flags); + size_t (*wait)(ares_event_thread_t *e, unsigned long timeout_ms); +} ares_event_sys_t; + +struct ares_event_thread { + /*! Whether the event thread should be online or not. Checked on every wake + * event before sleeping. */ + ares_bool_t isup; + /*! Handle to the thread for joining during shutdown */ + ares__thread_t *thread; + /*! Lock to protect the data contained within the event thread itself */ + ares__thread_mutex_t *mutex; + /*! Reference to the ares channel, for being able to call things like + * ares_timeout() and ares_process_fd(). */ + ares_channel_t *channel; + /*! Not-yet-processed event handle updates. These will get enqueued by a + * thread other than the event thread itself. The event thread will then + * be woken then process these updates itself */ + ares__llist_t *ev_updates; + /*! Registered event handles. */ + ares__htable_asvp_t *ev_handles; + /*! Pointer to the event handle which is used to signal and wake the event + * thread itself. This is needed to be able to do things like update the + * file descriptors being waited on and to wake the event subsystem during + * shutdown */ + ares_event_t *ev_signal; + /* Event subsystem callbacks */ + const ares_event_sys_t *ev_sys; + /* Event subsystem private data */ + void *ev_sys_data; +}; + +/*! Queue an update for the event handle. + * + * Will search by the fd passed if not ARES_SOCKET_BAD to find a match and + * perform an update or delete (depending on flags). Otherwise will add. + * Do not use the event handle returned if its not guaranteed to be an add + * operation. + * + * \param[out] event Event handle. Optional, can be NULL. This handle + * will be invalidate quickly if the result of the + * operation is not an ADD. + * \param[in] e pointer to event thread handle + * \param[in] flags flags for the event handle. Use + * ARES_EVENT_FLAG_NONE if removing a socket from + * queue (not valid if socket is ARES_SOCKET_BAD). + * Non-socket events cannot be removed, and must have + * ARES_EVENT_FLAG_OTHER set. + * \param[in] cb Callback to call when + * event is triggered. Required. Not allowed to be + * changed, ignored on modification. + * \param[in] fd File descriptor/socket to monitor. May + * be ARES_SOCKET_BAD if not monitoring file + * descriptor. + * \param[in] data Optional. Caller-supplied data to be passed to + * callback. Only allowed on initial add, cannot be + * modified later, ignored on modification. + * \param[in] free_data_cb Optional. Callback to clean up caller-supplied + * data. Only allowed on initial add, cannot be + * modified later, ignored on modification. + * \param[in] signal_cb Optional. Callback to call to trigger an event. + * \return ARES_SUCCESS on success + */ +ares_status_t ares_event_update(ares_event_t **event, ares_event_thread_t *e, + ares_event_flags_t flags, ares_event_cb_t cb, + ares_socket_t fd, void *data, + ares_event_free_data_t free_data_cb, + ares_event_signal_cb_t signal_cb); + + +#ifdef HAVE_PIPE +ares_event_t *ares_pipeevent_create(ares_event_thread_t *e); +#endif + +#ifdef HAVE_POLL +extern const ares_event_sys_t ares_evsys_poll; +#endif + +#ifdef HAVE_KQUEUE +extern const ares_event_sys_t ares_evsys_kqueue; +#endif + +#ifdef HAVE_EPOLL +extern const ares_event_sys_t ares_evsys_epoll; +#endif + +#ifdef _WIN32 +extern const ares_event_sys_t ares_evsys_win32; +#endif + +/* All systems have select(), but not all have a way to wake, so we require + * pipe() to wake the select() */ +#ifdef HAVE_PIPE +extern const ares_event_sys_t ares_evsys_select; +#endif + +#endif diff --git a/deps/cares/src/lib/ares_event_epoll.c b/deps/cares/src/lib/ares_event_epoll.c new file mode 100644 index 00000000000000..3c9ccbbb7529a2 --- /dev/null +++ b/deps/cares/src/lib/ares_event_epoll.c @@ -0,0 +1,198 @@ +/* MIT License + * + * Copyright (c) 2024 Brad House + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * SPDX-License-Identifier: MIT + */ +#include "ares_setup.h" +#include "ares.h" +#include "ares_private.h" +#include "ares_event.h" + +#ifdef HAVE_SYS_EPOLL_H +# include +#endif +#ifdef HAVE_FCNTL_H +# include +#endif + +#ifdef HAVE_EPOLL + +typedef struct { + int epoll_fd; +} ares_evsys_epoll_t; + +static void ares_evsys_epoll_destroy(ares_event_thread_t *e) +{ + ares_evsys_epoll_t *ep = NULL; + + if (e == NULL) { + return; + } + + ep = e->ev_sys_data; + if (ep == NULL) { + return; + } + + if (ep->epoll_fd != -1) { + close(ep->epoll_fd); + } + + ares_free(ep); + e->ev_sys_data = NULL; +} + +static ares_bool_t ares_evsys_epoll_init(ares_event_thread_t *e) +{ + ares_evsys_epoll_t *ep = NULL; + + ep = ares_malloc_zero(sizeof(*ep)); + if (ep == NULL) { + return ARES_FALSE; + } + + e->ev_sys_data = ep; + + ep->epoll_fd = epoll_create1(0); + if (ep->epoll_fd == -1) { + ares_evsys_epoll_destroy(e); + return ARES_FALSE; + } + +# ifdef FD_CLOEXEC + fcntl(ep->epoll_fd, F_SETFD, FD_CLOEXEC); +# endif + + e->ev_signal = ares_pipeevent_create(e); + if (e->ev_signal == NULL) { + ares_evsys_epoll_destroy(e); + return ARES_FALSE; + } + + return ARES_TRUE; +} + +static ares_bool_t ares_evsys_epoll_event_add(ares_event_t *event) +{ + ares_event_thread_t *e = event->e; + ares_evsys_epoll_t *ep = e->ev_sys_data; + struct epoll_event epev; + + memset(&epev, 0, sizeof(epev)); + epev.data.fd = event->fd; + epev.events = EPOLLRDHUP | EPOLLERR | EPOLLHUP; + if (event->flags & ARES_EVENT_FLAG_READ) { + epev.events |= EPOLLIN; + } + if (event->flags & ARES_EVENT_FLAG_WRITE) { + epev.events |= EPOLLOUT; + } + if (epoll_ctl(ep->epoll_fd, EPOLL_CTL_ADD, event->fd, &epev) != 0) { + return ARES_FALSE; + } + return ARES_TRUE; +} + +static void ares_evsys_epoll_event_del(ares_event_t *event) +{ + ares_event_thread_t *e = event->e; + ares_evsys_epoll_t *ep = e->ev_sys_data; + struct epoll_event epev; + + memset(&epev, 0, sizeof(epev)); + epev.data.fd = event->fd; + epoll_ctl(ep->epoll_fd, EPOLL_CTL_DEL, event->fd, &epev); +} + +static void ares_evsys_epoll_event_mod(ares_event_t *event, + ares_event_flags_t new_flags) +{ + ares_event_thread_t *e = event->e; + ares_evsys_epoll_t *ep = e->ev_sys_data; + struct epoll_event epev; + + memset(&epev, 0, sizeof(epev)); + epev.data.fd = event->fd; + epev.events = EPOLLRDHUP | EPOLLERR | EPOLLHUP; + if (new_flags & ARES_EVENT_FLAG_READ) { + epev.events |= EPOLLIN; + } + if (new_flags & ARES_EVENT_FLAG_WRITE) { + epev.events |= EPOLLOUT; + } + epoll_ctl(ep->epoll_fd, EPOLL_CTL_MOD, event->fd, &epev); +} + +static size_t ares_evsys_epoll_wait(ares_event_thread_t *e, + unsigned long timeout_ms) +{ + struct epoll_event events[8]; + size_t nevents = sizeof(events) / sizeof(*events); + ares_evsys_epoll_t *ep = e->ev_sys_data; + int rv; + size_t i; + size_t cnt = 0; + + memset(events, 0, sizeof(events)); + + rv = epoll_wait(ep->epoll_fd, events, (int)nevents, + (timeout_ms == 0) ? -1 : (int)timeout_ms); + if (rv < 0) { + return 0; + } + + nevents = (size_t)rv; + + for (i = 0; i < nevents; i++) { + ares_event_t *ev; + ares_event_flags_t flags = 0; + + ev = ares__htable_asvp_get_direct(e->ev_handles, + (ares_socket_t)events[i].data.fd); + if (ev == NULL || ev->cb == NULL) { + continue; + } + + cnt++; + + if (events[i].events & (EPOLLIN | EPOLLRDHUP | EPOLLHUP | EPOLLERR)) { + flags |= ARES_EVENT_FLAG_READ; + } + if (events[i].events & EPOLLOUT) { + flags |= ARES_EVENT_FLAG_WRITE; + } + + ev->cb(e, ev->fd, ev->data, flags); + } + + return cnt; +} + +const ares_event_sys_t ares_evsys_epoll = { "epoll", + ares_evsys_epoll_init, + ares_evsys_epoll_destroy, + ares_evsys_epoll_event_add, + ares_evsys_epoll_event_del, + ares_evsys_epoll_event_mod, + ares_evsys_epoll_wait }; +#endif diff --git a/deps/cares/src/lib/ares_event_kqueue.c b/deps/cares/src/lib/ares_event_kqueue.c new file mode 100644 index 00000000000000..944c4b003bc5a4 --- /dev/null +++ b/deps/cares/src/lib/ares_event_kqueue.c @@ -0,0 +1,249 @@ +/* MIT License + * + * Copyright (c) 2024 Brad House + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * SPDX-License-Identifier: MIT + */ +#include "ares_setup.h" +#include "ares.h" +#include "ares_private.h" +#include "ares_event.h" + +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_EVENT_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_FCNTL_H +# include +#endif + +#ifdef HAVE_KQUEUE + +typedef struct { + int kqueue_fd; + struct kevent *changelist; + size_t nchanges; + size_t nchanges_alloc; +} ares_evsys_kqueue_t; + +static void ares_evsys_kqueue_destroy(ares_event_thread_t *e) +{ + ares_evsys_kqueue_t *kq = NULL; + + if (e == NULL) { + return; + } + + kq = e->ev_sys_data; + if (kq == NULL) { + return; + } + + if (kq->kqueue_fd != -1) { + close(kq->kqueue_fd); + } + + ares_free(kq->changelist); + ares_free(kq); + e->ev_sys_data = NULL; +} + +static ares_bool_t ares_evsys_kqueue_init(ares_event_thread_t *e) +{ + ares_evsys_kqueue_t *kq = NULL; + + kq = ares_malloc_zero(sizeof(*kq)); + if (kq == NULL) { + return ARES_FALSE; + } + + e->ev_sys_data = kq; + + kq->kqueue_fd = kqueue(); + if (kq->kqueue_fd == -1) { + ares_evsys_kqueue_destroy(e); + return ARES_FALSE; + } + +# ifdef FD_CLOEXEC + fcntl(kq->kqueue_fd, F_SETFD, FD_CLOEXEC); +# endif + + kq->nchanges_alloc = 8; + kq->changelist = + ares_malloc_zero(sizeof(*kq->changelist) * kq->nchanges_alloc); + if (kq->changelist == NULL) { + ares_evsys_kqueue_destroy(e); + return ARES_FALSE; + } + + e->ev_signal = ares_pipeevent_create(e); + if (e->ev_signal == NULL) { + ares_evsys_kqueue_destroy(e); + return ARES_FALSE; + } + + return ARES_TRUE; +} + +static void ares_evsys_kqueue_enqueue(ares_evsys_kqueue_t *kq, int fd, + int16_t filter, uint16_t flags) +{ + size_t idx; + + if (kq == NULL) { + return; + } + + idx = kq->nchanges; + + kq->nchanges++; + + if (kq->nchanges > kq->nchanges_alloc) { + kq->nchanges_alloc <<= 1; + kq->changelist = ares_realloc_zero(kq->changelist, kq->nchanges_alloc >> 1, + kq->nchanges_alloc); + } + + EV_SET(&kq->changelist[idx], fd, filter, flags, 0, 0, 0); +} + +static void ares_evsys_kqueue_event_process(ares_event_t *event, + ares_event_flags_t old_flags, + ares_event_flags_t new_flags) +{ + ares_event_thread_t *e = event->e; + ares_evsys_kqueue_t *kq; + + if (e == NULL) { + return; + } + + kq = e->ev_sys_data; + if (kq == NULL) { + return; + } + + if (new_flags & ARES_EVENT_FLAG_READ && !(old_flags & ARES_EVENT_FLAG_READ)) { + ares_evsys_kqueue_enqueue(kq, event->fd, EVFILT_READ, EV_ADD | EV_ENABLE); + } + + if (!(new_flags & ARES_EVENT_FLAG_READ) && old_flags & ARES_EVENT_FLAG_READ) { + ares_evsys_kqueue_enqueue(kq, event->fd, EVFILT_READ, EV_DELETE); + } + + if (new_flags & ARES_EVENT_FLAG_WRITE && + !(old_flags & ARES_EVENT_FLAG_WRITE)) { + ares_evsys_kqueue_enqueue(kq, event->fd, EVFILT_WRITE, EV_ADD | EV_ENABLE); + } + + if (!(new_flags & ARES_EVENT_FLAG_WRITE) && + old_flags & ARES_EVENT_FLAG_WRITE) { + ares_evsys_kqueue_enqueue(kq, event->fd, EVFILT_WRITE, EV_DELETE); + } +} + +static ares_bool_t ares_evsys_kqueue_event_add(ares_event_t *event) +{ + ares_evsys_kqueue_event_process(event, 0, event->flags); + return ARES_TRUE; +} + +static void ares_evsys_kqueue_event_del(ares_event_t *event) +{ + ares_evsys_kqueue_event_process(event, event->flags, 0); +} + +static void ares_evsys_kqueue_event_mod(ares_event_t *event, + ares_event_flags_t new_flags) +{ + ares_evsys_kqueue_event_process(event, event->flags, new_flags); +} + +static size_t ares_evsys_kqueue_wait(ares_event_thread_t *e, + unsigned long timeout_ms) +{ + struct kevent events[8]; + size_t nevents = sizeof(events) / sizeof(*events); + ares_evsys_kqueue_t *kq = e->ev_sys_data; + int rv; + size_t i; + struct timespec ts; + struct timespec *timeout = NULL; + size_t cnt = 0; + + if (timeout_ms != 0) { + ts.tv_sec = timeout_ms / 1000; + ts.tv_nsec = (timeout_ms % 1000) * 1000 * 1000; + timeout = &ts; + } + + memset(events, 0, sizeof(events)); + + rv = kevent(kq->kqueue_fd, kq->changelist, (int)kq->nchanges, events, + (int)nevents, timeout); + if (rv < 0) { + return 0; + } + + /* Changelist was consumed */ + kq->nchanges = 0; + nevents = (size_t)rv; + + for (i = 0; i < nevents; i++) { + ares_event_t *ev; + ares_event_flags_t flags = 0; + + ev = ares__htable_asvp_get_direct(e->ev_handles, + (ares_socket_t)events[i].ident); + if (ev == NULL || ev->cb == NULL) { + continue; + } + + cnt++; + + if (events[i].filter == EVFILT_READ || + events[i].flags & (EV_EOF | EV_ERROR)) { + flags |= ARES_EVENT_FLAG_READ; + } else { + flags |= ARES_EVENT_FLAG_WRITE; + } + + ev->cb(e, ev->fd, ev->data, flags); + } + + return cnt; +} + +const ares_event_sys_t ares_evsys_kqueue = { "kqueue", + ares_evsys_kqueue_init, + ares_evsys_kqueue_destroy, + ares_evsys_kqueue_event_add, + ares_evsys_kqueue_event_del, + ares_evsys_kqueue_event_mod, + ares_evsys_kqueue_wait }; +#endif diff --git a/deps/cares/src/lib/ares_event_poll.c b/deps/cares/src/lib/ares_event_poll.c new file mode 100644 index 00000000000000..e2b1db12b4a814 --- /dev/null +++ b/deps/cares/src/lib/ares_event_poll.c @@ -0,0 +1,137 @@ +/* MIT License + * + * Copyright (c) 2024 Brad House + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * SPDX-License-Identifier: MIT + */ +#include "ares_setup.h" +#include "ares.h" +#include "ares_private.h" +#include "ares_event.h" +#ifdef HAVE_POLL_H +# include +#endif + +#if defined(HAVE_POLL) + +static ares_bool_t ares_evsys_poll_init(ares_event_thread_t *e) +{ + e->ev_signal = ares_pipeevent_create(e); + if (e->ev_signal == NULL) { + return ARES_FALSE; + } + return ARES_TRUE; +} + +static void ares_evsys_poll_destroy(ares_event_thread_t *e) +{ + (void)e; +} + +static ares_bool_t ares_evsys_poll_event_add(ares_event_t *event) +{ + (void)event; + return ARES_TRUE; +} + +static void ares_evsys_poll_event_del(ares_event_t *event) +{ + (void)event; +} + +static void ares_evsys_poll_event_mod(ares_event_t *event, + ares_event_flags_t new_flags) +{ + (void)event; + (void)new_flags; +} + +static size_t ares_evsys_poll_wait(ares_event_thread_t *e, + unsigned long timeout_ms) +{ + size_t num_fds = 0; + ares_socket_t *fdlist = ares__htable_asvp_keys(e->ev_handles, &num_fds); + struct pollfd *pollfd = NULL; + int rv; + size_t cnt = 0; + size_t i; + + if (num_fds) { + pollfd = ares_malloc_zero(sizeof(*pollfd) * num_fds); + for (i = 0; i < num_fds; i++) { + ares_event_t *ev = ares__htable_asvp_get_direct(e->ev_handles, fdlist[i]); + pollfd[i].fd = ev->fd; + if (ev->flags & ARES_EVENT_FLAG_READ) { + pollfd[i].events |= POLLIN; + } + if (ev->flags & ARES_EVENT_FLAG_WRITE) { + pollfd[i].events |= POLLOUT; + } + } + } + ares_free(fdlist); + + rv = poll(pollfd, (nfds_t)num_fds, (timeout_ms == 0) ? -1 : (int)timeout_ms); + if (rv <= 0) { + goto done; + } + + for (i = 0; i < num_fds; i++) { + ares_event_t *ev; + ares_event_flags_t flags = 0; + + if (pollfd[i].revents == 0) { + continue; + } + + cnt++; + + ev = ares__htable_asvp_get_direct(e->ev_handles, pollfd[i].fd); + if (ev == NULL || ev->cb == NULL) { + continue; + } + + if (pollfd[i].revents & (POLLERR | POLLHUP | POLLIN)) { + flags |= ARES_EVENT_FLAG_READ; + } + + if (pollfd[i].revents & POLLOUT) { + flags |= ARES_EVENT_FLAG_WRITE; + } + + ev->cb(e, pollfd[i].fd, ev->data, flags); + } + +done: + ares_free(pollfd); + return cnt; +} + +const ares_event_sys_t ares_evsys_poll = { "poll", + ares_evsys_poll_init, + ares_evsys_poll_destroy, /* NoOp */ + ares_evsys_poll_event_add, /* NoOp */ + ares_evsys_poll_event_del, /* NoOp */ + ares_evsys_poll_event_mod, /* NoOp */ + ares_evsys_poll_wait }; + +#endif diff --git a/deps/cares/src/lib/ares_event_select.c b/deps/cares/src/lib/ares_event_select.c new file mode 100644 index 00000000000000..b73ac74716601a --- /dev/null +++ b/deps/cares/src/lib/ares_event_select.c @@ -0,0 +1,150 @@ +/* MIT License + * + * Copyright (c) 2024 Brad House + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * SPDX-License-Identifier: MIT + */ +#include "ares_setup.h" +#include "ares.h" +#include "ares_private.h" +#include "ares_event.h" +#ifdef HAVE_SYS_SELECT_H +# include +#endif + +/* All systems have select(), but not all have a way to wake, so we require + * pipe() to wake the select() */ +#if defined(HAVE_PIPE) + +static ares_bool_t ares_evsys_select_init(ares_event_thread_t *e) +{ + e->ev_signal = ares_pipeevent_create(e); + if (e->ev_signal == NULL) { + return ARES_FALSE; + } + return ARES_TRUE; +} + +static void ares_evsys_select_destroy(ares_event_thread_t *e) +{ + (void)e; +} + +static ares_bool_t ares_evsys_select_event_add(ares_event_t *event) +{ + (void)event; + return ARES_TRUE; +} + +static void ares_evsys_select_event_del(ares_event_t *event) +{ + (void)event; +} + +static void ares_evsys_select_event_mod(ares_event_t *event, + ares_event_flags_t new_flags) +{ + (void)event; + (void)new_flags; +} + +static size_t ares_evsys_select_wait(ares_event_thread_t *e, + unsigned long timeout_ms) +{ + size_t num_fds = 0; + ares_socket_t *fdlist = ares__htable_asvp_keys(e->ev_handles, &num_fds); + int rv; + size_t cnt = 0; + size_t i; + fd_set read_fds; + fd_set write_fds; + int nfds = 0; + struct timeval tv; + struct timeval *tout = NULL; + + FD_ZERO(&read_fds); + FD_ZERO(&write_fds); + + for (i = 0; i < num_fds; i++) { + ares_event_t *ev = ares__htable_asvp_get_direct(e->ev_handles, fdlist[i]); + if (ev->flags & ARES_EVENT_FLAG_READ) { + FD_SET(ev->fd, &read_fds); + } + if (ev->flags & ARES_EVENT_FLAG_WRITE) { + FD_SET(ev->fd, &write_fds); + } + if (ev->fd + 1 > nfds) { + nfds = ev->fd + 1; + } + } + + if (timeout_ms) { + tv.tv_sec = (int)(timeout_ms / 1000); + tv.tv_usec = (int)((timeout_ms % 1000) * 1000); + tout = &tv; + } + + rv = select(nfds, &read_fds, &write_fds, NULL, tout); + if (rv > 0) { + for (i = 0; i < num_fds; i++) { + ares_event_t *ev; + ares_event_flags_t flags = 0; + + ev = ares__htable_asvp_get_direct(e->ev_handles, fdlist[i]); + if (ev == NULL || ev->cb == NULL) { + continue; + } + + if (FD_ISSET(fdlist[i], &read_fds)) { + flags |= ARES_EVENT_FLAG_READ; + } + + if (FD_ISSET(fdlist[i], &write_fds)) { + flags |= ARES_EVENT_FLAG_WRITE; + } + + if (flags == 0) { + continue; + } + + cnt++; + + ev->cb(e, fdlist[i], ev->data, flags); + } + } + + ares_free(fdlist); + + return cnt; +} + +const ares_event_sys_t ares_evsys_select = { + "select", + ares_evsys_select_init, + ares_evsys_select_destroy, /* NoOp */ + ares_evsys_select_event_add, /* NoOp */ + ares_evsys_select_event_del, /* NoOp */ + ares_evsys_select_event_mod, /* NoOp */ + ares_evsys_select_wait +}; + +#endif diff --git a/deps/cares/src/lib/ares_event_thread.c b/deps/cares/src/lib/ares_event_thread.c new file mode 100644 index 00000000000000..6a69c8e4d702d2 --- /dev/null +++ b/deps/cares/src/lib/ares_event_thread.c @@ -0,0 +1,447 @@ +/* MIT License + * + * Copyright (c) 2024 Brad House + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * SPDX-License-Identifier: MIT + */ +#include "ares_setup.h" +#include "ares.h" +#include "ares_private.h" +#include "ares_event.h" + +static void ares_event_destroy_cb(void *arg) +{ + ares_event_t *event = arg; + if (event == NULL) { + return; + } + + /* Unregister from the event thread if it was registered with one */ + if (event->e) { + ares_event_thread_t *e = event->e; + e->ev_sys->event_del(event); + event->e = NULL; + } + + if (event->free_data_cb && event->data) { + event->free_data_cb(event->data); + } + + ares_free(event); +} + +/* See if a pending update already exists. We don't want to enqueue multiple + * updates for the same event handle. Right now this is O(n) based on number + * of updates already enqueued. In the future, it might make sense to make + * this O(1) with a hashtable. */ +static ares_event_t *ares_event_update_find(ares_event_thread_t *e, + ares_socket_t fd, void *data) +{ + ares__llist_node_t *node; + + for (node = ares__llist_node_first(e->ev_updates); node != NULL; + node = ares__llist_node_next(node)) { + ares_event_t *ev = ares__llist_node_val(node); + + if (fd != ARES_SOCKET_BAD && fd == ev->fd) { + return ev; + } + + if (fd == ARES_SOCKET_BAD && ev->fd == ARES_SOCKET_BAD && + data == ev->data) { + return ev; + } + } + + return NULL; +} + +ares_status_t ares_event_update(ares_event_t **event, ares_event_thread_t *e, + ares_event_flags_t flags, ares_event_cb_t cb, + ares_socket_t fd, void *data, + ares_event_free_data_t free_data_cb, + ares_event_signal_cb_t signal_cb) +{ + ares_event_t *ev = NULL; + + if (e == NULL || cb == NULL) { + return ARES_EFORMERR; + } + + if (event != NULL) { + *event = NULL; + } + + /* Validate flags */ + if (fd == ARES_SOCKET_BAD) { + if (flags & (ARES_EVENT_FLAG_READ | ARES_EVENT_FLAG_WRITE)) { + return ARES_EFORMERR; + } + if (!(flags & ARES_EVENT_FLAG_OTHER)) { + return ARES_EFORMERR; + } + } else { + if (flags & ARES_EVENT_FLAG_OTHER) { + return ARES_EFORMERR; + } + } + + /* That's all the validation we can really do */ + + /* See if we have a queued update already */ + ev = ares_event_update_find(e, fd, data); + if (ev == NULL) { + /* Allocate a new one */ + ev = ares_malloc_zero(sizeof(*ev)); + if (ev == NULL) { + return ARES_ENOMEM; + } + + if (ares__llist_insert_last(e->ev_updates, ev) == NULL) { + ares_free(ev); + return ARES_ENOMEM; + } + } + + ev->flags = flags; + ev->fd = fd; + if (ev->cb == NULL) { + ev->cb = cb; + } + if (ev->data == NULL) { + ev->data = data; + } + if (ev->free_data_cb == NULL) { + ev->free_data_cb = free_data_cb; + } + if (ev->signal_cb == NULL) { + ev->signal_cb = signal_cb; + } + + if (event != NULL) { + *event = ev; + } + + return ARES_SUCCESS; +} + +static void ares_event_signal(const ares_event_t *event) +{ + if (event == NULL || event->signal_cb == NULL) { + return; + } + event->signal_cb(event); +} + +static void ares_event_thread_wake(ares_event_thread_t *e) +{ + if (e == NULL) { + return; + } + + ares_event_signal(e->ev_signal); +} + +static void ares_event_thread_process_fd(ares_event_thread_t *e, + ares_socket_t fd, void *data, + ares_event_flags_t flags) +{ + (void)data; + + ares_process_fd(e->channel, + (flags & ARES_EVENT_FLAG_READ) ? fd : ARES_SOCKET_BAD, + (flags & ARES_EVENT_FLAG_WRITE) ? fd : ARES_SOCKET_BAD); +} + +static void ares_event_thread_sockstate_cb(void *data, ares_socket_t socket_fd, + int readable, int writable) +{ + ares_event_thread_t *e = data; + ares_event_flags_t flags = ARES_EVENT_FLAG_NONE; + + if (readable) { + flags |= ARES_EVENT_FLAG_READ; + } + + if (writable) { + flags |= ARES_EVENT_FLAG_WRITE; + } + + /* Update channel fd */ + ares__thread_mutex_lock(e->mutex); + + ares_event_update(NULL, e, flags, ares_event_thread_process_fd, socket_fd, + NULL, NULL, NULL); + + /* Wake the event thread so it properly enqueues any updates */ + ares_event_thread_wake(e); + + ares__thread_mutex_unlock(e->mutex); +} + +static void ares_event_process_updates(ares_event_thread_t *e) +{ + ares__llist_node_t *node; + + /* Iterate across all updates and apply to internal list, removing from update + * list */ + while ((node = ares__llist_node_first(e->ev_updates)) != NULL) { + ares_event_t *newev = ares__llist_node_claim(node); + ares_event_t *oldev = + ares__htable_asvp_get_direct(e->ev_handles, newev->fd); + + /* Adding new */ + if (oldev == NULL) { + newev->e = e; + /* Don't try to add a new event if all flags are cleared, that's basically + * someone trying to delete something already deleted. Also if it fails + * to add, cleanup. */ + if (newev->flags == ARES_EVENT_FLAG_NONE || + !e->ev_sys->event_add(newev)) { + newev->e = NULL; + ares_event_destroy_cb(newev); + } else { + ares__htable_asvp_insert(e->ev_handles, newev->fd, newev); + } + continue; + } + + /* Removal request */ + if (newev->flags == ARES_EVENT_FLAG_NONE) { + /* the callback for the removal will call e->ev_sys->event_del(e, event) + */ + ares__htable_asvp_remove(e->ev_handles, newev->fd); + ares_free(newev); + continue; + } + + /* Modify request -- only flags can be changed */ + e->ev_sys->event_mod(oldev, newev->flags); + oldev->flags = newev->flags; + ares_free(newev); + } +} + +static void *ares_event_thread(void *arg) +{ + ares_event_thread_t *e = arg; + ares__thread_mutex_lock(e->mutex); + + while (e->isup) { + struct timeval tv; + struct timeval *tvout; + unsigned long timeout_ms = 0; /* 0 = unlimited */ + + tvout = ares_timeout(e->channel, NULL, &tv); + if (tvout != NULL) { + timeout_ms = + (unsigned long)((tvout->tv_sec * 1000) + (tvout->tv_usec / 1000) + 1); + } + + ares_event_process_updates(e); + + /* Don't hold a mutex while waiting on events */ + ares__thread_mutex_unlock(e->mutex); + e->ev_sys->wait(e, timeout_ms); + + /* Each iteration should do timeout processing */ + if (e->isup) { + ares_process_fd(e->channel, ARES_SOCKET_BAD, ARES_SOCKET_BAD); + } + + /* Relock before we loop again */ + ares__thread_mutex_lock(e->mutex); + } + + ares__thread_mutex_unlock(e->mutex); + return NULL; +} + +static void ares_event_thread_destroy_int(ares_event_thread_t *e) +{ + ares__llist_node_t *node; + + /* Wake thread and tell it to shutdown if it exists */ + ares__thread_mutex_lock(e->mutex); + if (e->isup) { + e->isup = ARES_FALSE; + ares_event_thread_wake(e); + } + ares__thread_mutex_unlock(e->mutex); + + /* Wait for thread to shutdown */ + if (e->thread) { + ares__thread_join(e->thread, NULL); + e->thread = NULL; + } + + /* Manually free any updates that weren't processed */ + while ((node = ares__llist_node_first(e->ev_updates)) != NULL) { + ares_event_destroy_cb(ares__llist_node_claim(node)); + } + ares__llist_destroy(e->ev_updates); + e->ev_updates = NULL; + + ares__htable_asvp_destroy(e->ev_handles); + e->ev_handles = NULL; + + if (e->ev_sys->destroy) { + e->ev_sys->destroy(e); + } + + ares__thread_mutex_destroy(e->mutex); + e->mutex = NULL; + + ares_free(e); +} + +void ares_event_thread_destroy(ares_channel_t *channel) +{ + ares_event_thread_t *e = channel->sock_state_cb_data; + + if (e == NULL) { + return; + } + + ares_event_thread_destroy_int(e); +} + +static const ares_event_sys_t *ares_event_fetch_sys(ares_evsys_t evsys) +{ + switch (evsys) { + case ARES_EVSYS_WIN32: +#if defined(_WIN32) + return &ares_evsys_win32; +#else + return NULL; +#endif + + case ARES_EVSYS_EPOLL: +#if defined(HAVE_EPOLL) + return &ares_evsys_epoll; +#else + return NULL; +#endif + + case ARES_EVSYS_KQUEUE: +#if defined(HAVE_KQUEUE) + return &ares_evsys_kqueue; +#else + return NULL; +#endif + + case ARES_EVSYS_POLL: +#if defined(HAVE_POLL) + return &ares_evsys_poll; +#else + return NULL; +#endif + + case ARES_EVSYS_SELECT: +#if defined(HAVE_PIPE) + return &ares_evsys_select; +#else + return NULL; +#endif + + case ARES_EVSYS_DEFAULT: + default: +#if defined(_WIN32) + return &ares_evsys_win32; +#elif defined(HAVE_KQUEUE) + return &ares_evsys_kqueue; +#elif defined(HAVE_EPOLL) + return &ares_evsys_epoll; +#elif defined(HAVE_POLL) + return &ares_evsys_poll; +#elif defined(HAVE_PIPE) + return &ares_evsys_select; +#else + break; +#endif + } + + return NULL; +} + +ares_status_t ares_event_thread_init(ares_channel_t *channel) +{ + ares_event_thread_t *e; + + e = ares_malloc_zero(sizeof(*e)); + if (e == NULL) { + return ARES_ENOMEM; + } + + e->mutex = ares__thread_mutex_create(); + if (e->mutex == NULL) { + ares_event_thread_destroy_int(e); + return ARES_ENOMEM; + } + + e->ev_updates = ares__llist_create(NULL); + if (e->ev_updates == NULL) { + ares_event_thread_destroy_int(e); + return ARES_ENOMEM; + } + + e->ev_handles = ares__htable_asvp_create(ares_event_destroy_cb); + if (e->ev_handles == NULL) { + ares_event_thread_destroy_int(e); + return ARES_ENOMEM; + } + + e->channel = channel; + e->isup = ARES_TRUE; + e->ev_sys = ares_event_fetch_sys(channel->evsys); + if (e->ev_sys == NULL) { + ares_event_thread_destroy_int(e); + return ARES_ENOTIMP; + } + + channel->sock_state_cb = ares_event_thread_sockstate_cb; + channel->sock_state_cb_data = e; + + if (!e->ev_sys->init(e)) { + ares_event_thread_destroy_int(e); + channel->sock_state_cb = NULL; + channel->sock_state_cb_data = NULL; + return ARES_ESERVFAIL; + } + + /* Before starting the thread, process any possible events the initialization + * might have enqueued as we may actually depend on these being valid + * immediately upon return, which may mean before the thread is fully spawned + * and processed the list itself. We don't want any sort of race conditions + * (like the event system wake handle itself). */ + ares_event_process_updates(e); + + /* Start thread */ + if (ares__thread_create(&e->thread, ares_event_thread, e) != ARES_SUCCESS) { + ares_event_thread_destroy_int(e); + channel->sock_state_cb = NULL; + channel->sock_state_cb_data = NULL; + return ARES_ESERVFAIL; + } + + return ARES_SUCCESS; +} diff --git a/deps/cares/src/lib/ares_event_wake_pipe.c b/deps/cares/src/lib/ares_event_wake_pipe.c new file mode 100644 index 00000000000000..eca7539a024a87 --- /dev/null +++ b/deps/cares/src/lib/ares_event_wake_pipe.c @@ -0,0 +1,166 @@ +/* MIT License + * + * Copyright (c) 2024 Brad House + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * SPDX-License-Identifier: MIT + */ +#include "ares_setup.h" +#include "ares.h" +#include "ares_private.h" +#include "ares_event.h" +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_FCNTL_H +# include +#endif + +#ifdef HAVE_PIPE +typedef struct { + int filedes[2]; +} ares_pipeevent_t; + +static void ares_pipeevent_destroy(ares_pipeevent_t *p) +{ + if (p->filedes[0] != -1) { + close(p->filedes[0]); + } + if (p->filedes[1] != -1) { + close(p->filedes[1]); + } + + ares_free(p); +} + +static void ares_pipeevent_destroy_cb(void *arg) +{ + ares_pipeevent_destroy(arg); +} + +static ares_pipeevent_t *ares_pipeevent_init(void) +{ + ares_pipeevent_t *p = ares_malloc_zero(sizeof(*p)); + if (p == NULL) { + return NULL; + } + + p->filedes[0] = -1; + p->filedes[1] = -1; + +# ifdef HAVE_PIPE2 + if (pipe2(p->filedes, O_NONBLOCK | O_CLOEXEC) != 0) { + ares_pipeevent_destroy(p); + return NULL; + } +# else + if (pipe(p->filedes) != 0) { + ares_pipeevent_destroy(p); + return NULL; + } + +# ifdef O_NONBLOCK + { + int val; + val = fcntl(p->filedes[0], F_GETFL, 0); + if (val >= 0) { + val |= O_NONBLOCK; + } + fcntl(p->filedes[0], F_SETFL, val); + + val = fcntl(p->filedes[1], F_GETFL, 0); + if (val >= 0) { + val |= O_NONBLOCK; + } + fcntl(p->filedes[1], F_SETFL, val); + } +# endif + +# ifdef O_CLOEXEC + fcntl(p->filedes[0], F_SETFD, O_CLOEXEC); + fcntl(p->filedes[1], F_SETFD, O_CLOEXEC); +# endif +# endif + +# ifdef F_SETNOSIGPIPE + fcntl(p->filedes[0], F_SETNOSIGPIPE, 1); + fcntl(p->filedes[1], F_SETNOSIGPIPE, 1); +# endif + + return p; +} + +static void ares_pipeevent_signal(const ares_event_t *e) +{ + ares_pipeevent_t *p; + + if (e == NULL || e->data == NULL) { + return; + } + + p = e->data; + write(p->filedes[1], "1", 1); +} + +static void ares_pipeevent_cb(ares_event_thread_t *e, ares_socket_t fd, + void *data, ares_event_flags_t flags) +{ + unsigned char buf[32]; + ares_pipeevent_t *p = NULL; + + (void)e; + (void)fd; + (void)flags; + + if (data == NULL) { + return; + } + + p = data; + + while (read(p->filedes[0], buf, sizeof(buf)) == sizeof(buf)) { + /* Do nothing */ + } +} + +ares_event_t *ares_pipeevent_create(ares_event_thread_t *e) +{ + ares_event_t *event = NULL; + ares_pipeevent_t *p = NULL; + ares_status_t status; + + p = ares_pipeevent_init(); + if (p == NULL) { + return NULL; + } + + status = ares_event_update(&event, e, ARES_EVENT_FLAG_READ, ares_pipeevent_cb, + p->filedes[0], p, ares_pipeevent_destroy_cb, + ares_pipeevent_signal); + if (status != ARES_SUCCESS) { + ares_pipeevent_destroy(p); + return NULL; + } + + return event; +} + +#endif diff --git a/deps/cares/src/lib/ares_event_win32.c b/deps/cares/src/lib/ares_event_win32.c new file mode 100644 index 00000000000000..718e865085116c --- /dev/null +++ b/deps/cares/src/lib/ares_event_win32.c @@ -0,0 +1,601 @@ +/* MIT License + * + * Copyright (c) 2024 Brad House + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * SPDX-License-Identifier: MIT + */ + +#include "ares_setup.h" +#include "ares.h" +#include "ares_private.h" +#include "ares_event.h" +#include "ares_event_win32.h" +#ifdef HAVE_LIMITS_H +# include +#endif + +#ifdef _WIN32 + +/* IMPLEMENTATION NOTES + * ==================== + * + * This implementation uses some undocumented functionality within Windows for + * monitoring sockets. The Ancillary Function Driver (AFD) is the low level + * implementation that Winsock2 sits on top of. Winsock2 unfortunately does + * not expose the equivalent of epoll() or kqueue(), but it is possible to + * access AFD directly and use along with IOCP to simulate the functionality. + * We want to use IOCP if possible as it gives us the ability to monitor more + * than just sockets (WSAPoll is not an option), and perform arbitrary callbacks + * which means we can hook in non-socket related events. + * + * The information for this implementation was gathered from "wepoll" and + * "libuv" which both use slight variants on this, but this implementation + * doesn't directly follow either methodology. + * + * Initialization: + * 1. Dynamically load the NtDeviceIoControlFile and NtCancelIoFileEx internal + * symbols from ntdll.dll. These functions are used to submit the AFD POLL + * request and to cancel a prior request, respectively. + * 2. Create an IO Completion Port base handle via CreateIoCompletionPort() + * that all socket events will be delivered through. + * 3. Create a callback to be used to be able to interrupt waiting for IOCP + * events, this may be called for allowing enqueuing of additional socket + * events or removing socket events. PostQueuedCompletionStatus() is the + * obvious choice. Use the same container structure as used with a Socket + * but tagged indicating it is not as the CompletionKey (important!). + * + * Socket Add: + * 1. Create/Allocate a container for holding metadata about a socket: + * - SOCKET base_socket; + * - SOCKET peer_socket; + * - OVERLAPPED overlapped; -- Used by AFD POLL + * - AFD_POLL_INFO afd_poll_info; -- Used by AFD POLL + * 2. Call WSAIoctl(..., SIO_BASE_HANDLE, ...) to unwrap the SOCKET and get + * the "base socket" we can use for polling. It appears this may fail so + * we should call WSAIoctl(..., SIO_BSP_HANDLE_POLL, ...) as a fallback. + * 3. The SOCKET handle we have is most likely not capable of supporting + * OVERLAPPED, and we need to have a way to unbind a socket from IOCP + * (which is done via a simple closesocket()) so we need to duplicate the + * "base socket" using WSADuplicateSocketW() followed by + * WSASocketW(..., WSA_FLAG_OVERLAPPED) to create this "peer socket" for + * submitting AFD POLL requests. + * 4. Bind to IOCP using CreateIoCompletionPort() referencing the "peer + * socket" and the base IOCP handle from "Initialization". Use the + * pointer to the socket container as the "CompletionKey" which will be + * returned when an event occurs. + * 5. Submit AFD POLL request (see "AFD POLL Request" section) + * + * Socket Delete: + * 1. Call "AFD Poll Cancel" (see Section of same name) + * 2. If a cancel was requested (not bypassed due to no events, etc), tag the + * "container" for the socket as pending delete, and when the next IOCP + * event for the socket is dequeued, cleanup. + * 3. Otherwise, call closesocket(peer_socket) then free() the container + * which will officially delete it. + * NOTE: Deferring delete may be completely unnecessary. In theory closing + * the peer_socket() should guarantee no additional events will be + * delivered. But maybe if there's a pending event that hasn't been + * read yet but already trigggered it would be an issue, so this is + * "safer" unless we can prove its not necessary. + * + * Socket Modify: + * 1. Call "AFD Poll Cancel" (see Section of same name) + * 2. If a cancel was not enqueued because there is no pending request, + * submit AFD POLL request (see "AFD POLL Request" section), otherwise + * defer until next socket event. + * + * Event Wait: + * 1. Call GetQueuedCompletionStatusEx() with the base IOCP handle, a + * stack allocated array of OVERLAPPED_ENTRY's, and an appropriate + * timeout. + * 2. Iterate across returned events, the CompletionKey is a pointer to the + * container registered with CreateIoCompletionPort() or + * PostQueuedCompletionStatus() + * 3. If object indicates it is pending delete, go ahead and + * closesocket(peer_socket) and free() the container. Go to the next event. + * 4. Submit AFD POLL Request (see "AFD POLL Request"). We must re-enable + * the request each time we receive a response, it is not persistent. + * 5. Notify of any events received as indicated in the AFD_POLL_INFO + * Handles[0].Events (NOTE: check NumberOfHandles first, make sure it is + * > 0, otherwise we might not have events such as if our last request + * was cancelled). + * + * AFD Poll Request: + * 1. Initialize the AFD_POLL_INFO structure: + * Exclusive = TRUE; // Auto cancel duplicates for same socket + * NumberOfHandles = 1; + * Timeout.QuadPart = LLONG_MAX; + * Handles[0].Handle = (HANDLE)base_socket; + * Handles[0].Status = 0; + * Handles[0].Events = ... set as appropriate AFD_POLL_RECEIVE, etc; + * 2. Zero out the OVERLAPPED structure + * 3. Create an IO_STATUS_BLOCK pointer (iosb) and set it to the address of + * the OVERLAPPED "Internal" member. + * 4. Set the "Status" member of IO_STATUS_BLOCK to STATUS_PENDING + * 5. Call + * NtDeviceIoControlFile((HANDLE)peer_socket, NULL, NULL, &overlapped, + * iosb, IOCTL_AFD_POLL + * &afd_poll_info, sizeof(afd_poll_info), + * &afd_poll_info, sizeof(afd_poll_info)); + * NOTE: Its not clear to me if the IO_STATUS_BLOCK pointing to OVERLAPPED + * is for efficiency or if its a requirement for AFD. This is what + * libuv does, so I'm doing it here too. + * + * AFD Poll Cancel: + * 1. Check to see if the IO_STATUS_BLOCK "Status" member for the socket + * is still STATUS_PENDING, if not, no cancel request is necessary. + * 2. Call + * NtCancelIoFileEx((HANDLE)peer_socket, iosb, &temp_iosb); + * + * + * References: + * - https://github.com/piscisaureus/wepoll/ + * - https://github.com/libuv/libuv/ + */ + +typedef struct { + /* Dynamically loaded symbols */ + NtDeviceIoControlFile_t NtDeviceIoControlFile; + NtCancelIoFileEx_t NtCancelIoFileEx; + + /* Implementation details */ + HANDLE iocp_handle; +} ares_evsys_win32_t; + +typedef struct { + /*! Pointer to parent event container */ + ares_event_t *event; + /*! Socket passed in to monitor */ + SOCKET socket; + /*! Base socket derived from provided socket */ + SOCKET base_socket; + /*! New socket (duplicate base_socket handle) supporting OVERLAPPED operation + */ + SOCKET peer_socket; + /*! Structure for submitting AFD POLL requests (Internals!) */ + AFD_POLL_INFO afd_poll_info; + /*! Overlapped structure submitted with AFD POLL requests and returned with + * IOCP results */ + OVERLAPPED overlapped; +} ares_evsys_win32_eventdata_t; + +static void ares_iocpevent_signal(const ares_event_t *event) +{ + ares_event_thread_t *e = event->e; + ares_evsys_win32_t *ew = e->ev_sys_data; + + if (e == NULL) { + return; + } + + PostQueuedCompletionStatus(ew->iocp_handle, 0, (ULONG_PTR)event->data, NULL); +} + +static void ares_iocpevent_cb(ares_event_thread_t *e, ares_socket_t fd, + void *data, ares_event_flags_t flags) +{ + (void)e; + (void)data; + (void)fd; + (void)flags; +} + +static ares_event_t *ares_iocpevent_create(ares_event_thread_t *e) +{ + ares_event_t *event = NULL; + ares_status_t status; + + status = + ares_event_update(&event, e, ARES_EVENT_FLAG_OTHER, ares_iocpevent_cb, + ARES_SOCKET_BAD, NULL, NULL, ares_iocpevent_signal); + if (status != ARES_SUCCESS) { + return NULL; + } + + return event; +} + +static void ares_evsys_win32_destroy(ares_event_thread_t *e) +{ + ares_evsys_win32_t *ew = NULL; + + if (e == NULL) { + return; + } + + ew = e->ev_sys_data; + if (ew == NULL) { + return; + } + + if (ew->iocp_handle != NULL) { + CloseHandle(ew->iocp_handle); + } + + ares_free(ew); + e->ev_sys_data = NULL; +} + +static ares_bool_t ares_evsys_win32_init(ares_event_thread_t *e) +{ + ares_evsys_win32_t *ew = NULL; + HMODULE ntdll; + + ew = ares_malloc_zero(sizeof(*ew)); + if (ew == NULL) { + return ARES_FALSE; + } + + e->ev_sys_data = ew; + + /* All apps should have ntdll.dll already loaded, so just get a handle to + * this */ + ntdll = GetModuleHandleA("ntdll.dll"); + if (ntdll == NULL) { + goto fail; + } + + /* Load Internal symbols not typically accessible */ + ew->NtDeviceIoControlFile = (NtDeviceIoControlFile_t)(void *)GetProcAddress( + ntdll, "NtDeviceIoControlFile"); + ew->NtCancelIoFileEx = + (NtCancelIoFileEx_t)(void *)GetProcAddress(ntdll, "NtCancelIoFileEx"); + + if (ew->NtCancelIoFileEx == NULL || ew->NtDeviceIoControlFile == NULL) { + goto fail; + } + + ew->iocp_handle = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0); + if (ew->iocp_handle == NULL) { + goto fail; + } + + e->ev_signal = ares_iocpevent_create(e); + if (e->ev_signal == NULL) { + goto fail; + } + + return ARES_TRUE; + +fail: + ares_evsys_win32_destroy(e); + return ARES_FALSE; +} + +static ares_socket_t ares_evsys_win32_basesocket(ares_socket_t socket) +{ + while (1) { + DWORD bytes; /* Not used */ + ares_socket_t base_socket = ARES_SOCKET_BAD; + int rv; + + rv = WSAIoctl(socket, SIO_BASE_HANDLE, NULL, 0, &base_socket, + sizeof(base_socket), &bytes, NULL, NULL); + if (rv != SOCKET_ERROR && base_socket != ARES_SOCKET_BAD) { + socket = base_socket; + break; + } + + /* If we're here, an error occurred */ + if (GetLastError() == WSAENOTSOCK) { + /* This is critical, exit */ + return ARES_SOCKET_BAD; + } + + /* Work around known bug in Komodia based LSPs, use ARES_BSP_HANDLE_POLL + * to retrieve the underlying socket to then loop and get the base socket: + * https://docs.microsoft.com/en-us/windows/win32/winsock/winsock-ioctls + * https://www.komodia.com/newwiki/index.php?title=Komodia%27s_Redirector_bug_fixes#Version_2.2.2.6 + */ + base_socket = ARES_SOCKET_BAD; + rv = WSAIoctl(socket, SIO_BSP_HANDLE_POLL, NULL, 0, &base_socket, + sizeof(base_socket), &bytes, NULL, NULL); + + if (rv != SOCKET_ERROR && base_socket != ARES_SOCKET_BAD && + base_socket != socket) { + socket = base_socket; + continue; /* loop! */ + } + + return ARES_SOCKET_BAD; + } + + return socket; +} + +static ares_bool_t ares_evsys_win32_afd_enqueue(ares_event_t *event, + ares_event_flags_t flags) +{ + ares_event_thread_t *e = event->e; + ares_evsys_win32_t *ew = e->ev_sys_data; + ares_evsys_win32_eventdata_t *ed = event->data; + NTSTATUS status; + IO_STATUS_BLOCK *iosb_ptr; + + if (e == NULL || ed == NULL || ew == NULL) { + return ARES_FALSE; + } + + /* Enqueue AFD Poll */ + ed->afd_poll_info.Exclusive = TRUE; + ed->afd_poll_info.NumberOfHandles = 1; + ed->afd_poll_info.Timeout.QuadPart = LLONG_MAX; + ed->afd_poll_info.Handles[0].Handle = (HANDLE)ed->base_socket; + ed->afd_poll_info.Handles[0].Status = 0; + ed->afd_poll_info.Handles[0].Events = 0; + + if (flags & ARES_EVENT_FLAG_READ) { + ed->afd_poll_info.Handles[0].Events |= + (AFD_POLL_RECEIVE | AFD_POLL_DISCONNECT | AFD_POLL_ACCEPT | + AFD_POLL_ABORT); + } + if (flags & ARES_EVENT_FLAG_WRITE) { + ed->afd_poll_info.Handles[0].Events |= + (AFD_POLL_SEND | AFD_POLL_CONNECT_FAIL); + } + if (flags == 0) { + ed->afd_poll_info.Handles[0].Events |= AFD_POLL_DISCONNECT; + } + + memset(&ed->overlapped, 0, sizeof(ed->overlapped)); + iosb_ptr = (IO_STATUS_BLOCK *)&ed->overlapped.Internal; + iosb_ptr->Status = STATUS_PENDING; + + status = ew->NtDeviceIoControlFile( + (HANDLE)ed->peer_socket, NULL, NULL, &ed->overlapped, iosb_ptr, + IOCTL_AFD_POLL, &ed->afd_poll_info, sizeof(ed->afd_poll_info), + &ed->afd_poll_info, sizeof(ed->afd_poll_info)); + if (status != STATUS_SUCCESS && status != STATUS_PENDING) { + printf("%s(): failed to perform IOCTL_AFD_POLL operation\n", __FUNCTION__); + fflush(stdout); + return ARES_FALSE; + } + + return ARES_TRUE; +} + +static ares_bool_t ares_evsys_win32_afd_cancel(ares_evsys_win32_eventdata_t *ed) +{ + IO_STATUS_BLOCK *iosb_ptr; + IO_STATUS_BLOCK cancel_iosb; + ares_evsys_win32_t *ew; + NTSTATUS status; + + /* Detached due to destroy */ + if (ed->event == NULL) { + return ARES_FALSE; + } + + iosb_ptr = (IO_STATUS_BLOCK *)&ed->overlapped.Internal; + /* Not pending, nothing to do */ + if (iosb_ptr->Status != STATUS_PENDING) { + return ARES_FALSE; + } + + ew = ed->event->e->ev_sys_data; + status = + ew->NtCancelIoFileEx((HANDLE)ed->peer_socket, iosb_ptr, &cancel_iosb); + + /* NtCancelIoFileEx() may return STATUS_NOT_FOUND if the operation completed + * just before calling NtCancelIoFileEx(), but we have not yet received the + * notifiction (but it should be queued for the next IOCP event). */ + if (status == STATUS_SUCCESS || status == STATUS_NOT_FOUND) { + return ARES_TRUE; + } + + return ARES_FALSE; +} + +static void ares_evsys_win32_eventdata_destroy(ares_evsys_win32_eventdata_t *ed) +{ + if (ed == NULL) { + return; + } + + if (ed->peer_socket != ARES_SOCKET_BAD) { + closesocket(ed->peer_socket); + } + + ares_free(ed); +} + +static ares_bool_t ares_evsys_win32_event_add(ares_event_t *event) +{ + ares_event_thread_t *e = event->e; + ares_evsys_win32_t *ew = e->ev_sys_data; + ares_evsys_win32_eventdata_t *ed; + WSAPROTOCOL_INFOW protocol_info; + + ed = ares_malloc_zero(sizeof(*ed)); + ed->event = event; + ed->socket = event->fd; + ed->base_socket = ARES_SOCKET_BAD; + ed->peer_socket = ARES_SOCKET_BAD; + + /* Likely a signal event, not something we will directly handle. We create + * the ares_evsys_win32_eventdata_t as the placeholder to use as the + * IOCP Completion Key */ + if (ed->socket == ARES_SOCKET_BAD) { + event->data = ed; + return ARES_TRUE; + } + + ed->base_socket = ares_evsys_win32_basesocket(ed->socket); + if (ed->base_socket == ARES_SOCKET_BAD) { + fprintf(stderr, "%s(): could not determine base socket for fd %d\n", + __FUNCTION__, (int)event->fd); + ares_evsys_win32_eventdata_destroy(ed); + return ARES_FALSE; + } + + /* Create a peer socket that supports OVERLAPPED so we can use IOCP on the + * socket handle */ + if (WSADuplicateSocketW(ed->base_socket, GetCurrentProcessId(), + &protocol_info) != 0) { + fprintf(stderr, + "%s(): could not retrieve protocol info for creating peer socket\n", + __FUNCTION__); + ares_evsys_win32_eventdata_destroy(ed); + return ARES_FALSE; + } + + ed->peer_socket = + WSASocketW(protocol_info.iAddressFamily, protocol_info.iSocketType, + protocol_info.iProtocol, &protocol_info, 0, WSA_FLAG_OVERLAPPED); + if (ed->peer_socket == ARES_SOCKET_BAD) { + fprintf(stderr, "%s(): could not create peer socket\n", __FUNCTION__); + ares_evsys_win32_eventdata_destroy(ed); + return ARES_FALSE; + } + + SetHandleInformation((HANDLE)ed->peer_socket, HANDLE_FLAG_INHERIT, 0); + + if (CreateIoCompletionPort((HANDLE)ed->peer_socket, ew->iocp_handle, + (ULONG_PTR)ed, 0) == NULL) { + fprintf(stderr, "%s(): failed to bind peer socket to IOCP\n", __FUNCTION__); + ares_evsys_win32_eventdata_destroy(ed); + return ARES_FALSE; + } + + event->data = ed; + + if (!ares_evsys_win32_afd_enqueue(event, event->flags)) { + event->data = NULL; + ares_evsys_win32_eventdata_destroy(ed); + return ARES_FALSE; + } + + return ARES_TRUE; +} + +static void ares_evsys_win32_event_del(ares_event_t *event) +{ + ares_evsys_win32_eventdata_t *ed = event->data; + ares_event_thread_t *e = event->e; + + if (event->fd == ARES_SOCKET_BAD || !e->isup || ed == NULL || + !ares_evsys_win32_afd_cancel(ed)) { + /* Didn't need to enqueue a cancellation, for one of these reasons: + * - Not an IOCP socket + * - This is during shutdown of the event thread, no more signals can be + * delivered. + * - It has been determined there is no AFD POLL queued currently for the + * socket. + */ + ares_evsys_win32_eventdata_destroy(ed); + event->data = NULL; + } else { + /* Detach from event, so when the cancel event comes through, + * it will clean up */ + ed->event = NULL; + event->data = NULL; + } +} + +static void ares_evsys_win32_event_mod(ares_event_t *event, + ares_event_flags_t new_flags) +{ + ares_evsys_win32_eventdata_t *ed = event->data; + + /* Not for us */ + if (event->fd == ARES_SOCKET_BAD || ed == NULL) { + return; + } + + /* Try to cancel any current outstanding poll, if one is not running, + * go ahead and queue it up */ + if (!ares_evsys_win32_afd_cancel(ed)) { + ares_evsys_win32_afd_enqueue(event, new_flags); + } +} + +static size_t ares_evsys_win32_wait(ares_event_thread_t *e, + unsigned long timeout_ms) +{ + ares_evsys_win32_t *ew = e->ev_sys_data; + OVERLAPPED_ENTRY entries[16]; + ULONG nentries = sizeof(entries) / sizeof(*entries); + BOOL status; + size_t i; + size_t cnt = 0; + + status = GetQueuedCompletionStatusEx( + ew->iocp_handle, entries, nentries, &nentries, + (timeout_ms == 0) ? INFINITE : (DWORD)timeout_ms, FALSE); + + if (!status) { + return 0; + } + + for (i = 0; i < (size_t)nentries; i++) { + ares_event_flags_t flags = 0; + ares_evsys_win32_eventdata_t *ed = + (ares_evsys_win32_eventdata_t *)entries[i].lpCompletionKey; + ares_event_t *event = ed->event; + + if (ed->socket == ARES_SOCKET_BAD) { + /* Some sort of signal event */ + flags = ARES_EVENT_FLAG_OTHER; + } else { + /* Process events */ + if (ed->afd_poll_info.NumberOfHandles > 0) { + if (ed->afd_poll_info.Handles[0].Events & + (AFD_POLL_RECEIVE | AFD_POLL_DISCONNECT | AFD_POLL_ACCEPT | + AFD_POLL_ABORT)) { + flags |= ARES_EVENT_FLAG_READ; + } + if (ed->afd_poll_info.Handles[0].Events & + (AFD_POLL_SEND | AFD_POLL_CONNECT_FAIL)) { + flags |= ARES_EVENT_FLAG_WRITE; + } + + /* XXX: Handle ed->afd_poll_info.Handles[0].Events & + * AFD_POLL_LOCAL_CLOSE */ + } + + if (event == NULL) { + /* This means we need to cleanup the private event data as we've been + * detached */ + ares_evsys_win32_eventdata_destroy(ed); + } else { + /* Re-enqueue so we can get more events on the socket */ + ares_evsys_win32_afd_enqueue(event, event->flags); + } + } + + if (event != NULL && flags != 0) { + cnt++; + event->cb(e, event->fd, event->data, flags); + } + } + + return cnt; +} + +const ares_event_sys_t ares_evsys_win32 = { "win32", + ares_evsys_win32_init, + ares_evsys_win32_destroy, + ares_evsys_win32_event_add, + ares_evsys_win32_event_del, + ares_evsys_win32_event_mod, + ares_evsys_win32_wait }; +#endif diff --git a/deps/cares/src/lib/ares_event_win32.h b/deps/cares/src/lib/ares_event_win32.h new file mode 100644 index 00000000000000..99cd5c90f359c8 --- /dev/null +++ b/deps/cares/src/lib/ares_event_win32.h @@ -0,0 +1,119 @@ +/* MIT License + * + * Copyright (c) 2024 Brad House + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * SPDX-License-Identifier: MIT + */ +#ifndef __ARES_EVENT_WIN32_H +#define __ARES_EVENT_WIN32_H + +#ifdef _WIN32 +# ifdef HAVE_WINSOCK2_H +# include +# endif +# ifdef HAVE_WS2TCPIP_H +# include +# endif +# ifdef HAVE_MSWSOCK_H +# include +# endif +# ifdef HAVE_WINDOWS_H +# include +# endif + +/* From winternl.h */ + +/* If WDK is not installed and not using MinGW, provide the needed definitions + */ +typedef LONG NTSTATUS; + +typedef struct _IO_STATUS_BLOCK { + union { + NTSTATUS Status; + PVOID Pointer; + }; + + ULONG_PTR Information; +} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; + +typedef VOID(NTAPI *PIO_APC_ROUTINE)(PVOID ApcContext, + PIO_STATUS_BLOCK IoStatusBlock, + ULONG Reserved); + +/* From ntstatus.h */ +# define STATUS_SUCCESS ((NTSTATUS)0x00000000) +# ifndef STATUS_PENDING +# define STATUS_PENDING ((NTSTATUS)0x00000103L) +# endif +# define STATUS_CANCELLED ((NTSTATUS)0xC0000120L) +# define STATUS_NOT_FOUND ((NTSTATUS)0xC0000225L) + +/* Not sure what headers might have these */ +# define IOCTL_AFD_POLL 0x00012024 + +# define AFD_POLL_RECEIVE 0x0001 +# define AFD_POLL_RECEIVE_EXPEDITED 0x0002 +# define AFD_POLL_SEND 0x0004 +# define AFD_POLL_DISCONNECT 0x0008 +# define AFD_POLL_ABORT 0x0010 +# define AFD_POLL_LOCAL_CLOSE 0x0020 +# define AFD_POLL_ACCEPT 0x0080 +# define AFD_POLL_CONNECT_FAIL 0x0100 + +typedef struct _AFD_POLL_HANDLE_INFO { + HANDLE Handle; + ULONG Events; + NTSTATUS Status; +} AFD_POLL_HANDLE_INFO, *PAFD_POLL_HANDLE_INFO; + +typedef struct _AFD_POLL_INFO { + LARGE_INTEGER Timeout; + ULONG NumberOfHandles; + ULONG Exclusive; + AFD_POLL_HANDLE_INFO Handles[1]; +} AFD_POLL_INFO, *PAFD_POLL_INFO; + +/* Prototypes for dynamically loaded functions from ntdll.dll */ +typedef NTSTATUS(NTAPI *NtCancelIoFileEx_t)(HANDLE FileHandle, + PIO_STATUS_BLOCK IoRequestToCancel, + PIO_STATUS_BLOCK IoStatusBlock); +typedef NTSTATUS(NTAPI *NtDeviceIoControlFile_t)( + HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, + PIO_STATUS_BLOCK IoStatusBlock, ULONG IoControlCode, PVOID InputBuffer, + ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength); + +/* On UWP/Windows Store, these definitions aren't there for some reason */ +# ifndef SIO_BSP_HANDLE_POLL +# define SIO_BSP_HANDLE_POLL 0x4800001D +# endif + +# ifndef SIO_BASE_HANDLE +# define SIO_BASE_HANDLE 0x48000022 +# endif + +# ifndef HANDLE_FLAG_INHERIT +# define HANDLE_FLAG_INHERIT 0x00000001 +# endif + +#endif /* _WIN32 */ + +#endif /* __ARES_EVENT_WIN32_H */ diff --git a/deps/cares/src/lib/ares_init.c b/deps/cares/src/lib/ares_init.c index fab8c04d2acf19..014226f392bdfb 100644 --- a/deps/cares/src/lib/ares_init.c +++ b/deps/cares/src/lib/ares_init.c @@ -389,6 +389,14 @@ int ares_init_options(ares_channel_t **channelptr, ares_strerror(status))); } + /* Initialize the event thread */ + if (channel->optmask & ARES_OPT_EVENT_THREAD) { + status = ares_event_thread_init(channel); + if (status != ARES_SUCCESS) { + goto done; + } + } + done: if (status != ARES_SUCCESS) { ares_destroy(channel); diff --git a/deps/cares/src/lib/ares_options.c b/deps/cares/src/lib/ares_options.c index 649487dd300933..59e3aa7ab93229 100644 --- a/deps/cares/src/lib/ares_options.c +++ b/deps/cares/src/lib/ares_options.c @@ -225,6 +225,10 @@ int ares_save_options(ares_channel_t *channel, struct ares_options *options, options->qcache_max_ttl = channel->qcache_max_ttl; } + if (channel->optmask & ARES_OPT_EVENT_THREAD) { + options->evsys = channel->evsys; + } + *optmask = (int)channel->optmask; return ARES_SUCCESS; @@ -267,6 +271,17 @@ ares_status_t ares__init_by_options(ares_channel_t *channel, } /* Easy stuff. */ + + /* Event Thread requires threading support and is incompatible with socket + * state callbacks */ + if (optmask & ARES_OPT_EVENT_THREAD) { + if (!ares_threadsafety()) + return ARES_ENOTIMP; + if (optmask & ARES_OPT_SOCK_STATE_CB) + return ARES_EFORMERR; + channel->evsys = options->evsys; + } + if (optmask & ARES_OPT_FLAGS) { channel->flags = (unsigned int)options->flags; } diff --git a/deps/cares/src/lib/ares_parse_ptr_reply.c b/deps/cares/src/lib/ares_parse_ptr_reply.c index ffe797f3dddb10..d8a29f272251cf 100644 --- a/deps/cares/src/lib/ares_parse_ptr_reply.c +++ b/deps/cares/src/lib/ares_parse_ptr_reply.c @@ -113,7 +113,6 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen_int, /* Cycle through answers */ for (i = 0; i < ancount; i++) { - const char *rname = NULL; const ares_dns_rr_t *rr = ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); @@ -141,17 +140,20 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen_int, continue; } - /* Old code compared the name in the rr to the ptrname, so we'll do that - * check here, but I'm not sure its necessary */ - rname = ares_dns_rr_get_name(rr); - if (rname == NULL) { - /* Shouldn't be possible */ - status = ARES_EBADRESP; - goto done; - } - if (strcasecmp(ptrname, rname) != 0) { - continue; - } + /* Issue #683 + * Old code compared the name in the rr to the ptrname, but I think this + * is wrong since it was proven wrong for A & AAAA records. Leaving + * this code commented out for future reference + * + * rname = ares_dns_rr_get_name(rr); + * if (rname == NULL) { + * status = ARES_EBADRESP; + * goto done; + * } + * if (strcasecmp(ptrname, rname) != 0) { + * continue; + * } + */ /* Save most recent PTR record as the hostname */ hostname = ares_dns_rr_get_str(rr, ARES_RR_PTR_DNAME); diff --git a/deps/cares/src/lib/ares_private.h b/deps/cares/src/lib/ares_private.h index 4c1df3bdb9fbff..53c8d532a40b73 100644 --- a/deps/cares/src/lib/ares_private.h +++ b/deps/cares/src/lib/ares_private.h @@ -117,6 +117,7 @@ typedef struct ares_rand_state ares_rand_state; #include "ares__buf.h" #include "ares_dns_private.h" #include "ares__iface_ips.h" +#include "ares__threads.h" #ifndef HAVE_GETENV # include "ares_getenv.h" @@ -231,9 +232,6 @@ typedef struct ares__qcache ares__qcache_t; struct ares_hosts_file; typedef struct ares_hosts_file ares_hosts_file_t; -struct ares__thread_mutex; -typedef struct ares__thread_mutex ares__thread_mutex_t; - struct ares_channeldata { /* Configuration data */ unsigned int flags; @@ -253,6 +251,7 @@ struct ares_channeldata { char *lookups; size_t ednspsz; unsigned int qcache_max_ttl; + ares_evsys_t evsys; unsigned int optmask; /* For binding to local devices and/or IP addresses. Leave @@ -581,6 +580,13 @@ void ares__channel_threading_destroy(ares_channel_t *channel); void ares__channel_lock(ares_channel_t *channel); void ares__channel_unlock(ares_channel_t *channel); +struct ares_event_thread; +typedef struct ares_event_thread ares_event_thread_t; + +void ares_event_thread_destroy(ares_channel_t *channel); +ares_status_t ares_event_thread_init(ares_channel_t *channel); + + #ifdef _MSC_VER typedef __int64 ares_int64_t; typedef unsigned __int64 ares_uint64_t; diff --git a/deps/cares/src/lib/ares_process.c b/deps/cares/src/lib/ares_process.c index ff5899c111223e..d24add054c79cb 100644 --- a/deps/cares/src/lib/ares_process.c +++ b/deps/cares/src/lib/ares_process.c @@ -837,7 +837,6 @@ static size_t ares__calc_query_timeout(const struct query *query) /* For each trip through the entire server list, we want to double the * retry from the last retry */ rounds = (query->try_count / num_servers); - if (rounds > 0) { timeplus <<= rounds; } @@ -1002,7 +1001,6 @@ ares_status_t ares__send_query(struct query *query, struct timeval *now) } timeplus = ares__calc_query_timeout(query); - /* Keep track of queries bucketed by timeout, so we can process * timeout events quickly. */ diff --git a/deps/cares/src/lib/ares_rand.c b/deps/cares/src/lib/ares_rand.c index 976d8ff6ab2118..a7a74c9a8d7081 100644 --- a/deps/cares/src/lib/ares_rand.c +++ b/deps/cares/src/lib/ares_rand.c @@ -28,6 +28,13 @@ #include "ares.h" #include "ares_private.h" #include + +/* Older MacOS versions require including AvailabilityMacros.h before + * sys/random.h */ +#ifdef HAVE_AVAILABILITYMACROS_H +# include +#endif + #ifdef HAVE_SYS_RANDOM_H # include #endif diff --git a/deps/cares/src/lib/setup_once.h b/deps/cares/src/lib/setup_once.h index 042a3aaecd62ec..8341b348e7a9e0 100644 --- a/deps/cares/src/lib/setup_once.h +++ b/deps/cares/src/lib/setup_once.h @@ -95,10 +95,6 @@ # endif #endif -#ifdef HAVE_SYS_RANDOM_H -# include -#endif - #ifdef HAVE_SYS_SOCKET_H # include #endif diff --git a/deps/cares/src/tools/CMakeLists.txt b/deps/cares/src/tools/CMakeLists.txt index ed5a7d7233b308..13aefe135e9105 100644 --- a/deps/cares/src/tools/CMakeLists.txt +++ b/deps/cares/src/tools/CMakeLists.txt @@ -11,7 +11,7 @@ IF (CARES_BUILD_TOOLS) PUBLIC "$" "$" "$" - "$" + "$" "$" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" ) @@ -32,7 +32,7 @@ IF (CARES_BUILD_TOOLS) PUBLIC "$" "$" "$" - "$" + "$" "$" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" ) diff --git a/deps/cares/src/tools/Makefile.am b/deps/cares/src/tools/Makefile.am index 0545c06400e5e5..729658d79a76da 100644 --- a/deps/cares/src/tools/Makefile.am +++ b/deps/cares/src/tools/Makefile.am @@ -12,10 +12,10 @@ noinst_PROGRAMS =$(PROGS) # being currently built and tested are searched before the library which # might possibly already be installed in the system. -AM_CPPFLAGS = -I$(top_builddir)/include \ - -I$(top_builddir)/src/lib \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/lib +AM_CPPFLAGS += -I$(top_builddir)/include \ + -I$(top_builddir)/src/lib \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src/lib include Makefile.inc diff --git a/deps/cares/src/tools/Makefile.in b/deps/cares/src/tools/Makefile.in index deed34303c6304..f0602fe172fdbb 100644 --- a/deps/cares/src/tools/Makefile.in +++ b/deps/cares/src/tools/Makefile.in @@ -220,6 +220,15 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc \ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ + +# Specify our include paths here, and do it relative to $(top_srcdir) and +# $(top_builddir), to ensure that these paths which belong to the library +# being currently built and tested are searched before the library which +# might possibly already be installed in the system. +AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_builddir)/include \ + -I$(top_builddir)/src/lib -I$(top_srcdir)/include \ + -I$(top_srcdir)/src/lib AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ @@ -378,16 +387,6 @@ AUTOMAKE_OPTIONS = foreign subdir-objects nostdinc 1.9.6 PROGS = ahost adig EXTRA_DIST = CMakeLists.txt Makefile.inc -# Specify our include paths here, and do it relative to $(top_srcdir) and -# $(top_builddir), to ensure that these paths which belong to the library -# being currently built and tested are searched before the library which -# might possibly already be installed in the system. -AM_CPPFLAGS = -I$(top_builddir)/include \ - -I$(top_builddir)/src/lib \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/lib - - # Copyright (C) The c-ares project and its contributors # SPDX-License-Identifier: MIT SAMPLESOURCES = ares_getopt.c \ diff --git a/deps/cares/src/tools/adig.c b/deps/cares/src/tools/adig.c index 539080daaf4cd8..52215b3094fe28 100644 --- a/deps/cares/src/tools/adig.c +++ b/deps/cares/src/tools/adig.c @@ -46,6 +46,7 @@ #include "ares_dns.h" #ifndef HAVE_STRDUP +# include "ares_str.h" # define strdup(ptr) ares_strdup(ptr) #endif @@ -742,7 +743,13 @@ static void callback(void *arg, int status, int timeouts, unsigned char *abuf, (void)arg; (void)timeouts; - printf(";; Got answer:"); + /* We got a "Server status" */ + if (status >= ARES_SUCCESS && status <= ARES_EREFUSED) { + printf(";; Got answer:"); + } else { + printf(";;"); + } + if (status != ARES_SUCCESS) { printf(" %s", ares_strerror(status)); } diff --git a/deps/cares/src/tools/ahost.c b/deps/cares/src/tools/ahost.c index 6d9d1c6d201567..bbcd2b1d633c32 100644 --- a/deps/cares/src/tools/ahost.c +++ b/deps/cares/src/tools/ahost.c @@ -43,7 +43,7 @@ #include "ares_ipv6.h" #ifndef HAVE_STRDUP -# include "ares_strdup.h" +# include "ares_str.h" # define strdup(ptr) ares_strdup(ptr) #endif