1 #ifndef ACL_SYS_PATCH_INCLUDE_H 2 #define ACL_SYS_PATCH_INCLUDE_H 11 #if defined(_WIN32) || defined(_WIN64) 17 #ifdef HAVE_NO_TIMEVAL 33 ACL_API
void sleep(
int sec);
40 ACL_API
int gettimeofday(
struct timeval *tv,
struct timezone *tz);
41 ACL_API
int gettimeofday1(
struct timeval *tv,
struct timezone *tz);
42 ACL_API
int gettimeofday2(
struct timeval *tv,
struct timezone *tz);
43 ACL_API
int gettimeofday3(
struct timeval *tv,
struct timezone *tz);
44 ACL_API
int gettimeofday4(
struct timeval *tv,
struct timezone *tz);
77 #if defined(_WIN32) || defined(_WIN64) 79 # define SHUT_RD SD_RECEIVE 82 # define SHUT_WR SD_SEND 85 # define SHUT_RDWR SD_BOTH 114 size_t size,
int timeout,
ACL_VSTREAM *fp,
void *arg);
127 int count,
int timeout,
ACL_VSTREAM *fp,
void *arg);
144 ACL_API ACL_FILE_HANDLE
acl_file_open(
const char *filepath,
int flags,
int mode);
172 ACL_API
int acl_file_read(ACL_FILE_HANDLE fh,
void *buf,
size_t size,
185 ACL_API
int acl_file_write(ACL_FILE_HANDLE fh,
const void *buf,
size_t size,
198 ACL_API
int acl_file_writev(ACL_FILE_HANDLE fh,
const struct iovec *vec,
199 int count,
int timeout,
ACL_VSTREAM *fp,
void *arg);
235 ACL_SOCKET result[2]);
239 #if defined(_WIN32) || defined(_WIN64) 241 typedef int (WINAPI *
acl_recv_fn)(ACL_SOCKET,
char *, int, int);
242 typedef int (WINAPI *
acl_send_fn)(ACL_SOCKET,
const char *, int, int);
249 typedef ssize_t (*
acl_send_fn)(ACL_SOCKET,
const void *, size_t, int);
252 #if !defined(_WIN32) && !defined(_WIN64) ACL_API void acl_set_recv(acl_recv_fn fn)
ACL_API acl_int64 acl_file_size(const char *filename)
ACL_API int acl_file_fflush(ACL_FILE_HANDLE fh, ACL_VSTREAM *fp, void *arg)
ssize_t(* acl_send_fn)(ACL_SOCKET, const void *, size_t, int)
int(* acl_close_socket_fn)(ACL_SOCKET)
ACL_API int acl_file_writev(ACL_FILE_HANDLE fh, const struct iovec *vec, int count, int timeout, ACL_VSTREAM *fp, void *arg)
ACL_API int acl_sane_socketpair(int domain, int type, int protocol, ACL_SOCKET result[2])
ACL_API acl_off_t acl_lseek(ACL_FILE_HANDLE fh, acl_off_t offset, int whence)
ACL_API int acl_socket_read(ACL_SOCKET fd, void *buf, size_t size, int timeout, ACL_VSTREAM *fp, void *arg)
ACL_API acl_int64 acl_file_fsize(ACL_FILE_HANDLE fh, ACL_VSTREAM *fp, void *arg)
ssize_t(* acl_writev_fn)(ACL_SOCKET, const struct iovec *, int)
ACL_API ACL_FILE_HANDLE acl_file_open(const char *filepath, int flags, int mode)
ACL_API int acl_file_close(ACL_FILE_HANDLE fh)
ACL_API void acl_set_read(acl_read_fn fn)
ACL_API void acl_set_close_socket(acl_close_socket_fn fn)
ACL_API int acl_socket_end(void)
ACL_API int acl_socket_writev(ACL_SOCKET fd, const struct iovec *vec, int count, int timeout, ACL_VSTREAM *fp, void *arg)
ssize_t(* acl_recv_fn)(ACL_SOCKET, void *, size_t, int)
ssize_t(* acl_read_fn)(ACL_SOCKET, void *, size_t)
ACL_API int acl_file_read(ACL_FILE_HANDLE fh, void *buf, size_t size, int timeout, ACL_VSTREAM *fp, void *arg)
ACL_API int acl_socket_init(void)
ACL_API int acl_socket_shutdown(ACL_SOCKET fd, int how)
ACL_API void acl_set_send(acl_send_fn fn)
ssize_t(* acl_write_fn)(ACL_SOCKET, const void *, size_t)
ACL_API int acl_socket_close(ACL_SOCKET fd)
ACL_API int acl_socket_write(ACL_SOCKET fd, const void *buf, size_t size, int timeout, ACL_VSTREAM *fp, void *arg)
ACL_API void acl_set_writev(acl_writev_fn fn)
ACL_API int acl_socket_alive(ACL_SOCKET fd)
ACL_API int acl_file_write(ACL_FILE_HANDLE fh, const void *buf, size_t size, int timeout, ACL_VSTREAM *fp, void *arg)
ACL_API void acl_set_write(acl_write_fn fn)