Skip to content

tool_doswin: avoid Windowsisms in socket code#20452

Closed
vszakats wants to merge 2 commits intocurl:masterfrom
vszakats:sockwindowsisms
Closed

tool_doswin: avoid Windowsisms in socket code#20452
vszakats wants to merge 2 commits intocurl:masterfrom
vszakats:sockwindowsisms

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jan 27, 2026

For general readability. Also to match the rest of the source code.

  • SOCKADDRstruct sockaddr
  • SOCKADDR_INstruct sockaddr_in
  • == SOCKET_ERROR== -1 or silent != 0

Follow-up to 9a26633 #17572

@vszakats vszakats added Windows Windows-specific tidy-up labels Jan 27, 2026
@vszakats vszakats closed this in a81ab3e Jan 27, 2026
@vszakats vszakats deleted the sockwindowsisms branch January 27, 2026 18:59
vszakats added a commit to vszakats/curl that referenced this pull request Jan 27, 2026
vszakats added a commit to vszakats/curl that referenced this pull request Jan 28, 2026
vszakats added a commit that referenced this pull request Jan 28, 2026
For general readability. Also to match the rest of the source code.

- bump `send()` result type from `int` to `ssize_t`.
- fix an `int` to be `curl_socklen_t`.
- `.S_un.S_addr` -> `.s_addr`.
- `SD_RECEIVE` -> `SHUT_RD`.
- `SD_SEND` -> `SHUT_WR`.

Follow-up to a81ab3e #20452
Follow-up to 9a26633 #17572

Closes #20457
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant