Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addrinfo: add curl macro to avoid redefining foreign symbols #16274

Closed
wants to merge 5 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Feb 9, 2025

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 29e4eda #16272

Ref: #16272
Ref: 71cf0d1 #14772
Ref: 3efba94 #14765
Ref: f7d5f47 #14399


@vszakats vszakats marked this pull request as draft February 9, 2025 05:03
@vszakats vszakats marked this pull request as ready for review February 9, 2025 12:05
vszakats added a commit to vszakats/curl that referenced this pull request Feb 9, 2025
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.

Ref: curl#16272
Ref: 71cf0d1 curl#14772
Ref: 3efba94 curl#14765
Ref: f7d5f47 curl#14399

Closes curl#16274
vszakats added a commit to vszakats/curl that referenced this pull request Feb 9, 2025
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.

Ref: curl#16272
Ref: 71cf0d1 curl#14772
Ref: 3efba94 curl#14765
Ref: f7d5f47 curl#14399

Closes curl#16274
@github-actions github-actions bot added the CI Continuous Integration label Feb 10, 2025
@vszakats vszakats closed this in de0693f Feb 13, 2025
@vszakats vszakats deleted the tidy-addrinfo branch February 13, 2025 11:47
vszakats added a commit to vszakats/curl that referenced this pull request Mar 13, 2025
Include two more sources in unity mode to optimize builds, syncing this
pattern with `lib` and `src`.

Follow-up to de0693f curl#16274
Follow-up to 3efba94 curl#14765
Cherry-picked from curl#15000
vszakats added a commit to vszakats/curl that referenced this pull request Mar 13, 2025
Include two more sources in unity mode to optimize builds, syncing this
pattern with `lib` and `src`.

Follow-up to de0693f curl#16274
Follow-up to 3efba94 curl#14765
Cherry-picked from curl#15000
vszakats added a commit that referenced this pull request Mar 13, 2025
Include more sources in unity mode to optimize libtest and tests/server
builds for non-debug-enabled builds, syncing this pattern with `lib` and
`src`.

It reduces build steps from 62 to 47 (-14, -24%) with test bundles.
Without test bundles, from 680 to 642 (-38, -6%).

Follow-up to de0693f #16274
Follow-up to 3efba94 #14765
Cherry-picked from #15000
Closes #16695
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant