warnless: drop parts of the read/write preprocessor hack (Windows)#17673
Closed
vszakats wants to merge 5 commits intocurl:masterfrom
Closed
warnless: drop parts of the read/write preprocessor hack (Windows)#17673vszakats wants to merge 5 commits intocurl:masterfrom
read/write preprocessor hack (Windows)#17673vszakats wants to merge 5 commits intocurl:masterfrom
Conversation
66f33f7 to
7dd5c9e
Compare
read/write preprocessor hack (Windows)
read/write preprocessor hack (Windows)read/write preprocessor hack (Windows)
denandz
pushed a commit
to denandz/curl
that referenced
this pull request
Jun 21, 2025
The `#undef` hack is no longer necessary after changing the redifitions to not map back to the original symbols. This makes it unnecessary to repeat the redefinitions after compiling `warnless.c` itself (in unity mode). Which in turns makes it unnecessary to include `warnless.h` again, to trigger such redefinition. This also means that `read`/`write` are now redefined on Windows from the first inclusion of `warnless.h`. Also: - tests/server: drop a repeat `warnless.h` include, that is unnecessary after this patch. - tests/unit: drop repeat `warnless.h` include. - tests/libtest: drop repeat `warnless.h` includes. - tests/libtest: formatting. Follow-up to 2f312a1 curl#17619 Follow-up to 84338c4 curl#12331 Follow-up to 6239146 Closes curl#17673
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.
The
#undefhack is no longer necessary after changing the redifitionsto not map back to the original symbols.
This makes it unnecessary to repeat the redefinitions after compiling
warnless.citself (in unity mode).Which in turns makes it unnecessary to include
warnless.hagain, totrigger such redefinition.
This also means that
read/writeare now redefined on Windows fromthe first inclusion of
warnless.h.Also:
warnless.hinclude, that is unnecessaryafter this patch.
warnless.hinclude.warnless.hincludes.Follow-up to 2f312a1 #17619
Follow-up to 84338c4 #12331
Follow-up to 6239146