curl/REUSE.toml
Viktor Szakats bf7375ecc5
build: avoid overriding system symbols for socket functions
Before this patch `accept4()`, `socket()`, `socketpair()`, `send()` and
`recv()` system symbols were remapped via macros, using the same name,
to local curl debug wrappers. This patch replaces these overrides by
introducing curl-namespaced macros that map either to the system symbols
or to their curl debug wrappers in `CURLDEBUG` (TrackMemory) builds.

This follows a patch that implemented the same for `accept()`.

The old method required tricks to make these redefines work in unity
builds, and avoid them interfering with system headers. These tricks
did not work for system symbols implemented as macros.

The new method allows to setup these mappings once, without interfering
with system headers, upstream macros, or unity builds. It makes builds
more robust.

Also:
- checksrc: ban all mapped functions.
- docs/examples: tidy up checksrc rules.

Follow-up to 9863599d69 #18502
Follow-up to 3bb5e58c10 #17827

Closes #18503
2025-09-20 13:44:59 +02:00

56 lines
1.6 KiB
TOML

# SPDX-License-Identifier: curl
# SPDX-FileCopyrightText: Daniel Stenberg, <daniel@haxx.se>, et al.
# This file describes the licensing and copyright situation for files that
# cannot be annotated directly, for example because of being simply
# uncommentable. Unless this is the case, a file should be annotated directly.
#
# This follows the REUSE specification: https://reuse.software/spec-3.2/#reusetoml
version = 1
SPDX-PackageName = "curl"
SPDX-PackageDownloadLocation = "https://curl.se/"
[[annotations]]
path = [
".mailmap",
"docs/FAQ",
"docs/INSTALL",
"docs/KNOWN_BUGS",
"docs/libcurl/symbols-in-versions",
"docs/MAIL-ETIQUETTE",
"docs/options-in-versions",
"docs/THANKS",
"docs/TODO",
"GIT-INFO.md",
"lib/libcurl.vers.in",
"lib/libcurl.def",
"packages/OS400/README.OS400",
"packages/vms/build_vms.com",
"packages/vms/curl_release_note_start.txt",
"packages/vms/curlmsg.sdl",
"packages/vms/macro32_exactcase.patch",
"packages/vms/readme",
"plan9/README",
"projects/Windows/**",
"README",
"RELEASE-NOTES",
"renovate.json",
"tests/certs/**",
"tests/data/test**",
"tests/valgrind.supp",
# checksrc control files
"docs/examples/.checksrc",
"lib/.checksrc",
"lib/curlx/.checksrc",
"lib/vauth/.checksrc",
"lib/vquic/.checksrc",
"lib/vssh/.checksrc",
"lib/vtls/.checksrc",
"src/.checksrc",
"tests/server/.checksrc",
]
SPDX-FileCopyrightText = "Daniel Stenberg, <daniel@haxx.se>, et al."
SPDX-License-Identifier = "curl"
# If there is licensing/copyright information in or next to these files, prefer that
precedence = "closest"