From 28eedb41600c4c6617cd38905b3e55c879180754 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Sat, 5 May 2007 14:50:07 +0000 Subject: * Removed the dependency on winsock.h for definitions, it's all winsock2.h now. * Minor documentation/re-coding in chat.c. * More work on ticket #41. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10471 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/socket.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/common/socket.c') diff --git a/src/common/socket.c b/src/common/socket.c index 73b0fb06b..efc51b99d 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -1,14 +1,22 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder +#include "../common/cbasetypes.h" +#include "../common/mmo.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "socket.h" + #include #include #include #include -#ifdef __WIN32 - #define WIN32_LEAN_AND_MEAN - #include +#ifdef WIN32 + //#define WIN32_LEAN_AND_MEAN + //#include #include #include #else @@ -29,7 +37,7 @@ #endif // portability layer -#ifdef _WIN32 +#ifdef WIN32 typedef int socklen_t; #define s_errno WSAGetLastError() @@ -52,13 +60,6 @@ #define S_ECONNABORTED ECONNABORTED #endif -#include "../common/socket.h" -#include "../common/mmo.h" -#include "../common/timer.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" - fd_set readfds; int fd_max; time_t last_tick; @@ -561,7 +562,7 @@ int do_sendrecv(int next) fd_max = ret; } -#ifdef _WIN32 +#ifdef WIN32 // on windows, enumerating all members of the fd_set is way faster if we access the internals for(i=0;i<(int)rfd.fd_count;i++) { -- cgit v1.2.3-70-g09d2