10 #if defined(HAVE_CONFIG_H) 18 #define _WIN32_WINNT 0x0501 19 #ifndef WIN32_LEAN_AND_MEAN 20 #define WIN32_LEAN_AND_MEAN 1 26 #undef FD_SETSIZE // prevent redefinition compiler warning 28 #define FD_SETSIZE 1024 // max number of fds in fd_set 36 #include <sys/fcntl.h> 38 #include <sys/select.h> 39 #include <sys/socket.h> 40 #include <sys/types.h> 42 #include <netinet/in.h> 43 #include <netinet/tcp.h> 44 #include <arpa/inet.h> 54 #define WSAGetLastError() errno 55 #define WSAEINVAL EINVAL 56 #define WSAEALREADY EALREADY 57 #define WSAEWOULDBLOCK EWOULDBLOCK 58 #define WSAEMSGSIZE EMSGSIZE 59 #define WSAEINTR EINTR 60 #define WSAEINPROGRESS EINPROGRESS 61 #define WSAEADDRINUSE EADDRINUSE 62 #define WSAENOTSOCK EBADF 63 #define INVALID_SOCKET (SOCKET)(~0) 64 #define SOCKET_ERROR -1 70 #ifndef THREAD_PRIORITY_LOWEST 71 #define THREAD_PRIORITY_LOWEST PRIO_MAX 73 #ifndef THREAD_PRIORITY_BELOW_NORMAL 74 #define THREAD_PRIORITY_BELOW_NORMAL 2 76 #ifndef THREAD_PRIORITY_NORMAL 77 #define THREAD_PRIORITY_NORMAL 0 79 #ifndef THREAD_PRIORITY_ABOVE_NORMAL 80 #define THREAD_PRIORITY_ABOVE_NORMAL (-2) 92 #if HAVE_DECL_STRNLEN == 0 93 size_t strnlen(
const char *start,
size_t max_len);
94 #endif // HAVE_DECL_STRNLEN 96 bool static inline IsSelectableSocket(
const SOCKET& s) {
100 return (s < FD_SETSIZE);
104 #endif // RAVEN_COMPAT_H
size_t strnlen(const char *start, size_t max_len)