6 #ifndef BITCOIN_COMPAT_COMPAT_H 7 #define BITCOIN_COMPAT_COMPAT_H 9 #if defined(HAVE_CONFIG_H) 20 #define FD_SETSIZE 1024 27 #include <sys/select.h> 28 #include <sys/socket.h> 29 #include <sys/types.h> 31 #include <netinet/in.h> 32 #include <netinet/tcp.h> 33 #include <arpa/inet.h> 46 #define WSAGetLastError() errno 47 #define WSAEINVAL EINVAL 48 #define WSAEWOULDBLOCK EWOULDBLOCK 49 #define WSAEAGAIN EAGAIN 50 #define WSAEMSGSIZE EMSGSIZE 51 #define WSAEINTR EINTR 52 #define WSAEINPROGRESS EINPROGRESS 53 #define WSAEADDRINUSE EADDRINUSE 54 #define INVALID_SOCKET (SOCKET)(~0) 55 #define SOCKET_ERROR -1 59 #define WSAEAGAIN EAGAIN 61 #define WSAEAGAIN WSAEWOULDBLOCK 83 typedef SSIZE_T ssize_t;
100 #define MAIN_FUNCTION __declspec(dllexport) int main(int argc, char* argv[]) 102 #define MAIN_FUNCTION int main(int argc, char* argv[]) 108 #if defined(__linux__) 113 #if defined(USE_POLL) || defined(WIN32) 116 return (s < FD_SETSIZE);
121 #if !defined(MSG_NOSIGNAL) 122 #define MSG_NOSIGNAL 0 126 #if !defined(MSG_DONTWAIT) 127 #define MSG_DONTWAIT 0 130 #endif // BITCOIN_COMPAT_COMPAT_H static bool IsSelectableSocket(const SOCKET &s)