Repository navigation
Conversation
Follow-up to 38d334e curl#14298 Closes #xxxxx
We need to undo a previous override to avoid applying it to
system headers, and messing them up:
```
In file included from ~/curl/_build-cmake-libressl/src/CMakeFiles/curl.dir/Unity/unity_0_c.c:88:
In file included from ~/curl/src/tool_operate.c:54:
In file included from /usr/local/Cellar/libuv/1.48.0/include/uv.h:71:
In file included from /usr/local/Cellar/libuv/1.48.0/include/uv/unix.h:34:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/netdb.h:269:7: error: expected parameter declarator
void freeaddrinfo(struct addrinfo *);
^
~/curl/lib/memdebug.h:167:31: note: expanded from macro 'freeaddrinfo'
curl_dbg_freeaddrinfo(data, __LINE__, __FILE__)
^
<scratch space>:102:1: note: expanded from here
269
^
In file included from ~/curl/_build-cmake-libressl/src/CMakeFiles/curl.dir/Unity/unity_0_c.c:88:
In file included from ~/curl/src/tool_operate.c:54:
In file included from /usr/local/Cellar/libuv/1.48.0/include/uv.h:71:
In file included from /usr/local/Cellar/libuv/1.48.0/include/uv/unix.h:34:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/netdb.h:269:7: error: expected ')'
~/curl/lib/memdebug.h:167:31: note: expanded from macro 'freeaddrinfo'
curl_dbg_freeaddrinfo(data, __LINE__, __FILE__)
^
<scratch space>:102:1: note: expanded from here
269
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/netdb.h:269:7: note: to match this '('
~/curl/lib/memdebug.h:167:24: note: expanded from macro 'freeaddrinfo'
curl_dbg_freeaddrinfo(data, __LINE__, __FILE__)
^
In file included from ~/curl/_build-cmake-libressl/src/CMakeFiles/curl.dir/Unity/unity_0_c.c:88:
In file included from ~/curl/src/tool_operate.c:54:
In file included from /usr/local/Cellar/libuv/1.48.0/include/uv.h:71:
In file included from /usr/local/Cellar/libuv/1.48.0/include/uv/unix.h:34:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/netdb.h:271:6: error: expected parameter declarator
int getaddrinfo(const char * __restrict, const char * __restrict,
^
~/curl/lib/memdebug.h:160:47: note: expanded from macro 'getaddrinfo'
curl_dbg_getaddrinfo(host, serv, hint, res, __LINE__, __FILE__)
^
<scratch space>:104:1: note: expanded from here
273
^
In file included from ~/curl/_build-cmake-libressl/src/CMakeFiles/curl.dir/Unity/unity_0_c.c:88:
In file included from ~/curl/src/tool_operate.c:54:
In file included from /usr/local/Cellar/libuv/1.48.0/include/uv.h:71:
In file included from /usr/local/Cellar/libuv/1.48.0/include/uv/unix.h:34:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/netdb.h:271:6: error: expected ')'
~/curl/lib/memdebug.h:160:47: note: expanded from macro 'getaddrinfo'
curl_dbg_getaddrinfo(host, serv, hint, res, __LINE__, __FILE__)
^
<scratch space>:104:1: note: expanded from here
273
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/netdb.h:271:6: note: to match this '('
~/curl/lib/memdebug.h:160:23: note: expanded from macro 'getaddrinfo'
curl_dbg_getaddrinfo(host, serv, hint, res, __LINE__, __FILE__)
^
4 errors generated.
```
CURL_USE_LIBUV optionCURL_USE_LIBUV option
bagder
approved these changes
Aug 5, 2024
1 task done
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
vszakats
added a commit
that referenced
this pull request
Feb 13, 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 Closes #16274
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 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 curl#16272 Ref: curl#16272 Ref: 71cf0d1 curl#14772 Ref: 3efba94 curl#14765 Ref: f7d5f47 curl#14399 Closes curl#16274
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also use an
#undefhack for CMake Unity builds to avoid the previouslyincluded
memdebug.hheader messing up the declarations pulled in byuv.h:Follow-up to 38d334e #14298
Closes #14399