windows: Don't use function macros to overload send/recv() and friends

While the macro versions would not catch non-function invocations, we actually
have to use catch all to support the sender_t.send() function.
This commit is contained in:
Martin Willi
2014-06-04 15:53:03 +02:00
parent 87664d92ca
commit 9ff1716029
+4 -4
View File
@@ -267,26 +267,26 @@ int socketpair(int domain, int type, int protocol, int sv[2]);
/**
* recv(2) with support for MSG_DONTWAIT
*/
#define recv(...) windows_recv(__VA_ARGS__)
#define recv windows_recv
ssize_t windows_recv(int sockfd, void *buf, size_t len, int flags);
/**
* recvfrom(2) with support for MSG_DONTWAIT
*/
#define recvfrom(...) windows_recvfrom(__VA_ARGS__)
#define recvfrom windows_recvfrom
ssize_t windows_recvfrom(int sockfd, void *buf, size_t len, int flags,
struct sockaddr *src_addr, socklen_t *addrlen);
/**
* recvfrom(2) with support for MSG_DONTWAIT
*/
#define send(...) windows_send(__VA_ARGS__)
#define send windows_send
ssize_t windows_send(int sockfd, const void *buf, size_t len, int flags);
/**
* recvfrom(2) with support for MSG_DONTWAIT
*/
#define sendto(...) windows_send(__VA_ARGS__)
#define sendto windows_send
ssize_t windows_sendto(int sockfd, const void *buf, size_t len, int flags,
const struct sockaddr *dest_addr, socklen_t addrlen);