comparison 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
comparison
equal deleted inserted replaced
11430:4b7087777411 11431:d2e44c8085e0
137 return -1; 137 return -1;
138 } 138 }
139 return 0; 139 return 0;
140 } 140 }
141 141
142 int wgaim_sendto(int socket, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) {
143 int ret;
144 if ((ret = sendto(socket, buf, len, flags, to, tolen)
145 ) == SOCKET_ERROR) {
146 errno = WSAGetLastError();
147 return -1;
148 }
149 return ret;
150 }
151
142 /* fcntl.h */ 152 /* fcntl.h */
143 /* This is not a full implementation of fcntl. Update as needed.. */ 153 /* This is not a full implementation of fcntl. Update as needed.. */
144 int wgaim_fcntl(int socket, int command, int val) { 154 int wgaim_fcntl(int socket, int command, int val) {
145 switch( command ) { 155 switch( command ) {
146 case F_SETFL: 156 case F_SETFL: