patches/Python26-08-ctypes.diff
branchgnome-2-24
changeset 14178 eceff40e7580
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/Python26-08-ctypes.diff	Fri Jan 23 20:52:43 2009 +0000
@@ -0,0 +1,26 @@
+--- Python-2.6/Modules/_ctypes/libffi/src/x86/ffitarget.h.orig	2008-03-05 09:09:11.000000000 +1300
++++ Python-2.6/Modules/_ctypes/libffi/src/x86/ffitarget.h	2008-12-02 21:13:10.108375117 +1300
+@@ -54,10 +54,10 @@
+ #endif
+ 
+   /* ---- Intel x86 and AMD x86-64 - */
+-#if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__))
++#if !defined(X86_WIN32) && (defined(__i386__) || defined(__i386) || defined(__x86_64__))
+   FFI_SYSV,
+   FFI_UNIX64,   /* Unix variants all use the same ABI for x86-64  */
+-#ifdef __i386__
++#if defined (__i386__) || defined (__i386)
+   FFI_DEFAULT_ABI = FFI_SYSV,
+ #else
+   FFI_DEFAULT_ABI = FFI_UNIX64,
+--- Python-2.5.2/Modules/_ctypes/callproc.c.alloca	2008-06-05 23:48:27.578970813 +1200
++++ Python-2.5.2/Modules/_ctypes/callproc.c	2008-06-05 23:48:41.677662640 +1200
+@@ -73,6 +73,8 @@
+ #include <malloc.h>
+ #endif
+ 
++#include <alloca.h>
++
+ #include <ffi.h>
+ #include "ctypes.h"
+