~ubuntu-branches/ubuntu/natty/python3.1/natty-security

« back to all changes in this revision

Viewing changes to debian/patches/hurd-broken-poll.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-07-06 16:52:42 UTC
  • mfrom: (1.2.1 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100706165242-2xv4i019r3et6c0j
Tags: 3.1.2+20100706-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.
  - Add debian/patches/overwrite-semaphore-check for Lucid buildds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh -e
2
 
 
3
 
# DP: Fix build failure on hurd, working around poll() on systems
4
 
# DP: on which it returns an error on invalid FDs.
5
 
 
6
 
dir=
7
 
if [ $# -eq 3 -a "$2" = '-d' ]; then
8
 
    pdir="-d $3"
9
 
    dir="$3/"
10
 
elif [ $# -ne 1 ]; then
11
 
    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
12
 
    exit 1
13
 
fi
14
 
case "$1" in
15
 
    -patch)
16
 
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
17
 
        ;;
18
 
    -unpatch)
19
 
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
20
 
        ;;
21
 
    *)
22
 
        echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
23
 
        exit 1
24
 
esac
25
 
exit 0
26
 
 
27
 
--- Modules/selectmodule.c.orig
28
 
+++ Modules/selectmodule.c
29
 
@@ -1723,7 +1723,7 @@
30
 
 
31
 
 static PyMethodDef select_methods[] = {
32
 
        {"select",      select_select,  METH_VARARGS,   select_doc},
33
 
-#ifdef HAVE_POLL
34
 
+#if defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)
35
 
        {"poll",        select_poll,    METH_NOARGS,    poll_doc},
36
 
 #endif /* HAVE_POLL */
37
 
        {0,     0},     /* sentinel */
38
 
@@ -1747,7 +1747,7 @@
39
 
        Py_INCREF(SelectError);
40
 
        PyModule_AddObject(m, "error", SelectError);
41
 
 
42
 
-#if defined(HAVE_POLL)
43
 
+#if defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)
44
 
 #ifdef __APPLE__
45
 
        if (select_have_broken_poll()) {
46
 
                if (PyObject_DelAttrString(m, "poll") == -1) {