-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
windows: simplify detecting and using system headers #12495
Closed
Closed
Conversation
This file contains 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
vszakats
changed the title
windows: cleanup/dedupe detecting/using system/socket headers
windows: simplify detecting and using system headers
Dec 10, 2023
It seems like this was a mistake, as it contradicts the original commit message in 2748c64. These headers exist in a mingw32ce release from 2009. Though the commit predates that by 1 year, it seems unlikely these weren't present in earlier releases.
These are always available for _WIN32, no need keeping a tab of them. Use existing USE_WINSOCK to decide if we actually want to use the default Windows TCP/IP stack.
jay
approved these changes
Dec 13, 2023
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.
windows.h
,winsock2.h
andws2tcpip.h
do exist.#if
conditions to useUSE_WINSOCK
instead oflooking for
winsock2.h
.setup-win32.h
fromconfig-win32.h
. It opens up using these with all build tools. Alsomerge logic with Windows Sockets.
Follow-up to: 2748c64
signature_call_conv
sinceeb33ccd.
CURL_CHECK_WIN32_LARGEFILE
detection._source_epilogue
that wasn't used anymore.
WIN32_LEAN_AND_MEAN
for testSIZEOF_STRUCT_SOCKADDR_STORAGE
.After this patch curl universally uses
_WIN32
to guardWindows-specific logic. It guards Windows Sockets-specific logic with
USE_WINSOCK
(this might need further work).Closes #12495
TODO:
CURL_CHECK_NATIVE_WINDOWS
detection logic with_WIN32
.lib/setup-win32.h
vs.include/curl/system.h
. [→ system.h: sync mingwCURL_TYPEOF_CURL_SOCKLEN_T
with other compilers #12501]CURL_PULL_WS2TCPIP_H
is necessary. [→ build: remove redundantCURL_PULL_*
settings #12502]https://github.com/curl/curl/pull/12495/files?w=1