openbsd-ports/net/xmlrpc-c/patches/patch-src_xmlrpc_builddecomp_c
espie 31e4f1d7d2 xmlrpc C/C++ library, prereq for newer cmake.
Also, makes sense to take this code out, as some other stuff is bound
to want this at some point.

This library is incredibly sloppy engineering. Reasonably readable
code, looks sensible, but incredible lack of testing (doesn't even pass
its own testsuite on a stable release... and does a lot of things that
can't work outside of linux... makes you wonder who is actually using
this...)
2006-12-18 14:39:56 +00:00

44 lines
1.3 KiB
Plaintext

$OpenBSD: patch-src_xmlrpc_builddecomp_c,v 1.1.1.1 2006/12/18 14:39:56 espie Exp $
--- src/xmlrpc_builddecomp.c.orig Mon Dec 18 12:15:59 2006
+++ src/xmlrpc_builddecomp.c Mon Dec 18 12:47:57 2006
@@ -26,11 +26,15 @@ typedef double va_double;
** tricky fashions. We don't why Python does this, but since we're
** abusing our va_list objects in a similar fashion, we'll copy them
** too. */
+#if defined(va_copy)
+#define VA_LIST_COPY(dest, src) va_copy(dest, src)
+#else
#if VA_LIST_IS_ARRAY
#define VA_LIST_COPY(dest,src) memcpy((dest), (src), sizeof(va_list))
#else
#define VA_LIST_COPY(dest,src) ((dest) = (src))
#endif
+#endif
/*=========================================================================
** Creating XML-RPC values.
@@ -460,6 +464,7 @@ xmlrpc_build_value_va(xmlrpc_env * co
if (!envP->fault_occurred)
XMLRPC_ASSERT_VALUE_OK(*valPP);
+ va_end(args_copy);
*tailP = formatCursor;
}
@@ -887,6 +892,7 @@ xmlrpc_decompose_value_va(xmlrpc_env *
if (!envP->fault_occurred) {
XMLRPC_ASSERT(*format_copy == '\0');
}
+ va_end(args_copy);
}
@@ -925,6 +931,7 @@ xmlrpc_parse_value_va(xmlrpc_env * con
if (!envP->fault_occurred) {
XMLRPC_ASSERT(*format_copy == '\0');
}
+ va_end(args_copy);
}