2 #ifndef EL__OSDEP_WIN32_OVERRIDES_H
3 #define EL__OSDEP_WIN32_OVERRIDES_H
12 int win32_write(int fd
, const void *buf
, unsigned len
);
13 int win32_read(int fd
, void *buf
, unsigned len
);
14 int win32_pipe(int *fds
);
15 int win32_socket(int pf
, int type
, int proto
);
16 int win32_connect(int fd
, struct sockaddr
*addr
, int addr_len
);
17 int win32_getpeername(int fd
, struct sockaddr
*addr
, int *addr_len
);
18 int win32_getsockname(int fd
, struct sockaddr
*addr
, int *addr_len
);
19 int win32_listen(int fd
, int backlog
);
20 int win32_accept(int fd
, struct sockaddr
*addr
, int *addr_len
);
21 int win32_bind(int fd
, struct sockaddr
*addr
, int addr_len
);
22 int win32_close(int fd
);
23 int win32_getsockopt(int fd
, int level
, int option
, void *optval
, int *optlen
);
24 int win32_ioctl(int fd
, long option
, int *flag
);
25 int win32_select(int num_fds
, struct fd_set
*rd
, struct fd_set
*wr
,
26 struct fd_set
*ex
, struct timeval
*tv
);
27 char *win32_strerror(int err
);
30 #ifndef WIN32_OVERRIDES_SELF
32 #define read win32_read
33 #define write win32_write
34 #define close win32_close
35 #define pipe win32_pipe
36 #define socket(pf, type, prot) win32_socket(pf, type, prot)
37 #define connect(fd, a, al) win32_connect(fd, a, al)
38 #define getpeername(fd, a, al) win32_getpeername(fd, a, al)
39 #define getsockname(fd, a, al) win32_getsockname(fd, a, al)
40 #define listen(fd, bl) win32_listen(fd, bl)
41 #define accept(fd, a, al) win32_accept(fd, a, al)
42 #define bind(fd, a, al) win32_bind(fd, a, al)
43 #define getsockopt(fd, l, o, ov, ol) win32_getsockopt(fd, l, o, ov, ol)
44 #define ioctl(fd,opt,flag) win32_ioctl(fd, opt, flag)
45 #define select win32_select
46 #define strerror(err) win32_strerror(err)