Repository navigation
Conversation
krb5 defines strtok_r for Windows unconditionally: https://github.com/krb5/krb5/blob/dc5554394e5a4363b3e109623edbeb9ad6c18a62/src/include/win-mac.h#L214-L215 resulting in warning: ``` lib\strtok.h(31,9): warning C4005: 'strtok_r': macro redefinition (compiling source file 'CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c') C:\vcpkg\installed\x64-windows\include\win-mac.h(215,9): see previous definition of 'strtok_r' ```
strtok_r macro instead of redefining it
MarcelRaad
approved these changes
Nov 13, 2024
vszakats
pushed a commit
to vszakats/curl
that referenced
this pull request
Nov 15, 2024
Add gssapi to openssl job waiting for: - [x] curl#15564 - [x] curl#15545 Closes curl#15549
vszakats
pushed a commit
that referenced
this pull request
Nov 15, 2024
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
krb5 defines `strtok_r` for Windows unconditionally in its public header: https://github.com/krb5/krb5/blob/dc5554394e5a4363b3e109623edbeb9ad6c18a62/src/include/win-mac.h#L214-L215 resulting in this warning: ``` lib\strtok.h(31,9): warning C4005: 'strtok_r': macro redefinition C:\vcpkg\installed\x64-windows\include\win-mac.h(215,9): see previous definition of 'strtok_r' ``` The krb5 macro collides with curl's internal definition, in case the `strtok_r` function is undetected and falling back to a local replacement. Reported-by: Tal Regev Bug: curl#15549 (comment) Closes curl#15564
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Ref: curl#15545 Ref: curl#15564 Ref: curl#15585 Closes curl#15549
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.
krb5 defines
strtok_rfor Windows unconditionally in its publicheader:
https://github.com/krb5/krb5/blob/dc5554394e5a4363b3e109623edbeb9ad6c18a62/src/include/win-mac.h#L214-L215
resulting in warning:
This collides with curl's own definition, when
strtok_risundetected and falling back to the local replacement.
Reported-by: Tal Regev
Bug: #15549 (comment)
Perhaps worth noting that
win-mac.hunconditionally mappingstrtok_rtostrtok_sis wrong. At least mingw-w64 3.2.0 andolder versions don't support the latter symbol. Doing it in a public
header is possibly worse.