zlib/zlib-1.2.1-vsnprintf.patch
OBS User autobuild 1c3af89309 Accepting request 25075 from Archiving
Copy from Archiving/zlib based on submit request 25075 from user msmeissn

OBS-URL: https://build.opensuse.org/request/show/25075
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zlib?expand=0&rev=13
2009-11-26 23:54:06 +00:00

45 lines
1.4 KiB
Diff

Index: gzio.c
===================================================================
--- gzio.c.orig 2005-07-11 22:31:48.000000000 +0200
+++ gzio.c 2009-11-24 17:22:25.927568000 +0100
@@ -610,16 +610,19 @@ int ZEXPORTVA gzprintf (gzFile file, con
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);
@@ -647,16 +650,19 @@ int ZEXPORTVA gzprintf (file, format, a1
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);