Merge branch 'nodejs:main' into patch-1

This commit is contained in:
Konstantin Tsabolov 2024-08-15 12:13:16 +02:00 committed by GitHub
commit 19514a292e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1182 changed files with 56104 additions and 19332 deletions

8
.github/CODEOWNERS vendored
View File

@ -167,6 +167,7 @@
/doc/api/permissions.md @nodejs/security-wg
/lib/internal/process/permission.js @nodejs/security-wg
/src/permission/* @nodejs/security-wg
/test/parallel/test-permission-* @nodejs/security-wg
# Dependency Update Tools
@ -181,3 +182,10 @@
/lib/internal/navigator.js @nodejs/web-standards
/test/fixtures/wpt/ @nodejs/web-standards
/test/wpt/ @nodejs/web-standards
# TypeScript
/deps/amaro/ @nodejs/typescript
/doc/api/typescript.md @nodejs/typescript
/test/fixtures/typescript/ @nodejs/typescript
/tools/dep_updaters/update-amaro.sh @nodejs/typescript

View File

@ -33,13 +33,19 @@ body:
be run using `node` directly without installing third-party dependencies
or downloading code from the internet (i.e. no ZIP archive, no GitHub
repository, etc.).
validations:
required: true
- type: textarea
attributes:
label: How often does it reproduce? Is there a required condition?
validations:
required: true
- type: textarea
attributes:
label: What is the expected behavior? Why is that the expected behavior?
description: If possible please provide textual output instead of screenshots.
validations:
required: true
- type: textarea
attributes:
label: What do you see instead?

View File

@ -81,6 +81,7 @@ subSystemLabels:
/^deps\/nghttp2\/nghttp2\.gyp/: build, http2
/^deps\/nghttp2\//: http2
/^deps\/ngtcp2\//: quic
/^deps\/amaro\//: strip-types
/^deps\/([^/]+)/: dependencies, $1
## JS subsystems
@ -98,6 +99,7 @@ subSystemLabels:
/^lib\/test.js$/: test_runner
/^lib\/internal\/url\.js$/: whatwg-url
/^lib\/internal\/modules\/esm/: esm
/^lib\/internal\/modules/: module
/^lib\/internal\/webstreams/: web streams
/^lib\/internal\/test_runner/: test_runner
@ -122,6 +124,7 @@ exlusiveLabels:
/^test\/fixtures\/es-module/: test, esm
/^test\/es-module\//: test, esm
/^test\/fixtures\/wpt\/streams\//: test, web streams
/^test\/fixtures\/typescript/: test, strip-types
/^test\//: test
@ -141,6 +144,8 @@ exlusiveLabels:
# Add deprecations label to PRs that affect doc/api/deprecations.md
/^doc\/api\/deprecations.md$/: doc, deprecations
/^doc\/changelogs\//: release
# Specific map for typescript.md as it should be labeled 'strip-types'
/^doc\/api\/typescript.md$/: doc, strip-types
/^doc\//: doc
@ -187,8 +192,10 @@ allJsSubSystems:
- readline
- repl
- report
- sqlite
- stream
- string_decoder
- strip-types
- timers
- tls
- trace_events

View File

@ -50,7 +50,7 @@ jobs:
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
@ -59,11 +59,15 @@ jobs:
- name: Setup @node-core/utils
run: |
ncu-config set username ${{ secrets.JENKINS_USER }}
ncu-config set token "${{ secrets.GH_USER_TOKEN }}"
ncu-config set jenkins_token ${{ secrets.JENKINS_TOKEN }}
ncu-config set username "$USERNAME"
ncu-config set token "$GH_TOKEN"
ncu-config set jenkins_token "$JENKINS_TOKEN"
ncu-config set owner "${{ github.repository_owner }}"
ncu-config set repo "$(echo ${{ github.repository }} | cut -d/ -f2)"
env:
USERNAME: ${{ secrets.JENKINS_USER }}
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }}
- name: Start the CI
run: ./tools/actions/start-ci.sh ${{ needs.get-prs-for-ci.outputs.numbers }}

View File

@ -46,7 +46,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache
@ -64,7 +64,7 @@ jobs:
mkdir tarballs
mv *.tar.gz tarballs
- name: Upload tarball artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: tarballs
path: tarballs
@ -76,7 +76,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache
@ -86,7 +86,7 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Download tarball
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: tarballs
path: tarballs

View File

@ -42,7 +42,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install deps

View File

@ -23,7 +23,7 @@ jobs:
persist-credentials: false
- run: git reset HEAD^2
- name: Install Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Validate commit message

View File

@ -71,7 +71,7 @@ jobs:
# Install dependencies
- name: Install Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install @node-core/utils
@ -86,11 +86,15 @@ jobs:
run: |
ncu-config set branch ${GITHUB_REF_NAME}
ncu-config set upstream origin
ncu-config set username "${{ secrets.GH_USER_NAME }}"
ncu-config set token "${{ secrets.GH_USER_TOKEN }}"
ncu-config set jenkins_token "${{ secrets.JENKINS_TOKEN }}"
ncu-config set username "$USERNAME"
ncu-config set token "$GH_TOKEN"
ncu-config set jenkins_token "$JENKINS_TOKEN"
ncu-config set repo "${REPOSITORY}"
ncu-config set owner "${OWNER}"
env:
USERNAME: ${{ secrets.JENKINS_USER }}
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }}
- name: Start the Commit Queue
run: ./tools/actions/commit-queue.sh ${{ env.OWNER }} ${{ env.REPOSITORY }} ${{ needs.get_mergeable_prs.outputs.numbers }}

View File

@ -12,6 +12,7 @@ on:
- tools/gyp/**
- tools/test.py
- .github/workflows/coverage-linux-without-intl.yml
- codecov.yml
push:
branches:
- main
@ -24,6 +25,7 @@ on:
- tools/gyp/**
- tools/test.py
- .github/workflows/coverage-linux-without-intl.yml
- codecov.yml
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@ -48,7 +50,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache
@ -58,7 +60,7 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Install gcovr
run: pip install gcovr==4.2
run: pip install gcovr==7.2
- name: Build
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
@ -70,7 +72,7 @@ jobs:
env:
NODE_OPTIONS: --max-old-space-size=8192
- name: Report C++
run: cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd)
run: gcovr --object-directory=out -v --filter src --xml -o ./coverage/coverage-cxx.xml --root=./ --gcov-executable="llvm-cov-18 gcov"
# Clean temporary output from gcov and c8, so that it's not uploaded:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out

View File

@ -12,6 +12,7 @@ on:
- tools/gyp/**
- tools/test.py
- .github/workflows/coverage-linux.yml
- codecov.yml
push:
branches:
- main
@ -24,6 +25,7 @@ on:
- tools/gyp/**
- tools/test.py
- .github/workflows/coverage-linux.yml
- codecov.yml
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@ -48,7 +50,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache
@ -58,7 +60,7 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Install gcovr
run: pip install gcovr==4.2
run: pip install gcovr==7.2
- name: Build
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
@ -70,7 +72,7 @@ jobs:
env:
NODE_OPTIONS: --max-old-space-size=8192
- name: Report C++
run: cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd)
run: gcovr --object-directory=out -v --filter src --xml -o ./coverage/coverage-cxx.xml --root=./ --gcov-executable="llvm-cov-18 gcov"
# Clean temporary output from gcov and c8, so that it's not uploaded:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out

View File

@ -12,6 +12,7 @@ on:
- tools/gyp/**
- tools/test.py
- .github/workflows/coverage-windows.yml
- codecov.yml
push:
branches:
- main
@ -24,6 +25,7 @@ on:
- tools/gyp/**
- tools/test.py
- .github/workflows/coverage-windows.yml
- codecov.yml
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@ -45,7 +47,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install deps

View File

@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
@ -45,7 +45,7 @@ jobs:
run: echo "NIGHTLY=$(curl -s https://nodejs.org/download/nightly/index.json | jq -r '[.[] | select(.files[] | contains("linux-x64"))][0].version')" >> $GITHUB_ENV
- name: Install Node.js
id: setup-node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NIGHTLY || matrix.node-version }}
check-latest: true
@ -121,7 +121,7 @@ jobs:
run: cp wptreport.json wptreport-${{ steps.setup-node.outputs.node-version }}.json
- name: Upload GitHub Actions artifact
if: ${{ env.WPT_REPORT != '' }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
path: out/wpt/wptreport-*.json
name: WPT Report for ${{ steps.setup-node.outputs.node-version }}

View File

@ -19,7 +19,7 @@ jobs:
with:
persist-credentials: false
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information

View File

@ -28,14 +28,14 @@ jobs:
with:
persist-credentials: false
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Build
run: NODE=$(command -v node) make doc-only
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: docs
path: out/doc

View File

@ -25,7 +25,7 @@ jobs:
persist-credentials: false
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}

View File

@ -34,7 +34,7 @@ jobs:
repository: nodejs/TSC
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}

View File

@ -29,7 +29,7 @@ jobs:
with:
persist-credentials: false
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
@ -44,7 +44,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
@ -60,11 +60,11 @@ jobs:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
@ -97,7 +97,7 @@ jobs:
with:
persist-credentials: false
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
@ -122,7 +122,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
@ -139,7 +139,7 @@ jobs:
with:
persist-credentials: false
- name: Use Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
@ -185,4 +185,21 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- run: tools/lint-readme-lists.mjs
- name: Get team members if possible
id: team_members
run: |
get_list_members() {
TEAM="$1"
QUOTE='"'
gh api "/orgs/nodejs/teams/$TEAM/members" -X GET -f per_page=100 --jq "map(.login) | ${QUOTE}${TEAM}=\(tojson)${QUOTE}"
}
[ -z "$GITHUB_TOKEN" ] || (
get_list_members "collaborators"
get_list_members "issue-triage"
get_list_members "tsc"
) >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
- run: tools/lint-readme-lists.mjs "$TEAMS"
env:
TEAMS: ${{ tojson(steps.team_members.outputs) }}

View File

@ -60,7 +60,7 @@ jobs:
env:
SLACK_COLOR: '#DE512A'
SLACK_ICON: https://github.com/nodejs.png?size=48
SLACK_TITLE: Invalid commit was pushed to ${{ github.repository.default_branch }}
SLACK_TITLE: Invalid commit was pushed to ${{ github.ref }}
SLACK_MESSAGE: |
<!here> A commit with an invalid message was pushed to <https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}|${{ github.repository }}@${{ github.ref_name }}> by <https://github.com/${{ github.actor }}|${{ github.actor }}>.

View File

@ -33,7 +33,7 @@ jobs:
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
@ -43,7 +43,7 @@ jobs:
persist-credentials: false
- name: Run analysis
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
@ -65,7 +65,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: Upload artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: SARIF file
path: results.sarif
@ -73,6 +73,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
sarif_file: results.sarif

View File

@ -38,7 +38,7 @@ permissions:
jobs:
test-asan:
if: github.event.pull_request.draft == false
if: false # Temporarily disabled. References: https://github.com/nodejs/node/pull/52374, https://github.com/nodejs/node/pull/53651#issuecomment-2198510810
runs-on: ubuntu-20.04
env:
CC: sccache clang
@ -51,7 +51,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache

View File

@ -48,7 +48,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information

View File

@ -41,7 +41,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache

View File

@ -48,7 +48,7 @@ jobs:
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache

View File

@ -52,7 +52,7 @@ jobs:
run: |
echo "UBSAN_OPTIONS=suppressions=$GITHUB_WORKSPACE/suppressions.supp" >> $GITHUB_ENV
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up sccache

View File

@ -16,6 +16,7 @@ on:
- acorn
- acorn-walk
- ada
- amaro
- brotli
- c-ares
- cjs-module-lexer
@ -82,6 +83,14 @@ jobs:
cat temp-output
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
rm temp-output
- id: amaro
subsystem: deps
label: dependencies
run: |
./tools/dep_updaters/update-amaro.sh > temp-output
cat temp-output
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
rm temp-output
- id: brotli
subsystem: deps
label: dependencies
@ -321,7 +330,7 @@ jobs:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
if: matrix.id == 'icu' && (github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id)
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: ${{ matrix.run }}

View File

@ -30,7 +30,7 @@ jobs:
~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Install Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install @node-core/utils

View File

@ -19,7 +19,7 @@ file a new issue.
* [OpenSSL asm support](#openssl-asm-support)
* [Previous versions of this document](#previous-versions-of-this-document)
* [Building Node.js on supported platforms](#building-nodejs-on-supported-platforms)
* [Note about Python](#note-about-python)
* [Prerequisites](#prerequisites)
* [Unix and macOS](#unix-and-macos)
* [Unix prerequisites](#unix-prerequisites)
* [macOS prerequisites](#macos-prerequisites)
@ -33,7 +33,7 @@ file a new issue.
* [Speeding up frequent rebuilds when developing](#speeding-up-frequent-rebuilds-when-developing)
* [Troubleshooting Unix and macOS builds](#troubleshooting-unix-and-macos-builds)
* [Windows](#windows)
* [Prerequisites](#prerequisites)
* [Windows Prerequisites](#windows-prerequisites)
* [Option 1: Manual install](#option-1-manual-install)
* [Option 2: Automated install with Boxstarter](#option-2-automated-install-with-boxstarter)
* [Building Node.js](#building-nodejs-2)
@ -112,7 +112,6 @@ platforms. This is true regardless of entries in the table below.
| GNU/Linux | s390x | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 |
| GNU/Linux | loong64 | kernel >= 5.19, glibc >= 2.36 | Experimental | |
| Windows | x64 | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] |
| Windows | x64 | Windows 8.1/Server 2012 | Experimental | |
| Windows | arm64 | >= Windows 10 | Tier 2 | |
| macOS | x64 | >= 11.0 | Tier 1 | For notes about compilation see [^4] |
| macOS | arm64 | >= 11.0 | Tier 1 | |
@ -151,7 +150,7 @@ Depending on the host platform, the selection of toolchains may vary.
| Operating System | Compiler Versions |
| ---------------- | -------------------------------------------------------------- |
| Linux | GCC >= 10.1 |
| Linux | GCC >= 12.2 |
| Windows | Visual Studio >= 2022 with the Windows 10 SDK on a 64-bit host |
| macOS | Xcode >= 13 (Apple LLVM >= 12) |
@ -222,15 +221,16 @@ Consult previous versions of this document for older versions of Node.js:
## Building Node.js on supported platforms
### Note about Python
### Prerequisites
The Node.js project supports Python >= 3 for building and testing.
* Python support: the Node.js project supports Python >= 3.6 for building and testing.
* Memory: at least 8GB of RAM is typically required when compiling with 4 parallel jobs (e.g: `make -j4`)
### Unix and macOS
#### Unix prerequisites
* `gcc` and `g++` >= 10.1 or newer
* `gcc` and `g++` >= 12.2 or newer
* GNU Make 3.81 or newer
* [A supported version of Python][Python versions]
* For test coverage, your Python installation must include pip.
@ -594,6 +594,11 @@ rebuild may take a lot more time than previous builds. Additionally,
ran `./configure` with non-default options (such as `--debug`), you will need
to run it again before invoking `make -j4`.
If you received the error `nodejs g++ fatal error compilation terminated cc1plus`
during compilation, this is likely a memory issue and you should either provide
more RAM or create swap space to accommodate toolchain requirements or reduce
the number of parallel build tasks (`-j<n>`).
### Windows
#### Tips
@ -612,7 +617,7 @@ vcpkg integrate remove
Refs: #24448, <https://github.com/microsoft/vcpkg/issues/37518>, [vcpkg](https://github.com/microsoft/vcpkg/)
#### Prerequisites
#### Windows Prerequisites
##### Option 1: Manual install
@ -639,6 +644,8 @@ Optional requirements to build the MSI installer package:
Optional requirements for compiling for Windows on ARM (ARM64):
* Visual Studio 17.6.0 or newer
> **Note:** There is [a bug](https://github.com/nodejs/build/issues/3739) in `17.10.x`
> preventing Node.js from compiling.
* Visual Studio optional components
* Visual C++ compilers and libraries for ARM64
* Visual C++ ATL for ARM64

View File

@ -38,7 +38,10 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.4.1">22.4.1</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.6.0">22.6.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.5.1">22.5.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.5.0">22.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.4.1">22.4.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.4.0">22.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.3.0">22.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.2.0">22.2.0</a><br/>
@ -61,7 +64,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V21.md#21.0.0">21.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.15.1">20.15.1</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.16.0">20.16.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.15.1">20.15.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.15.0">20.15.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.14.0">20.14.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.13.1">20.13.1</a><br/>

58
LICENSE
View File

@ -130,6 +130,31 @@ The externally maintained libraries used by Node.js are:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- amaro, located at deps/amaro, is licensed as follows:
"""
MIT License
Copyright (c) Marco Ippolito and Amaro contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
- ICU, located at deps/icu-small, is licensed as follows:
"""
UNICODE LICENSE V3
@ -2194,39 +2219,6 @@ The externally maintained libraries used by Node.js are:
THE POSSIBILITY OF SUCH DAMAGE.
"""
- highlight.js, located at doc/api_assets/highlight.pack.js, is licensed as follows:
"""
BSD 3-Clause License
Copyright (c) 2006, Ivan Sagalaev.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- node-heapdump, located at src/heap_utils.cc, is licensed as follows:
"""
ISC License

View File

@ -175,7 +175,8 @@ with-code-cache test-code-cache:
out/Makefile: config.gypi common.gypi node.gyp \
deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
deps/simdutf/simdutf.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
tools/v8_gypfiles/toolchain.gypi \
tools/v8_gypfiles/features.gypi \
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
$(PYTHON) tools/gyp_node.py -f make
@ -253,7 +254,7 @@ coverage: coverage-test ## Run the tests and generate a coverage report.
.PHONY: coverage-build
coverage-build: all
-$(MAKE) coverage-build-js
if [ ! -d gcovr ]; then $(PYTHON) -m pip install -t gcovr gcovr==4.2; fi
if [ ! -d gcovr ]; then $(PYTHON) -m pip install -t gcovr gcovr==7.2; fi
$(MAKE)
.PHONY: coverage-build-js
@ -269,9 +270,10 @@ coverage-test: coverage-build
-NODE_V8_COVERAGE=coverage/tmp \
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)
$(MAKE) coverage-report-js
-(cd out && PYTHONPATH=../gcovr $(PYTHON) -m gcovr \
--gcov-exclude='.*\b(deps|usr|out|cctest|embedding)\b' -v \
-r ../src/ --object-directory Release/obj.target \
-(PYTHONPATH=./gcovr $(PYTHON) -m gcovr \
--object-directory=out \
--filter src -v \
--root ./ \
--html --html-details -o ../coverage/cxxcoverage.html \
--gcov-executable="$(GCOV)")
@printf "Javascript coverage %%: "
@ -1527,8 +1529,8 @@ cpplint: lint-cpp
# Try with '--system' if it fails without; the system may have set '--user'
lint-py-build:
$(info Pip installing ruff on $(shell $(PYTHON) --version)...)
$(PYTHON) -m pip install --upgrade --target tools/pip/site-packages ruff==0.4.5 || \
$(PYTHON) -m pip install --upgrade --system --target tools/pip/site-packages ruff==0.4.5
$(PYTHON) -m pip install --upgrade --target tools/pip/site-packages ruff==0.5.2 || \
$(PYTHON) -m pip install --upgrade --system --target tools/pip/site-packages ruff==0.5.2
.PHONY: lint-py
ifneq ("","$(wildcard tools/pip/site-packages/ruff)")

View File

@ -112,14 +112,9 @@ grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c -
For Current and LTS, the GPG detached signature of `SHASUMS256.txt` is in
`SHASUMS256.txt.sig`. You can use it with `gpg` to verify the integrity of
`SHASUMS256.txt`. You will first need to import
[the GPG keys of individuals authorized to create releases](#release-keys). To
import the keys:
[the GPG keys of individuals authorized to create releases](#release-keys).
```bash
gpg --keyserver hkps://keys.openpgp.org --recv-keys 4ED778F539E3634C779C87C6D7062848A1AB005C
```
See [Release keys](#release-keys) for a script to import active release keys.
See [Release keys](#release-keys) for commands to import active release keys.
Next, download the `SHASUMS256.txt.sig` for the release:
@ -164,14 +159,12 @@ For information about the governance of the Node.js project, see
* [aduh95](https://github.com/aduh95) -
**Antoine du Hamel** <<duhamelantoine1995@gmail.com>> (he/him)
* [apapirovski](https://github.com/apapirovski) -
**Anatoli Papirovski** <<apapirovski@mac.com>> (he/him)
* [anonrig](https://github.com/anonrig) -
**Yagiz Nizipli** <<yagiz@nizipli.com>> (he/him)
* [benjamingr](https://github.com/benjamingr) -
**Benjamin Gruenbaum** <<benjamingr@gmail.com>>
* [BridgeAR](https://github.com/BridgeAR) -
**Ruben Bridgewater** <<ruben@bridgewater.de>> (he/him)
* [GeoffreyBooth](https://github.com/geoffreybooth) -
**Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him)
* [gireeshpunathil](https://github.com/gireeshpunathil) -
**Gireesh Punathil** <<gpunathi@in.ibm.com>> (he/him)
* [jasnell](https://github.com/jasnell) -
@ -205,8 +198,8 @@ For information about the governance of the Node.js project, see
#### TSC regular members
* [anonrig](https://github.com/anonrig) -
**Yagiz Nizipli** <<yagiz@nizipli.com>> (he/him)
* [apapirovski](https://github.com/apapirovski) -
**Anatoli Papirovski** <<apapirovski@mac.com>> (he/him)
* [BethGriggs](https://github.com/BethGriggs) -
**Beth Griggs** <<bethanyngriggs@gmail.com>> (she/her)
* [bnoordhuis](https://github.com/bnoordhuis) -
@ -215,6 +208,8 @@ For information about the governance of the Node.js project, see
**Colin Ihrig** <<cjihrig@gmail.com>> (he/him)
* [codebytere](https://github.com/codebytere) -
**Shelley Vohr** <<shelley.vohr@gmail.com>> (she/her)
* [GeoffreyBooth](https://github.com/GeoffreyBooth) -
**Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him)
* [Trott](https://github.com/Trott) -
**Rich Trott** <<rtrott@gmail.com>> (he/him)
@ -329,7 +324,7 @@ For information about the governance of the Node.js project, see
**Deokjin Kim** <<deokjin81.kim@gmail.com>> (he/him)
* [edsadr](https://github.com/edsadr) -
**Adrian Estrada** <<edsadr@gmail.com>> (he/him)
* [erickwendel](https://github.com/erickwendel) -
* [ErickWendel](https://github.com/ErickWendel) -
**Erick Wendel** <<erick.workspace@gmail.com>> (he/him)
* [Ethan-Arrowood](https://github.com/Ethan-Arrowood) -
**Ethan Arrowood** <<ethan@arrowood.dev>> (he/him)
@ -343,7 +338,7 @@ For information about the governance of the Node.js project, see
**Gabriel Schulhof** <<gabrielschulhof@gmail.com>>
* [gengjiawen](https://github.com/gengjiawen) -
**Jiawen Geng** <<technicalcute@gmail.com>>
* [GeoffreyBooth](https://github.com/geoffreybooth) -
* [GeoffreyBooth](https://github.com/GeoffreyBooth) -
**Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him)
* [gireeshpunathil](https://github.com/gireeshpunathil) -
**Gireesh Punathil** <<gpunathi@in.ibm.com>> (he/him)
@ -355,6 +350,8 @@ For information about the governance of the Node.js project, see
**Harshitha K P** <<harshitha014@gmail.com>> (she/her)
* [himself65](https://github.com/himself65) -
**Zeyu "Alex" Yang** <<himself65@outlook.com>> (he/him)
* [jakecastelli](https://github.com/jakecastelli) -
**Jake Yuesong Li** <<jake.yuesong@gmail.com>> (he/him)
* [JakobJingleheimer](https://github.com/JakobJingleheimer) -
**Jacob Smith** <<jacob@frende.me>> (he/him)
* [jasnell](https://github.com/jasnell) -
@ -371,15 +368,13 @@ For information about the governance of the Node.js project, see
**Minwoo Jung** <<nodecorelab@gmail.com>> (he/him)
* [KhafraDev](https://github.com/KhafraDev) -
**Matthew Aitken** <<maitken033380023@gmail.com>> (he/him)
* [kuriyosh](https://github.com/kuriyosh) -
**Yoshiki Kurihara** <<yosyos0306@gmail.com>> (he/him)
* [kvakil](https://github.com/kvakil) -
**Keyhan Vakil** <<kvakil@sylph.kvakil.me>>
* [legendecas](https://github.com/legendecas) -
**Chengzhong Wu** <<legendecas@gmail.com>> (he/him)
* [lemire](https://github.com/lemire) -
**Daniel Lemire** <<daniel@lemire.me>>
* [linkgoron](https://github.com/linkgoron) -
* [Linkgoron](https://github.com/Linkgoron) -
**Nitzan Uziely** <<linkgoron@gmail.com>>
* [LiviaMedeiros](https://github.com/LiviaMedeiros) -
**LiviaMedeiros** <<livia@cirno.name>>
@ -393,6 +388,8 @@ For information about the governance of the Node.js project, see
**Marco Ippolito** <<marcoippolito54@gmail.com>> (he/him)
* [marsonya](https://github.com/marsonya) -
**Akhil Marsonya** <<akhil.marsonya27@gmail.com>> (he/him)
* [MattiasBuelens](https://github.com/MattiasBuelens) -
**Mattias Buelens** <<mattias@buelens.com>> (he/him)
* [mcollina](https://github.com/mcollina) -
**Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
* [meixg](https://github.com/meixg) -
@ -443,7 +440,7 @@ For information about the governance of the Node.js project, see
**Trivikram Kamat** <<trivikr.dev@gmail.com>>
* [Trott](https://github.com/Trott) -
**Rich Trott** <<rtrott@gmail.com>> (he/him)
* [UlisesGascon](https://github.com/ulisesgascon) -
* [UlisesGascon](https://github.com/UlisesGascon) -
**Ulises Gascón** <<ulisesgascongonzalez@gmail.com>> (he/him)
* [vmoroz](https://github.com/vmoroz) -
**Vladimir Morozov** <<vmorozov@microsoft.com>> (he/him)
@ -573,6 +570,8 @@ For information about the governance of the Node.js project, see
**Kyle Farnung** <<kfarnung@microsoft.com>> (he/him)
* [kunalspathak](https://github.com/kunalspathak) -
**Kunal Pathak** <<kunal.pathak@microsoft.com>>
* [kuriyosh](https://github.com/kuriyosh) -
**Yoshiki Kurihara** <<yosyos0306@gmail.com>> (he/him)
* [lance](https://github.com/lance) -
**Lance Ball** <<lball@redhat.com>> (he/him)
* [Leko](https://github.com/Leko) -
@ -735,20 +734,20 @@ maintaining the Node.js project.
**Daeyeon Jeong** <<daeyeon.dev@gmail.com>> (he/him)
* [F3n67u](https://github.com/F3n67u) -
**Feng Yu** <<F3n67u@outlook.com>> (he/him)
* [himadriganguly](https://github.com/himadriganguly) -
**Himadri Ganguly** <<himadri.tech@gmail.com>> (he/him)
* [gireeshpunathil](https://github.com/gireeshpunathil) -
**Gireesh Punathil** <<gpunathi@in.ibm.com>> (he/him)
* [iam-frankqiu](https://github.com/iam-frankqiu) -
**Frank Qiu** <<iam.frankqiu@gmail.com>> (he/him)
* [KevinEady](https://github.com/KevinEady) -
**Kevin Eady** <<kevin.c.eady@gmail.com>> (he/him)
* [kvakil](https://github.com/kvakil) -
**Keyhan Vakil** <<kvakil@sylph.kvakil.me>>
* [marsonya](https://github.com/marsonya) -
**Akhil Marsonya** <<akhil.marsonya27@gmail.com>> (he/him)
* [meixg](https://github.com/meixg) -
**Xuguang Mei** <<meixuguang@gmail.com>> (he/him)
* [mertcanaltin](https://github.com/mertcanaltin) -
**Mert Can Altin** <<mertgold60@gmail.com>>
* [Mesteery](https://github.com/Mesteery) -
**Mestery** <<mestery@protonmail.com>> (he/him)
* [PoojaDurgad](https://github.com/PoojaDurgad) -
**Pooja Durgad** <<Pooja.D.P@ibm.com>>
* [preveen-stack](https://github.com/preveen-stack) -
**Preveen Padmanabhan** <<wide4head@gmail.com>> (he/him)
* [RedYetiDev](https://github.com/redyetidev) -
@ -775,8 +774,6 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):
`CC68F5A3106FF448322E48ED27F5E38D5B0A215F`
* **Michaël Zasso** <<targos@protonmail.com>>
`8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600`
* **Myles Borins** <<myles.borins@gmail.com>>
`C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8`
* **Rafael Gonzaga** <<rafael.nunu@hotmail.com>>
`890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4`
* **Richard Lau** <<rlau@redhat.com>>
@ -796,7 +793,6 @@ gpg --keyserver hkps://keys.openpgp.org --recv-keys 74F12602B6F1C4E913FAA37AD3A8
gpg --keyserver hkps://keys.openpgp.org --recv-keys DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 # Juan José Arboleda
gpg --keyserver hkps://keys.openpgp.org --recv-keys CC68F5A3106FF448322E48ED27F5E38D5B0A215F # Marco Ippolito
gpg --keyserver hkps://keys.openpgp.org --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 # Michaël Zasso
gpg --keyserver hkps://keys.openpgp.org --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 # Myles Borins
gpg --keyserver hkps://keys.openpgp.org --recv-keys 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 # Rafael Gonzaga
gpg --keyserver hkps://keys.openpgp.org --recv-keys C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C # Richard Lau
gpg --keyserver hkps://keys.openpgp.org --recv-keys 108F52B48DB57BB0CC439B2997B01419BD92F80A # Ruy Adorno
@ -832,6 +828,8 @@ verify a downloaded file.
`61FC681DFB92A079F1685E77973F295594EC4689`
* **Julien Gilli** <<jgilli@fastmail.fm>>
`114F43EE0176B71C7BC219DD50A3051F888C628D`
* **Myles Borins** <<myles.borins@gmail.com>>
`C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8`
* **Rod Vagg** <<rod@vagg.org>>
`DD8F2338BAE7501E3DD5AC78C273792F7D83545D`
* **Ruben Bridgewater** <<ruben@bridgewater.de>>
@ -853,18 +851,18 @@ prioritize security releases. Security release stewards manage security
releases on a rotation basis as outlined in the
[security release process](./doc/contributing/security-release-process.md).
* Datadog
* [Datadog](https://www.datadoghq.com/)
* [bengl](https://github.com/bengl) -
**Bryan English** <<bryan@bryanenglish.com>> (he/him)
* NodeSource
* [NodeSource](https://nodesource.com/)
* [juanarbol](https://github.com/juanarbol) -
**Juan José Arboleda** <<soyjuanarbol@gmail.com>> (he/him)
* [RafaelGSS](https://github.com/RafaelGSS) -
**Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
* Platformatic
* [Platformatic](https://platformatic.dev/)
* [mcollina](https://github.com/mcollina) -
**Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
* Red Hat and IBM
* [Red Hat](https://redhat.com) / [IBM](https://ibm.com)
* [joesepi](https://github.com/joesepi) -
**Joe Sepi** <<joesepi@ibm.com>> (he/him)
* [mhdawson](https://github.com/mhdawson) -

View File

@ -33,6 +33,7 @@ function CLI(usage, settings) {
let mode = 'both'; // Possible states are: [both, option, item]
for (const arg of process.argv.slice(2)) {
if (arg === '--help') this.abort(usage);
if (arg === '--') {
// Only items can follow --
mode = 'item';

View File

@ -38,9 +38,11 @@ function runInAsyncScopes(resourceCount, cb, i = 0) {
function main({ n, resourceCount }) {
const store = new AsyncLocalStorage();
runInAsyncScopes(resourceCount, () => {
bench.start();
runBenchmark(store, n);
bench.end(n);
store.run({}, () => {
runInAsyncScopes(resourceCount, () => {
bench.start();
runBenchmark(store, n);
bench.end(n);
});
});
}

View File

@ -14,7 +14,7 @@ const { AsyncLocalStorage } = require('async_hooks');
* - AsyncLocalStorage1.getStore()
*/
const bench = common.createBenchmark(main, {
sotrageCount: [1, 10, 100],
storageCount: [1, 10, 100],
n: [1e4],
});
@ -34,8 +34,8 @@ function runStores(stores, value, cb, idx = 0) {
}
}
function main({ n, sotrageCount }) {
const stores = new Array(sotrageCount).fill(0).map(() => new AsyncLocalStorage());
function main({ n, storageCount }) {
const stores = new Array(storageCount).fill(0).map(() => new AsyncLocalStorage());
const contextValue = {};
runStores(stores, contextValue, () => {

View File

@ -16,5 +16,5 @@ function main({ n, size }) {
out += atob(input).length;
}
bench.end(n);
assert(out > 0);
assert.ok(out > 0);
}

View File

@ -16,5 +16,5 @@ function main({ n, size }) {
out += btoa(input).length;
}
bench.end(n);
assert(out > 0);
assert.ok(out > 0);
}

View File

@ -5,12 +5,6 @@ const bench = common.createBenchmark(main, {
bytes: [0, 8, 128, 32 * 1024],
partial: ['true', 'false'],
n: [6e6],
}, {
combinationFilter: (p) => {
return (p.partial === 'false' && p.bytes === 0) ||
(p.partial !== 'false' && p.bytes !== 0);
},
test: { partial: 'false', bytes: 0 },
});
function main({ n, bytes, partial }) {

View File

@ -31,7 +31,7 @@ function main({ size, type, method, n }) {
function benchFor(buffer, n) {
for (let k = 0; k < n; k++) {
for (let i = 0; i < buffer.length; i++) {
assert(buffer[i] === 0);
assert.strictEqual(buffer[i], 0);
}
}
}
@ -39,7 +39,7 @@ function benchFor(buffer, n) {
function benchForOf(buffer, n) {
for (let k = 0; k < n; k++) {
for (const b of buffer) {
assert(b === 0);
assert.strictEqual(b, 0);
}
}
}
@ -50,7 +50,7 @@ function benchIterator(buffer, n) {
let cur = iter.next();
while (!cur.done) {
assert(cur.value === 0);
assert.strictEqual(cur.value, 0);
cur = iter.next();
}

View File

@ -0,0 +1,20 @@
'use strict';
const common = require('../common.js');
const bench = common.createBenchmark(main, {
encoding: [
'utf8', 'ascii', 'latin1',
],
len: [1, 8, 16, 32],
n: [1e6],
});
function main({ len, n, encoding }) {
const buf = Buffer.allocUnsafe(len);
const string = Buffer.from('a'.repeat(len)).toString();
bench.start();
for (let i = 0; i < n; ++i) {
buf.write(string, 0, encoding);
}
bench.end(n);
}

View File

@ -45,7 +45,7 @@ function main({ n, type, method }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:

View File

@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, {
function main({ n }) {
tmpdir.refresh();
const options = { force: true, recursive: true };
const options = { recursive: true };
const src = path.join(__dirname, '../../test/fixtures/copy');
const dest = tmpdir.resolve(`${process.pid}/subdir/cp-bench-${process.pid}`);
bench.start();

View File

@ -41,7 +41,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:

View File

@ -30,7 +30,7 @@ function main({ n, type }) {
returnValue = fs.readlinkSync(tmpdir.resolve(`.readlink-sync-${i}`), { encoding: 'utf8' });
}
bench.end(n);
assert(returnValue);
assert.ok(returnValue);
break;
}
@ -45,7 +45,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:

View File

@ -49,7 +49,7 @@ function main({ n, type }) {
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:

View File

@ -23,7 +23,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
case 'valid': {

View File

@ -42,7 +42,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:

View File

@ -30,7 +30,7 @@ function main({ n, type }) {
}
bench.end(n);
assert(result);
assert.ok(result);
fs.closeSync(fd);
break;
case 'invalid': {
@ -46,7 +46,7 @@ function main({ n, type }) {
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:

View File

@ -67,7 +67,7 @@ function main(conf) {
}
function runTest(filesize, highWaterMark, encoding, n) {
assert(fs.statSync(filename).size === filesize * n);
assert.strictEqual(fs.statSync(filename).size, filesize * n);
const rs = fs.createReadStream(filename, {
highWaterMark,
encoding,

View File

@ -18,12 +18,12 @@ const availableCli = [
].filter((cli) => existsSync(path.resolve(__dirname, '../../', cli)));
const bench = common.createBenchmark(main, {
cli: availableCli,
count: [30],
n: [30],
});
function spawnProcess(cli, bench, state) {
const cmd = process.execPath || process.argv[0];
while (state.finished < state.count) {
while (state.finished < state.n) {
const child = spawnSync(cmd, [cli, '--version'], {
env: { npm_config_loglevel: 'silent', ...process.env },
});
@ -41,15 +41,15 @@ function spawnProcess(cli, bench, state) {
bench.start();
}
if (state.finished === state.count) {
bench.end(state.count);
if (state.finished === state.n) {
bench.end(state.n);
}
}
}
function main({ count, cli }) {
function main({ n, cli }) {
cli = path.resolve(__dirname, '../../', cli);
const warmup = 3;
const state = { count, finished: -warmup };
const state = { n, finished: -warmup };
spawnProcess(cli, bench, state);
}

View File

@ -12,12 +12,12 @@ const bench = common.createBenchmark(main, {
'test/fixtures/snapshot/typescript',
],
mode: ['process', 'worker'],
count: [30],
n: [30],
});
function spawnProcess(script, bench, state) {
const cmd = process.execPath || process.argv[0];
while (state.finished < state.count) {
while (state.finished < state.n) {
const child = spawnSync(cmd, [script]);
if (child.status !== 0) {
console.log('---- STDOUT ----');
@ -32,8 +32,8 @@ function spawnProcess(script, bench, state) {
bench.start();
}
if (state.finished === state.count) {
bench.end(state.count);
if (state.finished === state.n) {
bench.end(state.n);
}
}
}
@ -49,18 +49,18 @@ function spawnWorker(script, bench, state) {
// Finished warmup.
bench.start();
}
if (state.finished < state.count) {
if (state.finished < state.n) {
spawnWorker(script, bench, state);
} else {
bench.end(state.count);
bench.end(state.n);
}
});
}
function main({ count, script, mode }) {
function main({ n, script, mode }) {
script = path.resolve(__dirname, '../../', `${script}.js`);
const warmup = 3;
const state = { count, finished: -warmup };
const state = { n, finished: -warmup };
if (mode === 'worker') {
Worker = require('worker_threads').Worker;
spawnWorker(script, bench, state);

View File

@ -0,0 +1 @@
build/

View File

@ -0,0 +1,111 @@
#include <node_api.h>
#include <stdio.h>
#include <stdlib.h>
#define NODE_API_CALL(call) \
do { \
napi_status status = call; \
if (status != napi_ok) { \
fprintf(stderr, #call " failed: %d\n", status); \
abort(); \
} \
} while (0)
#define ABORT_IF_FALSE(condition) \
if (!(condition)) { \
fprintf(stderr, #condition " failed\n"); \
abort(); \
}
static napi_value Runner(napi_env env,
napi_callback_info info,
napi_value property_key) {
napi_value argv[2], undefined, js_array_length, start, end;
size_t argc = 2;
napi_valuetype val_type = napi_undefined;
bool is_array = false;
uint32_t array_length = 0;
napi_value* native_array;
// Validate params and retrieve start and end function.
NODE_API_CALL(napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr));
ABORT_IF_FALSE(argc == 2);
NODE_API_CALL(napi_typeof(env, argv[0], &val_type));
ABORT_IF_FALSE(val_type == napi_object);
NODE_API_CALL(napi_is_array(env, argv[1], &is_array));
ABORT_IF_FALSE(is_array);
NODE_API_CALL(napi_get_array_length(env, argv[1], &array_length));
NODE_API_CALL(napi_get_named_property(env, argv[0], "start", &start));
NODE_API_CALL(napi_typeof(env, start, &val_type));
ABORT_IF_FALSE(val_type == napi_function);
NODE_API_CALL(napi_get_named_property(env, argv[0], "end", &end));
NODE_API_CALL(napi_typeof(env, end, &val_type));
ABORT_IF_FALSE(val_type == napi_function);
NODE_API_CALL(napi_get_undefined(env, &undefined));
NODE_API_CALL(napi_create_uint32(env, array_length, &js_array_length));
// Copy objects into a native array.
native_array =
static_cast<napi_value*>(malloc(array_length * sizeof(napi_value)));
for (uint32_t idx = 0; idx < array_length; idx++) {
NODE_API_CALL(napi_get_element(env, argv[1], idx, &native_array[idx]));
}
// Start the benchmark.
napi_call_function(env, argv[0], start, 0, nullptr, nullptr);
for (uint32_t idx = 0; idx < array_length; idx++) {
NODE_API_CALL(
napi_set_property(env, native_array[idx], property_key, undefined));
}
// Conclude the benchmark.
NODE_API_CALL(
napi_call_function(env, argv[0], end, 1, &js_array_length, nullptr));
free(native_array);
return undefined;
}
static napi_value RunPropertyKey(napi_env env, napi_callback_info info) {
napi_value property_key;
NODE_API_CALL(node_api_create_property_key_utf16(
env, u"prop", NAPI_AUTO_LENGTH, &property_key));
return Runner(env, info, property_key);
}
static napi_value RunNormalString(napi_env env, napi_callback_info info) {
napi_value property_key;
NODE_API_CALL(
napi_create_string_utf16(env, u"prop", NAPI_AUTO_LENGTH, &property_key));
return Runner(env, info, property_key);
}
NAPI_MODULE_INIT() {
napi_property_descriptor props[] = {
{"RunPropertyKey",
nullptr,
RunPropertyKey,
nullptr,
nullptr,
nullptr,
static_cast<napi_property_attributes>(napi_writable | napi_configurable |
napi_enumerable),
nullptr},
{"RunNormalString",
nullptr,
RunNormalString,
nullptr,
nullptr,
nullptr,
static_cast<napi_property_attributes>(napi_writable | napi_configurable |
napi_enumerable),
nullptr},
};
NODE_API_CALL(napi_define_properties(
env, exports, sizeof(props) / sizeof(*props), props));
return exports;
}

View File

@ -0,0 +1,9 @@
{
'targets': [
{
'target_name': 'binding',
'sources': [ 'binding.cc' ],
'defines': [ 'NAPI_EXPERIMENTAL' ],
}
]
}

View File

@ -0,0 +1,15 @@
'use strict';
const common = require('../../common.js');
const binding = require(`./build/${common.buildType}/binding`);
const bench = common.createBenchmark(main, {
n: [5e6],
implem: ['RunPropertyKey', 'RunNormalString'],
});
function main({ n, implem }) {
const objs = Array(n).fill(null).map((item) => new Object());
binding[implem](bench, objs);
}

View File

@ -33,7 +33,7 @@ SetCount(napi_env env, napi_callback_info info) {
return NULL;
}
static void IncrementCounter(node_api_nogc_env env, void* data, void* hint) {
static void IncrementCounter(node_api_basic_env env, void* data, void* hint) {
size_t* count = data;
(*count) = (*count) + 1;
}

View File

@ -9,6 +9,7 @@ const bench = common.createBenchmark(main, {
['C:\\foo\\bar\\baz', 'C:\\foo\\bar\\baz'].join('|'),
['C:\\foo\\BAR\\BAZ', 'C:\\foo\\bar\\baz'].join('|'),
['C:\\foo\\bar\\baz\\quux', 'C:\\'].join('|'),
['c:\\İ\\a\\İ', 'c:\\İ\\b\\İ\\test.txt', '..\\..\\b\\İ\\test.txt'].join('|'),
],
n: [1e5],
});

View File

@ -0,0 +1,42 @@
'use strict';
const common = require('../common.js');
const {
PassThrough,
Readable,
Writable,
compose,
} = require('node:stream');
const bench = common.createBenchmark(main, {
n: [1e3],
});
function main({ n }) {
const cachedPassThroughs = [];
const cachedReadables = [];
const cachedWritables = [];
for (let i = 0; i < n; i++) {
const numberOfPassThroughs = 100;
const passThroughs = [];
for (let i = 0; i < numberOfPassThroughs; i++) {
passThroughs.push(new PassThrough());
}
const readable = Readable.from(['hello', 'world']);
const writable = new Writable({ objectMode: true, write: (chunk, encoding, cb) => cb() });
cachedPassThroughs.push(passThroughs);
cachedReadables.push(readable);
cachedWritables.push(writable);
}
bench.start();
for (let i = 0; i < n; i++) {
const composed = compose(cachedReadables[i], ...cachedPassThroughs[i], cachedWritables[i]);
composed.end();
}
bench.end(n);
}

View File

@ -17,7 +17,7 @@ function getMethod(url, property) {
function main({ searchParams, property, n }) {
const url = new URL('https://nodejs.org');
if (searchParams === 'true') assert(url.searchParams);
if (searchParams === 'true') assert.ok(url.searchParams);
const method = getMethod(url, property);

View File

@ -1,19 +1,19 @@
# TODO(bcoe): re-enable coverage report comments, once we can figure out
# how to make them more accurate for the Node.js project,
# See: https://github.com/nodejs/node/issues/35759
comment: false
# # Only show diff and files changed:
# layout: "diff, files"
# # Don't post if no changes in coverage:
# require_changes: true
comment:
# Only show diff and files changed:
layout: diff, files
# Don't post if no changes in coverage:
require_changes: true
codecov:
branch: main
notify:
# Wait for all coverage builds:
# - coverage-linux.yml
# - coverage-windows.yml [manually disabled see #50489]
# - coverage-linux-without-intl.yml
after_n_builds: 2
coverage:
# Useful for blocking Pull Requests that don't meet a particular coverage threshold.
status:
project: off
patch: off

View File

@ -36,7 +36,7 @@
# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.16',
'v8_embedder_string': '-node.18',
##### V8 defaults for Node.js #####
@ -113,6 +113,7 @@
['target_arch in "arm ia32 mips mipsel ppc"', {
'v8_enable_pointer_compression': 0,
'v8_enable_31bit_smis_on_64bit_arch': 0,
'v8_enable_sandbox': 0
}],
['target_arch in "ppc64 s390x"', {
'v8_enable_backtrace': 1,
@ -488,7 +489,12 @@
}],
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++20' ],
'cflags_cc': [
'-fno-rtti',
'-fno-exceptions',
'-fno-strict-aliasing',
'-std=gnu++20',
],
'defines': [ '__STDC_FORMAT_MACROS' ],
'ldflags': [ '-rdynamic' ],
'target_conditions': [
@ -619,12 +625,10 @@
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
'GCC_STRICT_ALIASING': 'NO', # -fno-strict-aliasing
'PREBINDING': 'NO', # No -Wl,-prebind
'MACOSX_DEPLOYMENT_TARGET': '11.0', # -mmacosx-version-min=11.0
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fno-strict-aliasing',
],
'WARNING_CFLAGS': [
'-Wall',
'-Wendif-labels',

View File

@ -765,6 +765,12 @@ http2_optgroup.add_argument('--debug-nghttp2',
default=None,
help='build nghttp2 with DEBUGBUILD (default is false)')
parser.add_argument('--without-amaro',
action='store_true',
dest='without_amaro',
default=None,
help='do not install the bundled Amaro (TypeScript utils)')
parser.add_argument('--without-npm',
action='store_true',
dest='without_npm',
@ -1172,8 +1178,8 @@ def check_compiler(o):
print_verbose(f"Detected {'clang ' if is_clang else ''}C++ compiler (CXX={CXX}) version: {version_str}")
if not ok:
warn(f'failed to autodetect C++ compiler version (CXX={CXX})')
elif clang_version < (8, 0, 0) if is_clang else gcc_version < (10, 1, 0):
warn(f'C++ compiler (CXX={CXX}, {version_str}) too old, need g++ 10.1.0 or clang++ 8.0.0')
elif clang_version < (8, 0, 0) if is_clang else gcc_version < (12, 2, 0):
warn(f'C++ compiler (CXX={CXX}, {version_str}) too old, need g++ 12.2.0 or clang++ 8.0.0')
ok, is_clang, clang_version, gcc_version = try_check_compiler(CC, 'c')
version_str = ".".join(map(str, clang_version if is_clang else gcc_version))
@ -1305,6 +1311,9 @@ def host_arch_win():
return matchup.get(arch, 'x64')
def set_configuration_variable(configs, name, release=None, debug=None):
configs['Release'][name] = release
configs['Debug'][name] = debug
def configure_arm(o):
if options.arm_float_abi:
@ -1377,6 +1386,7 @@ def configure_node(o):
o['variables']['node_prefix'] = options.prefix
o['variables']['node_install_npm'] = b(not options.without_npm)
o['variables']['node_install_corepack'] = b(not options.without_corepack)
o['variables']['node_use_amaro'] = b(not options.without_amaro)
o['variables']['debug_node'] = b(options.debug_node)
o['default_configuration'] = 'Debug' if options.debug else 'Release'
o['variables']['error_on_warn'] = b(options.error_on_warn)
@ -1619,12 +1629,13 @@ def configure_library(lib, output, pkgname=None):
output['libraries'] += pkg_libs.split()
def configure_v8(o):
def configure_v8(o, configs):
set_configuration_variable(configs, 'v8_enable_v8_checks', release=1, debug=0)
o['variables']['v8_enable_webassembly'] = 0 if options.v8_lite_mode else 1
o['variables']['v8_enable_javascript_promise_hooks'] = 1
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.
o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1
o['variables']['dcheck_always_on'] = 1 if options.v8_with_dchecks else 0
o['variables']['v8_enable_object_print'] = 0 if options.v8_disable_object_print else 1
@ -1634,10 +1645,10 @@ def configure_v8(o):
o['variables']['v8_enable_maglev'] = B(not options.v8_disable_maglev and
o['variables']['target_arch'] in maglev_enabled_architectures)
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_sandbox'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression or options.disable_shared_ro_heap else 1
o['variables']['v8_enable_extensible_ro_snapshot'] = 0
o['variables']['v8_enable_v8_checks'] = 1 if options.debug else 0
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
@ -2153,6 +2164,10 @@ output = {
'defines': [],
'cflags': [],
}
configurations = {
'Release': { 'variables': {} },
'Debug': { 'variables': {} },
}
# Print a warning when the compiler is too old.
check_compiler(output)
@ -2180,7 +2195,7 @@ configure_library('nghttp3', output, pkgname='libnghttp3')
configure_library('ngtcp2', output, pkgname='libngtcp2')
configure_library('sqlite', output, pkgname='sqlite3')
configure_library('uvwasi', output, pkgname='libuvwasi')
configure_v8(output)
configure_v8(output, configurations)
configure_openssl(output)
configure_intl(output)
configure_static(output)
@ -2203,7 +2218,6 @@ output['variables']['ossfuzz'] = b(options.ossfuzz)
# move everything else to target_defaults
variables = output['variables']
del output['variables']
variables['is_debug'] = B(options.debug)
# make_global_settings should be a root level element too
if 'make_global_settings' in output:
@ -2212,6 +2226,9 @@ if 'make_global_settings' in output:
else:
make_global_settings = False
# Add configurations to target defaults
output['configurations'] = configurations
output = {
'variables': variables,
'target_defaults': output,
@ -2222,7 +2239,7 @@ if make_global_settings:
print_verbose(output)
write('config.gypi', do_not_edit +
pprint.pformat(output, indent=2, width=1024) + '\n')
pprint.pformat(output, indent=2, width=128) + '\n')
write('config.status', '#!/bin/sh\nset -x\nexec ./configure ' +
' '.join([shlex.quote(arg) for arg in original_argv]) + '\n')

View File

@ -1,3 +1,33 @@
## 8.12.1 (2024-07-03)
### Bug fixes
Fix a regression that caused Acorn to no longer run on Node versions <8.10.
## 8.12.0 (2024-06-14)
### New features
Support ES2025 duplicate capture group names in regular expressions.
### Bug fixes
Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error.
Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name.
Properly recognize \"use strict\" when preceded by a string with an escaped newline.
Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors.
Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled.
Properly normalize line endings in raw strings of invalid template tokens.
Properly track line numbers for escaped newlines in strings.
Fix a bug that broke line number accounting after a template literal with invalid escape sequences.
## 8.11.3 (2023-12-29)
### Bug fixes

View File

@ -50,12 +50,11 @@ Options are provided by in a second argument, which should be an
object containing any of these fields (only `ecmaVersion` is
required):
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the
latest the library supports). This influences support for strict
mode, the set of reserved words, and support for new syntax
features.
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
number, either in year (`2022`) or plain version number (`6`) form,
or `"latest"` (the latest the library supports). This influences
support for strict mode, the set of reserved words, and support for
new syntax features.
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
implemented by Acorn. Other proposed new features must be

View File

@ -562,7 +562,7 @@ export type ModuleDeclaration =
| ExportDefaultDeclaration
| ExportAllDeclaration
export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock
export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator
export function parse(input: string, options: Options): Program
@ -573,16 +573,15 @@ export function tokenizer(input: string, options: Options): {
[Symbol.iterator](): Iterator<Token>
}
export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | "latest"
export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest"
export interface Options {
/**
* `ecmaVersion` indicates the ECMAScript version to parse. Must be
* either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
* (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
* (the latest version the library supports). This influences
* support for strict mode, the set of reserved words, and support
* for new syntax features.
* `ecmaVersion` indicates the ECMAScript version to parse. Can be a
* number, either in year (`2022`) or plain version number (`6`) form,
* or `"latest"` (the latest the library supports). This influences
* support for strict mode, the set of reserved words, and support for
* new syntax features.
*/
ecmaVersion: ecmaVersion
@ -733,7 +732,7 @@ export class Parser {
options: Options
input: string
private constructor(options: Options, input: string, startPos?: number)
protected constructor(options: Options, input: string, startPos?: number)
parse(): Program
static parse(input: string, options: Options): Program

View File

@ -562,7 +562,7 @@ export type ModuleDeclaration =
| ExportDefaultDeclaration
| ExportAllDeclaration
export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock
export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator
export function parse(input: string, options: Options): Program
@ -573,16 +573,15 @@ export function tokenizer(input: string, options: Options): {
[Symbol.iterator](): Iterator<Token>
}
export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | "latest"
export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest"
export interface Options {
/**
* `ecmaVersion` indicates the ECMAScript version to parse. Must be
* either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
* (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
* (the latest version the library supports). This influences
* support for strict mode, the set of reserved words, and support
* for new syntax features.
* `ecmaVersion` indicates the ECMAScript version to parse. Can be a
* number, either in year (`2022`) or plain version number (`6`) form,
* or `"latest"` (the latest the library supports). This influences
* support for strict mode, the set of reserved words, and support for
* new syntax features.
*/
ecmaVersion: ecmaVersion
@ -733,7 +732,7 @@ export class Parser {
options: Options
input: string
private constructor(options: Options, input: string, startPos?: number)
protected constructor(options: Options, input: string, startPos?: number)
parse(): Program
static parse(input: string, options: Options): Program

View File

@ -667,7 +667,7 @@
// ## Parser utilities
var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
var literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
pp$9.strictDirective = function(start) {
if (this.options.ecmaVersion < 5) { return false }
for (;;) {
@ -853,7 +853,7 @@
// Statement) is allowed here. If context is not empty then only a Statement
// is allowed. However, `let [` is an explicit negative lookahead for
// ExpressionStatement, so special-case it first.
if (nextCh === 91 || nextCh === 92) { return true } // '[', '/'
if (nextCh === 91 || nextCh === 92) { return true } // '[', '\'
if (context) { return false }
if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral
@ -1046,13 +1046,19 @@
return this.parseFor(node, init$1)
}
var startsWithLet = this.isContextual("let"), isForOf = false;
var containsEsc = this.containsEsc;
var refDestructuringErrors = new DestructuringErrors;
var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
var initPos = this.start;
var init = awaitAt > -1
? this.parseExprSubscripts(refDestructuringErrors, "await")
: this.parseExpression(true, refDestructuringErrors);
if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
if (this.options.ecmaVersion >= 9) {
if (this.type === types$1._in) {
if (awaitAt > -1) { this.unexpected(awaitAt); }
} else { node.await = awaitAt > -1; }
if (awaitAt > -1) { // implies `ecmaVersion >= 9` (see declaration of awaitAt)
if (this.type === types$1._in) { this.unexpected(awaitAt); }
node.await = true;
} else if (isForOf && this.options.ecmaVersion >= 8) {
if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") { this.unexpected(); }
else if (this.options.ecmaVersion >= 9) { node.await = false; }
}
if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); }
this.toAssignable(init, false, refDestructuringErrors);
@ -2665,8 +2671,7 @@
node.argument = this.parseMaybeUnary(null, true, update, forInit);
this.checkExpressionErrors(refDestructuringErrors, true);
if (update) { this.checkLValSimple(node.argument); }
else if (this.strict && node.operator === "delete" &&
node.argument.type === "Identifier")
else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument))
{ this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); }
else if (node.operator === "delete" && isPrivateFieldAccess(node.argument))
{ this.raiseRecoverable(node.start, "Private fields can not be deleted"); }
@ -2701,10 +2706,18 @@
}
};
function isLocalVariableAccess(node) {
return (
node.type === "Identifier" ||
node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression)
)
}
function isPrivateFieldAccess(node) {
return (
node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" ||
node.type === "ChainExpression" && isPrivateFieldAccess(node.expression)
node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) ||
node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression)
)
}
@ -3131,7 +3144,7 @@
this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
}
elem.value = {
raw: this.value,
raw: this.value.replace(/\r\n?/g, "\n"),
cooked: null
};
} else {
@ -3806,6 +3819,30 @@
var pp$1 = Parser.prototype;
// Track disjunction structure to determine whether a duplicate
// capture group name is allowed because it is in a separate branch.
var BranchID = function BranchID(parent, base) {
// Parent disjunction branch
this.parent = parent;
// Identifies this set of sibling branches
this.base = base || this;
};
BranchID.prototype.separatedFrom = function separatedFrom (alt) {
// A branch is separate from another branch if they or any of
// their parents are siblings in a given disjunction
for (var self = this; self; self = self.parent) {
for (var other = alt; other; other = other.parent) {
if (self.base === other.base && self !== other) { return true }
}
}
return false
};
BranchID.prototype.sibling = function sibling () {
return new BranchID(this.parent, this.base)
};
var RegExpValidationState = function RegExpValidationState(parser) {
this.parser = parser;
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : "");
@ -3822,8 +3859,9 @@
this.lastAssertionIsQuantifiable = false;
this.numCapturingParens = 0;
this.maxBackReference = 0;
this.groupNames = [];
this.groupNames = Object.create(null);
this.backReferenceNames = [];
this.branchID = null;
};
RegExpValidationState.prototype.reset = function reset (start, pattern, flags) {
@ -3955,6 +3993,11 @@
}
};
function hasProp(obj) {
for (var _ in obj) { return true }
return false
}
/**
* Validate the pattern part of a given RegExpLiteral.
*
@ -3969,7 +4012,7 @@
// |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*
// exception if _P_ did not conform to the grammar, if any elements of _P_
// were not matched by the parse, or if any Early Error conditions exist.
if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
state.switchN = true;
this.regexp_pattern(state);
}
@ -3983,8 +4026,9 @@
state.lastAssertionIsQuantifiable = false;
state.numCapturingParens = 0;
state.maxBackReference = 0;
state.groupNames.length = 0;
state.groupNames = Object.create(null);
state.backReferenceNames.length = 0;
state.branchID = null;
this.regexp_disjunction(state);
@ -4003,7 +4047,7 @@
for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {
var name = list[i];
if (state.groupNames.indexOf(name) === -1) {
if (!state.groupNames[name]) {
state.raise("Invalid named capture referenced");
}
}
@ -4011,10 +4055,14 @@
// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction
pp$1.regexp_disjunction = function(state) {
var trackDisjunction = this.options.ecmaVersion >= 16;
if (trackDisjunction) { state.branchID = new BranchID(state.branchID, null); }
this.regexp_alternative(state);
while (state.eat(0x7C /* | */)) {
if (trackDisjunction) { state.branchID = state.branchID.sibling(); }
this.regexp_alternative(state);
}
if (trackDisjunction) { state.branchID = state.branchID.parent; }
// Make the same message as V8.
if (this.regexp_eatQuantifier(state, true)) {
@ -4027,8 +4075,7 @@
// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative
pp$1.regexp_alternative = function(state) {
while (state.pos < state.source.length && this.regexp_eatTerm(state))
{ }
while (state.pos < state.source.length && this.regexp_eatTerm(state)) {}
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term
@ -4266,14 +4313,26 @@
// `?` GroupName
pp$1.regexp_groupSpecifier = function(state) {
if (state.eat(0x3F /* ? */)) {
if (this.regexp_eatGroupName(state)) {
if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
if (!this.regexp_eatGroupName(state)) { state.raise("Invalid group"); }
var trackDisjunction = this.options.ecmaVersion >= 16;
var known = state.groupNames[state.lastStringValue];
if (known) {
if (trackDisjunction) {
for (var i = 0, list = known; i < list.length; i += 1) {
var altID = list[i];
if (!altID.separatedFrom(state.branchID))
{ state.raise("Duplicate capture group name"); }
}
} else {
state.raise("Duplicate capture group name");
}
state.groupNames.push(state.lastStringValue);
return
}
state.raise("Invalid group");
if (trackDisjunction) {
(known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID);
} else {
state.groupNames[state.lastStringValue] = true;
}
}
};
@ -5778,15 +5837,18 @@
break
case "$":
if (this.input[this.pos + 1] !== "{") {
break
}
// falls through
if (this.input[this.pos + 1] !== "{") { break }
// fall through
case "`":
return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos))
// no default
case "\r":
if (this.input[this.pos + 1] === "\n") { ++this.pos; }
// fall through
case "\n": case "\u2028": case "\u2029":
++this.curLine;
this.lineStart = this.pos + 1;
break
}
}
this.raise(this.start, "Unterminated template");
@ -5849,6 +5911,7 @@
if (isNewLine(ch)) {
// Unicode new line characters after \ get removed from output in both
// template literals and strings
if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; }
return ""
}
return String.fromCharCode(ch)
@ -5927,7 +5990,7 @@
// [walk]: util/walk.js
var version = "8.11.3";
var version = "8.12.1";
Parser.acorn = {
Parser: Parser,

View File

@ -661,7 +661,7 @@ var pp$9 = Parser.prototype;
// ## Parser utilities
var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
var literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
pp$9.strictDirective = function(start) {
if (this.options.ecmaVersion < 5) { return false }
for (;;) {
@ -847,7 +847,7 @@ pp$8.isLet = function(context) {
// Statement) is allowed here. If context is not empty then only a Statement
// is allowed. However, `let [` is an explicit negative lookahead for
// ExpressionStatement, so special-case it first.
if (nextCh === 91 || nextCh === 92) { return true } // '[', '/'
if (nextCh === 91 || nextCh === 92) { return true } // '[', '\'
if (context) { return false }
if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral
@ -1040,13 +1040,19 @@ pp$8.parseForStatement = function(node) {
return this.parseFor(node, init$1)
}
var startsWithLet = this.isContextual("let"), isForOf = false;
var containsEsc = this.containsEsc;
var refDestructuringErrors = new DestructuringErrors;
var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
var initPos = this.start;
var init = awaitAt > -1
? this.parseExprSubscripts(refDestructuringErrors, "await")
: this.parseExpression(true, refDestructuringErrors);
if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
if (this.options.ecmaVersion >= 9) {
if (this.type === types$1._in) {
if (awaitAt > -1) { this.unexpected(awaitAt); }
} else { node.await = awaitAt > -1; }
if (awaitAt > -1) { // implies `ecmaVersion >= 9` (see declaration of awaitAt)
if (this.type === types$1._in) { this.unexpected(awaitAt); }
node.await = true;
} else if (isForOf && this.options.ecmaVersion >= 8) {
if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") { this.unexpected(); }
else if (this.options.ecmaVersion >= 9) { node.await = false; }
}
if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); }
this.toAssignable(init, false, refDestructuringErrors);
@ -2659,8 +2665,7 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
node.argument = this.parseMaybeUnary(null, true, update, forInit);
this.checkExpressionErrors(refDestructuringErrors, true);
if (update) { this.checkLValSimple(node.argument); }
else if (this.strict && node.operator === "delete" &&
node.argument.type === "Identifier")
else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument))
{ this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); }
else if (node.operator === "delete" && isPrivateFieldAccess(node.argument))
{ this.raiseRecoverable(node.start, "Private fields can not be deleted"); }
@ -2695,10 +2700,18 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
}
};
function isLocalVariableAccess(node) {
return (
node.type === "Identifier" ||
node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression)
)
}
function isPrivateFieldAccess(node) {
return (
node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" ||
node.type === "ChainExpression" && isPrivateFieldAccess(node.expression)
node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) ||
node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression)
)
}
@ -3125,7 +3138,7 @@ pp$5.parseTemplateElement = function(ref) {
this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
}
elem.value = {
raw: this.value,
raw: this.value.replace(/\r\n?/g, "\n"),
cooked: null
};
} else {
@ -3800,6 +3813,30 @@ for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) {
var pp$1 = Parser.prototype;
// Track disjunction structure to determine whether a duplicate
// capture group name is allowed because it is in a separate branch.
var BranchID = function BranchID(parent, base) {
// Parent disjunction branch
this.parent = parent;
// Identifies this set of sibling branches
this.base = base || this;
};
BranchID.prototype.separatedFrom = function separatedFrom (alt) {
// A branch is separate from another branch if they or any of
// their parents are siblings in a given disjunction
for (var self = this; self; self = self.parent) {
for (var other = alt; other; other = other.parent) {
if (self.base === other.base && self !== other) { return true }
}
}
return false
};
BranchID.prototype.sibling = function sibling () {
return new BranchID(this.parent, this.base)
};
var RegExpValidationState = function RegExpValidationState(parser) {
this.parser = parser;
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : "");
@ -3816,8 +3853,9 @@ var RegExpValidationState = function RegExpValidationState(parser) {
this.lastAssertionIsQuantifiable = false;
this.numCapturingParens = 0;
this.maxBackReference = 0;
this.groupNames = [];
this.groupNames = Object.create(null);
this.backReferenceNames = [];
this.branchID = null;
};
RegExpValidationState.prototype.reset = function reset (start, pattern, flags) {
@ -3949,6 +3987,11 @@ pp$1.validateRegExpFlags = function(state) {
}
};
function hasProp(obj) {
for (var _ in obj) { return true }
return false
}
/**
* Validate the pattern part of a given RegExpLiteral.
*
@ -3963,7 +4006,7 @@ pp$1.validateRegExpPattern = function(state) {
// |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*
// exception if _P_ did not conform to the grammar, if any elements of _P_
// were not matched by the parse, or if any Early Error conditions exist.
if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
state.switchN = true;
this.regexp_pattern(state);
}
@ -3977,8 +4020,9 @@ pp$1.regexp_pattern = function(state) {
state.lastAssertionIsQuantifiable = false;
state.numCapturingParens = 0;
state.maxBackReference = 0;
state.groupNames.length = 0;
state.groupNames = Object.create(null);
state.backReferenceNames.length = 0;
state.branchID = null;
this.regexp_disjunction(state);
@ -3997,7 +4041,7 @@ pp$1.regexp_pattern = function(state) {
for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {
var name = list[i];
if (state.groupNames.indexOf(name) === -1) {
if (!state.groupNames[name]) {
state.raise("Invalid named capture referenced");
}
}
@ -4005,10 +4049,14 @@ pp$1.regexp_pattern = function(state) {
// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction
pp$1.regexp_disjunction = function(state) {
var trackDisjunction = this.options.ecmaVersion >= 16;
if (trackDisjunction) { state.branchID = new BranchID(state.branchID, null); }
this.regexp_alternative(state);
while (state.eat(0x7C /* | */)) {
if (trackDisjunction) { state.branchID = state.branchID.sibling(); }
this.regexp_alternative(state);
}
if (trackDisjunction) { state.branchID = state.branchID.parent; }
// Make the same message as V8.
if (this.regexp_eatQuantifier(state, true)) {
@ -4021,8 +4069,7 @@ pp$1.regexp_disjunction = function(state) {
// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative
pp$1.regexp_alternative = function(state) {
while (state.pos < state.source.length && this.regexp_eatTerm(state))
{ }
while (state.pos < state.source.length && this.regexp_eatTerm(state)) {}
};
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term
@ -4260,14 +4307,26 @@ pp$1.regexp_eatExtendedPatternCharacter = function(state) {
// `?` GroupName
pp$1.regexp_groupSpecifier = function(state) {
if (state.eat(0x3F /* ? */)) {
if (this.regexp_eatGroupName(state)) {
if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
if (!this.regexp_eatGroupName(state)) { state.raise("Invalid group"); }
var trackDisjunction = this.options.ecmaVersion >= 16;
var known = state.groupNames[state.lastStringValue];
if (known) {
if (trackDisjunction) {
for (var i = 0, list = known; i < list.length; i += 1) {
var altID = list[i];
if (!altID.separatedFrom(state.branchID))
{ state.raise("Duplicate capture group name"); }
}
} else {
state.raise("Duplicate capture group name");
}
state.groupNames.push(state.lastStringValue);
return
}
state.raise("Invalid group");
if (trackDisjunction) {
(known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID);
} else {
state.groupNames[state.lastStringValue] = true;
}
}
};
@ -5772,15 +5831,18 @@ pp.readInvalidTemplateToken = function() {
break
case "$":
if (this.input[this.pos + 1] !== "{") {
break
}
// falls through
if (this.input[this.pos + 1] !== "{") { break }
// fall through
case "`":
return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos))
// no default
case "\r":
if (this.input[this.pos + 1] === "\n") { ++this.pos; }
// fall through
case "\n": case "\u2028": case "\u2029":
++this.curLine;
this.lineStart = this.pos + 1;
break
}
}
this.raise(this.start, "Unterminated template");
@ -5843,6 +5905,7 @@ pp.readEscapedChar = function(inTemplate) {
if (isNewLine(ch)) {
// Unicode new line characters after \ get removed from output in both
// template literals and strings
if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; }
return ""
}
return String.fromCharCode(ch)
@ -5921,7 +5984,7 @@ pp.readWord = function() {
// [walk]: util/walk.js
var version = "8.11.3";
var version = "8.12.1";
Parser.acorn = {
Parser: Parser,

View File

@ -16,7 +16,7 @@
],
"./package.json": "./package.json"
},
"version": "8.11.3",
"version": "8.12.1",
"engines": {
"node": ">=0.4.0"
},
@ -38,13 +38,13 @@
],
"repository": {
"type": "git",
"url": "https://github.com/acornjs/acorn.git"
"url": "git+https://github.com/acornjs/acorn.git"
},
"license": "MIT",
"scripts": {
"prepare": "cd ..; npm run build:main"
},
"bin": {
"acorn": "./bin/acorn"
"acorn": "bin/acorn"
}
}

21
deps/amaro/LICENSE.md vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Marco Ippolito and Amaro contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

53
deps/amaro/README.md vendored Normal file
View File

@ -0,0 +1,53 @@
# Amaro
Amaro is a wrapper around `@swc/wasm-typescript`, a WebAssembly port of the SWC TypeScript parser.
It's currently used as an internal in Node.js for [Type Stripping](https://github.com/nodejs/loaders/issues/208), but in the future it will be possible to be upgraded separately by users.
The main goal of this package is to provide a stable API for TypeScript parser, which is unstable and subject to change.
> Amaro means "bitter" in Italian. It's a reference to [Mount Amaro](https://en.wikipedia.org/wiki/Monte_Amaro_(Abruzzo)) on whose slopes this package was conceived.
## How to Install
To install Amaro, run:
```shell
npm install amaro
```
## How to Use
By default Amaro exports a `transformSync` function that performs type stripping.
Stack traces are preserved, by replacing removed types with white spaces.
```javascript
const amaro = require('amaro');
const { code } = amaro.transformSync("const foo: string = 'bar';");
console.log(code); // "const foo = 'bar';"
```
### How to update SWC
To update the SWC version, run:
```shell
./tools/update-swc.sh
git add deps
git commit -m "chore: update swc to vX.Y.Z"
```
Once you have updated the rust source code we must build the wasm.
To build the wasm it is necessary to have Docker installed.
```shell
node ./tools/build-wasm.js
git add lib
git commit -m "chore: build wasm from swc vX.Y.Z"
```
### TypeScript Version
The supported TypeScript version is 5.5.4.
## License (MIT)
See [`LICENSE.md`](./LICENSE.md).

666
deps/amaro/dist/index.js vendored Normal file

File diff suppressed because one or more lines are too long

38
deps/amaro/package.json vendored Normal file
View File

@ -0,0 +1,38 @@
{
"name": "amaro",
"version": "0.0.6",
"description": "Node.js TypeScript wrapper",
"license": "MIT",
"type": "commonjs",
"main": "dist/index.js",
"homepage": "https://github.com/nodejs/amaro#readme",
"bugs": {
"url": "https://github.com/nodejs/amaro/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/nodejs/amaro.git"
},
"scripts": {
"clean": "rimraf dist",
"lint": "biome lint --write",
"format": "biome format --write",
"ci": "biome ci",
"ci:fix": "biome check --write",
"prepack": "npm run build",
"postpack": "npm run clean",
"build": "rspack build",
"typecheck": "tsc --noEmit",
"test": "node --test --experimental-test-snapshots **/*.test.js",
"test:regenerate": "node --test --experimental-test-snapshots --test-update-snapshots **/*.test.js"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@rspack/cli": "^0.7.5",
"@rspack/core": "^0.7.5",
"@types/node": "^20.14.11",
"rimraf": "^6.0.1",
"typescript": "^5.5.3"
},
"files": ["dist", "LICENSE.md"]
}

View File

@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles)
INCLUDE (CheckStructHasMember)
INCLUDE (CheckLibraryExists)
PROJECT (c-ares LANGUAGES C VERSION "1.32.1" )
PROJECT (c-ares LANGUAGES C VERSION "1.33.0" )
# 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 "19:1:17")
SET (CARES_LIB_VERSIONINFO "20:0:18")
OPTION (CARES_STATIC "Build as a static library" OFF)
@ -42,6 +42,7 @@ OPTION (CARES_BUILD_CONTAINER_TESTS "Build and run container tests (implies CARE
OPTION (CARES_BUILD_TOOLS "Build tools" ON)
OPTION (CARES_SYMBOL_HIDING "Hide private symbols in shared libraries" OFF)
OPTION (CARES_THREADS "Build with thread-safety support" ON)
OPTION (CARES_COVERAGE "Build for code coverage" OFF)
SET (CARES_RANDOM_FILE "/dev/urandom" CACHE STRING "Suitable File / Device Path for entropy, such as /dev/urandom")
@ -265,7 +266,7 @@ IF (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "Linux")
LIST (APPEND SYSFLAGS -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700)
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
LIST (APPEND SYSFLAGS -D__EXTENSIONS__ -D_REENTRANT -D_XOPEN_SOURCE=700)
LIST (APPEND SYSFLAGS -D__EXTENSIONS__ -D_REENTRANT -D_XOPEN_SOURCE=600)
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "AIX")
LIST (APPEND SYSFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=700 -D_USE_IRS)
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
@ -409,6 +410,7 @@ CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in6" sin6_scope_id "${CMAKE_EXTRA_INCLU
CHECK_SYMBOL_EXISTS (closesocket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CLOSESOCKET)
CHECK_SYMBOL_EXISTS (CloseSocket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CLOSESOCKET_CAMEL)
CHECK_SYMBOL_EXISTS (connect "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CONNECT)
CHECK_SYMBOL_EXISTS (connectx "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CONNECTX)
CHECK_SYMBOL_EXISTS (fcntl "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_FCNTL)
CHECK_SYMBOL_EXISTS (freeaddrinfo "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_FREEADDRINFO)
CHECK_SYMBOL_EXISTS (getaddrinfo "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_GETADDRINFO)
@ -423,6 +425,10 @@ CHECK_SYMBOL_EXISTS (if_indextoname "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_IF_INDE
CHECK_SYMBOL_EXISTS (if_nametoindex "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_IF_NAMETOINDEX)
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)
CHECK_SYMBOL_EXISTS (RegisterWaitForSingleObject "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_REGISTERWAITFORSINGLEOBJECT)
CHECK_SYMBOL_EXISTS (inet_net_pton "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_INET_NET_PTON)
IF (NOT WIN32)
# Disabled on Windows, because these functions are only really supported on Windows
@ -682,6 +688,27 @@ IF (HAVE_ARPA_NAMESER_COMPAT_H)
SET (CARES_HAVE_ARPA_NAMESER_COMPAT_H 1)
ENDIF()
# Coverage
IF (CARES_COVERAGE)
# set compiler flags
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage -fprofile-arcs")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftest-coverage -fprofile-arcs")
# find required tools
FIND_PROGRAM(LCOV lcov REQUIRED)
FIND_PROGRAM(GENHTML genhtml REQUIRED)
# add coverage target
ADD_CUSTOM_TARGET(coverage
# gather data
COMMAND ${LCOV} --directory . --capture --output-file coverage.info
# generate report
COMMAND ${GENHTML} --demangle-cpp -o coverage coverage.info
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
ENDIF()
# TRANSFORM_MAKEFILE_INC
#
# This function consumes the "Makefile.inc" autotools file, and converts it into
@ -729,6 +756,8 @@ IF (CARES_BUILD_TESTS OR CARES_BUILD_CONTAINER_TESTS)
ENDIF ()
# Export targets
IF (CARES_INSTALL)
SET (CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")

View File

@ -1,5 +1,3 @@
# c-ares license
MIT License
Copyright (c) 1998 Massachusetts Institute of Technology

View File

@ -97,7 +97,19 @@ all: $(ARESBUILDH) $(OBJ_BASE) $(TARGETS) $(DEMOS) .SYMBOLIC
$(OBJ_BASE):
-$(MD) $^@
-$(MD) $^@\stat
-$(MD) $^@\stat\dsa
-$(MD) $^@\stat\event
-$(MD) $^@\stat\legacy
-$(MD) $^@\stat\record
-$(MD) $^@\stat\str
-$(MD) $^@\stat\util
-$(MD) $^@\dyn
-$(MD) $^@\dyn\dsa
-$(MD) $^@\dyn\event
-$(MD) $^@\dyn\legacy
-$(MD) $^@\dyn\record
-$(MD) $^@\dyn\str
-$(MD) $^@\dyn\util
-$(MD) $^@\tools
$(ARESBUILDH): .EXISTSONLY
@ -129,7 +141,19 @@ vclean realclean: clean .SYMBOLIC
-$(RM) $(TARGETS) $(LIBNAME).map
-$(RM) $(DEMOS) $(DEMOS:.exe=.map)
-$(RD) $(OBJ_BASE)\stat
-$(RD) $(OBJ_BASE)\stat\dsa
-$(RD) $(OBJ_BASE)\stat\event
-$(RD) $(OBJ_BASE)\stat\legacy
-$(RD) $(OBJ_BASE)\stat\record
-$(RD) $(OBJ_BASE)\stat\str
-$(RD) $(OBJ_BASE)\stat\util
-$(RD) $(OBJ_BASE)\dyn
-$(RD) $(OBJ_BASE)\dyn\dsa
-$(RD) $(OBJ_BASE)\dyn\event
-$(RD) $(OBJ_BASE)\dyn\legacy
-$(RD) $(OBJ_BASE)\dyn\record
-$(RD) $(OBJ_BASE)\dyn\str
-$(RD) $(OBJ_BASE)\dyn\util
-$(RD) $(OBJ_BASE)\tools
-$(RD) $(OBJ_BASE)
@ -144,10 +168,58 @@ $(RESOURCE): src\lib\cares.rc .AUTODEPEND
.c{$(OBJ_BASE)\dyn}.obj:
$(CC) $(CFLAGS) -bd .\src\lib\$^& -fo=$^@
.ERASE
{dsa}.c{$(OBJ_BASE)\dyn\dsa}.obj:
$(CC) $(CFLAGS) -bd .\src\lib\dsa\$^& -fo=$^@
.ERASE
{event}.c{$(OBJ_BASE)\dyn\event}.obj:
$(CC) $(CFLAGS) -bd .\src\lib\event\$^& -fo=$^@
.ERASE
{legacy}.c{$(OBJ_BASE)\dyn\legacy}.obj:
$(CC) $(CFLAGS) -bd .\src\lib\legacy\$^& -fo=$^@
.ERASE
{record}.c{$(OBJ_BASE)\dyn\record}.obj:
$(CC) $(CFLAGS) -bd .\src\lib\record\$^& -fo=$^@
.ERASE
{str}.c{$(OBJ_BASE)\dyn\str}.obj:
$(CC) $(CFLAGS) -bd .\src\lib\str\$^& -fo=$^@
.ERASE
{util}.c{$(OBJ_BASE)\dyn\util}.obj:
$(CC) $(CFLAGS) -bd .\src\lib\util\$^& -fo=$^@
.ERASE
.c{$(OBJ_BASE)\stat}.obj:
$(CC) $(CFLAGS) -DCARES_STATICLIB .\src\lib\$^& -fo=$^@
.ERASE
{dsa}.c{$(OBJ_BASE)\stat\dsa}.obj:
$(CC) $(CFLAGS) -DCARES_STATICLIB .\src\lib\dsa\$^& -fo=$^@
.ERASE
{event}.c{$(OBJ_BASE)\stat\event}.obj:
$(CC) $(CFLAGS) -DCARES_STATICLIB .\src\lib\event\$^& -fo=$^@
.ERASE
{legacy}.c{$(OBJ_BASE)\stat\legacy}.obj:
$(CC) $(CFLAGS) -DCARES_STATICLIB .\src\lib\legacy\$^& -fo=$^@
.ERASE
{record}.c{$(OBJ_BASE)\stat\record}.obj:
$(CC) $(CFLAGS) -DCARES_STATICLIB .\src\lib\record\$^& -fo=$^@
.ERASE
{str}.c{$(OBJ_BASE)\stat\str}.obj:
$(CC) $(CFLAGS) -DCARES_STATICLIB .\src\lib\str\$^& -fo=$^@
.ERASE
{util}.c{$(OBJ_BASE)\stat\util}.obj:
$(CC) $(CFLAGS) -DCARES_STATICLIB .\src\lib\util\$^& -fo=$^@
$(LINK_ARG): $(__MAKEFILES__)
%create $^@
@%append $^@ system nt dll

View File

@ -22,7 +22,7 @@
AUTOMAKE_OPTIONS = foreign nostdinc 1.9.6
ACLOCAL_AMFLAGS = -I m4 --install
MSVCFILES = msvc_ver.inc buildconf.bat
MSVCFILES = buildconf.bat
# adig and ahost are just sample programs and thus not mentioned with the
# regular sources and headers

View File

@ -5,8 +5,14 @@
#
include src/lib/Makefile.inc
CSOURCES := $(addprefix src/lib/, $(CSOURCES))
CSOURCES := $(filter-out src/lib/windows_port.c, $(CSOURCES))
OBJ_DIR = djgpp
OBJECTS = $(addprefix $(OBJ_DIR)/, \
$(CSOURCES:.c=.o))
CSRC = $(addprefix src/lib/, $(CSOURCES))
#CSRC := $(filter-out src/lib/windows_port.c, $(CSOURCES))
OBJ_SUBDIRS = $(OBJ_DIR)/dsa $(OBJ_DIR)/event $(OBJ_DIR)/legacy $(OBJ_DIR)/record $(OBJ_DIR)/str $(OBJ_DIR)/util
VPATH = src/lib src/tools
@ -17,8 +23,6 @@ VPATH = src/lib src/tools
WATT32_ROOT = $(realpath $(WATT_ROOT))
WATT32_LIB = $(WATT32_ROOT)/lib/libwatt.a
OBJ_DIR = djgpp
CFLAGS = -g -O2 -I./include -I./src/lib \
-I$(WATT32_ROOT)/inc \
-Wall \
@ -82,9 +86,6 @@ else
CC = gcc
endif
OBJECTS = $(addprefix $(OBJ_DIR)/, \
$(notdir $(CSOURCES:.c=.o)))
GENERATED = src/lib/ares_config.h \
include/ares_build.h
@ -92,7 +93,7 @@ TARGETS = libcares.a adig.exe ahost.exe
.SECONDARY: $(OBJ_DIR)/ares_getopt.o
all: $(OBJ_DIR) $(GENERATED) $(TARGETS)
all: $(OBJ_DIR) $(OBJ_SUBDIRS) $(GENERATED) $(TARGETS)
@echo Welcome to c-ares.
libcares.a: $(OBJECTS)
@ -111,15 +112,19 @@ include/ares_build.h: include/ares_build.h.dist
#
clean:
- rm -f depend.dj $(GENERATED) $(OBJ_DIR)/*.o
- rmdir $(OBJ_DIR)
- rmdir $(OBJ_SUBDIRS)
# Clean everything
#
realclean vclean: clean
- rm -f $(TARGETS) $(TARGETS:.exe=.map)
$(OBJ_DIR):
- mkdir $@
.PHONY: obj_subdirs $(OBJ_SUBDIRS)
obj_subdirs: $(OBJ_SUBDIRS)
$(OBJ_SUBDIRS):
mkdir $@
$(OBJ_DIR)/%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
@ -138,7 +143,7 @@ DEP_REPLACE = sed -e 's@\(.*\)\.o: @\n$$(OBJ_DIR)\/\1.o: @' \
# a foreign 'curl_config.h' is making trouble.
#
depend: $(GENERATED) Makefile.dj
$(CC) -MM $(CFLAGS) $(CSOURCES) | $(DEP_REPLACE) > depend.dj
$(CC) -MM $(CFLAGS) $(CSRC) | $(DEP_REPLACE) > depend.dj
-include depend.dj

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# Makefile.in generated by automake 1.17 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -91,6 +91,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
am__rm_f = rm -f $(am__rm_f_notfound)
am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -194,10 +196,9 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
{ test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
}
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
DATA = $(pkgconfig_DATA)
@ -238,8 +239,8 @@ distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \
; rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
@ -269,14 +270,16 @@ am__relativize = \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
GZIP_ENV = -9
DIST_TARGETS = dist-gzip
# Exists only to be overridden by the user if desired.
AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
distcleancheck_listfiles = \
find . \( -type f -a \! \
\( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
@ -387,8 +390,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
am__xargs_n = @am__xargs_n@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
@ -435,7 +440,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign nostdinc 1.9.6
ACLOCAL_AMFLAGS = -I m4 --install
MSVCFILES = msvc_ver.inc buildconf.bat
MSVCFILES = buildconf.bat
# adig and ahost are just sample programs and thus not mentioned with the
# regular sources and headers
@ -634,7 +639,7 @@ distdir: $(BUILT_SOURCES)
distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
$(AM_V_at)$(MKDIR_P) "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@ -748,7 +753,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@ -758,7 +763,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
*.tar.zst*) \
@ -859,12 +864,12 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-$(am__rm_f) $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
-$(am__rm_f) $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -973,3 +978,10 @@ dist-hook:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
# Tell GNU make to disable its built-in pattern rules.
%:: %,v
%:: RCS/%,v
%:: RCS/%
%:: s.%
%:: SCCS/s.%

View File

@ -75,11 +75,6 @@ RTLIBD = /MTd
USE_WATT32 = 0
!ENDIF
# --------------------------------------------------------
# Detect compiler version.
# --------------------------------------------------------
!INCLUDE .\msvc_ver.inc
# ----------------------------------------------------
# Verify that current subdir is the c-ares source one
# ----------------------------------------------------
@ -190,30 +185,13 @@ EX_LIBS_REL = ws2_32.lib advapi32.lib kernel32.lib iphlpapi.lib
EX_LIBS_DBG = ws2_32.lib advapi32.lib kernel32.lib iphlpapi.lib
!ENDIF
# -------------------------------------------------
# Switches that depend on ancient compiler versions
# -------------------------------------------------
!IF $(CC_VERS_NUM) == 60
PDB_NONE = /pdb:none
PDBTYPE_CONSOLIDATE = /pdbtype:consolidate
!ELSE
!UNDEF PDB_NONE
!UNDEF PDBTYPE_CONSOLIDATE
!ENDIF
!IF $(CC_VERS_NUM) <= 70
RT_ERROR_CHECKING = /GZ
!ELSE
RT_ERROR_CHECKING = /RTCsu
!ENDIF
# ----------------------------
# Assorted commands and flags
# ----------------------------
CC_CMD_REL = cl.exe /nologo $(RTLIB) /DNDEBUG /O2
CC_CMD_DBG = cl.exe /nologo $(RTLIBD) /D_DEBUG /Od /Zi $(RT_ERROR_CHECKING)
CC_CMD_DBG = cl.exe /nologo $(RTLIBD) /D_DEBUG /Od /Zi /RTCsu
CC_CFLAGS = $(CFLAGS) /D_REENTRANT /I.\src\lib /I.\include /W3 /EHsc /FD
RC_CMD_REL = rc.exe /l 0x409 /d "NDEBUG"
@ -223,8 +201,8 @@ LINK_CMD_LIB = link.exe /lib /nologo
LINK_CMD_DLL = link.exe /dll /nologo /incremental:no /fixed:no
LINK_CMD_EXE = link.exe /nologo /incremental:no /fixed:no /subsystem:console
LINK_CMD_EXE_REL = $(LINK_CMD_EXE) /release $(PDB_NONE)
LINK_CMD_EXE_DBG = $(LINK_CMD_EXE) /debug $(PDBTYPE_CONSOLIDATE)
LINK_CMD_EXE_REL = $(LINK_CMD_EXE) /release
LINK_CMD_EXE_DBG = $(LINK_CMD_EXE) /debug
# ---------------------------------
# Configuration dependent settings
@ -255,7 +233,7 @@ CC_CMD = $(CC_CMD_DBG)
!IF "$(CFG)" == "dll-release"
CARES_TARGET = $(DYN_LIB_REL).dll
CARES_CFLAGS = /DCARES_BUILDING_LIBRARY
CARES_LFLAGS = /release $(EX_LIBS_REL) /implib:$(CARES_OUTDIR)\$(IMP_LIB_REL).lib $(PDB_NONE)
CARES_LFLAGS = /release $(EX_LIBS_REL) /implib:$(CARES_OUTDIR)\$(IMP_LIB_REL).lib
SPROG_CFLAGS = /DCARES_NO_DEPRECATED
SPROG_LFLAGS = /libpath:$(CARES_OUTDIR) $(EX_LIBS_REL) $(IMP_LIB_REL).lib
CARES_LINK = $(LINK_CMD_DLL)
@ -268,7 +246,7 @@ RC_CMD = $(RC_CMD_REL)
!IF "$(CFG)" == "dll-debug"
CARES_TARGET = $(DYN_LIB_DBG).dll
CARES_CFLAGS = /DCARES_BUILDING_LIBRARY /DDEBUGBUILD
CARES_LFLAGS = /debug $(EX_LIBS_DBG) /implib:$(CARES_OUTDIR)\$(IMP_LIB_DBG).lib /pdb:$(CARES_OUTDIR)\$(DYN_LIB_DBG).pdb $(PDBTYPE_CONSOLIDATE)
CARES_LFLAGS = /debug $(EX_LIBS_DBG) /implib:$(CARES_OUTDIR)\$(IMP_LIB_DBG).lib /pdb:$(CARES_OUTDIR)\$(DYN_LIB_DBG).pdb
SPROG_CFLAGS = /DCARES_NO_DEPRECATED
SPROG_LFLAGS = /libpath:$(CARES_OUTDIR) $(EX_LIBS_DBG) $(IMP_LIB_DBG).lib
CARES_LINK = $(LINK_CMD_DLL)
@ -299,6 +277,7 @@ RC_CMD = $(RC_CMD_DBG)
!ERROR Problem generating CARES_OBJS list.
!ENDIF
CARES_OBJS = $(CARES_OBJS:.c=.obj)
CARES_OBJS = $(CARES_OBJS:/=\)
!IF "$(USE_RES_FILE)" == "TRUE"
CARES_OBJS = $(CARES_OBJS) $(CARES_OBJDIR)\cares.res
!ENDIF
@ -341,20 +320,38 @@ PROG3_OBJS = $(PROG3_OBJS) $(PROG3_OBJDIR)\ahost.obj
{$(SRCDIR)\src\lib}.c{$(CARES_OBJDIR)}.obj:
$(CC_CMD) $(CC_CFLAGS) $(CARES_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
{$(SRCDIR)\src\lib\dsa}.c{$(CARES_OBJDIR)\dsa}.obj:
$(CC_CMD) $(CC_CFLAGS) $(CARES_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
{$(SRCDIR)\src\lib\event}.c{$(CARES_OBJDIR)\event}.obj:
$(CC_CMD) $(CC_CFLAGS) $(CARES_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
{$(SRCDIR)\src\lib\legacy}.c{$(CARES_OBJDIR)\legacy}.obj:
$(CC_CMD) $(CC_CFLAGS) $(CARES_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
{$(SRCDIR)\src\lib\record}.c{$(CARES_OBJDIR)\record}.obj:
$(CC_CMD) $(CC_CFLAGS) $(CARES_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
{$(SRCDIR)\src\lib\str}.c{$(CARES_OBJDIR)\str}.obj:
$(CC_CMD) $(CC_CFLAGS) $(CARES_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
{$(SRCDIR)\src\lib\util}.c{$(CARES_OBJDIR)\util}.obj:
$(CC_CMD) $(CC_CFLAGS) $(CARES_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
{$(SRCDIR)\src\tools}.c{$(PROG2_OBJDIR)}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$@ /Fd$(PROG2_OBJDIR)\ /c $<
{$(SRCDIR)\src\tools}.c{$(PROG3_OBJDIR)}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$@ /Fd$(@D)\ /c $<
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$@ /Fd$(PROG3_OBJDIR)\ /c $<
# Hack Alert! we reference ../lib/ files in the Makefile.inc for tools as they
# Hack Alert! we reference ../lib/str files in the Makefile.inc for tools as they
# share some files with the library itself. We need to hack around that here.
{$(SRCDIR)\src\lib}.c{$(PROG2_OBJDIR)\..\lib}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$(PROG2_OBJDIR)\$(@F) /Fd$(PROG2_OBJDIR)\ /c $<
{$(SRCDIR)\src\lib\str}.c{$(PROG2_OBJDIR)\..\lib\str}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$(PROG2_OBJDIR)\str\$(@F) /Fd$(PROG2_OBJDIR)\str\ /c $<
{$(SRCDIR)\src\lib}.c{$(PROG3_OBJDIR)\..\lib}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$(PROG3_OBJDIR)\$(@F) /Fd$(PROG3_OBJDIR)\ /c $<
{$(SRCDIR)\src\lib\str}.c{$(PROG3_OBJDIR)\..\lib\str}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$(PROG3_OBJDIR)\str\$(@F) /Fd$(PROG3_OBJDIR)\str\ /c $<
# ------------------------------------------------------------- #
# ------------------------------------------------------------- #
@ -419,16 +416,32 @@ $(PROG3_OUTDIR): $(PROG3_DIR)
$(CARES_OBJDIR): $(CARES_OUTDIR)
@if not exist $(CARES_OBJDIR) mkdir $(CARES_OBJDIR)
@if not exist $(CARES_OBJDIR)\dsa mkdir $(CARES_OBJDIR)\dsa
@if not exist $(CARES_OBJDIR)\event mkdir $(CARES_OBJDIR)\event
@if not exist $(CARES_OBJDIR)\legacy mkdir $(CARES_OBJDIR)\legacy
@if not exist $(CARES_OBJDIR)\record mkdir $(CARES_OBJDIR)\record
@if not exist $(CARES_OBJDIR)\str mkdir $(CARES_OBJDIR)\str
@if not exist $(CARES_OBJDIR)\util mkdir $(CARES_OBJDIR)\util
$(PROG2_OBJDIR): $(PROG2_OUTDIR)
@if not exist $(PROG2_OBJDIR) mkdir $(PROG2_OBJDIR)
@if not exist $(PROG2_OBJDIR)\str mkdir $(PROG2_OBJDIR)\str
$(PROG3_OBJDIR): $(PROG3_OUTDIR)
@if not exist $(PROG3_OBJDIR) mkdir $(PROG3_OBJDIR)
@if not exist $(PROG3_OBJDIR)\str mkdir $(PROG3_OBJDIR)\str
clean:
@-RMDIR /S /Q $(CARES_OBJDIR)\dsa >NUL 2>&1
@-RMDIR /S /Q $(CARES_OBJDIR)\event >NUL 2>&1
@-RMDIR /S /Q $(CARES_OBJDIR)\legacy >NUL 2>&1
@-RMDIR /S /Q $(CARES_OBJDIR)\record >NUL 2>&1
@-RMDIR /S /Q $(CARES_OBJDIR)\str >NUL 2>&1
@-RMDIR /S /Q $(CARES_OBJDIR)\util >NUL 2>&1
@-RMDIR /S /Q $(CARES_OUTDIR) >NUL 2>&1
@-RMDIR /S /Q $(PROG2_OBJDIR)\str >NUL 2>&1
@-RMDIR /S /Q $(PROG2_OUTDIR) >NUL 2>&1
@-RMDIR /S /Q $(PROG3_OBJDIR)\str >NUL 2>&1
@-RMDIR /S /Q $(PROG3_OUTDIR) >NUL 2>&1
install:

52
deps/cares/README.md vendored
View File

@ -8,6 +8,14 @@
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=c-ares_c-ares&metric=bugs)](https://sonarcloud.io/summary/new_code?id=c-ares_c-ares)
[![Coverity Scan Status](https://scan.coverity.com/projects/c-ares/badge.svg)](https://scan.coverity.com/projects/c-ares)
- [Overview](#overview)
- [Code](#code)
- [Communication](#communication)
- [Release Keys](#release-keys)
- [Verifying signatures](#verifying-signatures)
- [Features](#features)
- [RFCs and Proposals](#supported-rfcs-and-proposals)
## Overview
[c-ares](https://c-ares.org) is a modern DNS (stub) resolver library, written in
C. It provides interfaces for asynchronous queries while trying to abstract the
@ -99,3 +107,47 @@ gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 27ED EAF2 2F3A BCEB 50DB 9A12 5CC9 08FD B71E 12C2
gpg: binary signature, digest algorithm SHA512, key algorithm rsa2048
```
## Features
### Supported RFCs and Proposals
- [RFC1035](https://datatracker.ietf.org/doc/html/rfc7873).
Initial/Base DNS RFC
- [RFC2671](https://datatracker.ietf.org/doc/html/rfc2671),
[RFC6891](https://datatracker.ietf.org/doc/html/rfc6891).
EDNS0 option (meta-RR)
- [RFC3596](https://datatracker.ietf.org/doc/html/rfc3596).
IPv6 Address. `AAAA` Record.
- [RFC2782](https://datatracker.ietf.org/doc/html/rfc2782).
Server Selection. `SRV` Record.
- [RFC3403](https://datatracker.ietf.org/doc/html/rfc3403).
Naming Authority Pointer. `NAPTR` Record.
- [RFC6698](https://datatracker.ietf.org/doc/html/rfc6698).
DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol.
`TLSA` Record.
- [RFC9460](https://datatracker.ietf.org/doc/html/rfc9460).
General Purpose Service Binding, Service Binding type for use with HTTPS.
`SVCB` and `HTTPS` Records.
- [RFC7553](https://datatracker.ietf.org/doc/html/rfc7553).
Uniform Resource Identifier. `URI` Record.
- [RFC6844](https://datatracker.ietf.org/doc/html/rfc6844).
Certification Authority Authorization. `CAA` Record.
- [RFC2535](https://datatracker.ietf.org/doc/html/rfc2535),
[RFC2931](https://datatracker.ietf.org/doc/html/rfc2931).
`SIG0` Record. Only basic parser, not full implementation.
- [RFC7873](https://datatracker.ietf.org/doc/html/rfc7873),
[RFC9018](https://datatracker.ietf.org/doc/html/rfc9018).
DNS Cookie off-path dns poisoning and amplification mitigation.
- [draft-vixie-dnsext-dns0x20-00](https://datatracker.ietf.org/doc/html/draft-vixie-dnsext-dns0x20-00).
DNS 0x20 query name case randomization to prevent cache poisioning attacks.
- [RFC7686](https://datatracker.ietf.org/doc/html/rfc7686).
Reject queries for `.onion` domain names with `NXDOMAIN`.
- [RFC2606](https://datatracker.ietf.org/doc/html/rfc2606),
[RFC6761](https://datatracker.ietf.org/doc/html/rfc6761).
Special case treatment for `localhost`/`.localhost`.
- [RFC2308](https://datatracker.ietf.org/doc/html/rfc2308),
[RFC9520](https://datatracker.ietf.org/doc/html/rfc9520).
Negative Caching of DNS Resolution Failures.
- [RFC6724](https://datatracker.ietf.org/doc/html/rfc6724).
IPv6 address sorting as used by `ares_getaddrinfo()`.
- [RFC7413](https://datatracker.ietf.org/doc/html/rfc7413).
TCP FastOpen (TFO) for 0-RTT TCP Connection Resumption.

View File

@ -1,48 +1,33 @@
## c-ares version 1.32.1 - July 7 2024
This is a bugfix release.
Bugfixes:
* Channel lock needs to be recursive to ensure calls into c-ares functions can
be made from callbacks otherwise deadlocks will occur. This regression was
introduced in 1.32.0.
## c-ares version 1.32.0 - July 4 2024
## c-ares version 1.33.0 - August 2 2024
This is a feature and bugfix release.
Features:
* Add support for DNS 0x20 to help prevent cache poisoning attacks, enabled
by specifying `ARES_FLAG_DNS0x20`. Disabled by default. [PR #800](https://github.com/c-ares/c-ares/pull/800)
* Rework query timeout logic to automatically adjust timeouts based on network
conditions. The timeout specified now is only used as a hint until there
is enough history to calculate a more valid timeout. [PR #794](https://github.com/c-ares/c-ares/pull/794)
* Add DNS cookie support (RFC7873 + RFC9018) to help prevent off-path cache
poisoning attacks. [PR #833](https://github.com/c-ares/c-ares/pull/833)
* Implement TCP FastOpen (TFO) RFC7413, which will make TCP reconnects 0-RTT
on supported systems. [PR #840](https://github.com/c-ares/c-ares/pull/840)
Changes:
* DNS RR TXT strings should not be automatically concatenated as there are use
cases outside of RFC 7208. In order to maintain ABI compliance, the ability
to retrieve TXT strings concatenated is retained as well as a new API to
retrieve the individual strings. This restores behavior from c-ares 1.20.0.
[PR #801](https://github.com/c-ares/c-ares/pull/801)
* Clean up header inclusion logic to make hacking on code easier. [PR #797](https://github.com/c-ares/c-ares/pull/797)
* GCC/Clang: Enable even more strict warnings to catch more coding flaws. [253bdee](https://github.com/c-ares/c-ares/commit/253bdee)
* MSVC: Enable `/W4` warning level. [PR #792](https://github.com/c-ares/c-ares/pull/792)
* Reorganize source tree. [PR #822](https://github.com/c-ares/c-ares/pull/822)
* Refactoring of connection handling to prevent code duplication.
[PR #839](https://github.com/c-ares/c-ares/pull/839)
* New dynamic array data structure to prevent simple logic flaws in array
handling in various code paths.
[PR #841](https://github.com/c-ares/c-ares/pull/841)
Bugfixes:
* `ares_destroy()` race condition during shutdown due to missing lock.
[PR #831](https://github.com/c-ares/c-ares/pull/831)
* Android: Preserve thread name after attaching it to JVM.
[PR #838](https://github.com/c-ares/c-ares/pull/838)
* Windows UWP (Store) support fix.
[PR #845](https://github.com/c-ares/c-ares/pull/845)
* Tests: Fix thread race condition in test cases for EventThread. [PR #803](https://github.com/c-ares/c-ares/pull/803)
* Windows: Fix building with UNICODE. [PR #802](https://github.com/c-ares/c-ares/pull/802)
* Thread Saftey: `ares_timeout()` was missing lock. [74a64e4](https://github.com/c-ares/c-ares/commit/74a64e4)
* Fix building with DJGPP (32bit protected mode DOS). [PR #789](https://github.com/c-ares/c-ares/pull/789)
Thanks go to these friendly people for their efforts and contributions for this
release:
* Brad House (@bradh352)
* Cheng (@zcbenz)
* Yauheni Khnykin (@Hsilgos)

415
deps/cares/aclocal.m4 vendored
View File

@ -1,6 +1,6 @@
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
# generated automatically by aclocal 1.17 -*- Autoconf -*-
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
# Copyright (C) 2002-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.16'
[am__api_version='1.17'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.16.5], [],
m4_if([$1], [1.17], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.16.5])dnl
[AM_AUTOMAKE_VERSION([1.17])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_COND_IF -*- Autoconf -*-
# Copyright (C) 2008-2021 Free Software Foundation, Inc.
# Copyright (C) 2008-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -147,7 +147,7 @@ fi[]dnl
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
# Copyright (C) 1997-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -178,7 +178,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -310,7 +310,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@ -369,7 +369,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -437,7 +437,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -571,7 +571,7 @@ if test -z "$CSCOPE"; then
fi
AC_SUBST([CSCOPE])
AC_REQUIRE([AM_SILENT_RULES])dnl
AC_REQUIRE([_AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
@ -579,47 +579,9 @@ AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes. So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
cat >&2 <<'END'
Oops!
AC_REQUIRE([_AM_PROG_RM_F])
AC_REQUIRE([_AM_PROG_XARGS_N])
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message. This
can help us improve future automake versions.
END
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
echo 'Configuration will proceed anyway, since you have set the' >&2
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
echo >&2
else
cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.
END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
fi
dnl The trailing newline in this macro's definition is deliberate, for
dnl backward compatibility and to allow trailing 'dnl'-style comments
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
@ -652,7 +614,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -673,7 +635,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2021 Free Software Foundation, Inc.
# Copyright (C) 2003-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -695,7 +657,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -730,7 +692,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -773,7 +735,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
# Copyright (C) 1997-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -807,7 +769,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -836,7 +798,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -883,7 +845,23 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
# Copyright (C) 2022-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_PROG_RM_F
# ---------------
# Check whether 'rm -f' without any arguments works.
# https://bugs.gnu.org/10828
AC_DEFUN([_AM_PROG_RM_F],
[am__rm_f_notfound=
AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""'])
AC_SUBST(am__rm_f_notfound)
])
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -902,16 +880,169 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_SLEEP_FRACTIONAL_SECONDS
# ----------------------------
AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl
AC_CACHE_CHECK([whether sleep supports fractional seconds],
am_cv_sleep_fractional_seconds, [dnl
AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes],
[am_cv_sleep_fractional_seconds=no])
])])
# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION
# -----------------------------------
# Determine the filesystem's resolution for file modification
# timestamps. The coarsest we know of is FAT, with a resolution
# of only two seconds, even with the most recent "exFAT" extensions.
# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one
# nanosecond, matching clock_gettime. However, it is probably not
# possible to delay execution of a shell script for less than one
# millisecond, due to process creation overhead and scheduling
# granularity, so we don't check for anything finer than that. (See below.)
AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl
AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS])
AC_CACHE_CHECK([filesystem timestamp resolution],
am_cv_filesystem_timestamp_resolution, [dnl
# Default to the worst case.
am_cv_filesystem_timestamp_resolution=2
# Only try to go finer than 1 sec if sleep can do it.
# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
# - 1 sec is not much of a win compared to 2 sec, and
# - it takes 2 seconds to perform the test whether 1 sec works.
#
# Instead, just use the default 2s on platforms that have 1s resolution,
# accept the extra 1s delay when using $sleep in the Automake tests, in
# exchange for not incurring the 2s delay for running the test for all
# packages.
#
am_try_resolutions=
if test "$am_cv_sleep_fractional_seconds" = yes; then
# Even a millisecond often causes a bunch of false positives,
# so just try a hundredth of a second. The time saved between .001 and
# .01 is not terribly consequential.
am_try_resolutions="0.01 0.1 $am_try_resolutions"
fi
# In order to catch current-generation FAT out, we must *modify* files
# that already exist; the *creation* timestamp is finer. Use names
# that make ls -t sort them differently when they have equal
# timestamps than when they have distinct timestamps, keeping
# in mind that ls -t prints the *newest* file first.
rm -f conftest.ts?
: > conftest.ts1
: > conftest.ts2
: > conftest.ts3
# Make sure ls -t actually works. Do 'set' in a subshell so we don't
# clobber the current shell's arguments. (Outer-level square brackets
# are removed by m4; they're present so that m4 does not expand
# <dollar><star>; be careful, easy to get confused.)
if (
set X `[ls -t conftest.ts[12]]` &&
{
test "$[]*" != "X conftest.ts1 conftest.ts2" ||
test "$[]*" != "X conftest.ts2 conftest.ts1";
}
); then :; else
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
_AS_ECHO_UNQUOTED(
["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""],
[AS_MESSAGE_LOG_FD])
AC_MSG_FAILURE([ls -t produces unexpected output.
Make sure there is not a broken ls alias in your environment.])
fi
for am_try_res in $am_try_resolutions; do
# Any one fine-grained sleep might happen to cross the boundary
# between two values of a coarser actual resolution, but if we do
# two fine-grained sleeps in a row, at least one of them will fall
# entirely within a coarse interval.
echo alpha > conftest.ts1
sleep $am_try_res
echo beta > conftest.ts2
sleep $am_try_res
echo gamma > conftest.ts3
# We assume that 'ls -t' will make use of high-resolution
# timestamps if the operating system supports them at all.
if (set X `ls -t conftest.ts?` &&
test "$[]2" = conftest.ts3 &&
test "$[]3" = conftest.ts2 &&
test "$[]4" = conftest.ts1); then
#
# Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
# because we don't need to test make.
make_ok=true
if test $am_try_res != 1; then
# But if we've succeeded so far with a subsecond resolution, we
# have one more thing to check: make. It can happen that
# everything else supports the subsecond mtimes, but make doesn't;
# notably on macOS, which ships make 3.81 from 2006 (the last one
# released under GPLv2). https://bugs.gnu.org/68808
#
# We test $MAKE if it is defined in the environment, else "make".
# It might get overridden later, but our hope is that in practice
# it does not matter: it is the system "make" which is (by far)
# the most likely to be broken, whereas if the user overrides it,
# probably they did so with a better, or at least not worse, make.
# https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
#
# Create a Makefile (real tab character here):
rm -f conftest.mk
echo 'conftest.ts1: conftest.ts2' >conftest.mk
echo ' touch conftest.ts2' >>conftest.mk
#
# Now, running
# touch conftest.ts1; touch conftest.ts2; make
# should touch ts1 because ts2 is newer. This could happen by luck,
# but most often, it will fail if make's support is insufficient. So
# test for several consecutive successes.
#
# (We reuse conftest.ts[12] because we still want to modify existing
# files, not create new ones, per above.)
n=0
make=${MAKE-make}
until test $n -eq 3; do
echo one > conftest.ts1
sleep $am_try_res
echo two > conftest.ts2 # ts2 should now be newer than ts1
if $make -f conftest.mk | grep 'up to date' >/dev/null; then
make_ok=false
break # out of $n loop
fi
n=`expr $n + 1`
done
fi
#
if $make_ok; then
# Everything we know to check worked out, so call this resolution good.
am_cv_filesystem_timestamp_resolution=$am_try_res
break # out of $am_try_res loop
fi
# Otherwise, we'll go on to check the next resolution.
fi
done
rm -f conftest.ts?
# (end _am_filesystem_timestamp_resolution)
])])
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION])
# This check should not be cached, as it may vary across builds of
# different projects.
AC_MSG_CHECKING([whether build environment is sane])
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@ -930,49 +1061,40 @@ esac
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
am_has_slept=no
for am_try in 1 2; do
echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
am_build_env_is_sane=no
am_has_slept=no
rm -f conftest.file
for am_try in 1 2; do
echo "timestamp, slept: $am_has_slept" > conftest.file
if (
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[]*" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
test "$[]2" = conftest.file
); then
am_build_env_is_sane=yes
break
fi
# Just in case.
sleep "$am_cv_filesystem_timestamp_resolution"
am_has_slept=yes
done
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
if test "$[2]" = conftest.file || test $am_try -eq 2; then
break
fi
# Just in case.
sleep 1
am_has_slept=yes
done
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
AC_MSG_RESULT([$am_build_env_is_sane])
if test "$am_build_env_is_sane" = no; then
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT([yes])
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
( sleep 1 ) &
AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl
( sleep "$am_cv_filesystem_timestamp_resolution" ) &
am_sleep_pid=$!
fi
])
AC_CONFIG_COMMANDS_PRE(
[AC_MSG_CHECKING([that generated files are newer than configure])
if test -n "$am_sleep_pid"; then
@ -983,18 +1105,18 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
# Copyright (C) 2009-2021 Free Software Foundation, Inc.
# Copyright (C) 2009-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
# ("yes" being less verbose, "no" or empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
[AC_ARG_ENABLE([silent-rules], [dnl
# _AM_SILENT_RULES
# ----------------
# Enable less verbose build rules support.
AC_DEFUN([_AM_SILENT_RULES],
[AM_DEFAULT_VERBOSITY=1
AC_ARG_ENABLE([silent-rules], [dnl
AS_HELP_STRING(
[--enable-silent-rules],
[less verbose build output (undo: "make V=1")])
@ -1002,11 +1124,6 @@ AS_HELP_STRING(
[--disable-silent-rules],
[verbose build output (undo: "make V=0")])dnl
])
case $enable_silent_rules in @%:@ (((
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac
dnl
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
dnl do not support nested variable expansions.
@ -1025,14 +1142,6 @@ am__doit:
else
am_cv_make_support_nested_variables=no
fi])
if test $am_cv_make_support_nested_variables = yes; then
dnl Using '$V' instead of '$(V)' breaks IRIX make.
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AC_SUBST([AM_V])dnl
AM_SUBST_NOTMAKE([AM_V])dnl
AC_SUBST([AM_DEFAULT_V])dnl
@ -1041,9 +1150,33 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
dnl to AM_SILENT_RULES to change the default value.
AC_CONFIG_COMMANDS_PRE([dnl
case $enable_silent_rules in @%:@ (((
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
esac
if test $am_cv_make_support_nested_variables = yes; then
dnl Using '$V' instead of '$(V)' breaks IRIX make.
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
])dnl
])
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
# empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
[AC_REQUIRE([_AM_SILENT_RULES])
AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])])
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1071,7 +1204,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2021 Free Software Foundation, Inc.
# Copyright (C) 2006-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1090,7 +1223,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2021 Free Software Foundation, Inc.
# Copyright (C) 2004-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1136,15 +1269,19 @@ m4_if([$1], [v7],
am_uid=`id -u || echo unknown`
am_gid=`id -g || echo unknown`
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
if test $am_uid -le $am_max_uid; then
AC_MSG_RESULT([yes])
if test x$am_uid = xunknown; then
AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work])
elif test $am_uid -le $am_max_uid; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
_am_tools=none
AC_MSG_RESULT([no])
_am_tools=none
fi
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
if test $am_gid -le $am_max_gid; then
AC_MSG_RESULT([yes])
if test x$gm_gid = xunknown; then
AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work])
elif test $am_gid -le $am_max_gid; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
_am_tools=none
@ -1221,6 +1358,26 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
# Copyright (C) 2022-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_PROG_XARGS_N
# ----------------
# Check whether 'xargs -n' works. It should work everywhere, so the fallback
# is not optimized at all as we never expect to use it.
AC_DEFUN([_AM_PROG_XARGS_N],
[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl
AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])])
AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl
am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }'
])dnl
AC_SUBST(am__xargs_n)
])
m4_include([m4/ax_ac_append_to_file.m4])
m4_include([m4/ax_ac_print_to_file.m4])
m4_include([m4/ax_add_am_macro_static.m4])

View File

@ -1,6 +1,6 @@
# aminclude_static.am generated automatically by Autoconf
# from AX_AM_MACROS_STATIC on Sun Jul 7 10:45:53 EDT 2024
# from AX_AM_MACROS_STATIC on Fri Aug 2 08:48:39 EDT 2024
# Code coverage

133
deps/cares/cares.gyp vendored
View File

@ -8,60 +8,18 @@
'include/ares_version.h',
'src/lib/ares__addrinfo2hostent.c',
'src/lib/ares__addrinfo_localhost.c',
'src/lib/ares__buf.c',
'src/lib/ares__buf.h',
'src/lib/ares__close_sockets.c',
'src/lib/ares__hosts_file.c',
'src/lib/ares__htable.c',
'src/lib/ares__htable.h',
'src/lib/ares__htable_asvp.c',
'src/lib/ares__htable_asvp.h',
'src/lib/ares__htable_strvp.c',
'src/lib/ares__htable_strvp.h',
'src/lib/ares__htable_szvp.c',
'src/lib/ares__htable_szvp.h',
'src/lib/ares__htable_vpvp.c',
'src/lib/ares__htable_vpvp.h',
'src/lib/ares__iface_ips.c',
'src/lib/ares__iface_ips.h',
'src/lib/ares__llist.c',
'src/lib/ares__llist.h',
'src/lib/ares__parse_into_addrinfo.c',
'src/lib/ares__slist.c',
'src/lib/ares__slist.h',
'src/lib/ares__socket.c',
'src/lib/ares__sortaddrinfo.c',
'src/lib/ares__threads.c',
'src/lib/ares__threads.h',
'src/lib/ares__timeval.c',
'src/lib/ares_android.c',
'src/lib/ares_android.h',
'src/lib/ares_cancel.c',
'src/lib/ares_create_query.c',
'src/lib/ares_cookie.c',
'src/lib/ares_data.c',
'src/lib/ares_data.h',
'src/lib/ares_destroy.c',
'src/lib/ares_dns_mapping.c',
'src/lib/ares_dns_multistring.c',
'src/lib/ares_dns_multistring.h',
'src/lib/ares_dns_name.c',
'src/lib/ares_dns_parse.c',
'src/lib/ares_dns_record.c',
'src/lib/ares_dns_private.h',
'src/lib/ares_dns_write.c',
'src/lib/ares_event_configchg.c',
'src/lib/ares_event.h',
'src/lib/ares_event_win32.h',
'src/lib/ares_event_epoll.c',
'src/lib/ares_event_kqueue.c',
'src/lib/ares_event_poll.c',
'src/lib/ares_event_select.c',
'src/lib/ares_event_thread.c',
'src/lib/ares_event_wake_pipe.c',
'src/lib/ares_event_win32.c',
'src/lib/ares_expand_name.c',
'src/lib/ares_expand_string.c',
'src/lib/ares_fds.c',
'src/lib/ares_free_hostent.c',
'src/lib/ares_free_string.c',
'src/lib/ares_freeaddrinfo.c',
@ -71,49 +29,94 @@
'src/lib/ares_gethostbyaddr.c',
'src/lib/ares_gethostbyname.c',
'src/lib/ares_getnameinfo.c',
'src/lib/ares_getsock.c',
'src/lib/ares_inet_net_pton.h',
'src/lib/ares_init.c',
'src/lib/ares_library_init.c',
'src/lib/ares_ipv6.h',
'src/lib/ares_math.c',
'src/lib/ares_library_init.c',
'src/lib/ares_metrics.c',
'src/lib/ares_options.c',
'src/lib/ares_parse_a_reply.c',
'src/lib/ares_parse_aaaa_reply.c',
'src/lib/ares_parse_caa_reply.c',
'src/lib/ares_parse_mx_reply.c',
'src/lib/ares_parse_naptr_reply.c',
'src/lib/ares_parse_ns_reply.c',
'src/lib/ares_parse_ptr_reply.c',
'src/lib/ares_parse_soa_reply.c',
'src/lib/ares_parse_srv_reply.c',
'src/lib/ares_parse_txt_reply.c',
'src/lib/ares_parse_uri_reply.c',
'src/lib/ares_platform.c',
'src/lib/ares_platform.h',
'src/lib/ares_private.h',
'src/lib/ares_process.c',
'src/lib/ares_qcache.c',
'src/lib/ares_query.c',
'src/lib/ares_rand.c',
'src/lib/ares_search.c',
'src/lib/ares_send.c',
'src/lib/ares_setup.h',
'src/lib/ares_strcasecmp.c',
'src/lib/ares_strcasecmp.h',
'src/lib/ares_str.c',
'src/lib/ares_str.h',
'src/lib/ares_strerror.c',
'src/lib/ares_strsplit.c',
'src/lib/ares_strsplit.h',
'src/lib/ares_sysconfig.c',
'src/lib/ares_sysconfig_files.c',
'src/lib/ares_timeout.c',
'src/lib/ares_update_servers.c',
'src/lib/ares_version.c',
'src/lib/dsa/ares__array.c',
'src/lib/dsa/ares__array.h',
'src/lib/dsa/ares__htable.c',
'src/lib/dsa/ares__htable.h',
'src/lib/dsa/ares__htable_asvp.c',
'src/lib/dsa/ares__htable_asvp.h',
'src/lib/dsa/ares__htable_strvp.c',
'src/lib/dsa/ares__htable_strvp.h',
'src/lib/dsa/ares__htable_szvp.c',
'src/lib/dsa/ares__htable_szvp.h',
'src/lib/dsa/ares__htable_vpvp.c',
'src/lib/dsa/ares__htable_vpvp.h',
'src/lib/dsa/ares__llist.c',
'src/lib/dsa/ares__llist.h',
'src/lib/dsa/ares__slist.c',
'src/lib/dsa/ares__slist.h',
'src/lib/event/ares_event.h',
'src/lib/event/ares_event_configchg.c',
'src/lib/event/ares_event_epoll.c',
'src/lib/event/ares_event_kqueue.c',
'src/lib/event/ares_event_poll.c',
'src/lib/event/ares_event_select.c',
'src/lib/event/ares_event_thread.c',
'src/lib/event/ares_event_wake_pipe.c',
'src/lib/event/ares_event_win32.c',
'src/lib/event/ares_event_win32.h',
'src/lib/inet_net_pton.c',
'src/lib/inet_ntop.c',
'src/lib/legacy/ares_create_query.c',
'src/lib/legacy/ares_expand_name.c',
'src/lib/legacy/ares_expand_string.c',
'src/lib/legacy/ares_fds.c',
'src/lib/legacy/ares_getsock.c',
'src/lib/legacy/ares_parse_a_reply.c',
'src/lib/legacy/ares_parse_aaaa_reply.c',
'src/lib/legacy/ares_parse_caa_reply.c',
'src/lib/legacy/ares_parse_mx_reply.c',
'src/lib/legacy/ares_parse_naptr_reply.c',
'src/lib/legacy/ares_parse_ns_reply.c',
'src/lib/legacy/ares_parse_ptr_reply.c',
'src/lib/legacy/ares_parse_soa_reply.c',
'src/lib/legacy/ares_parse_srv_reply.c',
'src/lib/legacy/ares_parse_txt_reply.c',
'src/lib/legacy/ares_parse_uri_reply.c',
'src/lib/record/ares_dns_mapping.c',
'src/lib/record/ares_dns_multistring.c',
'src/lib/record/ares_dns_multistring.h',
'src/lib/record/ares_dns_name.c',
'src/lib/record/ares_dns_parse.c',
'src/lib/record/ares_dns_private.h',
'src/lib/record/ares_dns_record.c',
'src/lib/record/ares_dns_write.c',
'src/lib/str/ares__buf.c',
'src/lib/str/ares__buf.h',
'src/lib/str/ares_str.c',
'src/lib/str/ares_str.h',
'src/lib/str/ares_strcasecmp.c',
'src/lib/str/ares_strcasecmp.h',
'src/lib/str/ares_strsplit.c',
'src/lib/str/ares_strsplit.h',
'src/lib/util/ares__iface_ips.c',
'src/lib/util/ares__iface_ips.h',
'src/lib/util/ares__threads.c',
'src/lib/util/ares__threads.h',
'src/lib/util/ares__timeval.c',
'src/lib/util/ares_math.c',
'src/lib/util/ares_rand.c',
'src/tools/ares_getopt.c',
'src/tools/ares_getopt.h',
],
@ -160,7 +163,7 @@
{
'target_name': 'cares',
'type': '<(library)',
'include_dirs': [ 'include' ],
'include_dirs': [ 'include', 'src/lib' ],
'direct_dependent_settings': {
'include_dirs': [ 'include' ],
'cflags': [ '-Wno-error=deprecated-declarations' ],

574
deps/cares/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.72 for c-ares 1.32.1.
# Generated by GNU Autoconf 2.72 for c-ares 1.33.0.
#
# Report bugs to <c-ares mailing list: http://lists.haxx.se/listinfo/c-ares>.
#
@ -614,8 +614,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='c-ares'
PACKAGE_TARNAME='c-ares'
PACKAGE_VERSION='1.32.1'
PACKAGE_STRING='c-ares 1.32.1'
PACKAGE_VERSION='1.33.0'
PACKAGE_STRING='c-ares 1.33.0'
PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares'
PACKAGE_URL=''
@ -729,6 +729,8 @@ LIBTOOL
OBJDUMP
DLLTOOL
AS
am__xargs_n
am__rm_f_notfound
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
@ -1415,7 +1417,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.32.1 to adapt to many kinds of systems.
'configure' configures c-ares 1.33.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1486,7 +1488,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of c-ares 1.32.1:";;
short | recursive ) echo "Configuration of c-ares 1.33.0:";;
esac
cat <<\_ACEOF
@ -1623,7 +1625,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
c-ares configure 1.32.1
c-ares configure 1.33.0
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
@ -2267,7 +2269,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.32.1, which was
It was created by c-ares $as_me 1.33.0, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
@ -3259,7 +3261,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
CARES_VERSION_INFO="19:1:17"
CARES_VERSION_INFO="20:0:18"
@ -5421,7 +5423,7 @@ printf "%s\n" "#define HAVE_CXX14 1" >>confdefs.h
fi
am__api_version='1.16'
am__api_version='1.17'
# Find a good install program. We prefer a C program (faster),
@ -5523,6 +5525,165 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5
printf %s "checking whether sleep supports fractional seconds... " >&6; }
if test ${am_cv_sleep_fractional_seconds+y}
then :
printf %s "(cached) " >&6
else case e in #(
e) if sleep 0.001 2>/dev/null
then :
am_cv_sleep_fractional_seconds=yes
else case e in #(
e) am_cv_sleep_fractional_seconds=no ;;
esac
fi
;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5
printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem timestamp resolution" >&5
printf %s "checking filesystem timestamp resolution... " >&6; }
if test ${am_cv_filesystem_timestamp_resolution+y}
then :
printf %s "(cached) " >&6
else case e in #(
e) # Default to the worst case.
am_cv_filesystem_timestamp_resolution=2
# Only try to go finer than 1 sec if sleep can do it.
# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
# - 1 sec is not much of a win compared to 2 sec, and
# - it takes 2 seconds to perform the test whether 1 sec works.
#
# Instead, just use the default 2s on platforms that have 1s resolution,
# accept the extra 1s delay when using $sleep in the Automake tests, in
# exchange for not incurring the 2s delay for running the test for all
# packages.
#
am_try_resolutions=
if test "$am_cv_sleep_fractional_seconds" = yes; then
# Even a millisecond often causes a bunch of false positives,
# so just try a hundredth of a second. The time saved between .001 and
# .01 is not terribly consequential.
am_try_resolutions="0.01 0.1 $am_try_resolutions"
fi
# In order to catch current-generation FAT out, we must *modify* files
# that already exist; the *creation* timestamp is finer. Use names
# that make ls -t sort them differently when they have equal
# timestamps than when they have distinct timestamps, keeping
# in mind that ls -t prints the *newest* file first.
rm -f conftest.ts?
: > conftest.ts1
: > conftest.ts2
: > conftest.ts3
# Make sure ls -t actually works. Do 'set' in a subshell so we don't
# clobber the current shell's arguments. (Outer-level square brackets
# are removed by m4; they're present so that m4 does not expand
# <dollar><star>; be careful, easy to get confused.)
if (
set X `ls -t conftest.ts[12]` &&
{
test "$*" != "X conftest.ts1 conftest.ts2" ||
test "$*" != "X conftest.ts2 conftest.ts1";
}
); then :; else
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
printf "%s\n" ""Bad output from ls -t: \"`ls -t conftest.ts[12]`\""" >&5
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "ls -t produces unexpected output.
Make sure there is not a broken ls alias in your environment.
See 'config.log' for more details" "$LINENO" 5; }
fi
for am_try_res in $am_try_resolutions; do
# Any one fine-grained sleep might happen to cross the boundary
# between two values of a coarser actual resolution, but if we do
# two fine-grained sleeps in a row, at least one of them will fall
# entirely within a coarse interval.
echo alpha > conftest.ts1
sleep $am_try_res
echo beta > conftest.ts2
sleep $am_try_res
echo gamma > conftest.ts3
# We assume that 'ls -t' will make use of high-resolution
# timestamps if the operating system supports them at all.
if (set X `ls -t conftest.ts?` &&
test "$2" = conftest.ts3 &&
test "$3" = conftest.ts2 &&
test "$4" = conftest.ts1); then
#
# Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
# because we don't need to test make.
make_ok=true
if test $am_try_res != 1; then
# But if we've succeeded so far with a subsecond resolution, we
# have one more thing to check: make. It can happen that
# everything else supports the subsecond mtimes, but make doesn't;
# notably on macOS, which ships make 3.81 from 2006 (the last one
# released under GPLv2). https://bugs.gnu.org/68808
#
# We test $MAKE if it is defined in the environment, else "make".
# It might get overridden later, but our hope is that in practice
# it does not matter: it is the system "make" which is (by far)
# the most likely to be broken, whereas if the user overrides it,
# probably they did so with a better, or at least not worse, make.
# https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
#
# Create a Makefile (real tab character here):
rm -f conftest.mk
echo 'conftest.ts1: conftest.ts2' >conftest.mk
echo ' touch conftest.ts2' >>conftest.mk
#
# Now, running
# touch conftest.ts1; touch conftest.ts2; make
# should touch ts1 because ts2 is newer. This could happen by luck,
# but most often, it will fail if make's support is insufficient. So
# test for several consecutive successes.
#
# (We reuse conftest.ts[12] because we still want to modify existing
# files, not create new ones, per above.)
n=0
make=${MAKE-make}
until test $n -eq 3; do
echo one > conftest.ts1
sleep $am_try_res
echo two > conftest.ts2 # ts2 should now be newer than ts1
if $make -f conftest.mk | grep 'up to date' >/dev/null; then
make_ok=false
break # out of $n loop
fi
n=`expr $n + 1`
done
fi
#
if $make_ok; then
# Everything we know to check worked out, so call this resolution good.
am_cv_filesystem_timestamp_resolution=$am_try_res
break # out of $am_try_res loop
fi
# Otherwise, we'll go on to check the next resolution.
fi
done
rm -f conftest.ts?
# (end _am_filesystem_timestamp_resolution)
;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5
printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; }
# This check should not be cached, as it may vary across builds of
# different projects.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
printf %s "checking whether build environment is sane... " >&6; }
# Reject unsafe characters in $srcdir or the absolute working directory
@ -5543,49 +5704,45 @@ esac
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
am_has_slept=no
for am_try in 1 2; do
echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
if test "$*" != "X $srcdir/configure conftest.file" \
&& test "$*" != "X conftest.file $srcdir/configure"; then
am_build_env_is_sane=no
am_has_slept=no
rm -f conftest.file
for am_try in 1 2; do
echo "timestamp, slept: $am_has_slept" > conftest.file
if (
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
test "$2" = conftest.file
); then
am_build_env_is_sane=yes
break
fi
# Just in case.
sleep "$am_cv_filesystem_timestamp_resolution"
am_has_slept=yes
done
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
if test "$2" = conftest.file || test $am_try -eq 2; then
break
fi
# Just in case.
sleep 1
am_has_slept=yes
done
test "$2" = conftest.file
)
then
# Ok.
:
else
as_fn_error $? "newly created file is older than distributed files!
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_build_env_is_sane" >&5
printf "%s\n" "$am_build_env_is_sane" >&6; }
if test "$am_build_env_is_sane" = no; then
as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
( sleep 1 ) &
if test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1
then :
else case e in #(
e) ( sleep "$am_cv_filesystem_timestamp_resolution" ) &
am_sleep_pid=$!
;;
esac
fi
rm -f conftest.file
@ -5935,17 +6092,13 @@ else
fi
AM_DEFAULT_VERBOSITY=1
# Check whether --enable-silent-rules was given.
if test ${enable_silent_rules+y}
then :
enableval=$enable_silent_rules;
fi
case $enable_silent_rules in # (((
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=1;;
esac
am_make=${MAKE-make}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
printf %s "checking whether $am_make supports nested variables... " >&6; }
@ -5968,15 +6121,45 @@ esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AM_BACKSLASH='\'
am__rm_f_notfound=
if (rm -f && rm -fr && rm -rf) 2>/dev/null
then :
else case e in #(
e) am__rm_f_notfound='""' ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5
printf %s "checking xargs -n works... " >&6; }
if test ${am_cv_xargs_n_works+y}
then :
printf %s "(cached) " >&6
else case e in #(
e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
3"
then :
am_cv_xargs_n_works=yes
else case e in #(
e) am_cv_xargs_n_works=no ;;
esac
fi ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5
printf "%s\n" "$am_cv_xargs_n_works" >&6; }
if test "$am_cv_xargs_n_works" = yes
then :
am__xargs_n='xargs -n'
else case e in #(
e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }'
;;
esac
fi
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
@ -5999,7 +6182,7 @@ fi
# Define the identity of the package.
PACKAGE='c-ares'
VERSION='1.32.1'
VERSION='1.33.0'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@ -6140,7 +6323,7 @@ else case e in #(
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@ -6270,7 +6453,7 @@ else case e in #(
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@ -6320,47 +6503,9 @@ fi
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes. So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
cat >&2 <<'END'
Oops!
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message. This
can help us improve future automake versions.
END
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
echo 'Configuration will proceed anyway, since you have set the' >&2
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
echo >&2
else
cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.
END
as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
fi
fi
case `pwd` in
*\ * | *\ *)
@ -19498,48 +19643,8 @@ fi
MAINT=$MAINTAINER_MODE_TRUE
# Check whether --enable-silent-rules was given.
if test ${enable_silent_rules+y}
then :
enableval=$enable_silent_rules;
fi
case $enable_silent_rules in # (((
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=0;;
esac
am_make=${MAKE-make}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
printf %s "checking whether $am_make supports nested variables... " >&6; }
if test ${am_cv_make_support_nested_variables+y}
then :
printf %s "(cached) " >&6
else case e in #(
e) if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
am__doit:
@$(TRUE)
.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
am_cv_make_support_nested_variables=yes
else
am_cv_make_support_nested_variables=no
fi ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AM_BACKSLASH='\'
AM_DEFAULT_VERBOSITY=0
@ -20682,7 +20787,7 @@ fi
if test "$enable_warnings" = "yes"; then
for flag in -std=c90 -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wjump-misses-init -Wlogical-op -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wno-coverage-mismatch -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wtrampolines -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Wno-long-long ; do
for flag in -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wjump-misses-init -Wlogical-op -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wno-coverage-mismatch -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wtrampolines -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Wno-long-long ; do
as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_-Werror_$flag" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
printf %s "checking whether C compiler accepts $flag... " >&6; }
@ -20751,6 +20856,155 @@ fi
done
case $host_os in
*android*)
for flag in -std=c99; do
as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_-Werror_$flag" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
printf %s "checking whether C compiler accepts $flag... " >&6; }
if eval test \${$as_CACHEVAR+y}
then :
printf %s "(cached) " >&6
else case e in #(
e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror $flag"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main (void)
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$as_CACHEVAR=yes"
else case e in #(
e) eval "$as_CACHEVAR=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$ax_check_save_flags ;;
esac
fi
eval ac_res=\$$as_CACHEVAR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if test x"`eval 'as_val=${'$as_CACHEVAR'};printf "%s\n" "$as_val"'`" = xyes
then :
if test ${AM_CFLAGS+y}
then :
case " $AM_CFLAGS " in
*" $flag "*)
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS already contains \$flag"; } >&5
(: AM_CFLAGS already contains $flag) 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
;;
*)
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS=\"\$AM_CFLAGS \$flag\""; } >&5
(: AM_CFLAGS="$AM_CFLAGS $flag") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
AM_CFLAGS="$AM_CFLAGS $flag"
;;
esac
else case e in #(
e) AM_CFLAGS="$flag" ;;
esac
fi
else case e in #(
e) : ;;
esac
fi
done
;;
*)
for flag in -std=c90; do
as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_-Werror_$flag" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
printf %s "checking whether C compiler accepts $flag... " >&6; }
if eval test \${$as_CACHEVAR+y}
then :
printf %s "(cached) " >&6
else case e in #(
e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror $flag"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main (void)
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$as_CACHEVAR=yes"
else case e in #(
e) eval "$as_CACHEVAR=no" ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$ax_check_save_flags ;;
esac
fi
eval ac_res=\$$as_CACHEVAR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if test x"`eval 'as_val=${'$as_CACHEVAR'};printf "%s\n" "$as_val"'`" = xyes
then :
if test ${AM_CFLAGS+y}
then :
case " $AM_CFLAGS " in
*" $flag "*)
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS already contains \$flag"; } >&5
(: AM_CFLAGS already contains $flag) 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
;;
*)
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_CFLAGS=\"\$AM_CFLAGS \$flag\""; } >&5
(: AM_CFLAGS="$AM_CFLAGS $flag") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
AM_CFLAGS="$AM_CFLAGS $flag"
;;
esac
else case e in #(
e) AM_CFLAGS="$flag" ;;
esac
fi
else case e in #(
e) : ;;
esac
fi
done
;;
esac
fi
if test "$ax_cv_c_compiler_vendor" = "intel"; then
@ -22622,6 +22876,14 @@ then :
printf "%s\n" "#define HAVE_CONNECT 1" >>confdefs.h
fi
ac_fn_check_decl "$LINENO" "connectx" "ac_cv_have_decl_connectx" "$cares_all_includes
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_connectx" = xyes
then :
printf "%s\n" "#define HAVE_CONNECTX 1" >>confdefs.h
fi
ac_fn_check_decl "$LINENO" "closesocket" "ac_cv_have_decl_closesocket" "$cares_all_includes
" "$ac_c_undeclared_builtin_options" "CFLAGS"
@ -22910,6 +23172,22 @@ then :
printf "%s\n" "#define HAVE_CONVERTINTERFACELUIDTONAMEA 1" >>confdefs.h
fi
ac_fn_check_decl "$LINENO" "NotifyIpInterfaceChange" "ac_cv_have_decl_NotifyIpInterfaceChange" "$cares_all_includes
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_NotifyIpInterfaceChange" = xyes
then :
printf "%s\n" "#define HAVE_NOTIFYIPINTERFACECHANGE 1" >>confdefs.h
fi
ac_fn_check_decl "$LINENO" "RegisterWaitForSingleObject" "ac_cv_have_decl_RegisterWaitForSingleObject" "$cares_all_includes
" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_RegisterWaitForSingleObject" = xyes
then :
printf "%s\n" "#define HAVE_REGISTERWAITFORSINGLEOBJECT 1" >>confdefs.h
fi
ac_fn_check_decl "$LINENO" "__system_property_get" "ac_cv_have_decl___system_property_get" "$cares_all_includes
" "$ac_c_undeclared_builtin_options" "CFLAGS"
@ -25912,6 +26190,18 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
case $enable_silent_rules in # (((
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
esac
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@ -26339,7 +26629,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.32.1, which was
This file was extended by c-ares $as_me 1.33.0, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -26407,7 +26697,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.32.1
c-ares config.status 1.33.0
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"

View File

@ -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.32.1],
AC_INIT([c-ares], [1.33.0],
[c-ares mailing list: http://lists.haxx.se/listinfo/c-ares])
CARES_VERSION_INFO="19:1:17"
CARES_VERSION_INFO="20:0:18"
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.
@ -245,8 +245,18 @@ AC_SUBST(CARES_SYMBOL_HIDING_CFLAG)
if test "$enable_warnings" = "yes"; then
AX_APPEND_COMPILE_FLAGS([-std=c90 -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wjump-misses-init -Wlogical-op -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wno-coverage-mismatch -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wtrampolines -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Wno-long-long ],
AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wjump-misses-init -Wlogical-op -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wno-coverage-mismatch -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wtrampolines -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Wno-long-long ],
[AM_CFLAGS], [-Werror])
dnl Android requires c99, all others should use c90
case $host_os in
*android*)
AX_APPEND_COMPILE_FLAGS([-std=c99], [AM_CFLAGS], [-Werror])
;;
*)
AX_APPEND_COMPILE_FLAGS([-std=c90], [AM_CFLAGS], [-Werror])
;;
esac
fi
if test "$ax_cv_c_compiler_vendor" = "intel"; then
@ -538,6 +548,7 @@ AC_CHECK_DECL(send, [AC_DEFINE([HAVE_SEND], 1, [Define t
AC_CHECK_DECL(getnameinfo, [AC_DEFINE([HAVE_GETNAMEINFO], 1, [Define to 1 if you have `getnameinfo`] )], [], $cares_all_includes)
AC_CHECK_DECL(gethostname, [AC_DEFINE([HAVE_GETHOSTNAME], 1, [Define to 1 if you have `gethostname`] )], [], $cares_all_includes)
AC_CHECK_DECL(connect, [AC_DEFINE([HAVE_CONNECT], 1, [Define to 1 if you have `connect`] )], [], $cares_all_includes)
AC_CHECK_DECL(connectx, [AC_DEFINE([HAVE_CONNECTX], 1, [Define to 1 if you have `connectx`] )], [], $cares_all_includes)
AC_CHECK_DECL(closesocket, [AC_DEFINE([HAVE_CLOSESOCKET], 1, [Define to 1 if you have `closesocket`] )], [], $cares_all_includes)
AC_CHECK_DECL(CloseSocket, [AC_DEFINE([HAVE_CLOSESOCKET_CAMEL], 1, [Define to 1 if you have `CloseSocket`] )], [], $cares_all_includes)
AC_CHECK_DECL(fcntl, [AC_DEFINE([HAVE_FCNTL], 1, [Define to 1 if you have `fcntl`] )], [], $cares_all_includes)
@ -574,6 +585,8 @@ AC_CHECK_DECL(kqueue, [AC_DEFINE([HAVE_KQUEUE], 1, [Define t
AC_CHECK_DECL(epoll_create1, [AC_DEFINE([HAVE_EPOLL], 1, [Define to 1 if you have `epoll_{create1,ctl,wait}`])], [], $cares_all_includes)
AC_CHECK_DECL(ConvertInterfaceIndexToLuid, [AC_DEFINE([HAVE_CONVERTINTERFACEINDEXTOLUID], 1, [Define to 1 if you have `ConvertInterfaceIndexToLuid`])], [], $cares_all_includes)
AC_CHECK_DECL(ConvertInterfaceLuidToNameA, [AC_DEFINE([HAVE_CONVERTINTERFACELUIDTONAMEA], 1, [Define to 1 if you have `ConvertInterfaceLuidToNameA`])], [], $cares_all_includes)
AC_CHECK_DECL(NotifyIpInterfaceChange, [AC_DEFINE([HAVE_NOTIFYIPINTERFACECHANGE], 1, [Define to 1 if you have `NotifyIpInterfaceChange`] )], [], $cares_all_includes)
AC_CHECK_DECL(RegisterWaitForSingleObject, [AC_DEFINE([HAVE_REGISTERWAITFORSINGLEOBJECT], 1, [Define to 1 if you have `RegisterWaitForSingleObject`])], [], $cares_all_includes)
AC_CHECK_DECL(__system_property_get, [AC_DEFINE([HAVE___SYSTEM_PROPERTY_GET], 1, [Define to 1 if you have `__system_property_get`] )], [], $cares_all_includes)

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# Makefile.in generated by automake 1.17 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -72,6 +72,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
am__rm_f = rm -f $(am__rm_f_notfound)
am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -166,10 +168,9 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
{ test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
}
man3dir = $(mandir)/man3
am__installdirs = "$(DESTDIR)$(man3dir)"
@ -288,8 +289,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
am__xargs_n = @am__xargs_n@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
@ -374,6 +377,7 @@ MANPAGES = ares_cancel.3 \
ares_dns_record_rr_del.3 \
ares_dns_record_rr_get.3 \
ares_dns_record_rr_get_const.3 \
ares_dns_record_set_id.3 \
ares_dns_rec_type_fromstr.3 \
ares_dns_rec_type_tostr.3 \
ares_dns_rec_type_t.3 \
@ -637,8 +641,8 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -732,3 +736,10 @@ uninstall-man: uninstall-man3
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
# Tell GNU make to disable its built-in pattern rules.
%:: %,v
%:: RCS/%,v
%:: RCS/%
%:: s.%
%:: SCCS/s.%

View File

@ -36,6 +36,7 @@ MANPAGES = ares_cancel.3 \
ares_dns_record_rr_del.3 \
ares_dns_record_rr_get.3 \
ares_dns_record_rr_get_const.3 \
ares_dns_record_set_id.3 \
ares_dns_rec_type_fromstr.3 \
ares_dns_rec_type_tostr.3 \
ares_dns_rec_type_t.3 \

View File

@ -32,6 +32,9 @@ ares_dns_record_t *ares_dns_record_duplicate(const ares_dns_record_t *dnsrec);
unsigned short ares_dns_record_get_id(const ares_dns_record_t *dnsrec);
ares_bool_t ares_dns_record_set_id(ares_dns_record_t *dnsrec,
unsigned short id);
unsigned short ares_dns_record_get_flags(const ares_dns_record_t *dnsrec);
ares_dns_opcode_t ares_dns_record_get_opcode(const ares_dns_record_t *dnsrec);
@ -343,6 +346,14 @@ message id from the DNS record provided in the
.IR dnsrec
parameter.
The \fIares_dns_record_set_id(3)\fP function is used to set the DNS
message id in the
.IR id
parameter from the DNS record provided in the
.IR dnsrec
parameter. This id will be overwritten when passing the record to c-ares,
so mostly exists for external purposes.
The \fIares_dns_record_get_flags(3)\fP function is used to retrieve the DNS
message flags from the DNS record provided in the
.IR dnsrec
@ -428,12 +439,12 @@ is returned on out of memory,
.B ARES_EFORMERR
is returned on misuse.
\fIares_dns_record_get_id(3)\fP, \fIares_dns_record_get_flags(3)\fP,
\fIares_dns_record_get_opcode(3)\fP, \fIares_dns_record_get_rcode(3)\fP, and
\fIares_dns_record_query_cnt(3)\fP all returned their prescribed datatype
values and in general can't fail except for misuse cases, in which a 0 may
be returned, however 0 can also be a valid return value for most of these
functions.
\fIares_dns_record_get_id(3)\fP, \fIares_dns_record_set_id(3)\fP,
\fIares_dns_record_get_flags(3)\fP, \fIares_dns_record_get_opcode(3)\fP,
\fIares_dns_record_get_rcode(3)\fP, and \fIares_dns_record_query_cnt(3)\fP
all returned their prescribed datatype values and in general can't fail except
for misuse cases, in which a 0 may be returned, however 0 can also be a valid
return value for most of these functions.
.SH AVAILABILITY

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -96,6 +96,10 @@ ares_status_t ares_dns_rr_set_opt(ares_dns_rr_t *dns_rr,
const unsigned char *val,
size_t val_len);
ares_status_t ares_dns_rr_del_opt_byid(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
unsigned short opt);
const struct in_addr *ares_dns_rr_get_addr(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key);
@ -553,7 +557,7 @@ parameter, and the index to remove is provided in the
parameter.
The \fIares_dns_rr_set_opt(3)\fP function is used to set option/parameter keys and
values for the resource record when the datatype if \fIARES_DATATYPE_OPT\fP. The
values for the resource record when the datatype is \fIARES_DATATYPE_OPT\fP. The
resource record to be modified is provided in the
.IR dns_rr
parameter. They key/parameter is provided in the
@ -568,6 +572,18 @@ enumerations. The value for the option is always provided in binary form in
with length provided in
.IR val_len.
The \fIares_dns_rr_del_opt_byid(3)\fP function is used to delete option/parameter
keys and values for the resource record when the datatype is
\fIARES_DATATYPE_OPT\fP. The resource record to be modified is provided in the
.IR dns_rr
parameter. They key/parameter is provided in the
.IR key
parameter. The option/parameter value specific to the resource record is provided
in the
.IR opt
parameter. This function returns \fIARES_SUCCESS\fP if the record is successfully
removed, or \fIARES_ENOTFOUND\fP if the record could not be found.
The \fIares_dns_rr_get_addr(3)\fP function is used to retrieve the IPv4 address
from the resource record when the datatype is \fIARES_DATATYPE_INADDR\fP. The
resource record is provided in the
@ -635,7 +651,7 @@ parameter and the key/parameter to retrieve is provided in the
.IR key
parameter.
The \fIares_dns_rr_get_abin(3)\fP function is used to retrive binary data from
The \fIares_dns_rr_get_abin(3)\fP function is used to retrieve binary data from
the resource record array when the datatype is \fIARES_DATATYPE_ABINP\fP.
The resource record is provided in the
.IR dns_rr

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# Makefile.in generated by automake 1.17 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -70,6 +70,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
am__rm_f = rm -f $(am__rm_f_notfound)
am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -162,10 +164,9 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
{ test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
}
am__installdirs = "$(DESTDIR)$(includedir)"
HEADERS = $(include_HEADERS)
@ -299,8 +300,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
am__xargs_n = @am__xargs_n@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
@ -393,8 +396,8 @@ ares_build.h: stamp-h2
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2
stamp-h2: $(srcdir)/ares_build.h.in $(top_builddir)/config.status
@rm -f stamp-h2
cd $(top_builddir) && $(SHELL) ./config.status include/ares_build.h
$(AM_V_at)rm -f stamp-h2
$(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status include/ares_build.h
distclean-hdr:
-rm -f ares_build.h stamp-h2
@ -541,8 +544,8 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -635,3 +638,10 @@ uninstall-am: uninstall-includeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
# Tell GNU make to disable its built-in pattern rules.
%:: %,v
%:: RCS/%,v
%:: RCS/%
%:: s.%
%:: SCCS/s.%

View File

@ -95,7 +95,7 @@
#endif
typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
#ifdef __cplusplus
extern "C" {

View File

@ -152,28 +152,28 @@ typedef enum {
ARES_RCODE_BADNAME = 20, /*!< RFC 2930. Duplicate Key Name */
ARES_RCODE_BADALG = 21, /*!< RFC 2930. Algorithm not supported */
ARES_RCODE_BADTRUNC = 22, /*!< RFC 8945. Bad Truncation */
ARES_RCODE_BADCOOKIE = 23 /*!< RVC 7973. Bad/missing Server Cookie */
ARES_RCODE_BADCOOKIE = 23 /*!< RFC 7873. Bad/missing Server Cookie */
} ares_dns_rcode_t;
/*! Data types used */
typedef enum {
ARES_DATATYPE_INADDR = 1, /*!< struct in_addr * type */
ARES_DATATYPE_INADDR6 = 2, /*!< struct ares_in6_addr * type */
ARES_DATATYPE_U8 = 3, /*!< 8bit unsigned integer */
ARES_DATATYPE_U16 = 4, /*!< 16bit unsigned integer */
ARES_DATATYPE_U32 = 5, /*!< 32bit unsigned integer */
ARES_DATATYPE_NAME = 6, /*!< Null-terminated string of a domain name */
ARES_DATATYPE_STR = 7, /*!< Null-terminated string */
ARES_DATATYPE_BIN = 8, /*!< Binary data */
ARES_DATATYPE_BINP = 9, /*!< Officially defined as binary data, but likely
* printable. Guaranteed to have a NULL
* terminator for convenience (not included in
* length) */
ARES_DATATYPE_OPT = 10, /*!< Array of options. 16bit identifier, BIN
* data. */
ARES_DATATYPE_ABINP = 11 /*!< Array of binary data, likely printable.
* Guaranteed to have a NULL terminator for
* convenience (not included in length) */
ARES_DATATYPE_INADDR = 1, /*!< struct in_addr * type */
ARES_DATATYPE_INADDR6 = 2, /*!< struct ares_in6_addr * type */
ARES_DATATYPE_U8 = 3, /*!< 8bit unsigned integer */
ARES_DATATYPE_U16 = 4, /*!< 16bit unsigned integer */
ARES_DATATYPE_U32 = 5, /*!< 32bit unsigned integer */
ARES_DATATYPE_NAME = 6, /*!< Null-terminated string of a domain name */
ARES_DATATYPE_STR = 7, /*!< Null-terminated string */
ARES_DATATYPE_BIN = 8, /*!< Binary data */
ARES_DATATYPE_BINP = 9, /*!< Officially defined as binary data, but likely
* printable. Guaranteed to have a NULL
* terminator for convenience (not included in
* length) */
ARES_DATATYPE_OPT = 10, /*!< Array of options. 16bit identifier, BIN
* data. */
ARES_DATATYPE_ABINP = 11 /*!< Array of binary data, likely printable.
* Guaranteed to have a NULL terminator for
* convenience (not included in length) */
} ares_dns_datatype_t;
/*! Keys used for all RR Types. We take the record type and multiply by 100
@ -609,8 +609,8 @@ CARES_EXTERN unsigned short
* \param[in] id DNS query id
* \return ARES_TRUE on success, ARES_FALSE on usage error
*/
CARES_EXTERN ares_bool_t
ares_dns_record_set_id(ares_dns_record_t *dnsrec, unsigned short id);
CARES_EXTERN ares_bool_t ares_dns_record_set_id(ares_dns_record_t *dnsrec,
unsigned short id);
/*! Get the DNS Record Flags
*
@ -885,10 +885,10 @@ CARES_EXTERN ares_status_t ares_dns_rr_set_bin(ares_dns_rr_t *dns_rr,
* \param[in] len Length of binary data
* \return ARES_SUCCESS on success
*/
CARES_EXTERN ares_status_t ares_dns_rr_add_abin(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
CARES_EXTERN ares_status_t ares_dns_rr_add_abin(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
const unsigned char *val,
size_t len);
size_t len);
/*! Delete binary array value (ABINP) data for specified resource record and
* key by specified index. Can only be used on keys with datatype
@ -899,9 +899,9 @@ CARES_EXTERN ares_status_t ares_dns_rr_add_abin(ares_dns_rr_t *dns_rr,
* \param[in] idx Index to delete
* \return ARES_SUCCESS on success
*/
CARES_EXTERN ares_status_t ares_dns_rr_del_abin(ares_dns_rr_t *dns_rr,
CARES_EXTERN ares_status_t ares_dns_rr_del_abin(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
size_t idx);
size_t idx);
/*! Set the option for the RR
*
@ -918,6 +918,17 @@ CARES_EXTERN ares_status_t ares_dns_rr_set_opt(ares_dns_rr_t *dns_rr,
const unsigned char *val,
size_t val_len);
/*! Delete the option for the RR by id
*
* \param[in] dns_rr Pointer to resource record
* \param[in] key DNS Resource Record Key
* \param[in] opt Option record key id.
* \return ARES_SUCCESS if removed, ARES_ENOTFOUND if not found
*/
CARES_EXTERN ares_status_t ares_dns_rr_del_opt_byid(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
unsigned short opt);
/*! Retrieve a pointer to the ipv4 address. Can only be used on keys with
* datatype ARES_DATATYPE_INADDR.
*
@ -1000,7 +1011,7 @@ CARES_EXTERN const unsigned char *
* \return count of values
*/
CARES_EXTERN size_t ares_dns_rr_get_abin_cnt(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key);
ares_dns_rr_key_t key);
/*! Retrieve a pointer to the binary array data from the specified index. Can
* only be used on keys with datatype ARES_DATATYPE_ABINP. If ABINP, the data
@ -1014,8 +1025,9 @@ CARES_EXTERN size_t ares_dns_rr_get_abin_cnt(const ares_dns_rr_t *dns_rr,
* \param[out] len Length of binary data returned
* \return pointer binary data or NULL on error
*/
CARES_EXTERN const unsigned char *ares_dns_rr_get_abin(
const ares_dns_rr_t *dns_rr, ares_dns_rr_key_t key, size_t idx, size_t *len);
CARES_EXTERN const unsigned char *
ares_dns_rr_get_abin(const ares_dns_rr_t *dns_rr, ares_dns_rr_key_t key,
size_t idx, size_t *len);
/*! Retrieve the number of options stored for the RR.

View File

@ -31,12 +31,12 @@
#define ARES_COPYRIGHT "2004 - 2024 Daniel Stenberg, <daniel@haxx.se>."
#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 32
#define ARES_VERSION_PATCH 1
#define ARES_VERSION_MINOR 33
#define ARES_VERSION_PATCH 0
#define ARES_VERSION \
((ARES_VERSION_MAJOR << 16) | (ARES_VERSION_MINOR << 8) | \
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.32.1"
#define ARES_VERSION_STR "1.33.0"
#define CARES_HAVE_ARES_LIBRARY_INIT 1
#define CARES_HAVE_ARES_LIBRARY_CLEANUP 1

View File

@ -1,26 +0,0 @@
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
# -----------------------------------------------
# Detect NMAKE version deducing old MSVC versions
# -----------------------------------------------
!IFNDEF _NMAKE_VER
! MESSAGE Macro _NMAKE_VER not defined.
! MESSAGE Use MSVC's NMAKE to process this makefile.
! ERROR See previous message.
!ENDIF
!IF "$(_NMAKE_VER)" == "6.00.8168.0"
CC_VERS_NUM = 60
!ELSEIF "$(_NMAKE_VER)" == "6.00.9782.0"
CC_VERS_NUM = 60
!ELSEIF "$(_NMAKE_VER)" == "7.00.8882"
CC_VERS_NUM = 70
!ELSEIF "$(_NMAKE_VER)" == "7.00.9466"
CC_VERS_NUM = 70
!ELSEIF "$(_NMAKE_VER)" == "7.00.9955"
CC_VERS_NUM = 70
!ELSE
# Pick an arbitrary bigger number for all later versions
CC_VERS_NUM = 199
!ENDIF

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# Makefile.in generated by automake 1.17 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -69,6 +69,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
am__rm_f = rm -f $(am__rm_f_notfound)
am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -310,8 +312,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
am__xargs_n = @am__xargs_n@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
@ -585,8 +589,8 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -678,3 +682,10 @@ uninstall-am:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
# Tell GNU make to disable its built-in pattern rules.
%:: %,v
%:: RCS/%,v
%:: RCS/%
%:: s.%
%:: SCCS/s.%

File diff suppressed because it is too large Load Diff

View File

@ -3,43 +3,16 @@
CSOURCES = ares__addrinfo2hostent.c \
ares__addrinfo_localhost.c \
ares__buf.c \
ares__close_sockets.c \
ares__hosts_file.c \
ares__htable.c \
ares__htable_asvp.c \
ares__htable_strvp.c \
ares__htable_szvp.c \
ares__htable_vpvp.c \
ares__iface_ips.c \
ares__llist.c \
ares__parse_into_addrinfo.c \
ares__slist.c \
ares__socket.c \
ares__sortaddrinfo.c \
ares__threads.c \
ares__timeval.c \
ares_android.c \
ares_cancel.c \
ares_cookie.c \
ares_data.c \
ares_destroy.c \
ares_dns_mapping.c \
ares_dns_multistring.c \
ares_dns_name.c \
ares_dns_parse.c \
ares_dns_record.c \
ares_dns_write.c \
ares_event_configchg.c \
ares_event_epoll.c \
ares_event_kqueue.c \
ares_event_poll.c \
ares_event_select.c \
ares_event_thread.c \
ares_event_wake_pipe.c \
ares_event_win32.c \
ares_expand_name.c \
ares_expand_string.c \
ares_fds.c \
ares_free_hostent.c \
ares_free_string.c \
ares_freeaddrinfo.c \
@ -48,35 +21,17 @@ CSOURCES = ares__addrinfo2hostent.c \
ares_gethostbyaddr.c \
ares_gethostbyname.c \
ares_getnameinfo.c \
ares_getsock.c \
ares_init.c \
ares_library_init.c \
ares_math.c \
ares_metrics.c \
ares_create_query.c \
ares_options.c \
ares_parse_a_reply.c \
ares_parse_aaaa_reply.c \
ares_parse_caa_reply.c \
ares_parse_mx_reply.c \
ares_parse_naptr_reply.c \
ares_parse_ns_reply.c \
ares_parse_ptr_reply.c \
ares_parse_soa_reply.c \
ares_parse_srv_reply.c \
ares_parse_txt_reply.c \
ares_parse_uri_reply.c \
ares_platform.c \
ares_process.c \
ares_qcache.c \
ares_query.c \
ares_rand.c \
ares_search.c \
ares_send.c \
ares_strcasecmp.c \
ares_str.c \
ares_strerror.c \
ares_strsplit.c \
ares_sysconfig.c \
ares_sysconfig_files.c \
ares_sysconfig_mac.c \
@ -86,32 +41,80 @@ CSOURCES = ares__addrinfo2hostent.c \
ares_version.c \
inet_net_pton.c \
inet_ntop.c \
windows_port.c
windows_port.c \
dsa/ares__array.c \
dsa/ares__htable.c \
dsa/ares__htable_asvp.c \
dsa/ares__htable_strvp.c \
dsa/ares__htable_szvp.c \
dsa/ares__htable_vpvp.c \
dsa/ares__llist.c \
dsa/ares__slist.c \
event/ares_event_configchg.c \
event/ares_event_epoll.c \
event/ares_event_kqueue.c \
event/ares_event_poll.c \
event/ares_event_select.c \
event/ares_event_thread.c \
event/ares_event_wake_pipe.c \
event/ares_event_win32.c \
legacy/ares_create_query.c \
legacy/ares_expand_name.c \
legacy/ares_expand_string.c \
legacy/ares_fds.c \
legacy/ares_getsock.c \
legacy/ares_parse_a_reply.c \
legacy/ares_parse_aaaa_reply.c \
legacy/ares_parse_caa_reply.c \
legacy/ares_parse_mx_reply.c \
legacy/ares_parse_naptr_reply.c \
legacy/ares_parse_ns_reply.c \
legacy/ares_parse_ptr_reply.c \
legacy/ares_parse_soa_reply.c \
legacy/ares_parse_srv_reply.c \
legacy/ares_parse_txt_reply.c \
legacy/ares_parse_uri_reply.c \
record/ares_dns_mapping.c \
record/ares_dns_multistring.c \
record/ares_dns_name.c \
record/ares_dns_parse.c \
record/ares_dns_record.c \
record/ares_dns_write.c \
str/ares__buf.c \
str/ares_strcasecmp.c \
str/ares_str.c \
str/ares_strsplit.c \
util/ares__iface_ips.c \
util/ares__threads.c \
util/ares__timeval.c \
util/ares_math.c \
util/ares_rand.c
HHEADERS = ares__buf.h \
ares__htable.h \
ares__htable_asvp.h \
ares__htable_strvp.h \
ares__htable_szvp.h \
ares__htable_vpvp.h \
ares__iface_ips.h \
ares__llist.h \
ares__slist.h \
ares__threads.h \
ares_android.h \
HHEADERS = ares_android.h \
ares_data.h \
ares_dns_multistring.h \
ares_dns_private.h \
ares_event.h \
ares_event_win32.h \
ares_getenv.h \
ares_inet_net_pton.h \
ares_ipv6.h \
ares_platform.h \
ares_private.h \
ares_strcasecmp.h \
ares_str.h \
ares_strsplit.h \
ares_setup.h \
dsa/ares__array.h \
dsa/ares__htable.h \
dsa/ares__htable_asvp.h \
dsa/ares__htable_strvp.h \
dsa/ares__htable_szvp.h \
dsa/ares__htable_vpvp.h \
dsa/ares__llist.h \
dsa/ares__slist.h \
event/ares_event.h \
event/ares_event_win32.h \
record/ares_dns_multistring.h \
record/ares_dns_private.h \
str/ares__buf.h \
str/ares_strcasecmp.h \
str/ares_str.h \
str/ares_strsplit.h \
util/ares__iface_ips.h \
util/ares__threads.h \
thirdparty/apple/dnsinfo.h

View File

@ -161,16 +161,16 @@ ares_status_t ares__addrinfo2hostent(const struct ares_addrinfo *ai, int family,
}
(*host)->h_addr_list[i] = addrs + (i * (size_t)(*host)->h_length);
if (family == AF_INET6) {
memcpy(
(*host)->h_addr_list[i],
&(CARES_INADDR_CAST(const struct sockaddr_in6 *, next->ai_addr)->sin6_addr),
(size_t)(*host)->h_length);
memcpy((*host)->h_addr_list[i],
&(CARES_INADDR_CAST(const struct sockaddr_in6 *, next->ai_addr)
->sin6_addr),
(size_t)(*host)->h_length);
}
if (family == AF_INET) {
memcpy(
(*host)->h_addr_list[i],
&(CARES_INADDR_CAST(const struct sockaddr_in *, next->ai_addr)->sin_addr),
(size_t)(*host)->h_length);
memcpy((*host)->h_addr_list[i],
&(CARES_INADDR_CAST(const struct sockaddr_in *, next->ai_addr)
->sin_addr),
(size_t)(*host)->h_length);
}
++i;
}
@ -252,20 +252,20 @@ ares_status_t ares__addrinfo2addrttl(const struct ares_addrinfo *ai, int family,
addr6ttls[*naddrttls].ttl = next->ai_ttl;
}
memcpy(
&addr6ttls[*naddrttls].ip6addr,
&(CARES_INADDR_CAST(const struct sockaddr_in6 *, next->ai_addr)->sin6_addr),
sizeof(struct ares_in6_addr));
memcpy(&addr6ttls[*naddrttls].ip6addr,
&(CARES_INADDR_CAST(const struct sockaddr_in6 *, next->ai_addr)
->sin6_addr),
sizeof(struct ares_in6_addr));
} else {
if (next->ai_ttl > cname_ttl) {
addrttls[*naddrttls].ttl = cname_ttl;
} else {
addrttls[*naddrttls].ttl = next->ai_ttl;
}
memcpy(
&addrttls[*naddrttls].ipaddr,
&(CARES_INADDR_CAST(const struct sockaddr_in *, next->ai_addr)->sin_addr),
sizeof(struct in_addr));
memcpy(&addrttls[*naddrttls].ipaddr,
&(CARES_INADDR_CAST(const struct sockaddr_in *, next->ai_addr)
->sin_addr),
sizeof(struct in_addr));
}
(*naddrttls)++;
}

Some files were not shown because too many files have changed in this diff Show More