comparison src/protocols/oscar/ft.c @ 3646:bfd8df165f32

[gaim-migrate @ 3770] win32 fix committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Fri, 11 Oct 2002 19:30:22 +0000
parents 9682c0e022c6
children e597186997d5
comparison
equal deleted inserted replaced
3645:6278486dc21d 3646:bfd8df165f32
15 #include <netdb.h> 15 #include <netdb.h>
16 #include <sys/socket.h> 16 #include <sys/socket.h>
17 #include <netinet/in.h> 17 #include <netinet/in.h>
18 #include <sys/utsname.h> /* for aim_directim_initiate */ 18 #include <sys/utsname.h> /* for aim_directim_initiate */
19 #include <arpa/inet.h> /* for inet_ntoa */ 19 #include <arpa/inet.h> /* for inet_ntoa */
20 #else 20 #endif
21
22 #include "gaim.h"
23
24 #ifdef _WIN32
21 #include "win32dep.h" 25 #include "win32dep.h"
22 #endif 26 #endif
23 27
24 #include "gaim.h"
25 28
26 /* TODO: 29 /* TODO:
27 o look for memory leaks.. there's going to be shitloads, i'm sure. 30 o look for memory leaks.. there's going to be shitloads, i'm sure.
28 */ 31 */
29 32
963 return listenfd; 966 return listenfd;
964 #else 967 #else
965 int listenfd; 968 int listenfd;
966 const int on = 1; 969 const int on = 1;
967 struct sockaddr_in sockin; 970 struct sockaddr_in sockin;
971 #ifdef _WIN32
972 u_long imode;
973 #endif
968 974
969 if ((listenfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { 975 if ((listenfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
970 perror("socket(listenfd)"); 976 perror("socket(listenfd)");
971 return -1; 977 return -1;
972 } 978 }
1001 #else 1007 #else
1002 closesocket(listenfd); 1008 closesocket(listenfd);
1003 #endif 1009 #endif
1004 return -1; 1010 return -1;
1005 } 1011 }
1012 #ifndef _WIN32
1006 fcntl(listenfd, F_SETFL, O_NONBLOCK); 1013 fcntl(listenfd, F_SETFL, O_NONBLOCK);
1014 #else
1015 imode = 1;
1016 ioctlsocket(listenfd, FIONBIO, &imode);
1017 #endif
1007 return listenfd; 1018 return listenfd;
1008 #endif 1019 #endif
1009 } 1020 }
1010 1021
1011 static int getcommand_getfile(aim_session_t *sess, aim_conn_t *conn) 1022 static int getcommand_getfile(aim_session_t *sess, aim_conn_t *conn)