Skip to content

system.h: sync mingw CURL_TYPEOF_CURL_SOCKLEN_T with other compilers - #12501

Closed
vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:mingw-socklen
Closed

vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:mingw-socklen

Conversation

@vszakats

@vszakats vszakats commented Dec 11, 2023 •

Copy link
Copy Markdown
Member

Align mingw with the other Windows compilers and use the int type for
CURL_TYPEOF_CURL_SOCKLEN_T (and thus for curl_socklent_t). This
makes it unnecessary to make a mingw-specific trick and pull all Windows
headers early just for this type definition. This type is specific to
Windows, not to the compiler. mingw-w64's Windows header maps it to
int too.

With this we also delete all remaining uses of CURL_PULL_WS2TCPIP_H.

[ The official solution is to use socklen_t for all Windows compilers.
In this case we may want to update curl/curl.h to pull in Windows
headers before system.h. ]

Closes #12501

Align mingw with the other Windows compilers and use the `int` type for
`CURL_TYPEOF_CURL_SOCKLEN_T` (and thus for `curl_socklent_t`). This
makes it unnecessary to make a mingw-specific trick and pull all Windows
headers early just for this type definition. This type is specific to
Windows, not to the compiler. mingw-w64's Windows header maps it to
`int` too.

With this we also delete all remaining uses of `CURL_PULL_WS2TCPIP_H`.

[ The official solution is to use `socklen_t` for all Windows compilers.
In this case we may want to update `curl/curl.h` to pull in Windows
headers before `system.h`. ]

Closes #xxxxx
@vszakats vszakats added the Windows Windows-specific label Dec 11, 2023
@vszakats vszakats closed this in 6265718 Dec 16, 2023
@vszakats
vszakats deleted the mingw-socklen branch December 16, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libcurl API Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

3 participants