diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml
index 4796b5b316ebe4..a784b43cfc6268 100644
--- a/.github/workflows/build-tarball.yml
+++ b/.github/workflows/build-tarball.yml
@@ -46,13 +46,13 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache
- uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
+ uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
with:
- version: v0.8.1
+ version: v0.10.0
- name: Environment Information
run: npx envinfo
- name: Make tarball
@@ -64,7 +64,7 @@ jobs:
mkdir tarballs
mv *.tar.gz tarballs
- name: Upload tarball artifact
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: tarballs
path: tarballs
@@ -76,17 +76,17 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache
- uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
+ uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
with:
- version: v0.8.1
+ version: v0.10.0
- name: Environment Information
run: npx envinfo
- name: Download tarball
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
+ uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
name: tarballs
path: tarballs
@@ -96,7 +96,7 @@ jobs:
echo "TAR_DIR=$RUNNER_TEMP/`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
- name: Copy directories needed for testing
run: |
- cp -r tools/node_modules $TAR_DIR/tools
+ cp -r tools/eslint $TAR_DIR/tools
cp -r tools/eslint-rules $TAR_DIR/tools
- name: Build
run: |
@@ -105,4 +105,4 @@ jobs:
- name: Test
run: |
cd $TAR_DIR
- make run-ci -j4 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9"
+ make run-ci -j4 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9"
diff --git a/.github/workflows/coverage-linux-without-intl.yml b/.github/workflows/coverage-linux-without-intl.yml
index 1977eda3f97e03..a1f8f060ddab13 100644
--- a/.github/workflows/coverage-linux-without-intl.yml
+++ b/.github/workflows/coverage-linux-without-intl.yml
@@ -52,13 +52,13 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache
- uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
+ uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
with:
- version: v0.8.1
+ version: v0.10.0
- name: Environment Information
run: npx envinfo
- name: Install gcovr
@@ -68,7 +68,7 @@ jobs:
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
# The cause is most likely coverage's use of the inspector.
- name: Test
- run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j4 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9" || exit 0
+ run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j4 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9" || exit 0
- name: Report JS
run: npx c8 report --check-coverage
env:
@@ -79,6 +79,6 @@ jobs:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
- name: Upload
- uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
+ uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
with:
directory: ./coverage
diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml
index 164c0b540a9f45..9305d5f02cad6f 100644
--- a/.github/workflows/coverage-linux.yml
+++ b/.github/workflows/coverage-linux.yml
@@ -52,13 +52,13 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache
- uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
+ uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
with:
- version: v0.8.1
+ version: v0.10.0
- name: Environment Information
run: npx envinfo
- name: Install gcovr
@@ -68,7 +68,7 @@ jobs:
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
# The cause is most likely coverage's use of the inspector.
- name: Test
- run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j4 V=1 TEST_CI_ARGS="-p dots --node-args='--test-reporter=spec' --measure-flakiness 9" || exit 0
+ run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j4 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9" || exit 0
- name: Report JS
run: npx c8 report --check-coverage
env:
@@ -79,6 +79,6 @@ jobs:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
- name: Upload
- uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
+ uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
with:
directory: ./coverage
diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml
index 24cf47f9b376bd..2266d0da067cdd 100644
--- a/.github/workflows/test-linux.yml
+++ b/.github/workflows/test-linux.yml
@@ -35,22 +35,34 @@ permissions:
jobs:
test-linux:
if: github.event.pull_request.draft == false
- runs-on: ubuntu-24.04
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-24.04, ubuntu-24.04-arm]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
+ path: node
- name: Set up Python ${{ env.PYTHON_VERSION }}
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
+ uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache
- uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
+ uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
with:
- version: v0.8.1
+ version: v0.10.0
- name: Environment Information
run: npx envinfo
- name: Build
- run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn"
+ run: make -C node build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn"
- name: Test
- run: make run-ci -j4 V=1 TEST_CI_ARGS="-p actions --node-args='--test-reporter=spec' --node-args='--test-reporter-destination=stdout' --measure-flakiness 9"
+ run: make -C node run-ci -j4 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9"
+ - name: Re-run test in a folder whose name contains unusual chars
+ run: |
+ mv node "$DIR"
+ cd "$DIR"
+ ./tools/test.py --flaky-tests keep_retrying -p actions -j 4
+ env:
+ DIR: dir%20with $unusual"chars?'åß∂ƒ©∆¬…`
diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml
index 56e8d6fdd65999..c45799a022b035 100644
--- a/.github/workflows/test-macos.yml
+++ b/.github/workflows/test-macos.yml
@@ -56,7 +56,7 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache
- uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
+ uses: Mozilla-Actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
with:
version: v0.8.1
- name: Environment Information
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6abfebadc97775..1cf81efb18ec34 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,7 +35,8 @@ release.
-20.19.0
+20.19.1
+20.19.0
20.18.3
20.18.2
20.18.1
diff --git a/deps/cares/CMakeLists.txt b/deps/cares/CMakeLists.txt
index 139defd8ffd159..49f98cac2688c1 100644
--- a/deps/cares/CMakeLists.txt
+++ b/deps/cares/CMakeLists.txt
@@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles)
INCLUDE (CheckStructHasMember)
INCLUDE (CheckLibraryExists)
-PROJECT (c-ares LANGUAGES C VERSION "1.34.4" )
+PROJECT (c-ares LANGUAGES C VERSION "1.34.5" )
# Set this version before release
SET (CARES_VERSION "${PROJECT_VERSION}")
@@ -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 "21:3:19")
+SET (CARES_LIB_VERSIONINFO "21:4:19")
OPTION (CARES_STATIC "Build as a static library" OFF)
@@ -274,12 +274,14 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "QNX")
LIST (APPEND SYSFLAGS -D_QNX_SOURCE)
ELSEIF (WIN32)
- LIST (APPEND SYSFLAGS -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WIN32_WINNT=0x0602)
+ LIST (APPEND SYSFLAGS -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
+ IF (NOT CMAKE_C_FLAGS MATCHES ".*-D_WIN32_WINNT=.*")
+ LIST (APPEND SYSFLAGS -D_WIN32_WINNT=0x0602)
+ ENDIF ()
ENDIF ()
ADD_DEFINITIONS(${SYSFLAGS})
-
# Tell C-Ares about libraries to depend on
IF (HAVE_LIBRESOLV)
LIST (APPEND CARES_DEPENDENT_LIBS resolv)
@@ -426,6 +428,7 @@ CHECK_SYMBOL_EXISTS (getservbyname_r "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_GETSERV
CHECK_SYMBOL_EXISTS (gettimeofday "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_GETTIMEOFDAY)
CHECK_SYMBOL_EXISTS (if_indextoname "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_IF_INDEXTONAME)
CHECK_SYMBOL_EXISTS (if_nametoindex "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_IF_NAMETOINDEX)
+CHECK_SYMBOL_EXISTS (GetBestRoute2 "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_GETBESTROUTE2)
CHECK_SYMBOL_EXISTS (ConvertInterfaceIndexToLuid "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CONVERTINTERFACEINDEXTOLUID)
CHECK_SYMBOL_EXISTS (ConvertInterfaceLuidToNameA "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CONVERTINTERFACELUIDTONAMEA)
CHECK_SYMBOL_EXISTS (NotifyIpInterfaceChange "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_NOTIFYIPINTERFACECHANGE)
@@ -503,11 +506,7 @@ IF (CARES_THREADS)
CARES_EXTRAINCLUDE_IFSET (HAVE_PTHREAD_H pthread.h)
CARES_EXTRAINCLUDE_IFSET (HAVE_PTHREAD_NP_H pthread_np.h)
CHECK_SYMBOL_EXISTS (pthread_init "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_PTHREAD_INIT)
- # Make sure libcares.pc.cmake knows about thread libraries on static builds
- # The variable set by FIND_PACKAGE(Threads) has a -l prefix on it, we need
- # to strip that first since CARES_DEPENDENT_LIBS doesn't expect that.
- STRING (REPLACE "-l" "" CARES_THREAD_LIBRARY "${CMAKE_THREAD_LIBS_INIT}")
- LIST (APPEND CARES_DEPENDENT_LIBS ${CARES_THREAD_LIBRARY})
+ LIST (APPEND CARES_DEPENDENT_LIBS ${CMAKE_THREAD_LIBS_INIT})
ELSE ()
MESSAGE (WARNING "Threading support not found, disabling...")
SET (CARES_THREADS OFF)
@@ -777,7 +776,10 @@ IF (CARES_INSTALL)
# pkgconfig support for static builds
FOREACH (LIB ${CARES_DEPENDENT_LIBS})
- SET (CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS} -l${LIB}")
+ IF (NOT LIB MATCHES "^-")
+ SET (LIB "-l${LIB}")
+ ENDIF ()
+ SET (CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS} ${LIB}")
ENDFOREACH ()
CONFIGURE_FILE("libcares.pc.cmake" "libcares.pc" @ONLY)
diff --git a/deps/cares/Makefile.in b/deps/cares/Makefile.in
index 2342125d136526..bf8645bf260933 100644
--- a/deps/cares/Makefile.in
+++ b/deps/cares/Makefile.in
@@ -329,6 +329,7 @@ EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GMOCK112_CFLAGS = @GMOCK112_CFLAGS@
diff --git a/deps/cares/Makefile.m32 b/deps/cares/Makefile.m32
index 7bd85165978208..427b08771e1535 100644
--- a/deps/cares/Makefile.m32
+++ b/deps/cares/Makefile.m32
@@ -19,7 +19,9 @@ RANLIB = $(CROSSPREFIX)ranlib
#RM = rm -f
CP = cp -afv
-CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I./include -I./src/lib -I./src/lib/include -D_WIN32_WINNT=0x0602
+WIN32_WINNT ?= 0x0602
+
+CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I./include -I./src/lib -I./src/lib/include -D_WIN32_WINNT=$(WIN32_WINNT)
CFLAGS += -DCARES_STATICLIB
LDFLAGS = $(CARES_LDFLAG_EXTRAS) -s
LIBS = -lws2_32 -liphlpapi
diff --git a/deps/cares/RELEASE-NOTES.md b/deps/cares/RELEASE-NOTES.md
index 19a204b3ea96bd..1a8d8d2233351c 100644
--- a/deps/cares/RELEASE-NOTES.md
+++ b/deps/cares/RELEASE-NOTES.md
@@ -1,25 +1,28 @@
-## c-ares version 1.34.4 - December 14 2024
+## c-ares version 1.34.5 - April 8 2025
-This is a bugfix release.
+This is a security release.
+
+Security:
+* CVE-2025-31498. A use-after-free bug has been uncovered in read_answers() that
+ was introduced in v1.32.3. Please see https://github.com/c-ares/c-ares/security/advisories/GHSA-6hxc-62jh-p29v
Changes:
-* QNX Port: Port to QNX 8, add primary config reading support, add CI build. [PR #934](https://github.com/c-ares/c-ares/pull/934), [PR #937](https://github.com/c-ares/c-ares/pull/937), [PR #938](https://github.com/c-ares/c-ares/pull/938)
+* Restore Windows XP support. [PR #958](https://github.com/c-ares/c-ares/pull/958)
Bugfixes:
-* Empty TXT records were not being preserved. [PR #922](https://github.com/c-ares/c-ares/pull/922)
-* docs: update deprecation notices for `ares_create_query()` and `ares_mkquery()`. [PR #910](https://github.com/c-ares/c-ares/pull/910)
-* license: some files weren't properly updated. [PR #920](https://github.com/c-ares/c-ares/pull/920)
-* Fix bind local device regression from 1.34.0. [PR #929](https://github.com/c-ares/c-ares/pull/929), [PR #931](https://github.com/c-ares/c-ares/pull/931), [PR #935](https://github.com/c-ares/c-ares/pull/935)
-* CMake: set policy version to prevent deprecation warnings. [PR #932](https://github.com/c-ares/c-ares/pull/932)
-* CMake: shared and static library names should be the same on unix platforms like autotools uses. [PR #933](https://github.com/c-ares/c-ares/pull/933)
-* Update to latest autoconf archive macros for enhanced system compatibility. [PR #936](https://github.com/c-ares/c-ares/pull/936)
+* A missing mutex initialization would make busy polling for configuration
+ changes (platforms other than Windows, Linux, MacOS) eat too much CPU
+ [PR #974](https://github.com/c-ares/c-ares/pull/974)
+* Pkgconfig may be generated wrong for static builds in relation to `-pthread`
+ [PR #965](https://github.com/c-ares/c-ares/pull/965)
+* Localhost resolution can fail if only one address family is in `/etc/hosts`
+ [PR #947](https://github.com/c-ares/c-ares/pull/947)
Thanks go to these friendly people for their efforts and contributions for this
release:
* Brad House (@bradh352)
-* Daniel Stenberg (@bagder)
-* Gregor Jasny (@gjasny)
-* @marcovsz
-* Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
-* @vlasovsoft1979
+* Erik Lax (@eriklax)
+* Florian Pfisterer (@FlorianPfisterer)
+* Kai Pastor (@dg0yt)
+
diff --git a/deps/cares/aminclude_static.am b/deps/cares/aminclude_static.am
index ec7a86a43e6829..57c265006f0a91 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 Sat Dec 14 15:15:44 UTC 2024
+# from AX_AM_MACROS_STATIC on Tue Apr 8 12:12:30 UTC 2025
# Code coverage
diff --git a/deps/cares/configure b/deps/cares/configure
index d02f117d2f0b64..7a29494d6fa976 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.34.4.
+# Generated by GNU Autoconf 2.71 for c-ares 1.34.5.
#
# Report bugs to .
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='c-ares'
PACKAGE_TARNAME='c-ares'
-PACKAGE_VERSION='1.34.4'
-PACKAGE_STRING='c-ares 1.34.4'
+PACKAGE_VERSION='1.34.5'
+PACKAGE_STRING='c-ares 1.34.5'
PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares'
PACKAGE_URL=''
@@ -715,6 +715,7 @@ MANIFEST_TOOL
RANLIB
ac_ct_AR
AR
+FILECMD
LN_S
NM
ac_ct_DUMPBIN
@@ -1424,7 +1425,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.34.4 to adapt to many kinds of systems.
+\`configure' configures c-ares 1.34.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1495,7 +1496,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of c-ares 1.34.4:";;
+ short | recursive ) echo "Configuration of c-ares 1.34.5:";;
esac
cat <<\_ACEOF
@@ -1637,7 +1638,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-c-ares configure 1.34.4
+c-ares configure 1.34.5
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2261,7 +2262,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.34.4, which was
+It was created by c-ares $as_me 1.34.5, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3235,7 +3236,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-CARES_VERSION_INFO="21:3:19"
+CARES_VERSION_INFO="21:4:19"
@@ -4755,11 +4756,11 @@ if test x$ac_prog_cxx_stdcxx = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
-if test ${ac_cv_prog_cxx_11+y}
+if test ${ac_cv_prog_cxx_cxx11+y}
then :
printf %s "(cached) " >&6
else $as_nop
- ac_cv_prog_cxx_11=no
+ ac_cv_prog_cxx_cxx11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4801,11 +4802,11 @@ if test x$ac_prog_cxx_stdcxx = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
-if test ${ac_cv_prog_cxx_98+y}
+if test ${ac_cv_prog_cxx_cxx98+y}
then :
printf %s "(cached) " >&6
else $as_nop
- ac_cv_prog_cxx_98=no
+ ac_cv_prog_cxx_cxx98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5927,7 +5928,7 @@ fi
# Define the identity of the package.
PACKAGE='c-ares'
- VERSION='1.34.4'
+ VERSION='1.34.5'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -6296,8 +6297,8 @@ esac
-macro_version='2.4.6'
-macro_revision='2.4.6'
+macro_version='2.4.7'
+macro_revision='2.4.7'
@@ -6925,13 +6926,13 @@ else
mingw*) lt_bad_file=conftest.nm/nofile ;;
*) lt_bad_file=/dev/null ;;
esac
- case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
*$lt_bad_file* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
break 2
;;
*)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
break 2
@@ -7069,7 +7070,7 @@ esac
fi
fi
- case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
*COFF*)
DUMPBIN="$DUMPBIN -symbols -headers"
;;
@@ -7173,7 +7174,7 @@ else $as_nop
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -7216,7 +7217,7 @@ else $as_nop
sysv5* | sco5v6* | sysv4.2uw2*)
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'`
else
lt_cv_sys_max_cmd_len=32768
fi
@@ -7421,6 +7422,114 @@ esac
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
+set dummy ${ac_tool_prefix}file; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_FILECMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$FILECMD"; then
+ ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_FILECMD="${ac_tool_prefix}file"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+FILECMD=$ac_cv_prog_FILECMD
+if test -n "$FILECMD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
+printf "%s\n" "$FILECMD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_FILECMD"; then
+ ac_ct_FILECMD=$FILECMD
+ # Extract the first word of "file", so it can be a program name with args.
+set dummy file; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_FILECMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_FILECMD"; then
+ ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_FILECMD="file"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
+if test -n "$ac_ct_FILECMD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
+printf "%s\n" "$ac_ct_FILECMD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_FILECMD" = x; then
+ FILECMD=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ FILECMD=$ac_ct_FILECMD
+ fi
+else
+ FILECMD="$ac_cv_prog_FILECMD"
+fi
+
+
+
+
+
+
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
@@ -7561,7 +7670,7 @@ beos*)
bsdi[45]*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_cmd='$FILECMD -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
@@ -7595,14 +7704,14 @@ darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
@@ -7616,7 +7725,7 @@ haiku*)
;;
hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
case $host_cpu in
ia64*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
@@ -7663,7 +7772,7 @@ netbsd* | netbsdelf*-gnu)
newos6*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
@@ -8033,13 +8142,29 @@ esac
fi
: ${AR=ar}
-: ${AR_FLAGS=cr}
+# Use ARFLAGS variable as AR's operation code to sync the variable naming with
+# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
+# higher priority because thats what people were doing historically (setting
+# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
+# variable obsoleted/removed.
+
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+lt_ar_flags=$AR_FLAGS
+
+
+
+
+
+
+# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
+# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
+
@@ -8456,7 +8581,7 @@ esac
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Gets list of data symbols to import.
- lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
# Adjust the below global symbol transforms to fixup imported variables.
lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
@@ -8474,20 +8599,20 @@ fi
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
$lt_cdecl_hook\
" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
$lt_c_name_hook\
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
# Transform an extracted symbol line into symbol name with lib prefix and
# symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
$lt_c_name_lib_hook\
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
@@ -8511,7 +8636,7 @@ for ac_symprfx in "" "_"; do
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Fake it for dumpbin and say T for any non-static function,
# D for any global variable and I for any imported variable.
- # Also find C++ and __fastcall symbols from MSVC++,
+ # Also find C++ and __fastcall symbols from MSVC++ or ICC,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK '"\
" {last_section=section; section=\$ 3};"\
@@ -8529,9 +8654,9 @@ for ac_symprfx in "" "_"; do
" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx"
else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
- lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
# Check to see that the pipe works correctly.
pipe_works=no
@@ -8731,7 +8856,7 @@ case $with_sysroot in #(
fi
;; #(
/*)
- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
;; #(
no|'')
;; #(
@@ -8856,7 +8981,7 @@ ia64-*-hpux*)
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*ELF-32*)
HPUX_IA64_MODE=32
;;
@@ -8877,7 +9002,7 @@ ia64-*-hpux*)
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
if test yes = "$lt_cv_prog_gnu_ld"; then
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
;;
@@ -8889,7 +9014,7 @@ ia64-*-hpux*)
;;
esac
else
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
@@ -8915,7 +9040,7 @@ mips64*-*linux*)
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
emul=elf
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
emul="${emul}32"
;;
@@ -8923,7 +9048,7 @@ mips64*-*linux*)
emul="${emul}64"
;;
esac
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*MSB*)
emul="${emul}btsmip"
;;
@@ -8931,7 +9056,7 @@ mips64*-*linux*)
emul="${emul}ltsmip"
;;
esac
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*N32*)
emul="${emul}n32"
;;
@@ -8955,14 +9080,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*32-bit*)
case $host in
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*x86-64*)
LD="${LD-ld} -m elf32_x86_64"
;;
@@ -9070,7 +9195,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*)
@@ -9853,8 +9978,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
- echo "$AR cr libconftest.a conftest.o" >&5
- $AR cr libconftest.a conftest.o 2>&5
+ echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
+ $AR $AR_FLAGS libconftest.a conftest.o 2>&5
echo "$RANLIB libconftest.a" >&5
$RANLIB libconftest.a 2>&5
cat > conftest.c << _LT_EOF
@@ -9881,17 +10006,12 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; }
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[912]*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
- 10.[012][,.]*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- 10.*|11.*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ darwin*)
+ case $MACOSX_DEPLOYMENT_TARGET,$host in
+ 10.[012],*|,*powerpc*-darwin[5-8]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ *)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
@@ -10588,8 +10708,8 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
libext=a
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -11107,7 +11227,7 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-qstaticlink'
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
# Sun Fortran 8.3 passes all unrecognized flags to the linker
lt_prog_compiler_pic='-KPIC'
@@ -11530,15 +11650,15 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
+ # Microsoft Visual C++ or Intel C++ Compiler.
if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
+ # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
with_gnu_ld=yes
;;
openbsd* | bitrig*)
@@ -11593,7 +11713,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
whole_archive_flag_spec=
fi
supports_anon_versioning=no
- case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+ case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -11705,6 +11825,7 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
enable_shared_with_static_runtimes=yes
+ file_list_spec='@'
;;
interix[3-9]*)
@@ -11719,7 +11840,7 @@ _LT_EOF
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -11762,7 +11883,7 @@ _LT_EOF
compiler_needs_object=yes
;;
esac
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*) # Sun C 5.9
whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object=yes
@@ -11774,13 +11895,14 @@ _LT_EOF
if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
tcc*)
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
export_dynamic_flag_spec='-rdynamic'
;;
xlf* | bgf* | bgxlf* | mpixlf*)
@@ -11790,7 +11912,7 @@ _LT_EOF
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
@@ -11922,7 +12044,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -12193,12 +12315,12 @@ fi
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
+ # Microsoft Visual C++ or Intel C++ Compiler.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
case $cc_basename in
- cl*)
- # Native MSVC
+ cl* | icl*)
+ # Native MSVC or ICC
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
always_export_symbols=yes
@@ -12239,7 +12361,7 @@ fi
fi'
;;
*)
- # Assume MSVC wrapper
+ # Assume MSVC and ICC wrapper
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
# Tell ltmain to make .lib files, not .a files.
@@ -12280,8 +12402,8 @@ fi
output_verbose_link_cmd=func_echo_all
archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
- module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
else
ld_shlibs=no
@@ -12315,7 +12437,7 @@ fi
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
@@ -12496,6 +12618,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
# Fabrice Bellard et al's Tiny C Compiler
ld_shlibs=yes
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
;;
esac
;;
@@ -12567,6 +12690,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
emximp -o $lib $output_objdir/$libname.def'
old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
enable_shared_with_static_runtimes=yes
+ file_list_spec='@'
;;
osf3*)
@@ -13259,7 +13383,7 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
@@ -13269,14 +13393,14 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
;;
- *,cl*)
- # Native MSVC
+ *,cl* | *,icl*)
+ # Native MSVC or ICC
libname_spec='$name'
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
library_names_spec='$libname.dll.lib'
@@ -13295,7 +13419,7 @@ cygwin* | mingw* | pw32* | cegcc*)
done
IFS=$lt_save_ifs
# Convert to MSYS style.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
;;
cygwin*)
# Convert to unix form, then to dos form, then back to unix form
@@ -13332,7 +13456,7 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
*)
- # Assume MSVC wrapper
+ # Assume MSVC and ICC wrapper
library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
@@ -13365,7 +13489,7 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
if test -x /usr/bin/objformat; then
@@ -14530,30 +14654,41 @@ striplib=
old_striplib=
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
printf %s "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
+if test -z "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP"; then
+ if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ old_striplib="$STRIP --strip-debug"
+ striplib="$STRIP --strip-unneeded"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ case $host_os in
+ darwin*)
+ # FIXME - insert some real tests, host_os isn't really good enough
striplib="$STRIP -x"
old_striplib="$STRIP -S"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
- else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ ;;
+ freebsd*)
+ if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+ old_striplib="$STRIP --strip-debug"
+ striplib="$STRIP --strip-unneeded"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
- fi
- ;;
- *)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ fi
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
- ;;
- esac
+ ;;
+ esac
+ fi
fi
@@ -15323,8 +15458,8 @@ fi
cygwin* | mingw* | pw32* | cegcc*)
case $GXX,$cc_basename in
- ,cl* | no,cl*)
- # Native MSVC
+ ,cl* | no,cl* | ,icl* | no,icl*)
+ # Native MSVC or ICC
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec_CXX=' '
@@ -15415,11 +15550,11 @@ fi
output_verbose_link_cmd=func_echo_all
archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
- module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds_CXX="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
if test yes != "$lt_cv_apple_cc_single_mod"; then
archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
- archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+ archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi
else
@@ -15454,6 +15589,7 @@ fi
emximp -o $lib $output_objdir/$libname.def'
old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
enable_shared_with_static_runtimes_CXX=yes
+ file_list_spec_CXX='@'
;;
dgux*)
@@ -15484,7 +15620,7 @@ fi
archive_cmds_need_lc_CXX=no
;;
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
ld_shlibs_CXX=yes
@@ -15621,7 +15757,7 @@ fi
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
irix5* | irix6*)
case $cc_basename in
@@ -15761,13 +15897,13 @@ fi
archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*)
# Sun C++ 5.9
no_undefined_flag_CXX=' -zdefs'
@@ -16424,7 +16560,7 @@ lt_prog_compiler_static_CXX=
;;
esac
;;
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@@ -16507,7 +16643,7 @@ lt_prog_compiler_static_CXX=
lt_prog_compiler_static_CXX='-qstaticlink'
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*)
# Sun C++ 5.9
lt_prog_compiler_pic_CXX='-KPIC'
@@ -16894,7 +17030,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
@@ -16902,7 +17038,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
- cl*)
+ cl* | icl*)
exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
;;
*)
@@ -17253,7 +17389,7 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
mingw* | cegcc*)
@@ -17262,14 +17398,14 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
;;
- *,cl*)
- # Native MSVC
+ *,cl* | *,icl*)
+ # Native MSVC or ICC
libname_spec='$name'
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
library_names_spec='$libname.dll.lib'
@@ -17288,7 +17424,7 @@ cygwin* | mingw* | pw32* | cegcc*)
done
IFS=$lt_save_ifs
# Convert to MSYS style.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
;;
cygwin*)
# Convert to unix form, then to dos form, then back to unix form
@@ -17325,7 +17461,7 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
*)
- # Assume MSVC wrapper
+ # Assume MSVC and ICC wrapper
library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
@@ -17357,7 +17493,7 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
if test -x /usr/bin/objformat; then
@@ -22706,6 +22842,14 @@ then :
printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h
+fi
+ac_fn_check_decl "$LINENO" "GetBestRoute2" "ac_cv_have_decl_GetBestRoute2" "$cares_all_includes
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_GetBestRoute2" = xyes
+then :
+
+printf "%s\n" "#define HAVE_GETBESTROUTE2 1" >>confdefs.h
+
fi
ac_fn_check_decl "$LINENO" "ConvertInterfaceIndexToLuid" "ac_cv_have_decl_ConvertInterfaceIndexToLuid" "$cares_all_includes
" "$ac_c_undeclared_builtin_options" "CFLAGS"
@@ -26258,7 +26402,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.34.4, which was
+This file was extended by c-ares $as_me 1.34.5, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -26326,7 +26470,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.34.4
+c-ares config.status 1.34.5
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
@@ -26492,12 +26636,14 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q
lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
@@ -26675,13 +26821,13 @@ LN_S \
lt_SP2NL \
lt_NL2SP \
reload_flag \
+FILECMD \
deplibs_check_method \
file_magic_cmd \
file_magic_glob \
want_nocaseglob \
sharedlib_from_linklib_cmd \
AR \
-AR_FLAGS \
archiver_list_spec \
STRIP \
RANLIB \
@@ -27684,6 +27830,9 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd
# convert \$build files to toolchain format.
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+# A file(cmd) program that detects file types.
+FILECMD=$lt_FILECMD
+
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -27702,8 +27851,11 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
# The archiver.
AR=$lt_AR
+# Flags to create an archive (by configure).
+lt_ar_flags=$lt_ar_flags
+
# Flags to create an archive.
-AR_FLAGS=$lt_AR_FLAGS
+AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
# How to feed a file listing to the archiver.
archiver_list_spec=$lt_archiver_list_spec
@@ -28093,7 +28245,7 @@ ltmain=$ac_aux_dir/ltmain.sh
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" \
+ $SED '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
mv -f "$cfgfile" "$ofile" ||
diff --git a/deps/cares/configure.ac b/deps/cares/configure.ac
index 9dacf1fb2e4a40..72c06e7773ef27 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.34.4],
+AC_INIT([c-ares], [1.34.5],
[c-ares mailing list: http://lists.haxx.se/listinfo/c-ares])
-CARES_VERSION_INFO="21:3:19"
+CARES_VERSION_INFO="21:4:19"
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.
@@ -594,6 +594,7 @@ AC_CHECK_DECL(pipe, [AC_DEFINE([HAVE_PIPE], 1, [Define t
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(GetBestRoute2, [AC_DEFINE([HAVE_GETBESTROUTE2], 1, [Define to 1 if you have `GetBestRoute2`] )], [], $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(NotifyIpInterfaceChange, [AC_DEFINE([HAVE_NOTIFYIPINTERFACECHANGE], 1, [Define to 1 if you have `NotifyIpInterfaceChange`] )], [], $cares_all_includes)
diff --git a/deps/cares/docs/Makefile.in b/deps/cares/docs/Makefile.in
index 0d1873c9662c92..f3e2b35746d3bf 100644
--- a/deps/cares/docs/Makefile.in
+++ b/deps/cares/docs/Makefile.in
@@ -223,6 +223,7 @@ EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GMOCK112_CFLAGS = @GMOCK112_CFLAGS@
diff --git a/deps/cares/include/Makefile.in b/deps/cares/include/Makefile.in
index 7dc40eb08fab9c..8c6782a15ecdd6 100644
--- a/deps/cares/include/Makefile.in
+++ b/deps/cares/include/Makefile.in
@@ -234,6 +234,7 @@ EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GMOCK112_CFLAGS = @GMOCK112_CFLAGS@
diff --git a/deps/cares/include/ares_dns_record.h b/deps/cares/include/ares_dns_record.h
index 2896eab24b3408..cec9f47f63d8f5 100644
--- a/deps/cares/include/ares_dns_record.h
+++ b/deps/cares/include/ares_dns_record.h
@@ -1104,7 +1104,7 @@ CARES_EXTERN ares_status_t ares_dns_write(const ares_dns_record_t *dnsrec,
* (such as the ttl decrement capability).
*
* \param[in] dnsrec Pointer to initialized and filled DNS record object.
- * \return duplicted DNS record object, or NULL on out of memory.
+ * \return duplicated DNS record object, or NULL on out of memory.
*/
CARES_EXTERN ares_dns_record_t *
ares_dns_record_duplicate(const ares_dns_record_t *dnsrec);
diff --git a/deps/cares/include/ares_version.h b/deps/cares/include/ares_version.h
index 782046bd79d844..7da82f2a15b560 100644
--- a/deps/cares/include/ares_version.h
+++ b/deps/cares/include/ares_version.h
@@ -32,8 +32,8 @@
#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 34
-#define ARES_VERSION_PATCH 4
-#define ARES_VERSION_STR "1.34.4"
+#define ARES_VERSION_PATCH 5
+#define ARES_VERSION_STR "1.34.5"
/* NOTE: We cannot make the version string a C preprocessor stringify operation
* due to assumptions made by integrators that aren't properly using
diff --git a/deps/cares/m4/libtool.m4 b/deps/cares/m4/libtool.m4
index c4c02946dece79..e7b68334557bd6 100755
--- a/deps/cares/m4/libtool.m4
+++ b/deps/cares/m4/libtool.m4
@@ -1,6 +1,7 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
-# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
+# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is free software; the Free Software Foundation gives
@@ -31,7 +32,7 @@ m4_define([_LT_COPYING], [dnl
# along with this program. If not, see .
])
-# serial 58 LT_INIT
+# serial 59 LT_INIT
# LT_PREREQ(VERSION)
@@ -181,6 +182,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_DECL_FILECMD])dnl
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
@@ -219,8 +221,8 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
+# All known linkers require a '.a' archive for static linking (except MSVC and
+# ICC, which need '.lib').
libext=a
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -777,7 +779,7 @@ _LT_EOF
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" \
+ $SED '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
mv -f "$cfgfile" "$ofile" ||
@@ -1041,8 +1043,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
- echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
- $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
@@ -1066,17 +1068,12 @@ _LT_EOF
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]][[,.]]*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- 10.*|11.*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ darwin*)
+ case $MACOSX_DEPLOYMENT_TARGET,$host in
+ 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ *)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
@@ -1125,12 +1122,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
output_verbose_link_cmd=func_echo_all
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
m4_if([$1], [CXX],
[ if test yes != "$lt_cv_apple_cc_single_mod"; then
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi
],[])
else
@@ -1244,7 +1241,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
# _LT_WITH_SYSROOT
# ----------------
AC_DEFUN([_LT_WITH_SYSROOT],
-[AC_MSG_CHECKING([for sysroot])
+[m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([for sysroot])
AC_ARG_WITH([sysroot],
[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
[Search for dependent libraries within DIR (or the compiler's sysroot
@@ -1261,7 +1259,7 @@ case $with_sysroot in #(
fi
;; #(
/*)
- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
;; #(
no|'')
;; #(
@@ -1291,7 +1289,7 @@ ia64-*-hpux*)
# options accordingly.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*ELF-32*)
HPUX_IA64_MODE=32
;;
@@ -1308,7 +1306,7 @@ ia64-*-hpux*)
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
if test yes = "$lt_cv_prog_gnu_ld"; then
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
;;
@@ -1320,7 +1318,7 @@ ia64-*-hpux*)
;;
esac
else
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
@@ -1342,7 +1340,7 @@ mips64*-*linux*)
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
emul=elf
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*32-bit*)
emul="${emul}32"
;;
@@ -1350,7 +1348,7 @@ mips64*-*linux*)
emul="${emul}64"
;;
esac
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*MSB*)
emul="${emul}btsmip"
;;
@@ -1358,7 +1356,7 @@ mips64*-*linux*)
emul="${emul}ltsmip"
;;
esac
- case `/usr/bin/file conftest.$ac_objext` in
+ case `$FILECMD conftest.$ac_objext` in
*N32*)
emul="${emul}n32"
;;
@@ -1378,14 +1376,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# not appear in the list.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*32-bit*)
case $host in
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*x86-64*)
LD="${LD-ld} -m elf32_x86_64"
;;
@@ -1453,7 +1451,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# options accordingly.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
+ case `$FILECMD conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*)
@@ -1492,9 +1490,22 @@ need_locks=$enable_libtool_lock
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
-: ${AR_FLAGS=cr}
_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+# Use ARFLAGS variable as AR's operation code to sync the variable naming with
+# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
+# higher priority because thats what people were doing historically (setting
+# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
+# variable obsoleted/removed.
+
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+lt_ar_flags=$AR_FLAGS
+_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
+
+# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
+# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
+_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
+ [Flags to create an archive])
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
[lt_cv_ar_at_file=no
@@ -1713,7 +1724,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1756,7 +1767,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
sysv5* | sco5v6* | sysv4.2uw2*)
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
else
lt_cv_sys_max_cmd_len=32768
fi
@@ -2206,26 +2217,35 @@ m4_defun([_LT_CMD_STRIPLIB],
striplib=
old_striplib=
AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
+if test -z "$STRIP"; then
+ AC_MSG_RESULT([no])
else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP"; then
+ if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ old_striplib="$STRIP --strip-debug"
+ striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+ else
+ case $host_os in
+ darwin*)
+ # FIXME - insert some real tests, host_os isn't really good enough
striplib="$STRIP -x"
old_striplib="$STRIP -S"
AC_MSG_RESULT([yes])
- else
+ ;;
+ freebsd*)
+ if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+ old_striplib="$STRIP --strip-debug"
+ striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
+ ;;
+ esac
+ fi
fi
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
_LT_DECL([], [striplib], [1])
@@ -2548,7 +2568,7 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
@@ -2558,14 +2578,14 @@ m4_if([$1], [],[
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
;;
- *,cl*)
- # Native MSVC
+ *,cl* | *,icl*)
+ # Native MSVC or ICC
libname_spec='$name'
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
library_names_spec='$libname.dll.lib'
@@ -2584,7 +2604,7 @@ m4_if([$1], [],[
done
IFS=$lt_save_ifs
# Convert to MSYS style.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
;;
cygwin*)
# Convert to unix form, then to dos form, then back to unix form
@@ -2621,7 +2641,7 @@ m4_if([$1], [],[
;;
*)
- # Assume MSVC wrapper
+ # Assume MSVC and ICC wrapper
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
@@ -2654,7 +2674,7 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
if test -x /usr/bin/objformat; then
@@ -3465,7 +3485,7 @@ beos*)
bsdi[[45]]*)
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_cmd='$FILECMD -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
@@ -3499,14 +3519,14 @@ darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | dragonfly*)
+freebsd* | dragonfly* | midnightbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
@@ -3520,7 +3540,7 @@ haiku*)
;;
hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
case $host_cpu in
ia64*)
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
@@ -3567,7 +3587,7 @@ netbsd* | netbsdelf*-gnu)
newos6*)
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_cmd=$FILECMD
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
@@ -3694,13 +3714,13 @@ else
mingw*) lt_bad_file=conftest.nm/nofile ;;
*) lt_bad_file=/dev/null ;;
esac
- case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
*$lt_bad_file* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
break 2
;;
*)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
break 2
@@ -3726,7 +3746,7 @@ else
# Let the user override the test.
else
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
- case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
*COFF*)
DUMPBIN="$DUMPBIN -symbols -headers"
;;
@@ -3966,7 +3986,7 @@ esac
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Gets list of data symbols to import.
- lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
# Adjust the below global symbol transforms to fixup imported variables.
lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
@@ -3984,20 +4004,20 @@ fi
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
$lt_cdecl_hook\
" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
$lt_c_name_hook\
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
# Transform an extracted symbol line into symbol name with lib prefix and
# symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
$lt_c_name_lib_hook\
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
@@ -4021,7 +4041,7 @@ for ac_symprfx in "" "_"; do
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
# Fake it for dumpbin and say T for any non-static function,
# D for any global variable and I for any imported variable.
- # Also find C++ and __fastcall symbols from MSVC++,
+ # Also find C++ and __fastcall symbols from MSVC++ or ICC,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK ['"\
" {last_section=section; section=\$ 3};"\
@@ -4039,9 +4059,9 @@ for ac_symprfx in "" "_"; do
" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx]"
else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
- lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
# Check to see that the pipe works correctly.
pipe_works=no
@@ -4329,7 +4349,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
@@ -4412,7 +4432,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*)
# Sun C++ 5.9
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4754,7 +4774,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
# Sun Fortran 8.3 passes all unrecognized flags to the linker
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4937,7 +4957,7 @@ m4_if([$1], [CXX], [
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
@@ -4945,7 +4965,7 @@ m4_if([$1], [CXX], [
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
- cl*)
+ cl* | icl*)
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
;;
*)
@@ -5005,15 +5025,15 @@ dnl Note also adjust exclude_expsyms for C++ above.
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
+ # Microsoft Visual C++ or Intel C++ Compiler.
if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
+ # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
with_gnu_ld=yes
;;
openbsd* | bitrig*)
@@ -5068,7 +5088,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
_LT_TAGVAR(whole_archive_flag_spec, $1)=
fi
supports_anon_versioning=no
- case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+ case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -5180,6 +5200,7 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
;;
interix[[3-9]]*)
@@ -5194,7 +5215,7 @@ _LT_EOF
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -5237,7 +5258,7 @@ _LT_EOF
_LT_TAGVAR(compiler_needs_object, $1)=yes
;;
esac
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*) # Sun C 5.9
_LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
_LT_TAGVAR(compiler_needs_object, $1)=yes
@@ -5249,13 +5270,14 @@ _LT_EOF
if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
tcc*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
;;
xlf* | bgf* | bgxlf* | mpixlf*)
@@ -5265,7 +5287,7 @@ _LT_EOF
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
@@ -5397,7 +5419,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -5580,12 +5602,12 @@ _LT_EOF
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
+ # Microsoft Visual C++ or Intel C++ Compiler.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
case $cc_basename in
- cl*)
- # Native MSVC
+ cl* | icl*)
+ # Native MSVC or ICC
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=yes
@@ -5626,7 +5648,7 @@ _LT_EOF
fi'
;;
*)
- # Assume MSVC wrapper
+ # Assume MSVC and ICC wrapper
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
# Tell ltmain to make .lib files, not .a files.
@@ -5674,7 +5696,7 @@ _LT_EOF
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_TAGVAR(hardcode_direct, $1)=yes
@@ -5815,6 +5837,7 @@ _LT_EOF
# Fabrice Bellard et al's Tiny C Compiler
_LT_TAGVAR(ld_shlibs, $1)=yes
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
;;
esac
;;
@@ -5886,6 +5909,7 @@ _LT_EOF
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
;;
osf3*)
@@ -6656,8 +6680,8 @@ if test yes != "$_lt_caught_CXX_error"; then
cygwin* | mingw* | pw32* | cegcc*)
case $GXX,$cc_basename in
- ,cl* | no,cl*)
- # Native MSVC
+ ,cl* | no,cl* | ,icl* | no,icl*)
+ # Native MSVC or ICC
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
@@ -6755,6 +6779,7 @@ if test yes != "$_lt_caught_CXX_error"; then
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
;;
dgux*)
@@ -6785,7 +6810,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
;;
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | midnightbsd*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
_LT_TAGVAR(ld_shlibs, $1)=yes
@@ -6922,7 +6947,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
irix5* | irix6*)
case $cc_basename in
@@ -7062,13 +7087,13 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
if test yes = "$supports_anon_versioning"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
echo "local: *; };" >> $output_objdir/$libname.ver~
$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
;;
*)
- case `$CC -V 2>&1 | sed 5q` in
+ case `$CC -V 2>&1 | $SED 5q` in
*Sun\ C*)
# Sun C++ 5.9
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
@@ -8214,6 +8239,14 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
AC_SUBST([DLLTOOL])
])
+# _LT_DECL_FILECMD
+# ----------------
+# Check for a file(cmd) program that can be used to detect file type and magic
+m4_defun([_LT_DECL_FILECMD],
+[AC_CHECK_TOOL([FILECMD], [file], [:])
+_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
+])# _LD_DECL_FILECMD
+
# _LT_DECL_SED
# ------------
# Check for a fully-functional sed program, that truncates
diff --git a/deps/cares/m4/ltoptions.m4 b/deps/cares/m4/ltoptions.m4
index 94b082976667c0..b0b5e9c2126062 100755
--- a/deps/cares/m4/ltoptions.m4
+++ b/deps/cares/m4/ltoptions.m4
@@ -1,7 +1,7 @@
# Helper functions for option handling. -*- Autoconf -*-
#
-# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
+# Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
diff --git a/deps/cares/m4/ltsugar.m4 b/deps/cares/m4/ltsugar.m4
index 48bc9344a4d661..902508bd93aec6 100755
--- a/deps/cares/m4/ltsugar.m4
+++ b/deps/cares/m4/ltsugar.m4
@@ -1,6 +1,6 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
diff --git a/deps/cares/m4/ltversion.m4 b/deps/cares/m4/ltversion.m4
index fa04b52a3bf868..b155d0aceca376 100755
--- a/deps/cares/m4/ltversion.m4
+++ b/deps/cares/m4/ltversion.m4
@@ -1,6 +1,7 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
-# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
+# Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -9,15 +10,15 @@
# @configure_input@
-# serial 4179 ltversion.m4
+# serial 4245 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4.6])
-m4_define([LT_PACKAGE_REVISION], [2.4.6])
+m4_define([LT_PACKAGE_VERSION], [2.4.7])
+m4_define([LT_PACKAGE_REVISION], [2.4.7])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.6'
-macro_revision='2.4.6'
+[macro_version='2.4.7'
+macro_revision='2.4.7'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
diff --git a/deps/cares/m4/lt~obsolete.m4 b/deps/cares/m4/lt~obsolete.m4
index c6b26f88f6c3c1..0f7a8759da8d46 100755
--- a/deps/cares/m4/lt~obsolete.m4
+++ b/deps/cares/m4/lt~obsolete.m4
@@ -1,7 +1,7 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
+# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
diff --git a/deps/cares/src/Makefile.in b/deps/cares/src/Makefile.in
index 1f286880247aa1..575d391a3fe4b7 100644
--- a/deps/cares/src/Makefile.in
+++ b/deps/cares/src/Makefile.in
@@ -245,6 +245,7 @@ EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GMOCK112_CFLAGS = @GMOCK112_CFLAGS@
diff --git a/deps/cares/src/lib/Makefile.in b/deps/cares/src/lib/Makefile.in
index a45fc10b544755..942dae01ccfdff 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 Sat Dec 14 15:15:44 UTC 2024
+# from AX_AM_MACROS_STATIC on Tue Apr 8 12:12:30 UTC 2025
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
@@ -490,6 +490,7 @@ EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GMOCK112_CFLAGS = @GMOCK112_CFLAGS@
diff --git a/deps/cares/src/lib/ares_addrinfo2hostent.c b/deps/cares/src/lib/ares_addrinfo2hostent.c
index 2bbc791157b01e..239ca5bce7daec 100644
--- a/deps/cares/src/lib/ares_addrinfo2hostent.c
+++ b/deps/cares/src/lib/ares_addrinfo2hostent.c
@@ -47,119 +47,154 @@
# include
#endif
+static size_t hostent_nalias(const struct hostent *host)
+{
+ size_t i;
+ for (i=0; host->h_aliases != NULL && host->h_aliases[i] != NULL; i++)
+ ;
+
+ return i;
+}
+
+static size_t ai_nalias(const struct ares_addrinfo *ai)
+{
+ const struct ares_addrinfo_cname *cname;
+ size_t i = 0;
+
+ for (cname = ai->cnames; cname != NULL; cname=cname->next) {
+ i++;
+ }
+
+ return i;
+}
+
+static size_t hostent_naddr(const struct hostent *host)
+{
+ size_t i;
+ for (i=0; host->h_addr_list != NULL && host->h_addr_list[i] != NULL; i++)
+ ;
+
+ return i;
+}
+
+static size_t ai_naddr(const struct ares_addrinfo *ai, int af)
+{
+ const struct ares_addrinfo_node *node;
+ size_t i = 0;
+
+ for (node = ai->nodes; node != NULL; node=node->ai_next) {
+ if (af != AF_UNSPEC && af != node->ai_family)
+ continue;
+ i++;
+ }
+
+ return i;
+}
ares_status_t ares_addrinfo2hostent(const struct ares_addrinfo *ai, int family,
struct hostent **host)
{
struct ares_addrinfo_node *next;
- struct ares_addrinfo_cname *next_cname;
char **aliases = NULL;
- char *addrs = NULL;
+ char **addrs = NULL;
size_t naliases = 0;
size_t naddrs = 0;
- size_t alias = 0;
size_t i;
+ size_t ealiases = 0;
+ size_t eaddrs = 0;
if (ai == NULL || host == NULL) {
return ARES_EBADQUERY; /* LCOV_EXCL_LINE: DefensiveCoding */
}
- /* Use the first node of the response as the family, since hostent can only
+ /* Use either the host set in the passed in hosts to be filled in, or the
+ * first node of the response as the family, since hostent can only
* represent one family. We assume getaddrinfo() returned a sorted list if
* the user requested AF_UNSPEC. */
- if (family == AF_UNSPEC && ai->nodes) {
- family = ai->nodes->ai_family;
+ if (family == AF_UNSPEC) {
+ if (*host != NULL && (*host)->h_addrtype != AF_UNSPEC) {
+ family = (*host)->h_addrtype;
+ } else if (ai->nodes != NULL) {
+ family = ai->nodes->ai_family;
+ }
}
if (family != AF_INET && family != AF_INET6) {
return ARES_EBADQUERY; /* LCOV_EXCL_LINE: DefensiveCoding */
}
- *host = ares_malloc(sizeof(**host));
- if (!(*host)) {
- goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
+ if (*host == NULL) {
+ *host = ares_malloc_zero(sizeof(**host));
+ if (!(*host)) {
+ goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
+ }
}
- memset(*host, 0, sizeof(**host));
- next = ai->nodes;
- while (next) {
- if (next->ai_family == family) {
- ++naddrs;
- }
- next = next->ai_next;
+ (*host)->h_addrtype = (HOSTENT_ADDRTYPE_TYPE)family;
+ if (family == AF_INET) {
+ (*host)->h_length = sizeof(struct in_addr);
+ } else if (family == AF_INET6) {
+ (*host)->h_length = sizeof(struct ares_in6_addr);
}
- next_cname = ai->cnames;
- while (next_cname) {
- if (next_cname->alias) {
- ++naliases;
+ if ((*host)->h_name == NULL) {
+ if (ai->cnames) {
+ (*host)->h_name = ares_strdup(ai->cnames->name);
+ if ((*host)->h_name == NULL && ai->cnames->name) {
+ goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
+ }
+ } else {
+ (*host)->h_name = ares_strdup(ai->name);
+ if ((*host)->h_name == NULL && ai->name) {
+ goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
+ }
}
- next_cname = next_cname->next;
}
- aliases = ares_malloc((naliases + 1) * sizeof(char *));
+ naliases = ai_nalias(ai);
+ ealiases = hostent_nalias(*host);
+ aliases = ares_realloc_zero((*host)->h_aliases,
+ ealiases * sizeof(char *),
+ (naliases + ealiases + 1) * sizeof(char *));
if (!aliases) {
goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
}
(*host)->h_aliases = aliases;
- memset(aliases, 0, (naliases + 1) * sizeof(char *));
if (naliases) {
- for (next_cname = ai->cnames; next_cname != NULL;
- next_cname = next_cname->next) {
- if (next_cname->alias == NULL) {
+ const struct ares_addrinfo_cname *cname;
+ i = ealiases;
+ for (cname = ai->cnames; cname != NULL; cname = cname->next) {
+ if (cname->alias == NULL) {
continue;
}
- aliases[alias] = ares_strdup(next_cname->alias);
- if (!aliases[alias]) {
+ (*host)->h_aliases[i] = ares_strdup(cname->alias);
+ if ((*host)->h_aliases[i] == NULL) {
goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
}
- alias++;
+ i++;
}
}
-
- (*host)->h_addr_list = ares_malloc((naddrs + 1) * sizeof(char *));
- if (!(*host)->h_addr_list) {
+ naddrs = ai_naddr(ai, family);
+ eaddrs = hostent_naddr(*host);
+ addrs = ares_realloc_zero((*host)->h_addr_list, eaddrs * sizeof(char *),
+ (naddrs + eaddrs + 1) * sizeof(char *));
+ if (addrs == NULL) {
goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
}
-
- memset((*host)->h_addr_list, 0, (naddrs + 1) * sizeof(char *));
-
- if (ai->cnames) {
- (*host)->h_name = ares_strdup(ai->cnames->name);
- if ((*host)->h_name == NULL && ai->cnames->name) {
- goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
- }
- } else {
- (*host)->h_name = ares_strdup(ai->name);
- if ((*host)->h_name == NULL && ai->name) {
- goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
- }
- }
-
- (*host)->h_addrtype = (HOSTENT_ADDRTYPE_TYPE)family;
-
- if (family == AF_INET) {
- (*host)->h_length = sizeof(struct in_addr);
- }
-
- if (family == AF_INET6) {
- (*host)->h_length = sizeof(struct ares_in6_addr);
- }
+ (*host)->h_addr_list = addrs;
if (naddrs) {
- addrs = ares_malloc(naddrs * (size_t)(*host)->h_length);
- if (!addrs) {
- goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
- }
-
- i = 0;
+ i = eaddrs;
for (next = ai->nodes; next != NULL; next = next->ai_next) {
if (next->ai_family != family) {
continue;
}
- (*host)->h_addr_list[i] = addrs + (i * (size_t)(*host)->h_length);
+ (*host)->h_addr_list[i] = ares_malloc_zero((size_t)(*host)->h_length);
+ if ((*host)->h_addr_list[i] == NULL) {
+ goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
+ }
if (family == AF_INET6) {
memcpy((*host)->h_addr_list[i],
&(CARES_INADDR_CAST(const struct sockaddr_in6 *, next->ai_addr)
@@ -172,15 +207,11 @@ ares_status_t ares_addrinfo2hostent(const struct ares_addrinfo *ai, int family,
->sin_addr),
(size_t)(*host)->h_length);
}
- ++i;
- }
-
- if (i == 0) {
- ares_free(addrs);
+ i++;
}
}
- if (naddrs == 0 && naliases == 0) {
+ if (naddrs + eaddrs == 0 && naliases + ealiases == 0) {
ares_free_hostent(*host);
*host = NULL;
return ARES_ENODATA;
diff --git a/deps/cares/src/lib/ares_addrinfo_localhost.c b/deps/cares/src/lib/ares_addrinfo_localhost.c
index 6f4f2a373b3feb..2abb0c48a6f601 100644
--- a/deps/cares/src/lib/ares_addrinfo_localhost.c
+++ b/deps/cares/src/lib/ares_addrinfo_localhost.c
@@ -49,6 +49,19 @@
# endif
#endif
+static ares_bool_t ares_ai_has_family(int aftype,
+ const struct ares_addrinfo_node *nodes)
+{
+ const struct ares_addrinfo_node *node;
+
+ for (node = nodes; node != NULL; node = node->ai_next) {
+ if (node->ai_family == aftype)
+ return ARES_TRUE;
+ }
+
+ return ARES_FALSE;
+}
+
ares_status_t ares_append_ai_node(int aftype, unsigned short port,
unsigned int ttl, const void *adata,
struct ares_addrinfo_node **nodes)
@@ -107,7 +120,8 @@ static ares_status_t
{
ares_status_t status = ARES_SUCCESS;
- if (aftype == AF_UNSPEC || aftype == AF_INET6) {
+ if ((aftype == AF_UNSPEC || aftype == AF_INET6) &&
+ !ares_ai_has_family(AF_INET6, *nodes)) {
struct ares_in6_addr addr6;
ares_inet_pton(AF_INET6, "::1", &addr6);
status = ares_append_ai_node(AF_INET6, port, 0, &addr6, nodes);
@@ -116,7 +130,8 @@ static ares_status_t
}
}
- if (aftype == AF_UNSPEC || aftype == AF_INET) {
+ if ((aftype == AF_UNSPEC || aftype == AF_INET) &&
+ !ares_ai_has_family(AF_INET, *nodes)) {
struct in_addr addr4;
ares_inet_pton(AF_INET, "127.0.0.1", &addr4);
status = ares_append_ai_node(AF_INET, port, 0, &addr4, nodes);
@@ -150,11 +165,13 @@ static ares_status_t
continue;
}
- if (table->Table[i].Address.si_family == AF_INET) {
+ if (table->Table[i].Address.si_family == AF_INET &&
+ !ares_ai_has_family(AF_INET, *nodes)) {
status =
ares_append_ai_node(table->Table[i].Address.si_family, port, 0,
&table->Table[i].Address.Ipv4.sin_addr, nodes);
- } else if (table->Table[i].Address.si_family == AF_INET6) {
+ } else if (table->Table[i].Address.si_family == AF_INET6 &&
+ !ares_ai_has_family(AF_INET6, *nodes)) {
status =
ares_append_ai_node(table->Table[i].Address.si_family, port, 0,
&table->Table[i].Address.Ipv6.sin6_addr, nodes);
@@ -195,8 +212,7 @@ ares_status_t ares_addrinfo_localhost(const char *name, unsigned short port,
const struct ares_addrinfo_hints *hints,
struct ares_addrinfo *ai)
{
- struct ares_addrinfo_node *nodes = NULL;
- ares_status_t status;
+ ares_status_t status;
/* Validate family */
switch (hints->ai_family) {
@@ -208,26 +224,22 @@ ares_status_t ares_addrinfo_localhost(const char *name, unsigned short port,
return ARES_EBADFAMILY; /* LCOV_EXCL_LINE: DefensiveCoding */
}
+ if (ai->name != NULL) {
+ ares_free(ai->name);
+ }
ai->name = ares_strdup(name);
- if (!ai->name) {
- goto enomem; /* LCOV_EXCL_LINE: OutOfMemory */
+ if (ai->name == NULL) {
+ status = ARES_ENOMEM;
+ goto done; /* LCOV_EXCL_LINE: OutOfMemory */
}
- status = ares_system_loopback_addrs(hints->ai_family, port, &nodes);
-
- if (status == ARES_ENOTFOUND) {
- status = ares_default_loopback_addrs(hints->ai_family, port, &nodes);
+ status = ares_system_loopback_addrs(hints->ai_family, port, &ai->nodes);
+ if (status != ARES_SUCCESS && status != ARES_ENOTFOUND) {
+ goto done;
}
- ares_addrinfo_cat_nodes(&ai->nodes, nodes);
+ status = ares_default_loopback_addrs(hints->ai_family, port, &ai->nodes);
+done:
return status;
-
-/* LCOV_EXCL_START: OutOfMemory */
-enomem:
- ares_freeaddrinfo_nodes(nodes);
- ares_free(ai->name);
- ai->name = NULL;
- return ARES_ENOMEM;
- /* LCOV_EXCL_STOP */
}
diff --git a/deps/cares/src/lib/ares_close_sockets.c b/deps/cares/src/lib/ares_close_sockets.c
index fd3bf3c4b1e09e..347f43e6fcd88d 100644
--- a/deps/cares/src/lib/ares_close_sockets.c
+++ b/deps/cares/src/lib/ares_close_sockets.c
@@ -37,7 +37,7 @@ static void ares_requeue_queries(ares_conn_t *conn,
ares_tvnow(&now);
while ((query = ares_llist_first_val(conn->queries_to_conn)) != NULL) {
- ares_requeue_query(query, &now, requeue_status, ARES_TRUE, NULL);
+ ares_requeue_query(query, &now, requeue_status, ARES_TRUE, NULL, NULL);
}
}
diff --git a/deps/cares/src/lib/ares_config.h.cmake b/deps/cares/src/lib/ares_config.h.cmake
index 51744fe143868c..cff18187212b0b 100644
--- a/deps/cares/src/lib/ares_config.h.cmake
+++ b/deps/cares/src/lib/ares_config.h.cmake
@@ -145,6 +145,9 @@
/* Define to 1 if you have the `if_nametoindex' function. */
#cmakedefine HAVE_IF_NAMETOINDEX 1
+/* Define to 1 if you have the `GetBestRoute2' function. */
+#cmakedefine HAVE_GETBESTROUTE2 1
+
/* Define to 1 if you have the `ConvertInterfaceIndexToLuid' function. */
#cmakedefine HAVE_CONVERTINTERFACEINDEXTOLUID 1
diff --git a/deps/cares/src/lib/ares_config.h.in b/deps/cares/src/lib/ares_config.h.in
index a62e17089358aa..0ed9e32be76f55 100644
--- a/deps/cares/src/lib/ares_config.h.in
+++ b/deps/cares/src/lib/ares_config.h.in
@@ -105,6 +105,9 @@
/* fcntl() with O_NONBLOCK support */
#undef HAVE_FCNTL_O_NONBLOCK
+/* Define to 1 if you have `GetBestRoute2` */
+#undef HAVE_GETBESTROUTE2
+
/* Define to 1 if you have `getenv` */
#undef HAVE_GETENV
diff --git a/deps/cares/src/lib/ares_cookie.c b/deps/cares/src/lib/ares_cookie.c
index f31c74e748d974..509e12050e0c00 100644
--- a/deps/cares/src/lib/ares_cookie.c
+++ b/deps/cares/src/lib/ares_cookie.c
@@ -115,7 +115,7 @@
* - If `cookie.unsupported_ts` evaluates less than
* `COOKIE_UNSUPPORTED_TIMEOUT`
* - Ensure there is no EDNS cookie opt (10) set (shouldn't be unless
- * requestor had put this themselves), then **skip any remaining
+ * requester had put this themselves), then **skip any remaining
* processing** as we don't want to try to send cookies.
* - Otherwise:
* - clear all cookie settings, set `cookie.state = INITIAL`.
@@ -369,7 +369,8 @@ ares_status_t ares_cookie_apply(ares_dns_record_t *dnsrec, ares_conn_t *conn,
ares_status_t ares_cookie_validate(ares_query_t *query,
const ares_dns_record_t *dnsresp,
- ares_conn_t *conn, const ares_timeval_t *now)
+ ares_conn_t *conn, const ares_timeval_t *now,
+ ares_array_t **requeue)
{
ares_server_t *server = conn->server;
ares_cookie_t *cookie = &server->cookie;
@@ -427,7 +428,8 @@ ares_status_t ares_cookie_validate(ares_query_t *query,
/* Resend the request, hopefully it will work the next time as we should
* have recorded a server cookie */
ares_requeue_query(query, now, ARES_SUCCESS,
- ARES_FALSE /* Don't increment try count */, NULL);
+ ARES_FALSE /* Don't increment try count */, NULL,
+ requeue);
/* Parent needs to drop this response */
return ARES_EBADRESP;
diff --git a/deps/cares/src/lib/ares_free_hostent.c b/deps/cares/src/lib/ares_free_hostent.c
index bf2037238b559e..dfcbdf4910b665 100644
--- a/deps/cares/src/lib/ares_free_hostent.c
+++ b/deps/cares/src/lib/ares_free_hostent.c
@@ -44,9 +44,10 @@ void ares_free_hostent(struct hostent *host)
}
ares_free(host->h_aliases);
if (host->h_addr_list) {
- ares_free(
- host->h_addr_list[0]); /* no matter if there is one or many entries,
- there is only one malloc for all of them */
+ size_t i;
+ for (i=0; host->h_addr_list[i] != NULL; i++) {
+ ares_free(host->h_addr_list[i]);
+ }
ares_free(host->h_addr_list);
}
ares_free(host);
diff --git a/deps/cares/src/lib/ares_getaddrinfo.c b/deps/cares/src/lib/ares_getaddrinfo.c
index 32791dc37dcd6f..eabd17fcbac3b3 100644
--- a/deps/cares/src/lib/ares_getaddrinfo.c
+++ b/deps/cares/src/lib/ares_getaddrinfo.c
@@ -418,9 +418,13 @@ static ares_status_t file_lookup(struct host_query *hquery)
* SHOULD recognize localhost names as special and SHOULD always return the
* IP loopback address for address queries".
* We will also ignore ALL errors when trying to resolve localhost, such
- * as permissions errors reading /etc/hosts or a malformed /etc/hosts */
- if (status != ARES_SUCCESS && status != ARES_ENOMEM &&
- ares_is_localhost(hquery->name)) {
+ * as permissions errors reading /etc/hosts or a malformed /etc/hosts.
+ *
+ * Also, just because the query itself returned success from /etc/hosts
+ * lookup doesn't mean it returned everything it needed to for all requested
+ * address families. As long as we're not on a critical out of memory
+ * condition pass it through to fill in any other address classes. */
+ if (status != ARES_ENOMEM && ares_is_localhost(hquery->name)) {
return ares_addrinfo_localhost(hquery->name, hquery->port, &hquery->hints,
hquery->ai);
}
diff --git a/deps/cares/src/lib/ares_gethostbyaddr.c b/deps/cares/src/lib/ares_gethostbyaddr.c
index a7acf3c45c9e6d..69c509ab11b977 100644
--- a/deps/cares/src/lib/ares_gethostbyaddr.c
+++ b/deps/cares/src/lib/ares_gethostbyaddr.c
@@ -120,7 +120,7 @@ static void next_lookup(struct addr_query *aquery)
{
const char *p;
ares_status_t status;
- struct hostent *host;
+ struct hostent *host = NULL;
char *name;
for (p = aquery->remaining_lookups; *p; p++) {
diff --git a/deps/cares/src/lib/ares_gethostbyname.c b/deps/cares/src/lib/ares_gethostbyname.c
index 56de729526af34..d451b4685110ec 100644
--- a/deps/cares/src/lib/ares_gethostbyname.c
+++ b/deps/cares/src/lib/ares_gethostbyname.c
@@ -287,6 +287,8 @@ static ares_status_t ares_gethostbyname_file_int(ares_channel_t *channel,
return ARES_ENOTFOUND;
}
+ *host = NULL;
+
/* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */
if (ares_is_onion_domain(name)) {
return ARES_ENOTFOUND;
@@ -307,9 +309,13 @@ static ares_status_t ares_gethostbyname_file_int(ares_channel_t *channel,
* SHOULD recognize localhost names as special and SHOULD always return the
* IP loopback address for address queries".
* We will also ignore ALL errors when trying to resolve localhost, such
- * as permissions errors reading /etc/hosts or a malformed /etc/hosts */
- if (status != ARES_SUCCESS && status != ARES_ENOMEM &&
- ares_is_localhost(name)) {
+ * as permissions errors reading /etc/hosts or a malformed /etc/hosts.
+ *
+ * Also, just because the query itself returned success from /etc/hosts
+ * lookup doesn't mean it returned everything it needed to for all requested
+ * address families. As long as we're not on a critical out of memory
+ * condition pass it through to fill in any other address classes. */
+ if (status != ARES_ENOMEM && ares_is_localhost(name)) {
return ares_hostent_localhost(name, family, host);
}
diff --git a/deps/cares/src/lib/ares_hosts_file.c b/deps/cares/src/lib/ares_hosts_file.c
index 0439b8e1d476b9..d18863b8f66864 100644
--- a/deps/cares/src/lib/ares_hosts_file.c
+++ b/deps/cares/src/lib/ares_hosts_file.c
@@ -845,7 +845,7 @@ ares_status_t ares_hosts_entry_to_addrinfo(const ares_hosts_entry_t *entry,
ares_bool_t want_cnames,
struct ares_addrinfo *ai)
{
- ares_status_t status;
+ ares_status_t status = ARES_ENOTFOUND;
struct ares_addrinfo_cname *cnames = NULL;
struct ares_addrinfo_node *ainodes = NULL;
ares_llist_node_t *node;
@@ -860,6 +860,7 @@ ares_status_t ares_hosts_entry_to_addrinfo(const ares_hosts_entry_t *entry,
}
if (name != NULL) {
+ ares_free(ai->name);
ai->name = ares_strdup(name);
if (ai->name == NULL) {
status = ARES_ENOMEM; /* LCOV_EXCL_LINE: OutOfMemory */
@@ -888,6 +889,11 @@ ares_status_t ares_hosts_entry_to_addrinfo(const ares_hosts_entry_t *entry,
}
}
+ /* Might be ARES_ENOTFOUND here if no ips matched requested address family */
+ if (status != ARES_SUCCESS) {
+ goto done;
+ }
+
if (want_cnames) {
status = ares_hosts_ai_append_cnames(entry, &cnames);
if (status != ARES_SUCCESS) {
diff --git a/deps/cares/src/lib/ares_ipv6.h b/deps/cares/src/lib/ares_ipv6.h
index 5da341b010603f..d2007cc29ec4a0 100644
--- a/deps/cares/src/lib/ares_ipv6.h
+++ b/deps/cares/src/lib/ares_ipv6.h
@@ -90,6 +90,16 @@ struct addrinfo {
# define NS_INT16SZ 2
#endif
+/* Windows XP Compatibility with later MSVC/Mingw versions */
+#if defined(_WIN32)
+# if !defined(IF_MAX_STRING_SIZE)
+# define IF_MAX_STRING_SIZE 256 /* =256 in */
+# endif
+# if !defined(NDIS_IF_MAX_STRING_SIZE)
+# define NDIS_IF_MAX_STRING_SIZE IF_MAX_STRING_SIZE /* =256 in */
+# endif
+#endif
+
#ifndef IF_NAMESIZE
# ifdef IFNAMSIZ
# define IF_NAMESIZE IFNAMSIZ
diff --git a/deps/cares/src/lib/ares_metrics.c b/deps/cares/src/lib/ares_metrics.c
index 13e34decc06ae6..deb3b7febcc48a 100644
--- a/deps/cares/src/lib/ares_metrics.c
+++ b/deps/cares/src/lib/ares_metrics.c
@@ -197,7 +197,7 @@ void ares_metrics_record(const ares_query_t *query, ares_server_t *server,
}
if (query_ms > server->metrics[i].latency_max_ms) {
- server->metrics[i].latency_min_ms = query_ms;
+ server->metrics[i].latency_max_ms = query_ms;
}
server->metrics[i].total_count++;
diff --git a/deps/cares/src/lib/ares_private.h b/deps/cares/src/lib/ares_private.h
index e6d44e8b8640f9..3d7cea3d3a03c4 100644
--- a/deps/cares/src/lib/ares_private.h
+++ b/deps/cares/src/lib/ares_private.h
@@ -321,7 +321,8 @@ ares_status_t ares_send_query(ares_server_t *requested_server /* Optional */,
ares_status_t ares_requeue_query(ares_query_t *query, const ares_timeval_t *now,
ares_status_t status,
ares_bool_t inc_try_count,
- const ares_dns_record_t *dnsrec);
+ const ares_dns_record_t *dnsrec,
+ ares_array_t **requeue);
/*! Count the number of labels (dots+1) in a domain */
size_t ares_name_label_cnt(const char *name);
@@ -455,8 +456,10 @@ ares_status_t ares_parse_ptr_reply_dnsrec(const ares_dns_record_t *dnsrec,
const void *addr, int addrlen,
int family, struct hostent **host);
+/* host address must be valid or NULL as will create or append */
ares_status_t ares_addrinfo2hostent(const struct ares_addrinfo *ai, int family,
struct hostent **host);
+
ares_status_t ares_addrinfo2addrttl(const struct ares_addrinfo *ai, int family,
size_t req_naddrttls,
struct ares_addrttl *addrttls,
@@ -610,7 +613,8 @@ ares_status_t ares_cookie_apply(ares_dns_record_t *dnsrec, ares_conn_t *conn,
ares_status_t ares_cookie_validate(ares_query_t *query,
const ares_dns_record_t *dnsresp,
ares_conn_t *conn,
- const ares_timeval_t *now);
+ const ares_timeval_t *now,
+ ares_array_t **requeue);
ares_status_t ares_channel_threading_init(ares_channel_t *channel);
void ares_channel_threading_destroy(ares_channel_t *channel);
diff --git a/deps/cares/src/lib/ares_process.c b/deps/cares/src/lib/ares_process.c
index 3d186ea9d58b31..c5834fa100e82c 100644
--- a/deps/cares/src/lib/ares_process.c
+++ b/deps/cares/src/lib/ares_process.c
@@ -56,7 +56,8 @@ static ares_status_t process_timeouts(ares_channel_t *channel,
static ares_status_t process_answer(ares_channel_t *channel,
const unsigned char *abuf, size_t alen,
ares_conn_t *conn,
- const ares_timeval_t *now);
+ const ares_timeval_t *now,
+ ares_array_t **requeue);
static void handle_conn_error(ares_conn_t *conn, ares_bool_t critical_failure,
ares_status_t failure_status);
static ares_bool_t same_questions(const ares_query_t *query,
@@ -510,10 +511,38 @@ static ares_status_t read_conn_packets(ares_conn_t *conn)
return ARES_SUCCESS;
}
+/* Simple data structure to store a query that needs to be requeued with
+ * optional server */
+typedef struct {
+ unsigned short qid;
+ ares_server_t *server; /* optional */
+} ares_requeue_t;
+
+static ares_status_t ares_append_requeue(ares_array_t **requeue,
+ ares_query_t *query,
+ ares_server_t *server)
+{
+ ares_requeue_t entry;
+
+ if (*requeue == NULL) {
+ *requeue = ares_array_create(sizeof(ares_requeue_t), NULL);
+ if (*requeue == NULL) {
+ return ARES_ENOMEM;
+ }
+ }
+
+ ares_query_remove_from_conn(query);
+
+ entry.qid = query->qid;
+ entry.server = server;
+ return ares_array_insertdata_last(*requeue, &entry);
+}
+
static ares_status_t read_answers(ares_conn_t *conn, const ares_timeval_t *now)
{
ares_status_t status;
ares_channel_t *channel = conn->server->channel;
+ ares_array_t *requeue = NULL;
/* Process all queued answers */
while (1) {
@@ -550,15 +579,43 @@ static ares_status_t read_answers(ares_conn_t *conn, const ares_timeval_t *now)
data_len -= 2;
/* We finished reading this answer; process it */
- status = process_answer(channel, data, data_len, conn, now);
+ status = process_answer(channel, data, data_len, conn, now, &requeue);
if (status != ARES_SUCCESS) {
handle_conn_error(conn, ARES_TRUE, status);
- return status;
+ goto cleanup;
}
/* Since we processed the answer, clear the tag so space can be reclaimed */
ares_buf_tag_clear(conn->in_buf);
}
+
+cleanup:
+
+ /* Flush requeue */
+ while (ares_array_len(requeue) > 0) {
+ ares_query_t *query;
+ ares_requeue_t entry;
+ ares_status_t internal_status;
+
+ internal_status = ares_array_claim_at(&entry, sizeof(entry), requeue, 0);
+ if (internal_status != ARES_SUCCESS) {
+ break;
+ }
+
+ /* Query disappeared */
+ query = ares_htable_szvp_get_direct(channel->queries_by_qid, entry.qid);
+ if (query == NULL) {
+ continue;
+ }
+
+ internal_status = ares_send_query(entry.server, query, now);
+ /* We only care about ARES_ENOMEM */
+ if (internal_status == ARES_ENOMEM) {
+ status = ARES_ENOMEM;
+ }
+ }
+ ares_array_destroy(requeue);
+
return status;
}
@@ -611,7 +668,8 @@ static ares_status_t process_timeouts(ares_channel_t *channel,
conn = query->conn;
server_increment_failures(conn->server, query->using_tcp);
- status = ares_requeue_query(query, now, ARES_ETIMEOUT, ARES_TRUE, NULL);
+ status = ares_requeue_query(query, now, ARES_ETIMEOUT, ARES_TRUE, NULL,
+ NULL);
if (status == ARES_ENOMEM) {
goto done;
}
@@ -701,7 +759,8 @@ static ares_bool_t issue_might_be_edns(const ares_dns_record_t *req,
static ares_status_t process_answer(ares_channel_t *channel,
const unsigned char *abuf, size_t alen,
ares_conn_t *conn,
- const ares_timeval_t *now)
+ const ares_timeval_t *now,
+ ares_array_t **requeue)
{
ares_query_t *query;
/* Cache these as once ares_send_query() gets called, it may end up
@@ -745,7 +804,8 @@ static ares_status_t process_answer(ares_channel_t *channel,
/* Validate DNS cookie in response. This function may need to requeue the
* query. */
- if (ares_cookie_validate(query, rdnsrec, conn, now) != ARES_SUCCESS) {
+ if (ares_cookie_validate(query, rdnsrec, conn, now, requeue)
+ != ARES_SUCCESS) {
/* Drop response and return */
status = ARES_SUCCESS;
goto cleanup;
@@ -768,9 +828,8 @@ static ares_status_t process_answer(ares_channel_t *channel,
goto cleanup;
}
- /* Send to same server */
- ares_send_query(server, query, now);
- status = ARES_SUCCESS;
+ /* Requeue to same server */
+ status = ares_append_requeue(requeue, query, server);
goto cleanup;
}
@@ -782,8 +841,9 @@ static ares_status_t process_answer(ares_channel_t *channel,
!(conn->flags & ARES_CONN_FLAG_TCP) &&
!(channel->flags & ARES_FLAG_IGNTC)) {
query->using_tcp = ARES_TRUE;
- ares_send_query(NULL, query, now);
- status = ARES_SUCCESS; /* Switched to TCP is ok */
+ status = ares_append_requeue(requeue, query, NULL);
+ /* Status will reflect success except on memory error, which is good since
+ * requeuing to TCP is ok */
goto cleanup;
}
@@ -809,11 +869,13 @@ static ares_status_t process_answer(ares_channel_t *channel,
}
server_increment_failures(server, query->using_tcp);
- ares_requeue_query(query, now, status, ARES_TRUE, rdnsrec);
+ status = ares_requeue_query(query, now, status, ARES_TRUE, rdnsrec, requeue);
- /* Should any of these cause a connection termination?
- * Maybe SERVER_FAILURE? */
- status = ARES_SUCCESS;
+ if (status != ARES_ENOMEM) {
+ /* Should any of these cause a connection termination?
+ * Maybe SERVER_FAILURE? */
+ status = ARES_SUCCESS;
+ }
goto cleanup;
}
}
@@ -854,10 +916,14 @@ static void handle_conn_error(ares_conn_t *conn, ares_bool_t critical_failure,
ares_close_connection(conn, failure_status);
}
+/* Requeue query will normally call ares_send_query() but in some circumstances
+ * this needs to be delayed, so if requeue is not NULL, it will add the query
+ * to the queue instead */
ares_status_t ares_requeue_query(ares_query_t *query, const ares_timeval_t *now,
ares_status_t status,
ares_bool_t inc_try_count,
- const ares_dns_record_t *dnsrec)
+ const ares_dns_record_t *dnsrec,
+ ares_array_t **requeue)
{
ares_channel_t *channel = query->channel;
size_t max_tries = ares_slist_len(channel->servers) * channel->tries;
@@ -873,6 +939,9 @@ ares_status_t ares_requeue_query(ares_query_t *query, const ares_timeval_t *now,
}
if (query->try_count < max_tries && !query->no_retries) {
+ if (requeue != NULL) {
+ return ares_append_requeue(requeue, query, NULL);
+ }
return ares_send_query(NULL, query, now);
}
@@ -1187,7 +1256,7 @@ ares_status_t ares_send_query(ares_server_t *requested_server,
case ARES_ECONNREFUSED:
case ARES_EBADFAMILY:
server_increment_failures(server, query->using_tcp);
- return ares_requeue_query(query, now, status, ARES_TRUE, NULL);
+ return ares_requeue_query(query, now, status, ARES_TRUE, NULL, NULL);
/* Anything else is not retryable, likely ENOMEM */
default:
@@ -1213,7 +1282,7 @@ ares_status_t ares_send_query(ares_server_t *requested_server,
case ARES_ECONNREFUSED:
case ARES_EBADFAMILY:
handle_conn_error(conn, ARES_TRUE, status);
- status = ares_requeue_query(query, now, status, ARES_TRUE, NULL);
+ status = ares_requeue_query(query, now, status, ARES_TRUE, NULL, NULL);
if (status == ARES_ETIMEOUT) {
status = ARES_ECONNREFUSED;
}
@@ -1221,7 +1290,7 @@ ares_status_t ares_send_query(ares_server_t *requested_server,
default:
server_increment_failures(server, query->using_tcp);
- status = ares_requeue_query(query, now, status, ARES_TRUE, NULL);
+ status = ares_requeue_query(query, now, status, ARES_TRUE, NULL, NULL);
return status;
}
diff --git a/deps/cares/src/lib/ares_sysconfig_win.c b/deps/cares/src/lib/ares_sysconfig_win.c
index f6e07f92e47380..01109a89ba404a 100644
--- a/deps/cares/src/lib/ares_sysconfig_win.c
+++ b/deps/cares/src/lib/ares_sysconfig_win.c
@@ -176,6 +176,7 @@ static int compareAddresses(const void *arg1, const void *arg2)
return 0;
}
+#if defined(HAVE_GETBESTROUTE2) && !defined(__WATCOMC__)
/* There can be multiple routes to "the Internet". And there can be different
* DNS servers associated with each of the interfaces that offer those routes.
* We have to assume that any DNS server can serve any request. But, some DNS
@@ -213,18 +214,6 @@ static ULONG getBestRouteMetric(IF_LUID * const luid, /* Can't be const :( */
const SOCKADDR_INET * const dest,
const ULONG interfaceMetric)
{
- /* On this interface, get the best route to that destination. */
-# if defined(__WATCOMC__)
- /* OpenWatcom's builtin Windows SDK does not have a definition for
- * MIB_IPFORWARD_ROW2, and also does not allow the usage of SOCKADDR_INET
- * as a variable. Let's work around this by returning the worst possible
- * metric, but only when using the OpenWatcom compiler.
- * It may be worth investigating using a different version of the Windows
- * SDK with OpenWatcom in the future, though this may be fixed in OpenWatcom
- * 2.0.
- */
- return (ULONG)-1;
-# else
MIB_IPFORWARD_ROW2 row;
SOCKADDR_INET ignored;
if (GetBestRoute2(/* The interface to use. The index is ignored since we are
@@ -257,8 +246,8 @@ static ULONG getBestRouteMetric(IF_LUID * const luid, /* Can't be const :( */
* which describes the combination as a "sum".
*/
return row.Metric + interfaceMetric;
-# endif /* __WATCOMC__ */
}
+#endif
/*
* get_DNS_Windows()
@@ -379,9 +368,21 @@ static ares_bool_t get_DNS_Windows(char **outptr)
addressesSize = newSize;
}
+# if defined(HAVE_GETBESTROUTE2) && !defined(__WATCOMC__)
+ /* OpenWatcom's builtin Windows SDK does not have a definition for
+ * MIB_IPFORWARD_ROW2, and also does not allow the usage of SOCKADDR_INET
+ * as a variable. Let's work around this by returning the worst possible
+ * metric, but only when using the OpenWatcom compiler.
+ * It may be worth investigating using a different version of the Windows
+ * SDK with OpenWatcom in the future, though this may be fixed in OpenWatcom
+ * 2.0.
+ */
addresses[addressesIndex].metric = getBestRouteMetric(
&ipaaEntry->Luid, (SOCKADDR_INET *)((void *)(namesrvr.sa)),
ipaaEntry->Ipv4Metric);
+# else
+ addresses[addressesIndex].metric = (ULONG)-1;
+# endif
/* Record insertion index to make qsort stable */
addresses[addressesIndex].orig_idx = addressesIndex;
@@ -423,9 +424,13 @@ static ares_bool_t get_DNS_Windows(char **outptr)
ll_scope = ipaaEntry->Ipv6IfIndex;
}
+# if defined(HAVE_GETBESTROUTE2) && !defined(__WATCOMC__)
addresses[addressesIndex].metric = getBestRouteMetric(
&ipaaEntry->Luid, (SOCKADDR_INET *)((void *)(namesrvr.sa)),
ipaaEntry->Ipv6Metric);
+# else
+ addresses[addressesIndex].metric = (ULONG)-1;
+# endif
/* Record insertion index to make qsort stable */
addresses[addressesIndex].orig_idx = addressesIndex;
diff --git a/deps/cares/src/lib/config-win32.h b/deps/cares/src/lib/config-win32.h
index be233a2f8b9c2d..fc533c75516ea3 100644
--- a/deps/cares/src/lib/config-win32.h
+++ b/deps/cares/src/lib/config-win32.h
@@ -237,8 +237,10 @@
# undef HAVE_NETIOAPI_H
#endif
-/* Threading support enabled */
-#define CARES_THREADS 1
+/* Threading support enabled for Vista+ */
+#if !defined(_WIN32_WINNT) || _WIN32_WINNT >= 0x0600
+# define CARES_THREADS 1
+#endif
/* ---------------------------------------------------------------- */
/* TYPEDEF REPLACEMENTS */
@@ -370,6 +372,8 @@
# define HAVE_CONVERTINTERFACELUIDTONAMEA 1
/* Define to 1 if you have the `NotifyIpInterfaceChange' function. */
# define HAVE_NOTIFYIPINTERFACECHANGE 1
+/* Define to 1 if you have the `GetBestRoute2` function */
+# define HAVE_GETBESTROUTE2 1
#endif
/* ---------------------------------------------------------------- */
diff --git a/deps/cares/src/lib/event/ares_event.h b/deps/cares/src/lib/event/ares_event.h
index 36cd10dcf89152..bf298dfb6196ba 100644
--- a/deps/cares/src/lib/event/ares_event.h
+++ b/deps/cares/src/lib/event/ares_event.h
@@ -159,30 +159,33 @@ ares_status_t ares_event_update(ares_event_t **event, ares_event_thread_t *e,
ares_event_signal_cb_t signal_cb);
-#ifdef HAVE_PIPE
+#ifdef CARES_THREADS
+# ifdef HAVE_PIPE
ares_event_t *ares_pipeevent_create(ares_event_thread_t *e);
-#endif
+# endif
-#ifdef HAVE_POLL
+# ifdef HAVE_POLL
extern const ares_event_sys_t ares_evsys_poll;
-#endif
+# endif
-#ifdef HAVE_KQUEUE
+# ifdef HAVE_KQUEUE
extern const ares_event_sys_t ares_evsys_kqueue;
-#endif
+# endif
-#ifdef HAVE_EPOLL
+# ifdef HAVE_EPOLL
extern const ares_event_sys_t ares_evsys_epoll;
-#endif
+# endif
-#ifdef _WIN32
+# ifdef _WIN32
extern const ares_event_sys_t ares_evsys_win32;
-#endif
+# endif
/* All systems have select(), but not all have a way to wake, so we require
* pipe() to wake the select() */
-#ifdef HAVE_PIPE
+# ifdef HAVE_PIPE
extern const ares_event_sys_t ares_evsys_select;
+# endif
+
#endif
#endif
diff --git a/deps/cares/src/lib/event/ares_event_configchg.c b/deps/cares/src/lib/event/ares_event_configchg.c
index 5ecc6888ab719f..2a8c780c2ccb31 100644
--- a/deps/cares/src/lib/event/ares_event_configchg.c
+++ b/deps/cares/src/lib/event/ares_event_configchg.c
@@ -26,7 +26,7 @@
#include "ares_private.h"
#include "ares_event.h"
-#ifdef __ANDROID__
+#if defined(__ANDROID__) && defined(CARES_THREADS)
ares_status_t ares_event_configchg_init(ares_event_configchg_t **configchg,
ares_event_thread_t *e)
@@ -43,7 +43,7 @@ void ares_event_configchg_destroy(ares_event_configchg_t *configchg)
(void)configchg;
}
-#elif defined(__linux__)
+#elif defined(__linux__) && defined(CARES_THREADS)
# include
@@ -174,7 +174,7 @@ ares_status_t ares_event_configchg_init(ares_event_configchg_t **configchg,
return status;
}
-#elif defined(USE_WINSOCK)
+#elif defined(USE_WINSOCK) && defined(CARES_THREADS)
# include
# include
@@ -379,7 +379,7 @@ ares_status_t ares_event_configchg_init(ares_event_configchg_t **configchg,
return status;
}
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) && defined(CARES_THREADS)
# include
# include
@@ -531,7 +531,7 @@ ares_status_t ares_event_configchg_init(ares_event_configchg_t **configchg,
return status;
}
-#elif defined(HAVE_STAT) && !defined(_WIN32)
+#elif defined(HAVE_STAT) && !defined(_WIN32) && defined(CARES_THREADS)
# ifdef HAVE_SYS_TYPES_H
# include
# endif
@@ -665,6 +665,12 @@ ares_status_t ares_event_configchg_init(ares_event_configchg_t **configchg,
goto done;
}
+ c->lock = ares_thread_mutex_create();
+ if (c->lock == NULL) {
+ status = ARES_ENOMEM;
+ goto done;
+ }
+
c->resolvconf_path = c->e->channel->resolvconf_path;
if (c->resolvconf_path == NULL) {
c->resolvconf_path = PATH_RESOLV_CONF;
@@ -722,6 +728,8 @@ void ares_event_configchg_destroy(ares_event_configchg_t *configchg)
ares_status_t ares_event_configchg_init(ares_event_configchg_t **configchg,
ares_event_thread_t *e)
{
+ (void)configchg;
+ (void)e;
/* No ability */
return ARES_ENOTIMP;
}
@@ -729,6 +737,7 @@ ares_status_t ares_event_configchg_init(ares_event_configchg_t **configchg,
void ares_event_configchg_destroy(ares_event_configchg_t *configchg)
{
/* No-op */
+ (void)configchg;
}
#endif
diff --git a/deps/cares/src/lib/event/ares_event_epoll.c b/deps/cares/src/lib/event/ares_event_epoll.c
index 538c38b4f94ab4..d451c86a3d57e8 100644
--- a/deps/cares/src/lib/event/ares_event_epoll.c
+++ b/deps/cares/src/lib/event/ares_event_epoll.c
@@ -26,6 +26,8 @@
#include "ares_private.h"
#include "ares_event.h"
+#if defined(HAVE_EPOLL) && defined(CARES_THREADS)
+
#ifdef HAVE_SYS_EPOLL_H
# include
#endif
@@ -33,8 +35,6 @@
# include
#endif
-#ifdef HAVE_EPOLL
-
typedef struct {
int epoll_fd;
} ares_evsys_epoll_t;
diff --git a/deps/cares/src/lib/event/ares_event_kqueue.c b/deps/cares/src/lib/event/ares_event_kqueue.c
index dbbd0dbd9f76a6..00cdcbe9c2a912 100644
--- a/deps/cares/src/lib/event/ares_event_kqueue.c
+++ b/deps/cares/src/lib/event/ares_event_kqueue.c
@@ -26,6 +26,8 @@
#include "ares_private.h"
#include "ares_event.h"
+#if defined(HAVE_KQUEUE) && defined(CARES_THREADS)
+
#ifdef HAVE_SYS_TYPES_H
# include
#endif
@@ -39,8 +41,6 @@
# include
#endif
-#ifdef HAVE_KQUEUE
-
typedef struct {
int kqueue_fd;
struct kevent *changelist;
diff --git a/deps/cares/src/lib/event/ares_event_poll.c b/deps/cares/src/lib/event/ares_event_poll.c
index c6ab4b62072b36..28e3c096576751 100644
--- a/deps/cares/src/lib/event/ares_event_poll.c
+++ b/deps/cares/src/lib/event/ares_event_poll.c
@@ -25,12 +25,13 @@
*/
#include "ares_private.h"
#include "ares_event.h"
+
+#if defined(HAVE_POLL) && defined(CARES_THREADS)
+
#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);
diff --git a/deps/cares/src/lib/event/ares_event_select.c b/deps/cares/src/lib/event/ares_event_select.c
index 4d7c085d872088..df758b5a1e5172 100644
--- a/deps/cares/src/lib/event/ares_event_select.c
+++ b/deps/cares/src/lib/event/ares_event_select.c
@@ -31,13 +31,14 @@
#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)
+#if defined(HAVE_PIPE) && defined(CARES_THREADS)
+
+#ifdef HAVE_SYS_SELECT_H
+# include
+#endif
static ares_bool_t ares_evsys_select_init(ares_event_thread_t *e)
{
diff --git a/deps/cares/src/lib/event/ares_event_thread.c b/deps/cares/src/lib/event/ares_event_thread.c
index d59b7880a411cf..c77514e02c18c8 100644
--- a/deps/cares/src/lib/event/ares_event_thread.c
+++ b/deps/cares/src/lib/event/ares_event_thread.c
@@ -26,6 +26,7 @@
#include "ares_private.h"
#include "ares_event.h"
+#ifdef CARES_THREADS
static void ares_event_destroy_cb(void *arg)
{
ares_event_t *event = arg;
@@ -549,3 +550,18 @@ ares_status_t ares_event_thread_init(ares_channel_t *channel)
return ARES_SUCCESS;
}
+
+#else
+
+ares_status_t ares_event_thread_init(ares_channel_t *channel)
+{
+ (void)channel;
+ return ARES_ENOTIMP;
+}
+
+void ares_event_thread_destroy(ares_channel_t *channel)
+{
+ (void)channel;
+}
+
+#endif
diff --git a/deps/cares/src/lib/event/ares_event_wake_pipe.c b/deps/cares/src/lib/event/ares_event_wake_pipe.c
index d3b166a3d6cb78..cd1534bbbd586c 100644
--- a/deps/cares/src/lib/event/ares_event_wake_pipe.c
+++ b/deps/cares/src/lib/event/ares_event_wake_pipe.c
@@ -25,14 +25,16 @@
*/
#include "ares_private.h"
#include "ares_event.h"
-#ifdef HAVE_UNISTD_H
-# include
-#endif
-#ifdef HAVE_FCNTL_H
-# include
-#endif
-#ifdef HAVE_PIPE
+#if defined(HAVE_PIPE) && defined(CARES_THREADS)
+
+# ifdef HAVE_UNISTD_H
+# include
+# endif
+# ifdef HAVE_FCNTL_H
+# include
+# endif
+
typedef struct {
int filedes[2];
} ares_pipeevent_t;
diff --git a/deps/cares/src/lib/event/ares_event_win32.c b/deps/cares/src/lib/event/ares_event_win32.c
index 1531b6d81ddca4..d7d1d65735082d 100644
--- a/deps/cares/src/lib/event/ares_event_win32.c
+++ b/deps/cares/src/lib/event/ares_event_win32.c
@@ -37,12 +37,14 @@
#include "ares_private.h"
#include "ares_event.h"
#include "ares_event_win32.h"
+
+
+#if defined(USE_WINSOCK) && defined(CARES_THREADS)
+
#ifdef HAVE_LIMITS_H
# include
#endif
-#if defined(USE_WINSOCK)
-
/* IMPLEMENTATION NOTES
* ====================
*
@@ -667,7 +669,7 @@ static ares_bool_t ares_evsys_win32_afd_cancel(ares_evsys_win32_eventdata_t *ed)
/* 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). */
+ * notification (but it should be queued for the next IOCP event). */
if (status == STATUS_SUCCESS || status == STATUS_NOT_FOUND) {
return ARES_TRUE;
}
diff --git a/deps/cares/src/lib/legacy/ares_parse_a_reply.c b/deps/cares/src/lib/legacy/ares_parse_a_reply.c
index 870aaccf76c0a8..9fd4a07ac0fccc 100644
--- a/deps/cares/src/lib/legacy/ares_parse_a_reply.c
+++ b/deps/cares/src/lib/legacy/ares_parse_a_reply.c
@@ -77,6 +77,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
}
if (host != NULL) {
+ *host = NULL;
status = ares_addrinfo2hostent(&ai, AF_INET, host);
if (status != ARES_SUCCESS && status != ARES_ENODATA) {
goto fail; /* LCOV_EXCL_LINE: DefensiveCoding */
diff --git a/deps/cares/src/lib/legacy/ares_parse_aaaa_reply.c b/deps/cares/src/lib/legacy/ares_parse_aaaa_reply.c
index 278642f0b3e0af..4c177ec9cbbe55 100644
--- a/deps/cares/src/lib/legacy/ares_parse_aaaa_reply.c
+++ b/deps/cares/src/lib/legacy/ares_parse_aaaa_reply.c
@@ -80,6 +80,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
}
if (host != NULL) {
+ *host = NULL;
status = ares_addrinfo2hostent(&ai, AF_INET6, host);
if (status != ARES_SUCCESS && status != ARES_ENODATA) {
goto fail; /* LCOV_EXCL_LINE: DefensiveCoding */
diff --git a/deps/cares/src/lib/util/ares_iface_ips.c b/deps/cares/src/lib/util/ares_iface_ips.c
index 46cb291e300ec2..c5f507f87e1476 100644
--- a/deps/cares/src/lib/util/ares_iface_ips.c
+++ b/deps/cares/src/lib/util/ares_iface_ips.c
@@ -431,8 +431,14 @@ static ares_status_t ares_iface_ips_enumerate(ares_iface_ips_t *ips,
}
status = ares_iface_ips_add(ips, addrflag, ifname, &addr,
+#if _WIN32_WINNT >= 0x0600
ipaddr->OnLinkPrefixLength /* netmask */,
- address->Ipv6IfIndex /* ll_scope */);
+#else
+ ipaddr->Address.lpSockaddr->sa_family
+ == AF_INET?32:128,
+#endif
+ address->Ipv6IfIndex /* ll_scope */
+ );
if (status != ARES_SUCCESS) {
goto done;
diff --git a/deps/cares/src/lib/util/ares_uri.h b/deps/cares/src/lib/util/ares_uri.h
index 6a703cba5b53c5..2d8138fdc3e3d0 100644
--- a/deps/cares/src/lib/util/ares_uri.h
+++ b/deps/cares/src/lib/util/ares_uri.h
@@ -175,7 +175,7 @@ ares_status_t ares_uri_set_query_key(ares_uri_t *uri, const char *key,
*/
ares_status_t ares_uri_del_query_key(ares_uri_t *uri, const char *key);
-/*! Retrieve the value associted with a query key. Keys are case-insensitive.
+/*! Retrieve the value associated with a query key. Keys are case-insensitive.
*
* \param[in] uri Initialized URI object
* \param[in] key Key to retrieve.
diff --git a/deps/cares/src/tools/Makefile.in b/deps/cares/src/tools/Makefile.in
index 19e99a253378c7..932d1a98375ac9 100644
--- a/deps/cares/src/tools/Makefile.in
+++ b/deps/cares/src/tools/Makefile.in
@@ -264,6 +264,7 @@ EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GMOCK112_CFLAGS = @GMOCK112_CFLAGS@
diff --git a/deps/undici/src/lib/dispatcher/pool.js b/deps/undici/src/lib/dispatcher/pool.js
index 2d84cd96488fd6..0b8a2da6da4966 100644
--- a/deps/undici/src/lib/dispatcher/pool.js
+++ b/deps/undici/src/lib/dispatcher/pool.js
@@ -73,6 +73,20 @@ class Pool extends PoolBase {
? { ...options.interceptors }
: undefined
this[kFactory] = factory
+
+ this.on('connectionError', (origin, targets, error) => {
+ // If a connection error occurs, we remove the client from the pool,
+ // and emit a connectionError event. They will not be re-used.
+ // Fixes https://github.com/nodejs/undici/issues/3895
+ for (const target of targets) {
+ // Do not use kRemoveClient here, as it will close the client,
+ // but the client cannot be closed in this state.
+ const idx = this[kClients].indexOf(target)
+ if (idx !== -1) {
+ this[kClients].splice(idx, 1)
+ }
+ }
+ })
}
[kGetDispatcher] () {
diff --git a/deps/undici/src/lib/llhttp/wasm_build_env.txt b/deps/undici/src/lib/llhttp/wasm_build_env.txt
index c92b0aa26e0c48..5ce088f4338bde 100644
--- a/deps/undici/src/lib/llhttp/wasm_build_env.txt
+++ b/deps/undici/src/lib/llhttp/wasm_build_env.txt
@@ -1,15 +1,15 @@
-> undici@6.21.1 prebuild:wasm
+> undici@6.21.2 prebuild:wasm
> node build/wasm.js --prebuild
-> docker build --platform=linux/aarch64 -t llhttp_wasm_builder -f /Users/matteo/repos/node-private/deps/undici/src/build/Dockerfile /Users/matteo/repos/node-private/deps/undici/src
+> docker build --platform=linux/aarch64 -t llhttp_wasm_builder -f /Users/matteo/repos/node/deps/undici/src/build/Dockerfile /Users/matteo/repos/node/deps/undici/src
-> undici@6.21.1 build:wasm
+> undici@6.21.2 build:wasm
> node build/wasm.js --docker
-> docker run --rm -t --platform=linux/aarch64 --mount type=bind,source=/Users/matteo/repos/node-private/deps/undici/src/lib/llhttp,target=/home/node/undici/lib/llhttp llhttp_wasm_builder node build/wasm.js
+> docker run --rm -t --platform=linux/aarch64 --mount type=bind,source=/Users/matteo/repos/node/deps/undici/src/lib/llhttp,target=/home/node/undici/lib/llhttp llhttp_wasm_builder node build/wasm.js
alpine-baselayout-3.4.3-r2
diff --git a/deps/undici/src/package.json b/deps/undici/src/package.json
index a465327b1bc7f5..d7fab14768ad0f 100644
--- a/deps/undici/src/package.json
+++ b/deps/undici/src/package.json
@@ -1,6 +1,6 @@
{
"name": "undici",
- "version": "6.21.1",
+ "version": "6.21.2",
"description": "An HTTP/1.1 client, written from scratch for Node.js",
"homepage": "https://undici.nodejs.org",
"bugs": {
diff --git a/deps/undici/src/types/interceptors.d.ts b/deps/undici/src/types/interceptors.d.ts
index 65e9397554e9ab..9f6af128d5efc8 100644
--- a/deps/undici/src/types/interceptors.d.ts
+++ b/deps/undici/src/types/interceptors.d.ts
@@ -28,4 +28,5 @@ declare namespace Interceptors {
export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
export function responseError(opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
+ export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
}
diff --git a/deps/undici/undici.js b/deps/undici/undici.js
index 42387a0ea7e03c..d65ffba0ff6c1c 100644
--- a/deps/undici/undici.js
+++ b/deps/undici/undici.js
@@ -8123,6 +8123,14 @@ var require_pool = __commonJS({
this[kOptions] = { ...util.deepClone(options), connect, allowH2 };
this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0;
this[kFactory] = factory;
+ this.on("connectionError", (origin2, targets, error) => {
+ for (const target of targets) {
+ const idx = this[kClients].indexOf(target);
+ if (idx !== -1) {
+ this[kClients].splice(idx, 1);
+ }
+ }
+ });
}
[kGetDispatcher]() {
for (const client of this[kClients]) {
diff --git a/doc/changelogs/CHANGELOG_V20.md b/doc/changelogs/CHANGELOG_V20.md
index 320fec22565d9b..76882a8a5bf146 100644
--- a/doc/changelogs/CHANGELOG_V20.md
+++ b/doc/changelogs/CHANGELOG_V20.md
@@ -9,6 +9,7 @@
|