From 683b593c838db1fc2c2e303bb3811a4503e98a9b Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 22 Apr 2015 21:20:40 +0100 Subject: mingw: additional networking support --- include/mingw.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'include/mingw.h') diff --git a/include/mingw.h b/include/mingw.h index 247aae587..86259f2d1 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -217,18 +217,29 @@ int ioctl(int fd, int code, ...); */ #define hstrerror strerror +#define SHUT_WR SD_SEND + int mingw_socket(int domain, int type, int protocol); int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz); +int mingw_bind(int sockfd, struct sockaddr *sa, size_t sz); +int mingw_setsockopt(int sockfd, int lvl, int optname, void *optval, int optlen); +int mingw_shutdown(int sockfd, int how); +int mingw_listen(int sockfd, int backlog); +int mingw_accept(int sockfd1, struct sockaddr *sa, socklen_t *sz); +int mingw_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, + struct timeval *timeout); NOIMPL(mingw_sendto,SOCKET s UNUSED_PARAM, const char *buf UNUSED_PARAM, int len UNUSED_PARAM, int flags UNUSED_PARAM, const struct sockaddr *sa UNUSED_PARAM, int salen UNUSED_PARAM); -NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM); -NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,int salen UNUSED_PARAM); #define socket mingw_socket #define connect mingw_connect #define sendto mingw_sendto #define listen mingw_listen #define bind mingw_bind +#define setsockopt mingw_setsockopt +#define shutdown mingw_shutdown +#define accept mingw_accept +#define select mingw_select /* * sys/stat.h -- cgit v1.2.3-55-g6feb