CVS update: /common/util/
gwright at helixcommunity.org gwright at helixcommunity.orgUser: gwright Date: 02/12/20 15:32:12 Modified /common/util/ hxstrutl.cpp Log Fixing the SafeSprintf issue to remove the #error. Issue number: Obtained from: Submitted by: Reviewed by: File Changes: Directory: /common/util/ ======================== File [changed]: hxstrutl.cpp Url: https://common.helixcommunity.org/source/browse/common/util/hxstrutl.cpp.diff?r1=1.3&r2=1.4 Delta lines: +2 -9 ------------------- --- hxstrutl.cpp 20 Dec 2002 21:32:17 -0000 1.3 +++ hxstrutl.cpp 20 Dec 2002 23:32:12 -0000 1.4 @@ -40,6 +40,8 @@ #include "hxstrutl.h" #include "hxassert.h" +#include <stdio.h> //for vsnprintf + #ifdef _MACINTOSH int CopyP2CString(ConstStr255Param inSource, char* outDest, int inDestLength) @@ -501,16 +503,11 @@ #ifdef _WINDOWS #define VSNPRINTF _vsnprintf -#define VSNPRINTF_SUPPORTED #elif defined _MACINTOSH #define VSNPRINTF vsnprintf -#define VSNPRINTF_SUPPORTED #elif defined _LINUX #include <stdarg.h> //for va_start... #define VSNPRINTF vsnprintf -#define VSNPRINTF_SUPPORTED -#else -#error "You need to support vsnprintf on this platform." #endif int SafeSprintf(char* pBuffer, UINT32 ulBufferSize, const char* pFormatStr, ...) @@ -521,7 +518,6 @@ return 0; } -#ifdef VSNPRINTF_SUPPORTED va_list argptr; va_start(argptr, pFormatStr); @@ -531,7 +527,4 @@ va_end(argptr); return nCharsWritten; -#else - return 0; -#endif // VSNPRINTF_SUPPORTED } --------------------------------------------------------------------- To unsubscribe, e-mail: cvs-unsubscribe at common.helixcommunity.org For additional commands, e-mail: cvs-help at common.helixcommunity.org