summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-30 22:14:36 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-30 22:14:36 +0000
commit4d81f68ece4dee6282024fe7189d8402a05428db (patch)
treed04b30fe51fc769d70fab7e3ede00fe499fd923f /src/char/char.c
parent3c9107ed87b2153f9ca2ed8896979f076be469e3 (diff)
downloadhercules-4d81f68ece4dee6282024fe7189d8402a05428db.tar.gz
hercules-4d81f68ece4dee6282024fe7189d8402a05428db.tar.bz2
hercules-4d81f68ece4dee6282024fe7189d8402a05428db.tar.xz
hercules-4d81f68ece4dee6282024fe7189d8402a05428db.zip
eAthena VC7 solution and support added for native builds [MouseJstr]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1347 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/char/char.c b/src/char/char.c
index b2fc12ddb..1a5fa49e8 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2,19 +2,26 @@
// original : char2.c 2003/03/14 11:58:35 Rev.1.5
#include <sys/types.h>
-#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
+
+#ifdef _WIN32
+#include <winsock.h>
+typedef long in_addr_t;
+#else
+#include <sys/socket.h>
#include <netinet/in.h>
-#include <sys/time.h>
-#include <time.h>
+#include <arpa/inet.h>
+#include <netdb.h>
#include <sys/ioctl.h>
+#include <sys/time.h>
#include <unistd.h>
+#endif
+
+#include <time.h>
#include <signal.h>
#include <fcntl.h>
#include <string.h>
-#include <arpa/inet.h>
-#include <netdb.h>
#include <stdarg.h>
#include "../common/strlib.h"
@@ -1073,7 +1080,7 @@ void create_online_files(void) {
char temp[256]; // to prepare what we must display
time_t time_server; // for number of seconds
struct tm *datetime; // variable for time in structure ->tm_mday, ->tm_sec, ...
- int id[online_players_max];
+ int id[4096];
// don't return here if we display nothing, because server[j].users is updated in the first loop.
@@ -1822,7 +1829,7 @@ int parse_tologin(int fd) {
char_log("'ladmin': Receiving a message for broadcast, but no map-server is online." RETCODE);
else {
unsigned char buf[128];
- char message[RFIFOL(fd,4) + 1]; // +1 to add a null terminated if not exist in the packet
+ char message[4096]; // +1 to add a null terminated if not exist in the packet
int lp;
char *p;
memset(message, '\0', sizeof(message));