From 19a1067b34b13a04fb4f084585bf81ae02eb6765 Mon Sep 17 00:00:00 2001 From: anoncvs_rymo Date: Thu, 30 Aug 2001 15:49:37 +0000 Subject: [PATCH] vsnprintf is not standard git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1192 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/pic/pcode.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 2.47.2