Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
20346:07c2e60026da | 20347:04fe5601fedb |
---|---|
136 return ret; | 136 return ret; |
137 } | 137 } |
138 | 138 |
139 /* fcntl.h */ | 139 /* fcntl.h */ |
140 /* This is not a full implementation of fcntl. Update as needed.. */ | 140 /* This is not a full implementation of fcntl. Update as needed.. */ |
141 int wpurple_fcntl(int socket, int command, int val) { | 141 int wpurple_fcntl(int socket, int command, ...) { |
142 | |
142 switch( command ) { | 143 switch( command ) { |
144 case F_GETFL: | |
145 return 0; | |
146 | |
143 case F_SETFL: | 147 case F_SETFL: |
144 { | 148 { |
149 va_list args; | |
150 int val; | |
145 int ret=0; | 151 int ret=0; |
152 | |
153 va_start(args, command); | |
154 val = va_arg(args, int); | |
155 va_end(args); | |
146 | 156 |
147 switch( val ) { | 157 switch( val ) { |
148 case O_NONBLOCK: | 158 case O_NONBLOCK: |
149 { | 159 { |
150 u_long imode=1; | 160 u_long imode=1; |
151 ret = ioctlsocket(socket, FIONBIO, &imode); | 161 ret = ioctlsocket(socket, FIONBIO, &imode); |
152 break; | 162 break; |
153 } | 163 } |
154 case 0: | 164 case 0: |
155 { | 165 { |
156 u_long imode=0; | 166 u_long imode=0; |
157 ret = ioctlsocket(socket, FIONBIO, &imode); | 167 ret = ioctlsocket(socket, FIONBIO, &imode); |
158 break; | 168 break; |
159 } | 169 } |
160 default: | 170 default: |