comparing to raw EWOULDBLOCK may not be working as expected on Windows.
Based on this:
https://doc.rust-lang.org/std/io/struct.Error.html#method.last_os_error
Rust doesn't seem to be returning the socket error on Windows, but
a GetLastError() which does not return EWOULDBLOCK or SOCKEWOULDBLOCK.
```
/Users/runner/work/curl/curl/lib/socketpair.c:329:15: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
if((err == SOCKEWOULDBLOCK)
~~~~^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/lib/socketpair.c:329:15: note: remove extraneous parentheses around the comparison to silence this warning
if((err == SOCKEWOULDBLOCK)
~ ^ ~
/Users/runner/work/curl/curl/lib/socketpair.c:329:15: note: use '=' to turn this equality comparison into an assignment
if((err == SOCKEWOULDBLOCK)
^~
=
/Users/runner/work/curl/curl/lib/socketpair.c:359:21: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
if((SOCKERRNO == SOCKEWOULDBLOCK)
~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/Users/runner/work/curl/curl/lib/socketpair.c:359:21: note: remove extraneous parentheses around the comparison to silence this warning
if((SOCKERRNO == SOCKEWOULDBLOCK)
~ ^ ~
/Users/runner/work/curl/curl/lib/socketpair.c:359:21: note: use '=' to turn this equality comparison into an assignment
if((SOCKERRNO == SOCKEWOULDBLOCK)
^~
=
2 errors generated.
```
https://github.com/curl/curl/actions/runs/27107980068/job/80000462156?pr=21893
This code lacks tests, though we agreed it looks plausible enough to
merge it based on surrounding code. Even though this line has been
present for a long time. If you use this code, please report any results
or issues.
Reported by GitHub Code Quality
Follow-up to ae1912cb0dCloses#21979
clib2 defines __NEWLIB__ after its system headers are included, but it
does not provide explicit_bzero().
curl therefore selects the explicit_bzero() path and fails to build with
m68k-amigaos-gcc:
```
../lib/curl_setup.h:1650:35: error: implicit declaration of function 'explicit_bzero' [-Werror=implicit-function-declaration]
1650 | #define curlx_memzero(buf, size) explicit_bzero(buf, size)
| ^~~~~~~~~~~~~~
curlx/strdup.c:115:5: note: in expansion of macro 'curlx_memzero'
115 | curlx_memzero(buf, size);
| ^~~~~~~~~~~~~
```
Excluding __CLIB2__ from the generic __NEWLIB__ branch makes curl use
its existing portable curlx_memzero() fallback. The full AmigaOS build
then completes successfully.
I've tested the following on Amiga OS 3.2.3 with this patch and latest
build.
- HTTP and HTTPS transfers
- AmiSSL certificate handling
- redirects
- downloads and file output
- timeout handling with the expected exit code 28
- repeated execution with clean exits
- no crashes or regressions observed
Follow-up to 066478f634#21598Closes#21989