From edea14de2e6680db5955892913044b19c131a311 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 27 Sep 2010 13:44:59 -0400 Subject: [PATCH] fix test_structmember on 64bit-bigendian (patch 127) --- ...test_structmember-on-64bit-bigendian.patch | 21 +++++++++++++++++++ python.spec | 10 ++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 fix-test_structmember-on-64bit-bigendian.patch diff --git a/fix-test_structmember-on-64bit-bigendian.patch b/fix-test_structmember-on-64bit-bigendian.patch new file mode 100644 index 0000000..a250dea --- /dev/null +++ b/fix-test_structmember-on-64bit-bigendian.patch @@ -0,0 +1,21 @@ +Index: Modules/_testcapimodule.c +=================================================================== +--- Modules/_testcapimodule.c (revision 85001) ++++ Modules/_testcapimodule.c (working copy) +@@ -5,6 +5,7 @@ + * standard Python regression test, via Lib/test/test_capi.py. + */ + ++#define PY_SSIZE_T_CLEAN + #include "Python.h" + #include + #include "structmember.h" +@@ -593,7 +594,7 @@ + { + PyObject *tuple, *obj; + Py_UNICODE *value; +- int len; ++ Py_ssize_t len; + + /* issue4122: Undefined reference to _Py_ascii_whitespace on Windows */ + /* Just use the macro and check that it compiles */ diff --git a/python.spec b/python.spec index e54d1ad..3475d99 100644 --- a/python.spec +++ b/python.spec @@ -94,7 +94,7 @@ Summary: An interpreted, interactive, object-oriented programming language Name: %{python} # Remember to also rebase python-docs when changing this: Version: 2.7 -Release: 11%{?dist} +Release: 12%{?dist} License: Python Group: Development/Languages Requires: %{python}-libs%{?_isa} = %{version}-%{release} @@ -440,6 +440,10 @@ Patch125: less-verbose-COUNT_ALLOCS.patch # Sent upstream as http://bugs.python.org/issue9687 (rhbz#626756) Patch126: fix-dbm_contains-on-64bit-bigendian.patch +# Fix test_structmember on big-endian 64-bit +# Sent upstream as http://bugs.python.org/issue9960 +Patch127: fix-test_structmember-on-64bit-bigendian.patch + # This is the generated patch to "configure"; see the description of # %{regenerate_autotooling_patch} # above: @@ -691,6 +695,7 @@ popd %patch124 -p1 %patch125 -p1 -b .less-verbose-COUNT_ALLOCS %patch126 -p0 -b .fix-dbm_contains-on-64bit-bigendian +%patch127 -p0 -b .fix-test_structmember-on-64bit-bigendian # This shouldn't be necesarry, but is right now (2.2a3) find -name "*~" |xargs rm -f @@ -1637,6 +1642,9 @@ rm -fr %{buildroot} # payload file would be unpackaged) %changelog +* Mon Sep 27 2010 David Malcolm - 2.7-12 +- fix test_structmember on 64bit-bigendian (patch 127) + * Fri Sep 24 2010 David Malcolm - 2.7-11 - fix dbm_contains on 64bit-bigendian (patch 126; rhbz#626756)