]> git.ipfire.org Git - thirdparty/curl.git/commit
system.h: sync mingw `CURL_TYPEOF_CURL_SOCKLEN_T` with other compilers
authorViktor Szakats <commit@vsz.me>
Sun, 10 Dec 2023 02:19:32 +0000 (02:19 +0000)
committerViktor Szakats <commit@vsz.me>
Sat, 16 Dec 2023 13:15:19 +0000 (13:15 +0000)
commit6265718c77885d078a58a56d2174ecaab1cdbf23
treed629eeb7f06f2b96854ab280652138c07db5c296
parentc1bc090d65b8d7d14e811dd36f5e8674be43dff3
system.h: sync mingw `CURL_TYPEOF_CURL_SOCKLEN_T` with other compilers

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`. ]

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Closes #12501
CMakeLists.txt
include/curl/system.h