Mercurial > pidgin.yaz
diff libpurple/win32/libc_interface.c @ 20347:04fe5601fedb
applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
through 8548e491a5b470d5665cb1cf87a7b0caaa3c87a5
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 21 Oct 2007 04:46:33 +0000 |
parents | 44b4e8bd759b |
children | 35b4f1dc4c8d |
line wrap: on
line diff
--- a/libpurple/win32/libc_interface.c Sun Oct 21 04:44:56 2007 +0000 +++ b/libpurple/win32/libc_interface.c Sun Oct 21 04:46:33 2007 +0000 @@ -138,12 +138,22 @@ /* fcntl.h */ /* This is not a full implementation of fcntl. Update as needed.. */ -int wpurple_fcntl(int socket, int command, int val) { +int wpurple_fcntl(int socket, int command, ...) { + switch( command ) { + case F_GETFL: + return 0; + case F_SETFL: { + va_list args; + int val; int ret=0; + va_start(args, command); + val = va_arg(args, int); + va_end(args); + switch( val ) { case O_NONBLOCK: { @@ -152,7 +162,7 @@ break; } case 0: - { + { u_long imode=0; ret = ioctlsocket(socket, FIONBIO, &imode); break;