From: anoncvs_rymo Date: Thu, 30 Aug 2001 15:49:37 +0000 (+0000) Subject: vsnprintf is not standard X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=19a1067b34b13a04fb4f084585bf81ae02eb6765;p=fw%2Fsdcc vsnprintf is not standard git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1192 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/pic/pcode.c b/src/pic/pcode.c index 16bd38f9..95da354e 100644 --- a/src/pic/pcode.c +++ b/src/pic/pcode.c @@ -705,7 +705,15 @@ void SAFE_snprintf(char **str, size_t *size, const char *format, ...) return; va_start(val, format); +#if 0 + // Alas, vsnprintf is not ANSI standard, and does not exist + // on Solaris (and probably other non-Gnu flavored Unixes). vsnprintf(*str, *size, format, val); +#else + // This, of course, is *not* safe, despite the name. + vsprintf(*str, format, val); +#endif + va_end (val); len = strlen(*str);