diff options
author | Lars Persson | 2006-06-07 20:35:47 +0000 |
---|---|---|
committer | Lars Persson | 2006-06-07 20:35:47 +0000 |
commit | 60456933e75c2c3cdd436a2198010d59409d332a (patch) | |
tree | 23aacb1a6d4277066c5a2a357fe0366f3c7214e0 /backends | |
parent | 34dae22c1a1db184c380f5b30ecde367f0d12485 (diff) | |
download | scummvm-rg350-60456933e75c2c3cdd436a2198010d59409d332a.tar.gz scummvm-rg350-60456933e75c2c3cdd436a2198010d59409d332a.tar.bz2 scummvm-rg350-60456933e75c2c3cdd436a2198010d59409d332a.zip |
Proper override for vsnprintf to give proper error messages
svn-id: r22980
Diffstat (limited to 'backends')
-rw-r--r-- | backends/symbian/src/portdefs.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/backends/symbian/src/portdefs.h b/backends/symbian/src/portdefs.h index d84db8cdd9..c31fe8caa9 100644 --- a/backends/symbian/src/portdefs.h +++ b/backends/symbian/src/portdefs.h @@ -42,10 +42,10 @@ // hack in some tricks to work around not having these fcns for Symbian // and we _really_ don't wanna link with any other windows LIBC library! -#ifdef __GCC32__ +#if defined(__GCC32__) #define snprintf(buf,len,args...) sprintf(buf,args) - #define vsnprintf snprintf + #define vsnprintf(buf,len,format,valist) vsprintf(buf,format,valist) // taken from public domain http://www.opensource.apple.com/darwinsource/WWDC2004/gcc_legacy-939/gcc/floatlib.c #define SIGNBIT 0x80000000 @@ -104,7 +104,7 @@ PS2. http://gcc.gnu.org/ml/gcc-bugs/2004-01/msg01596.html might have found out the same problem there */ -#else // WINS +#elif defined (__WINS__) // WINS // let's just blatantly ignore this for now and just get it to work :P but does n't work from the debug function int inline scumm_snprintf (char *str, unsigned long /*n*/, char const *fmt, ...) { @@ -115,8 +115,13 @@ return strlen(str); } + int inline scumm_vsnprintf (char *str, unsigned long /*n*/, char const *fmt, va_list valist) { + vsprintf(str, fmt, valist); + return strlen(str); + } + #define snprintf scumm_snprintf - #define vsnprintf scumm_snprintf + #define vsnprintf scumm_vsnprintf #endif |