1 #ifndef FIBER_DEFINE_INCLUDE_H 2 #define FIBER_DEFINE_INCLUDE_H 11 #if defined(_WIN32) || defined (_WIN64) 12 # include <winsock2.h> 19 typedef __int64 ssize_t;
20 # elif defined(_WIN32) 27 typedef int socklen_t;
29 # define FIBER_ETIMEDOUT WSAETIMEDOUT 30 # define FIBER_ENOMEM WSAENOBUFS 31 # define FIBER_EINVAL WSAEINVAL 32 # define FIBER_ECONNREFUSED WSAECONNREFUSED 33 # define FIBER_ECONNRESET WSAECONNRESET 34 # define FIBER_EHOSTDOWN WSAEHOSTDOWN 35 # define FIBER_EHOSTUNREACH WSAEHOSTUNREACH 36 # define FIBER_EINTR WSAEINTR 37 # define FIBER_ENETDOWN WSAENETDOWN 38 # define FIBER_ENETUNREACH WSAENETUNREACH 39 # define FIBER_ENOTCONN WSAENOTCONN 40 # define FIBER_EISCONN WSAEISCONN 41 # define FIBER_EWOULDBLOCK WSAEWOULDBLOCK 42 # define FIBER_EAGAIN FIBER_EWOULDBLOCK 43 # define FIBER_ENOBUFS WSAENOBUFS 44 # define FIBER_ECONNABORTED WSAECONNABORTED 45 # define FIBER_EINPROGRESS WSAEINPROGRESS 50 # include <sys/types.h> 51 # include <sys/socket.h> 52 # include <sys/time.h> 53 # include <sys/select.h> 58 # define INVALID_SOCKET -1 61 # define FIBER_ETIMEDOUT ETIMEDOUT 62 # define FIBER_ENOMEM ENOMEM 63 # define FIBER_EINVAL EINVAL 64 # define FIBER_ECONNREFUSED ECONNREFUSED 65 # define FIBER_ECONNRESET ECONNRESET 66 # define FIBER_EHOSTDOWN EHOSTDOWN 67 # define FIBER_EHOSTUNREACH EHOSTUNREACH 68 # define FIBER_EINTR EINTR 69 # define FIBER_EAGAIN EAGAIN 70 # define FIBER_ENETDOWN ENETDOWN 71 # define FIBER_ENETUNREACH ENETUNREACH 72 # define FIBER_ENOTCONN ENOTCONN 73 # define FIBER_EISCONN EISCONN 74 # define FIBER_EWOULDBLOCK EWOULDBLOCK 75 # define FIBER_ENOBUFS ENOBUFS 76 # define FIBER_ECONNABORTED ECONNABORTED 77 # define FIBER_EINPROGRESS EINPROGRESS 85 #elif defined(FIBER_DLL) // || defined(_WINDLL) 86 # if defined(FIBER_EXPORTS) || defined(fiber_EXPORTS) 88 # define FIBER_API __declspec(dllexport) 90 # elif !defined(FIBER_API) 91 # define FIBER_API __declspec(dllimport) 93 #elif !defined(FIBER_API)
struct ACL_FIBER ACL_FIBER