Wrap listen and accept under Windows
Hrvoje Niksic <[email protected]> Sun, 03 Jul 2005 23:22:45 +0200
| Newsgroups | gmane.comp.web.wget.patches |
|---|---|
| Message-ID | <[email protected]> |
I just noticed that the Winsock functions listen and accept were not included in the list of functions that need wrapping. This fixes the oversight. This fix is also being applied to the 1.10 branch. 2005-07-03 Hrvoje Niksic <[email protected]> * mswindows.h: Also wrap accept() and listen(). Index: src/mswindows.c =================================================================== --- src/mswindows.c (revision 1955) +++ src/mswindows.c (revision 1956) @@ -752,6 +752,8 @@ WRAP (socket, (int domain, int type, int protocol), (domain, type, protocol)) WRAP (bind, (int s, struct sockaddr *a, int alen), (s, a, alen)) WRAP (connect, (int s, const struct sockaddr *a, int alen), (s, a, alen)) +WRAP (listen, (int s, int backlog), (s, backlog)) +WRAP (accept, (int s, struct sockaddr *a, int *alen), (s, a, alen)) WRAP (recv, (int s, void *buf, int len, int flags), (s, buf, len, flags)) WRAP (send, (int s, const void *buf, int len, int flags), (s, buf, len, flags)) WRAP (select, (int n, fd_set *r, fd_set *w, fd_set *e, const struct timeval *tm), Index: src/mswindows.h =================================================================== --- src/mswindows.h (revision 1955) +++ src/mswindows.h (revision 1956) @@ -149,6 +149,8 @@ #define socket wrapped_socket #define bind wrapped_bind #define connect wrapped_connect +#define listen wrapped_listen +#define accept wrapped_accept #define recv wrapped_recv #define send wrapped_send #define select wrapped_select @@ -162,6 +164,8 @@ int wrapped_socket (int, int, int); int wrapped_bind (int, struct sockaddr *, int); int wrapped_connect (int, const struct sockaddr *, int); +int wrapped_listen (int s, int backlog); +int wrapped_accept (int s, struct sockaddr *a, int *alen); int wrapped_recv (int, void *, int, int); int wrapped_send (int, const void *, int, int); int wrapped_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *);