Changed amx structure for compatibility
This commit is contained in:
parent
580b20e720
commit
37a5a38be5
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user