drop defined(EAGAIN) checks everywhere

There was an unprotected unconditional use in src. Also in vquic
and socketpair, on conditions.
This commit is contained in:
Viktor Szakats 2026-06-08 04:05:21 +02:00
parent 670e3fc0fa
commit 8a192a5b70
No known key found for this signature in database
4 changed files with 4 additions and 4 deletions

View file

@ -942,7 +942,7 @@ static CURLcode socket_connect_result(struct Curl_easy *data,
switch(error) {
case SOCKEINPROGRESS:
case SOCKEWOULDBLOCK:
#if !defined(USE_WINSOCK) && defined(EAGAIN) && EAGAIN != SOCKEWOULDBLOCK
#if !defined(USE_WINSOCK) && EAGAIN != SOCKEWOULDBLOCK
/* On some platforms EAGAIN and EWOULDBLOCK are the
* same value, and on others they are different, hence
* the odd #if

View file

@ -1137,7 +1137,7 @@ typedef unsigned int curl_bit;
#define SOCKEWOULDBLOCK EWOULDBLOCK
#endif
#if !defined(USE_WINSOCK) && defined(EAGAIN) && EAGAIN != SOCKEWOULDBLOCK
#if !defined(USE_WINSOCK) && EAGAIN != SOCKEWOULDBLOCK
#define SOCK_EWOULDBLOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK || (e) == EAGAIN)
#else
#define SOCK_EWOULDBLOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)

View file

@ -167,7 +167,7 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
if(!curlx_sztouz(rv, psent)) {
switch(SOCKERRNO) {
case SOCKEWOULDBLOCK:
#if !defined(USE_WINSOCK) && defined(EAGAIN) && EAGAIN != SOCKEWOULDBLOCK
#if !defined(USE_WINSOCK) && EAGAIN != SOCKEWOULDBLOCK
case EAGAIN:
#endif
return CURLE_AGAIN;

View file

@ -45,7 +45,7 @@
#include "curlx/base64.h"
#endif
#if defined(EAGAIN) && EAGAIN != SOCKEWOULDBLOCK
#if EAGAIN != SOCKEWOULDBLOCK
#define RAW_EWOULDBLOCK_EAGAIN(e) ((e) == EWOULDBLOCK || (e) == EAGAIN)
#else
#define RAW_EWOULDBLOCK_EAGAIN(e) ((e) == EWOULDBLOCK)