freebsd-ports/lang/python31/files/patch-Modules__selectmodule.c
Kubilay Kocak 8dee9b33cd lang/python31: Backport upstream kevent fix and use libffi from ports
Backport a change fixing use of kevent flags that was merged to Python
default, 3.3 and 2.7 branches, but not 3.2 and 3.1 that were in
security-only mode at the time of commit. [1]

- Add patch: patch-Modules__selectmodule.c

Based on patch by: David Naylor <naylor.b.david@gmail.com>

Unconditionally use libffi from ports because the Python 3.1 branch was
closed for maintenance when the import of libffi 3.0.13 took place. This
fixes _ctypes module build failure on i386. [2]

- Add global CONFIGURE_ARGS and LIB_DEPENDS

References:

[1] Issue #11973: Fix a problem in kevent. The flags and fflags fields
    are now properly handled as unsigned. [#11973]

    http://bugs.python.org/issue11973
    http://hg.python.org/cpython/rev/8345fb616cbd

[2] Fixes Issue #17192: Update the ctypes module's libffi to v3.0.13.
    This specifically addresses a stack misalignment issue on x86 and
    issues on some more recent platforms. [#17192]

    http://bugs.python.org/issue17192
    http://hg.python.org/cpython/rev/a94b3b4599f1
    http://hg.python.org/cpython/rev/688bc0b44d96

While I'm here:

- Add LICENSE (PSFL)
- Clean up & whitespace alignment

PR:		ports/156759 [1]
Reviewed by:	mva
2013-12-01 09:34:20 +00:00

11 lines
524 B
C

--- ./Modules/selectmodule.c.orig 2013-11-30 23:09:48.211062086 +1100
+++ ./Modules/selectmodule.c 2013-11-30 23:53:51.740895007 +1100
@@ -1229,7 +1229,7 @@
EV_SET(&(self->e), 0, EVFILT_READ, EV_ADD, 0, 0, 0); /* defaults */
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|hhiii:kevent", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|hHIii:kevent", kwlist,
&pfd, &(self->e.filter), &(self->e.flags),
&(self->e.fflags), &(self->e.data), &(self->e.udata))) {
return -1;