Skip to content

Commit 4647e6b

Browse files
nodejs-github-botmarco-ippolito
authored andcommitted
deps: update c-ares to v1.32.0
PR-URL: #53722 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
1 parent 98d59aa commit 4647e6b

File tree

140 files changed

+3457
-2667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+3457
-2667
lines changed

deps/cares/CMakeLists.txt

+7-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles)
1212
INCLUDE (CheckStructHasMember)
1313
INCLUDE (CheckLibraryExists)
1414

15-
PROJECT (c-ares LANGUAGES C VERSION "1.31.0" )
15+
PROJECT (c-ares LANGUAGES C VERSION "1.32.0" )
1616

1717
# Set this version before release
1818
SET (CARES_VERSION "${PROJECT_VERSION}")
@@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w
3030
# For example, a version of 4:0:2 would generate output such as:
3131
# libname.so -> libname.so.2
3232
# libname.so.2 -> libname.so.2.2.0
33-
SET (CARES_LIB_VERSIONINFO "18:0:16")
33+
SET (CARES_LIB_VERSIONINFO "19:0:17")
3434

3535

3636
OPTION (CARES_STATIC "Build as a static library" OFF)
@@ -62,8 +62,8 @@ ENDIF ()
6262

6363
INCLUDE (EnableWarnings)
6464

65-
# allow linking against the static runtime library in msvc
6665
IF (MSVC)
66+
# allow linking against the static runtime library in msvc
6767
OPTION (CARES_MSVC_STATIC_RUNTIME "Link against the static runtime library" OFF)
6868
IF (CARES_MSVC_STATIC_RUNTIME)
6969
# CMAKE_CONFIGURATION_TYPES is empty on non-IDE generators (Ninja, NMake)
@@ -564,7 +564,7 @@ SET (RECVFROM_TYPE_ARG5 "struct sockaddr *")
564564
SET (RECV_TYPE_ARG4 int)
565565
SET (GETNAMEINFO_TYPE_ARG1 "struct sockaddr *")
566566
SET (GETNAMEINFO_TYPE_ARG7 int)
567-
SET (SEND_TYPE_ARG2 "void *")
567+
SET (SEND_TYPE_ARG2 "const void *")
568568
SET (SEND_TYPE_ARG4 int)
569569
################################################################################
570570

@@ -663,6 +663,9 @@ ENDIF ()
663663
IF (HAVE_SYS_SOCKET_H)
664664
SET (CARES_HAVE_SYS_SOCKET_H 1)
665665
ENDIF()
666+
IF (HAVE_SYS_SELECT_H)
667+
SET (CARES_HAVE_SYS_SELECT_H 1)
668+
ENDIF()
666669
IF (HAVE_WS2TCPIP_H)
667670
SET (CARES_HAVE_WS2TCPIP_H 1)
668671
ENDIF()

deps/cares/INSTALL.md

+45-10
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ unpacked the source archive):
4242
You probably need to be root when doing the last command.
4343

4444
If you have checked out the sources from the git repository, read the
45-
[GIT-INFO](GIT_INFO) on how to proceed.
45+
[GIT-INFO](GIT-INFO) on how to proceed.
4646

4747
Get a full listing of all available configure options by invoking it like:
4848

@@ -307,6 +307,16 @@ first to rebuild every single library your app uses as well as your
307307
app using the debug multithreaded dynamic C runtime.
308308

309309

310+
### MSYS
311+
312+
Building is supported for native windows via both AutoTools and CMake. When
313+
building with autotools, you can only build either a shared version or a static
314+
version (use `--disable-shared` or `--disable-static`). CMake can build both
315+
simultaneously.
316+
317+
All of the MSYS environments are supported: `MINGW32`, `MINGW64`, `UCRT64`,
318+
`CLANG32`, `CLANG64`, `CLANGARM64`.
319+
310320
### MingW32
311321

312322
Make sure that MinGW32's bin dir is in the search path, for example:
@@ -339,6 +349,26 @@ add `-DCARES_STATICLIB` to your `CFLAGS`. Otherwise the linker will look for
339349
dynamic import symbols.
340350

341351

352+
DOS
353+
---
354+
355+
c-ares supports building as a 32bit protected mode application via
356+
[DJGPP](https://www.delorie.com/djgpp/). It is recommended to use a DJGPP
357+
cross compiler from [Andrew Wu](https://github.com/andrewwutw/build-djgpp)
358+
as building directly in a DOS environment can be difficult.
359+
360+
It is required to also have [Watt-32](https://www.watt-32.net/) available
361+
built using the same compiler. It is recommended to build the latest `master`
362+
branch from [GitHub](https://github.com/sezero/watt32/tree/master).
363+
364+
Finally, the `DJ_PREFIX` and `WATT_ROOT` environment variables must be set
365+
appropriately before calling `make Makefile.dj` to build c-ares.
366+
367+
Please refer to our CI
368+
[GitHub Actions Workflow](https://github.com/c-ares/c-ares/blob/main/.github/workflows/djgpp.yml)
369+
for a full build example, including building the latest Watt-32 release.
370+
371+
342372
IBM OS/2
343373
--------
344374

@@ -418,20 +448,25 @@ This is a probably incomplete list of known hardware and operating systems
418448
that c-ares has been compiled for. If you know a system c-ares compiles and
419449
runs on, that isn't listed, please let us know!
420450

421-
- Alpha Tru64 v5.0 5.1
422-
- ARM Android 1.5, 2.1, 2.3
423-
- MIPS IRIX 6.2, 6.5
424-
- Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
425-
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
426-
- i386 Novell NetWare
427-
- i386 Windows 95, 98, ME, NT, 2000, XP, 2003
428-
- x86_64 Linux
451+
- Linux (i686, x86_64, AARCH64, and more)
452+
- MacOS 10.4+
453+
- iOS
454+
- Windows 8+ (i686, x86_64)
455+
- Android (ARM, AARCH64, x86_64)
456+
- FreeBSD
457+
- NetBSD
458+
- OpenBSD
459+
- Solaris (SPARC, x86_64)
460+
- AIX (POWER)
461+
- Tru64 (Alpha)
462+
- IRIX (MIPS)
463+
- Novell NetWare (i386)
429464

430465

431466
Useful URLs
432467
===========
433468

434469
- c-ares: https://c-ares.org/
435-
- MingW: http://www.mingw.org/
436470
- MinGW-w64: http://mingw-w64.sourceforge.net/
471+
- MSYS2: https://msys2.org
437472
- OpenWatcom: http://www.openwatcom.org/

deps/cares/Makefile.dj

+42-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,51 @@ WATT32_LIB = $(WATT32_ROOT)/lib/libwatt.a
2020
OBJ_DIR = djgpp
2121

2222
CFLAGS = -g -O2 -I./include -I./src/lib \
23-
-I$(WATT32_ROOT)/inc -Wall \
23+
-I$(WATT32_ROOT)/inc \
24+
-Wall \
25+
-Wextra \
26+
-Waggregate-return \
27+
-Wcast-align \
28+
-Wcast-qual \
29+
-Wconversion \
30+
-Wdeclaration-after-statement \
31+
-Wdouble-promotion \
32+
-Wfloat-equal \
33+
-Winit-self \
34+
-Wjump-misses-init \
35+
-Wlogical-op \
36+
-Wmissing-braces \
37+
-Wmissing-declarations \
38+
-Wmissing-format-attribute \
39+
-Wmissing-include-dirs \
40+
-Wmissing-prototypes \
41+
-Wnested-externs \
42+
-Wno-coverage-mismatch \
43+
-Wold-style-definition \
44+
-Wpacked \
45+
-Wpointer-arith \
46+
-Wshadow \
47+
-Wsign-conversion \
48+
-Wstrict-overflow \
49+
-Wstrict-prototypes \
50+
-Wtrampolines \
51+
-Wundef \
52+
-Wunreachable-code \
53+
-Wunused \
54+
-Wvariadic-macros \
55+
-Wvla \
56+
-Wwrite-strings \
57+
-Werror=implicit-int \
58+
-Werror=implicit-function-declaration \
59+
-Wno-long-long \
2460
-DWATT32 -DHAVE_CONFIG_H \
61+
-D_REENTRANT \
62+
-DCARES_NO_DEPRECATED \
2563
-Dselect=select_s
2664

65+
# Can't enable -Wredundant-decls due to WATT32 issues
66+
67+
2768
LDFLAGS = -s
2869

2970
ifeq ($(OS),Windows_NT)

deps/cares/Makefile.m32

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ install:
6464
${INSTALL} -m 444 ${srcdir}/include/ares.h ${DESTDIR}${includedir}
6565
${INSTALL} -m 444 ${srcdir}/include/ares_build.h ${DESTDIR}${includedir}
6666
${INSTALL} -m 444 ${srcdir}/include/ares_dns_record.h ${DESTDIR}${includedir}
67-
${INSTALL} -m 444 ${srcdir}/include/ares_rules.h ${DESTDIR}${includedir}
6867
${INSTALL} -m 444 ${srcdir}/include/ares_version.h ${DESTDIR}${includedir}
6968
(for man in $(MANPAGES); do \
7069
${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \

deps/cares/Makefile.msvc

+1-2
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ RT_ERROR_CHECKING = /RTCsu
214214

215215
CC_CMD_REL = cl.exe /nologo $(RTLIB) /DNDEBUG /O2
216216
CC_CMD_DBG = cl.exe /nologo $(RTLIBD) /D_DEBUG /Od /Zi $(RT_ERROR_CHECKING)
217-
CC_CFLAGS = $(CFLAGS) /I.\src\lib /I.\include /W3 /EHsc /FD
217+
CC_CFLAGS = $(CFLAGS) /D_REENTRANT /I.\src\lib /I.\include /W3 /EHsc /FD
218218

219219
RC_CMD_REL = rc.exe /l 0x409 /d "NDEBUG"
220220
RC_CMD_DBG = rc.exe /l 0x409 /d "_DEBUG"
@@ -440,7 +440,6 @@ install:
440440
@copy /y $(CARES_OUTDIR)\*.* "$(INSTALL_DIR_LIB)" >NUL
441441
@copy /y $(SRCDIR)\include\ares.h "$(INSTALL_DIR_INC)" >NUL
442442
@copy /y $(SRCDIR)\include\ares_build.h "$(INSTALL_DIR_INC)" >NUL
443-
@copy /y $(SRCDIR)\include\ares_rules.h "$(INSTALL_DIR_INC)" >NUL
444443
@copy /y $(SRCDIR)\include\ares_version.h "$(INSTALL_DIR_INC)" >NUL
445444
@copy /y $(SRCDIR)\include\ares_dns_record.h "$(INSTALL_DIR_INC)" >NUL
446445
@echo Installed c-ares $(CFG)

deps/cares/Makefile.netware

+1-2
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,8 @@ ifeq ($(LIBARCH),CLIB)
299299
@echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
300300
@echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@
301301
@echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@
302-
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
303302
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
304-
@echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
303+
@echo $(DL)#define SEND_TYPE_ARG2 const char *$(DL) >> $@
305304
@echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
306305
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
307306
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@

deps/cares/RELEASE-NOTES.md

+24-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,38 @@
1-
## c-ares version 1.31.0 - June 18 2024
1+
## c-ares version 1.32.0 - July 4 2024
22

3-
This is a maintenance and bugfix release.
3+
This is a feature and bugfix release.
4+
5+
Features:
6+
7+
* Add support for DNS 0x20 to help prevent cache poisoning attacks, enabled
8+
by specifying `ARES_FLAG_DNS0x20`. Disabled by default. [PR #800](https://github.com/c-ares/c-ares/pull/800)
9+
* Rework query timeout logic to automatically adjust timeouts based on network
10+
conditions. The timeout specified now is only used as a hint until there
11+
is enough history to calculate a more valid timeout. [PR #794](https://github.com/c-ares/c-ares/pull/794)
412

513
Changes:
614

7-
* Enable Query Cache by default. [PR #786](https://github.com/c-ares/c-ares/pull/786)
15+
* DNS RR TXT strings should not be automatically concatenated as there are use
16+
cases outside of RFC 7208. In order to maintain ABI compliance, the ability
17+
to retrieve TXT strings concatenated is retained as well as a new API to
18+
retrieve the individual strings. This restores behavior from c-ares 1.20.0.
19+
[PR #801](https://github.com/c-ares/c-ares/pull/801)
20+
* Clean up header inclusion logic to make hacking on code easier. [PR #797](https://github.com/c-ares/c-ares/pull/797)
21+
* GCC/Clang: Enable even more strict warnings to catch more coding flaws. [253bdee](https://github.com/c-ares/c-ares/commit/253bdee)
22+
* MSVC: Enable `/W4` warning level. [PR #792](https://github.com/c-ares/c-ares/pull/792)
823

924
Bugfixes:
1025

11-
* Enhance Windows DNS configuration change detection to also detect manual DNS
12-
configuration changes. [PR #785](https://github.com/c-ares/c-ares/issues/785)
13-
* Various legacy MacOS Build fixes. [Issue #782](https://github.com/c-ares/c-ares/issues/782)
14-
* Ndots value of zero in resolv.conf was not being honored. [852a60a](https://github.com/c-ares/c-ares/commit/852a60a)
15-
* Watt-32 build support had been broken for some time. [PR #781](https://github.com/c-ares/c-ares/pull/781)
16-
* Distribute `ares_dns_rec_type_tostr` manpage. [PR #778](https://github.com/c-ares/c-ares/pull/778)
26+
* Tests: Fix thread race condition in test cases for EventThread. [PR #803](https://github.com/c-ares/c-ares/pull/803)
27+
* Windows: Fix building with UNICODE. [PR #802](https://github.com/c-ares/c-ares/pull/802)
28+
* Thread Saftey: `ares_timeout()` was missing lock. [74a64e4](https://github.com/c-ares/c-ares/commit/74a64e4)
29+
* Fix building with DJGPP (32bit protected mode DOS). [PR #789](https://github.com/c-ares/c-ares/pull/789)
1730

1831
Thanks go to these friendly people for their efforts and contributions for this
1932
release:
2033

2134
* Brad House (@bradh352)
22-
* Gregor Jasny (@gjasny)
35+
* Cheng (@zcbenz)
36+
2337

2438

deps/cares/aminclude_static.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# aminclude_static.am generated automatically by Autoconf
3-
# from AX_AM_MACROS_STATIC on Tue Jun 18 05:51:32 EDT 2024
3+
# from AX_AM_MACROS_STATIC on Thu Jul 4 07:03:12 EDT 2024
44

55

66
# Code coverage

deps/cares/cares.gyp

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
'include/ares_dns.h',
66
'include/ares_dns_record.h',
77
'include/ares_nameser.h',
8-
'include/ares_rules.h',
98
'include/ares_version.h',
109
'src/lib/ares__addrinfo2hostent.c',
1110
'src/lib/ares__addrinfo_localhost.c',
@@ -43,6 +42,8 @@
4342
'src/lib/ares_data.h',
4443
'src/lib/ares_destroy.c',
4544
'src/lib/ares_dns_mapping.c',
45+
'src/lib/ares_dns_multistring.c',
46+
'src/lib/ares_dns_multistring.h',
4647
'src/lib/ares_dns_name.c',
4748
'src/lib/ares_dns_parse.c',
4849
'src/lib/ares_dns_record.c',
@@ -76,6 +77,7 @@
7677
'src/lib/ares_library_init.c',
7778
'src/lib/ares_ipv6.h',
7879
'src/lib/ares_math.c',
80+
'src/lib/ares_metrics.c',
7981
'src/lib/ares_options.c',
8082
'src/lib/ares_parse_a_reply.c',
8183
'src/lib/ares_parse_aaaa_reply.c',
@@ -112,7 +114,6 @@
112114
'src/lib/ares_version.c',
113115
'src/lib/inet_net_pton.c',
114116
'src/lib/inet_ntop.c',
115-
'src/lib/setup_once.h',
116117
'src/tools/ares_getopt.c',
117118
'src/tools/ares_getopt.h',
118119
],
@@ -122,6 +123,7 @@
122123
'src/lib/thirdparty/apple/dnsinfo.h',
123124
],
124125
'cares_sources_win': [
126+
'src/lib/ares_sysconfig_win.c',
125127
'src/lib/config-win32.h',
126128
'src/lib/windows_port.c',
127129
],

0 commit comments

Comments
 (0)