Closed aganm closed 3 years ago
Looks like most modern systems define them to be the same value and there's a bunch of legacy systems that don't. The code appears to be correct, as advised by the GNU documentation:
Portability Note: In many older Unix systems, this condition was indicated by EWOULDBLOCK, which was a distinct error code different from EAGAIN. To make your program portable, you should check for both codes and treat them the same.
What seems to be left is working around the specific warning, maybe with an #ifdef
that checks the values are equal before comparison.
Given the potential value of handling EAGAIN
on the more obscure systems, it seems the function name TCPSocketWouldBlock
is also not accurate enough.
This part https://github.com/Celtoys/Remotery/blob/7e6886932e904c95c134d6af2f3ee1cfae69dba1/lib/Remotery.c#L2476-L2477
Checks for values which are defined to the same thing
gcc gives me a warning
Logical 'or' of equal expressions warning
, should this be fixed?