Mercurial > pidgin
diff src/win32/libc_interface.c @ 11431:d2e44c8085e0
[gaim-migrate @ 13668]
Win32 fixes for sendto() and also some whitespace fixes
committer: Tailor Script <tailor@pidgin.im>
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Fri, 02 Sep 2005 21:55:28 +0000 |
| parents | e1840eb860e7 |
| children | 8be7f4c472cf |
line wrap: on
line diff
--- a/src/win32/libc_interface.c Fri Sep 02 20:50:03 2005 +0000 +++ b/src/win32/libc_interface.c Fri Sep 02 21:55:28 2005 +0000 @@ -139,6 +139,16 @@ return 0; } +int wgaim_sendto(int socket, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) { + int ret; + if ((ret = sendto(socket, buf, len, flags, to, tolen) + ) == SOCKET_ERROR) { + errno = WSAGetLastError(); + return -1; + } + return ret; +} + /* fcntl.h */ /* This is not a full implementation of fcntl. Update as needed.. */ int wgaim_fcntl(int socket, int command, int val) {
