From 37a5a38be5f60aa45835f013c600d7aade11d7e8 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 3 Sep 2004 06:53:00 +0000 Subject: [PATCH] Changed amx structure for compatibility --- amxmodx/amx.h | 6 ++---- amxmodx/amxxlog.cpp | 8 ++++++-- amxmodx/sdk/amxxmodule.h | 2 -- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/amxmodx/amx.h b/amxmodx/amx.h index b7c96357..b4c0c05c 100755 --- a/amxmodx/amx.h +++ b/amxmodx/amx.h @@ -217,11 +217,9 @@ typedef struct tagAMX { cell reset_stk PACKED; cell reset_hea PACKED; cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */ - #if defined JIT /* support variables for the JIT */ - int reloc_size PACKED; /* required temporary buffer for relocations */ - long code_size PACKED; /* estimated memory footprint of the native code */ - #endif + int reloc_size PACKED; /* required temporary buffer for relocations */ + long code_size PACKED; /* estimated memory footprint of the native code */ } AMX; /* The AMX_HEADER structure is both the memory format as the file format. The diff --git a/amxmodx/amxxlog.cpp b/amxmodx/amxxlog.cpp index 25eb0b24..d23fdf7d 100755 --- a/amxmodx/amxxlog.cpp +++ b/amxmodx/amxxlog.cpp @@ -40,6 +40,10 @@ #endif #include "amxmodx.h" +#ifndef __linux__ +#define vsnprintf _vsnprintf +#endif + CLog::CLog() { m_LogType = 0; @@ -158,7 +162,7 @@ void CLog::Log(const char *fmt, ...) va_list arglst; va_start(arglst, fmt); - vsprintf(msg, fmt, arglst); + vsnprintf(msg, 3071, fmt, arglst); va_end(arglst); FILE *pF; @@ -203,7 +207,7 @@ void CLog::Log(const char *fmt, ...) char msg[3072]; va_list arglst; va_start(arglst, fmt); - vsprintf(msg, fmt, arglst); + vsnprintf(msg, 3071, fmt, arglst); va_end(arglst); ALERT(at_logged, "%s\n", msg); } diff --git a/amxmodx/sdk/amxxmodule.h b/amxmodx/sdk/amxxmodule.h index 2294e4a7..2c20eaa3 100755 --- a/amxmodx/sdk/amxxmodule.h +++ b/amxmodx/sdk/amxxmodule.h @@ -204,11 +204,9 @@ typedef struct tagAMX { cell reset_stk PACKED; cell reset_hea PACKED; cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */ - #if defined JIT /* support variables for the JIT */ int reloc_size PACKED; /* required temporary buffer for relocations */ long code_size PACKED; /* estimated memory footprint of the native code */ - #endif } AMX; enum {