Changed amx structure for compatibility

This commit is contained in:
David Anderson 2004-09-03 06:53:00 +00:00
parent 580b20e720
commit 37a5a38be5
3 changed files with 8 additions and 8 deletions

View File

@ -217,11 +217,9 @@ typedef struct tagAMX {
cell reset_stk PACKED; cell reset_stk PACKED;
cell reset_hea PACKED; cell reset_hea PACKED;
cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */ cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */
#if defined JIT
/* support variables for the JIT */ /* support variables for the JIT */
int reloc_size PACKED; /* required temporary buffer for relocations */ int reloc_size PACKED; /* required temporary buffer for relocations */
long code_size PACKED; /* estimated memory footprint of the native code */ long code_size PACKED; /* estimated memory footprint of the native code */
#endif
} AMX; } AMX;
/* The AMX_HEADER structure is both the memory format as the file format. The /* The AMX_HEADER structure is both the memory format as the file format. The

View File

@ -40,6 +40,10 @@
#endif #endif
#include "amxmodx.h" #include "amxmodx.h"
#ifndef __linux__
#define vsnprintf _vsnprintf
#endif
CLog::CLog() CLog::CLog()
{ {
m_LogType = 0; m_LogType = 0;
@ -158,7 +162,7 @@ void CLog::Log(const char *fmt, ...)
va_list arglst; va_list arglst;
va_start(arglst, fmt); va_start(arglst, fmt);
vsprintf(msg, fmt, arglst); vsnprintf(msg, 3071, fmt, arglst);
va_end(arglst); va_end(arglst);
FILE *pF; FILE *pF;
@ -203,7 +207,7 @@ void CLog::Log(const char *fmt, ...)
char msg[3072]; char msg[3072];
va_list arglst; va_list arglst;
va_start(arglst, fmt); va_start(arglst, fmt);
vsprintf(msg, fmt, arglst); vsnprintf(msg, 3071, fmt, arglst);
va_end(arglst); va_end(arglst);
ALERT(at_logged, "%s\n", msg); ALERT(at_logged, "%s\n", msg);
} }

View File

@ -204,11 +204,9 @@ typedef struct tagAMX {
cell reset_stk PACKED; cell reset_stk PACKED;
cell reset_hea PACKED; cell reset_hea PACKED;
cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */ cell sysreq_d PACKED; /* relocated address/value for the SYSREQ.D opcode */
#if defined JIT
/* support variables for the JIT */ /* support variables for the JIT */
int reloc_size PACKED; /* required temporary buffer for relocations */ int reloc_size PACKED; /* required temporary buffer for relocations */
long code_size PACKED; /* estimated memory footprint of the native code */ long code_size PACKED; /* estimated memory footprint of the native code */
#endif
} AMX; } AMX;
enum { enum {