1
0
forked from metin2/server

Rewrote network stack, started working on porting to 64-bit

This commit is contained in:
2022-03-12 11:39:41 +02:00
parent 64596d344c
commit a056345a7b
167 changed files with 1388 additions and 3085 deletions

View File

@ -25,7 +25,7 @@
char * mem_data;
int mem_size;
long flag;
int flag;
};
extern LPBUFFER buffer_new(int size); // <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>

View File

@ -11,6 +11,7 @@
#include <cassert>
#include <cctype>
#include <climits>
#include <string>
#include <dirent.h>
#include <sys/time.h>

View File

@ -1,10 +1,6 @@
#ifndef __INC_LIBTHECORE_UTILS_H__
#define __INC_LIBTHECORE_UTILS_H__
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
#define SAFE_FREE(p) { if (p) { free( (void *) p); (p) = NULL; } }
#define SAFE_DELETE(p) { if (p) { delete (p); (p) = NULL; } }
@ -62,6 +58,9 @@ extern "C"
extern char * time_str(time_t ct);
std::string GetSocketHost(const sockaddr * address);
in_port_t GetSocketPort(const sockaddr * address);
#define CREATE(result, type, number) do { \
if (!((result) = (type *) calloc ((number), sizeof(type)))) { \
sys_err("calloc failed [%d] %s", errno, strerror(errno)); \
@ -127,9 +126,6 @@ extern "C"
((DWORD)(BYTE) (ch2) << 16) | ((DWORD)(BYTE) (ch3) << 24))
#endif // defined(MAKEFOURCC)
#ifdef __cplusplus
}
#endif // __cplusplus
// _countof for gcc/g++
#if !defined(_countof)