mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
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 to9863599d69#18502 Follow-up to3bb5e58c10#17827 Closes #18503
This commit is contained in:
parent
2fe95cb0e3
commit
bf7375ecc5
24 changed files with 74 additions and 57 deletions
|
|
@ -40,6 +40,7 @@ path = [
|
|||
"tests/data/test**",
|
||||
"tests/valgrind.supp",
|
||||
# checksrc control files
|
||||
"docs/examples/.checksrc",
|
||||
"lib/.checksrc",
|
||||
"lib/curlx/.checksrc",
|
||||
"lib/vauth/.checksrc",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue