summaryrefslogtreecommitdiff
path: root/src/common/socket.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-05 14:50:07 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-05 14:50:07 +0000
commit28eedb41600c4c6617cd38905b3e55c879180754 (patch)
treef3309c45f09acdba5144185b51d91f4a51b0b2f9 /src/common/socket.c
parenta79359182bb925d2f64dc82adccbf4333cdcd01d (diff)
downloadhercules-28eedb41600c4c6617cd38905b3e55c879180754.tar.gz
hercules-28eedb41600c4c6617cd38905b3e55c879180754.tar.bz2
hercules-28eedb41600c4c6617cd38905b3e55c879180754.tar.xz
hercules-28eedb41600c4c6617cd38905b3e55c879180754.zip
* 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
Diffstat (limited to 'src/common/socket.c')
-rw-r--r--src/common/socket.c25
1 files changed, 13 insertions, 12 deletions
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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
-#ifdef __WIN32
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
+#ifdef WIN32
+ //#define WIN32_LEAN_AND_MEAN
+ //#include <windows.h>
#include <winsock2.h>
#include <io.h>
#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++)
{