components/python/cffi/patches/alloca.patch
author Danek Duvall <danek.duvall@oracle.com>
Tue, 22 Apr 2014 11:18:42 -0700
changeset 1846 df40919e04fa
permissions -rw-r--r--
PSARC/2014/110 CFFI: foreign function interface for Python calling C code 18468609 integrate cffi

Need to include alloca.h when using alloca().  This is filed upstream as:

    https://bitbucket.org/cffi/cffi/issue/144/fix-for-issue-128-is-incomplete

and fixed in

    https://bitbucket.org/cffi/cffi/commits/41b3ef920695

diff --git a/cffi/vengine_cpy.py b/cffi/vengine_cpy.py
--- a/cffi/vengine_cpy.py
+++ b/cffi/vengine_cpy.py
@@ -771,6 +771,10 @@
 typedef unsigned __int32 uint32_t;
 typedef unsigned __int64 uint64_t;
 typedef unsigned char _Bool;
+#else
+#if (defined (__SVR4) && defined (__sun)) || defined(_AIX)
+#  include <alloca.h>
+#endif
 #endif
 
 #if PY_MAJOR_VERSION < 3