SHA256
3
0
forked from pool/zlib
zlib/zlib-1.2.1-vsnprintf.patch

43 lines
1.2 KiB
Diff
Raw Normal View History

--- gzio.c
+++ gzio.c
@@ -606,16 +606,19 @@
va_start(va, format);
#ifdef NO_vsnprintf
# ifdef HAS_vsprintf_void
+#error
(void)vsprintf(buf, format, va);
va_end(va);
for (len = 0; len < sizeof(buf); len++)
if (buf[len] == 0) break;
# else
+#error
len = vsprintf(buf, format, va);
va_end(va);
# endif
#else
# ifdef HAS_vsnprintf_void
+#error
(void)vsnprintf(buf, sizeof(buf), format, va);
va_end(va);
len = strlen(buf);
@@ -643,16 +646,19 @@
buf[sizeof(buf) - 1] = 0;
#ifdef NO_snprintf
# ifdef HAS_sprintf_void
+#error
sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
for (len = 0; len < sizeof(buf); len++)
if (buf[len] == 0) break;
# else
+#error
len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
# endif
#else
# ifdef HAS_snprintf_void
+#error
snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
len = strlen(buf);