diff options
-rw-r--r-- | os/io.c | 14 | ||||
-rw-r--r-- | os/osdep.h | 14 |
2 files changed, 14 insertions, 14 deletions
@@ -102,20 +102,6 @@ typedef struct _connectionOutput { static ConnectionInputPtr AllocateInputBuffer(void); static ConnectionOutputPtr AllocateOutputBuffer(void); -/* If EAGAIN and EWOULDBLOCK are distinct errno values, then we check errno - * for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX - * systems are broken and return EWOULDBLOCK when they should return EAGAIN - */ -#ifndef WIN32 -# if (EAGAIN != EWOULDBLOCK) -# define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK) -# else -# define ETEST(err) (err == EAGAIN) -# endif -#else /* WIN32 The socket errorcodes differ from the normal errors */ -#define ETEST(err) (err == EAGAIN || err == WSAEWOULDBLOCK) -#endif - static Bool CriticalOutputPending; static int timesThisConnection = 0; static ConnectionInputPtr FreeInputs = (ConnectionInputPtr) NULL; diff --git a/os/osdep.h b/os/osdep.h index 3dc2daf55..9dbf0fb89 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -100,6 +100,20 @@ SOFTWARE. #include <stddef.h> +/* If EAGAIN and EWOULDBLOCK are distinct errno values, then we check errno + * for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX + * systems are broken and return EWOULDBLOCK when they should return EAGAIN + */ +#ifndef WIN32 +# if (EAGAIN != EWOULDBLOCK) +# define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK) +# else +# define ETEST(err) (err == EAGAIN) +# endif +#else /* WIN32 The socket errorcodes differ from the normal errors */ +#define ETEST(err) (err == EAGAIN || err == WSAEWOULDBLOCK) +#endif + #if defined(XDMCP) || defined(HASXDMAUTH) typedef Bool (*ValidatorFunc) (ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type); typedef Bool (*GeneratorFunc) (ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type); |