]> git.ipfire.org Git - thirdparty/curl.git/commit
addrinfo: add curl macro to avoid redefining foreign symbols
authorViktor Szakats <commit@vsz.me>
Sun, 9 Feb 2025 04:12:24 +0000 (05:12 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 13 Feb 2025 11:46:39 +0000 (12:46 +0100)
commitde0693f24943cd65f26a7b421a4304cbadb875a0
tree9efbe7c0370700b8181b0662478692a5964c652c
parent7241953ba565b5b3e24d07a05bfc5e142cf2447d
addrinfo: add curl macro to avoid redefining foreign symbols

Before this patch curl code was redefining `getaddrinfo` and
`freeaddrinfo` system symbols to plug in its debug wrappers. This was
causing pains to avoid applying the redefinitions to system headers
defining these functions, and to the local debug wrappers. Especially
in unity builds. It also required workarounds for systems where these
symbols are already macros.

Introduce curl-namespaced macros for these functions and use them.
This allows to drop all workarounds and makes it work in all envs,
local targets and unity/bundle combinations.

Also drop GHA/windows workaround and use the same unity batch across
all jobs. Follow-up to 29e4eda631f46368c2adf833ba3065b1b46c2a7d #16272

Ref: #16272
Ref: 71cf0d1fca9e1f53524e1545ef0c08d174458d80 #14772
Ref: 3efba94f773db5d8ae19e33aa749ab7914cafeea #14765
Ref: f7d5f47059c381502824ef9c1c9a2ca484930c91 #14399

Closes #16274
.github/workflows/windows.yml
lib/curl_addrinfo.c
lib/curl_memory.h
lib/curl_setup.h
lib/memdebug.h
src/tool_operate.c
tests/libtest/CMakeLists.txt
tests/libtest/Makefile.am
tests/server/CMakeLists.txt
tests/server/Makefile.am
tests/server/resolve.c