socket: use macros for determining if we need to EAGAIN.