From 9657eb263715096dff1c7b000fd76ccd826ffe37 Mon Sep 17 00:00:00 2001 From: Lance Date: Tue, 27 Mar 2012 03:01:13 +0000 Subject: [PATCH] Fix Win64 SDL build git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4012 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/botlib/l_script.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/engine/botlib/l_script.c b/engine/botlib/l_script.c index 278d71cca..4ed93cd14 100644 --- a/engine/botlib/l_script.c +++ b/engine/botlib/l_script.c @@ -166,6 +166,16 @@ char basefolder[MAX_PATH]; char basefolder[MAX_QPATH]; #endif +#ifdef _WIN64 + #ifdef _SDL + #define snprintf linuxlike_snprintf + int VARGS linuxlike_snprintf(char *buffer, int size, const char *format, ...) LIKEPRINTF(3); + #define vsnprintf linuxlike_vsnprintf + int VARGS linuxlike_vsnprintf(char *buffer, int size, const char *format, va_list argptr); + //void *__imp__vsnprintf = vsnprintf; + #endif +#endif + //=========================================================================== // // Parameter: - @@ -1164,7 +1174,7 @@ float ReadSignedFloat(script_t *script) sign = -1.0; } - + if (token.type != TT_NUMBER) { ScriptError(script, "expected float value, found %s\n", token.string); @@ -1201,7 +1211,7 @@ signed long int ReadSignedInt(script_t *script) ScriptError(script, "expected integer value, found %s\n", token.string); return 0; } - + return sign * token.intvalue; } //end of the function ReadSignedInt //============================================================================