forked from metin2/server
Rewrote network stack, started working on porting to 64-bit
This commit is contained in:
@ -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>
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <cassert>
|
||||
#include <cctype>
|
||||
#include <climits>
|
||||
#include <string>
|
||||
#include <dirent.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user