Skip to content
Snippets Groups Projects
Commit 8fe9376d authored by Yang Tse's avatar Yang Tse
Browse files

move WinSock definitions of EBADF, EINTR, EINVAL and EAFNOSUPPORT to setup_once.h

parent a1f72943
No related branches found
No related tags found
No related merge requests found
......@@ -276,6 +276,12 @@ typedef int sig_atomic_t;
*/
#ifdef USE_WINSOCK
#undef EBADF /* override definition in errno.h */
#define EBADF WSAEBADF
#undef EINTR /* override definition in errno.h */
#define EINTR WSAEINTR
#undef EINVAL /* override definition in errno.h */
#define EINVAL WSAEINVAL
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EINPROGRESS WSAEINPROGRESS
#define EALREADY WSAEALREADY
......
......@@ -41,10 +41,6 @@
#define INADDRSZ 4
#define INT16SZ 2
#ifdef USE_WINSOCK
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
/*
* WARNING: Don't even consider trying to compile this on a system where
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
......
......@@ -23,8 +23,6 @@
#include "setup.h"
#include <errno.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
......@@ -51,15 +49,6 @@
#include "connect.h"
#include "select.h"
#ifdef USE_WINSOCK
# undef EBADF
# define EBADF WSAEBADF
# undef EINTR
# define EINTR WSAEINTR
# undef EINVAL
# define EINVAL WSAEINVAL
#endif
/* Winsock and TPF sockets are not in range [0..FD_SETSIZE-1] */
#if defined(USE_WINSOCK) || defined(TPF)
......
......@@ -283,6 +283,12 @@ typedef int sig_atomic_t;
*/
#ifdef USE_WINSOCK
#undef EBADF /* override definition in errno.h */
#define EBADF WSAEBADF
#undef EINTR /* override definition in errno.h */
#define EINTR WSAEINTR
#undef EINVAL /* override definition in errno.h */
#define EINVAL WSAEINVAL
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EINPROGRESS WSAEINPROGRESS
#define EALREADY WSAEALREADY
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment