Mercurial > pidgin
diff src/protocols/oscar/ft.c @ 3717:988485669631
[gaim-migrate @ 3850]
Warning fixes and WIN32 ifdef removals
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Wed, 16 Oct 2002 19:57:03 +0000 |
parents | e597186997d5 |
children | b32474e522fa |
line wrap: on
line diff
--- a/src/protocols/oscar/ft.c Wed Oct 16 19:44:19 2002 +0000 +++ b/src/protocols/oscar/ft.c Wed Oct 16 19:57:03 2002 +0000 @@ -62,21 +62,13 @@ return 0; /* not an error */ if (cliaddr.sa_family != AF_INET) { /* just in case IPv6 really is happening */ -#ifndef _WIN32 close(acceptfd); -#else - closesocket(acceptfd); -#endif aim_conn_close(cur); return -1; } if (!(newconn = aim_cloneconn(sess, cur))) { -#ifndef _WIN32 close(acceptfd); -#else - closesocket(acceptfd); -#endif aim_conn_close(cur); return -1; } @@ -342,11 +334,7 @@ /* XXX switch to aim_cloneconn()? */ if (!(newconn = aim_newconn(sess, AIM_CONN_TYPE_RENDEZVOUS_OUT, NULL))) { -#ifndef _WIN32 close(listenfd); -#else - closesocket(listenfd); -#endif return NULL; } @@ -417,11 +405,7 @@ aim_cachecookie(sess, cookie); if (!(newconn = aim_newconn(sess, AIM_CONN_TYPE_RENDEZVOUS_OUT, NULL))) { -#ifndef _WIN32 close(listenfd); -#else - closesocket(listenfd); -#endif return NULL; } @@ -945,11 +929,7 @@ if (bind(listenfd, res->ai_addr, res->ai_addrlen) == 0) break; /* success */ -#ifndef _WIN32 close(listenfd); -#else - closesocket(listenfd); -#endif } while ( (res = res->ai_next) ); if (!res) @@ -968,9 +948,6 @@ int listenfd; const int on = 1; struct sockaddr_in sockin; -#ifdef _WIN32 - u_long imode; -#endif if ((listenfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("socket(listenfd)"); @@ -979,11 +956,7 @@ if (setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) != 0) { perror("setsockopt(listenfd)"); -#ifndef _WIN32 close(listenfd); -#else - closesocket(listenfd); -#endif return -1; } @@ -993,28 +966,15 @@ if (bind(listenfd, (struct sockaddr *)&sockin, sizeof(struct sockaddr_in)) != 0) { perror("bind(listenfd)"); -#ifndef _WIN32 close(listenfd); -#else - closesocket(listenfd); -#endif return -1; } if (listen(listenfd, 4) != 0) { perror("listen(listenfd)"); -#ifndef _WIN32 close(listenfd); -#else - closesocket(listenfd); -#endif return -1; } -#ifndef _WIN32 fcntl(listenfd, F_SETFL, O_NONBLOCK); -#else - imode = 1; - ioctlsocket(listenfd, FIONBIO, &imode); -#endif return listenfd; #endif }