From f09bd9153d81e657ec4f7721c51166a49b16f694 Mon Sep 17 00:00:00 2001 From: drahn Date: Sat, 16 Mar 2002 15:24:26 +0000 Subject: [PATCH] Fix vararg handling where code wants to double parse varargs data. ok matt@ --- lang/python/2.2/patches/patch-Objects_abstract_c | 15 +++++++++++++++ .../2.2/patches/patch-Objects_stringobject_c | 15 +++++++++++++++ lang/python/2.2/patches/patch-Python_getargs_c | 15 +++++++++++++++ lang/python/2.2/patches/patch-Python_modsupport_c | 15 +++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 lang/python/2.2/patches/patch-Objects_abstract_c create mode 100644 lang/python/2.2/patches/patch-Objects_stringobject_c create mode 100644 lang/python/2.2/patches/patch-Python_getargs_c create mode 100644 lang/python/2.2/patches/patch-Python_modsupport_c diff --git a/lang/python/2.2/patches/patch-Objects_abstract_c b/lang/python/2.2/patches/patch-Objects_abstract_c new file mode 100644 index 00000000000..8ef400a6dcd --- /dev/null +++ b/lang/python/2.2/patches/patch-Objects_abstract_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-Objects_abstract_c,v 1.1 2002/03/16 15:24:26 drahn Exp $ +--- Objects/abstract.c.orig Thu Mar 14 22:19:37 2002 ++++ Objects/abstract.c Thu Mar 14 22:20:49 2002 +@@ -1770,7 +1770,11 @@ objargs_mktuple(va_list va) + #ifdef VA_LIST_IS_ARRAY + memcpy(countva, va, sizeof(va_list)); + #else ++#ifdef __va_copy ++ __va_copy(countva, va); ++#else + countva = va; ++#endif + #endif + + while (((PyObject *)va_arg(countva, PyObject *)) != NULL) diff --git a/lang/python/2.2/patches/patch-Objects_stringobject_c b/lang/python/2.2/patches/patch-Objects_stringobject_c new file mode 100644 index 00000000000..685a8ee8ca3 --- /dev/null +++ b/lang/python/2.2/patches/patch-Objects_stringobject_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-Objects_stringobject_c,v 1.1 2002/03/16 15:24:26 drahn Exp $ +--- Objects/stringobject.c.orig Thu Mar 14 22:01:00 2002 ++++ Objects/stringobject.c Thu Mar 14 22:01:54 2002 +@@ -175,7 +175,11 @@ PyString_FromFormatV(const char *format, + #ifdef VA_LIST_IS_ARRAY + memcpy(count, vargs, sizeof(va_list)); + #else ++#ifdef __va_copy ++ __va_copy(count, vargs); ++#else + count = vargs; ++#endif + #endif + /* step 1: figure out how large a buffer we need */ + for (f = format; *f; f++) { diff --git a/lang/python/2.2/patches/patch-Python_getargs_c b/lang/python/2.2/patches/patch-Python_getargs_c new file mode 100644 index 00000000000..94b96dff6a7 --- /dev/null +++ b/lang/python/2.2/patches/patch-Python_getargs_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-Python_getargs_c,v 1.1 2002/03/16 15:24:26 drahn Exp $ +--- Python/getargs.c.orig Sun Dec 2 18:43:33 2001 ++++ Python/getargs.c Thu Mar 14 22:17:09 2002 +@@ -61,7 +61,11 @@ PyArg_VaParse(PyObject *args, char *form + #ifdef VA_LIST_IS_ARRAY + memcpy(lva, va, sizeof(va_list)); + #else ++#ifdef __va_copy ++ __va_copy(lva, va); ++#else + lva = va; ++#endif + #endif + + return vgetargs1(args, format, &lva, 0); diff --git a/lang/python/2.2/patches/patch-Python_modsupport_c b/lang/python/2.2/patches/patch-Python_modsupport_c new file mode 100644 index 00000000000..557322dbbf9 --- /dev/null +++ b/lang/python/2.2/patches/patch-Python_modsupport_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-Python_modsupport_c,v 1.1 2002/03/16 15:24:26 drahn Exp $ +--- Python/modsupport.c.orig Fri Aug 17 13:39:25 2001 ++++ Python/modsupport.c Thu Mar 14 22:17:27 2002 +@@ -411,7 +411,11 @@ Py_VaBuildValue(char *format, va_list va + #ifdef VA_LIST_IS_ARRAY + memcpy(lva, va, sizeof(va_list)); + #else ++#ifdef __va_copy ++ __va_copy(lva, va); ++#else + lva = va; ++#endif + #endif + + if (n < 0)