lib files are building
This commit is contained in:
@@ -106,7 +106,7 @@ bool CBlockCountry::IsBlockedCountryIp(const char *user_ip)
|
||||
BLOCK_IP_VECTOR::iterator iter;
|
||||
struct in_addr st_addr;
|
||||
|
||||
#ifndef __WIN32__
|
||||
#ifndef OS_WINDOWS
|
||||
if (0 == inet_aton(user_ip, &st_addr))
|
||||
#else
|
||||
unsigned long in_address;
|
||||
|
||||
@@ -9,6 +9,9 @@ target_link_libraries(db
|
||||
libsql
|
||||
libthecore
|
||||
libredis
|
||||
|
||||
# external
|
||||
mariadbclient
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
|
||||
@@ -3239,7 +3239,7 @@ int CClientManager::Process()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __WIN32__
|
||||
#ifdef OS_WINDOWS
|
||||
if (_kbhit()) {
|
||||
int c = _getch();
|
||||
switch (c) {
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
// vim:ts=8 sw=4
|
||||
#ifndef __INC_METIN2_DB_DBMANAGER_H__
|
||||
#define __INC_METIN2_DB_DBMANAGER_H__
|
||||
|
||||
// 디비 커넥션 클래스의 목적은... 디비에 접속해서 쿼리보내고 결과 받아오는
|
||||
// 모든 일들을 처리한다.
|
||||
// 코드 by 꼬붕 후로그래머 아노아~ = _=)b
|
||||
#include <mysql/mysql.h>
|
||||
#include <mysql.h>
|
||||
|
||||
#include "../../libsql/AsyncSQL.h"
|
||||
#include "libsql/AsyncSQL.h"
|
||||
|
||||
#define SQL_SAFE_LENGTH(size) (size * 2 + 1)
|
||||
#define QUERY_SAFE_LENGTH(size) (1024 + SQL_SAFE_LENGTH(size))
|
||||
|
||||
@@ -12,7 +12,7 @@ CLock::~CLock()
|
||||
void CLock::Initialize()
|
||||
{
|
||||
m_bLocked = false;
|
||||
#ifndef __WIN32__
|
||||
#ifndef OS_WINDOWS
|
||||
pthread_mutex_init(&m_lock, NULL);
|
||||
#else
|
||||
::InitializeCriticalSection(&m_lock);
|
||||
@@ -22,7 +22,7 @@ void CLock::Initialize()
|
||||
void CLock::Destroy()
|
||||
{
|
||||
assert(!m_bLocked && "lock didn't released");
|
||||
#ifndef __WIN32__
|
||||
#ifndef OS_WINDOWS
|
||||
pthread_mutex_destroy(&m_lock);
|
||||
#else
|
||||
::DeleteCriticalSection(&m_lock);
|
||||
@@ -31,7 +31,7 @@ void CLock::Destroy()
|
||||
|
||||
int CLock::Trylock()
|
||||
{
|
||||
#ifndef __WIN32__
|
||||
#ifndef OS_WINDOWS
|
||||
return pthread_mutex_trylock(&m_lock);
|
||||
#else
|
||||
return ::TryEnterCriticalSection(&m_lock);
|
||||
@@ -40,7 +40,7 @@ int CLock::Trylock()
|
||||
|
||||
void CLock::Lock()
|
||||
{
|
||||
#ifndef __WIN32__
|
||||
#ifndef OS_WINDOWS
|
||||
pthread_mutex_lock(&m_lock);
|
||||
#else
|
||||
::EnterCriticalSection(&m_lock);
|
||||
@@ -52,7 +52,7 @@ void CLock::Unlock()
|
||||
{
|
||||
assert(m_bLocked && "lock didn't issued");
|
||||
m_bLocked = false;
|
||||
#ifndef __WIN32__
|
||||
#ifndef OS_WINDOWS
|
||||
pthread_mutex_unlock(&m_lock);
|
||||
#else
|
||||
::LeaveCriticalSection(&m_lock);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#ifndef __INC_LOCK_H__
|
||||
#define __INC_LOCK_H__
|
||||
|
||||
#ifdef __WIN32__
|
||||
#ifdef OS_WINDOWS
|
||||
typedef CRITICAL_SECTION lock_t;
|
||||
#else
|
||||
typedef pthread_mutex_t lock_t;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "AuctionManager.h"
|
||||
#endif
|
||||
#include <signal.h>
|
||||
#undef __FreeBSD__
|
||||
#undef OS_FREEBSD
|
||||
void SetPlayerDBName(const char* c_pszPlayerDBName);
|
||||
void SetTablePostfix(const char* c_pszTablePostfix);
|
||||
int Start();
|
||||
@@ -44,7 +44,7 @@ int g_log = 1;
|
||||
int g_iItemPriceListTableCacheFlushSeconds = 540;
|
||||
// END_OF_MYSHOP_PRICE_LIST
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#ifdef OS_FREEBSD
|
||||
extern const char * _malloc_options;
|
||||
#endif
|
||||
|
||||
@@ -65,7 +65,7 @@ int main()
|
||||
{
|
||||
WriteVersion();
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#ifdef OS_FREEBSD
|
||||
_malloc_options = "A";
|
||||
#endif
|
||||
|
||||
@@ -392,7 +392,7 @@ int Start()
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef __WIN32__
|
||||
#ifndef OS_WINDOWS
|
||||
signal(SIGUSR1, emergency_sig);
|
||||
#endif
|
||||
signal(SIGSEGV, emergency_sig);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "../../libthecore/include/stdafx.h"
|
||||
|
||||
#ifndef __WIN32__
|
||||
#ifndef OS_WINDOWS
|
||||
#include <semaphore.h>
|
||||
#else
|
||||
#define isdigit iswdigit
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
void WriteVersion()
|
||||
{
|
||||
#ifndef __WIN32__
|
||||
#ifndef OS_WINDOWS
|
||||
FILE* fp(fopen("VERSION.txt", "w"));
|
||||
|
||||
if (NULL != fp)
|
||||
|
||||
Reference in New Issue
Block a user