summaryrefslogtreecommitdiffstats
path: root/Modules/selectmodule.c
diff options
context:
space:
mode:
authorNicholas Bastin <nick.bastin@gmail.com>2004-03-21 23:45:42 (GMT)
committerNicholas Bastin <nick.bastin@gmail.com>2004-03-21 23:45:42 (GMT)
commite62c5c88f179e5f6b445e40603ef7b7b2e706be9 (patch)
tree9ea49ad95d4e05d44177230f7791d35f3ee28f6d /Modules/selectmodule.c
parent3f60629242a13c9d5fb425294a33d22b7cf2b802 (diff)
downloadcpython-e62c5c88f179e5f6b445e40603ef7b7b2e706be9.zip
cpython-e62c5c88f179e5f6b445e40603ef7b7b2e706be9.tar.gz
cpython-e62c5c88f179e5f6b445e40603ef7b7b2e706be9.tar.bz2
Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Fixes SF Bug #850981
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r--Modules/selectmodule.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 989885a..26b918e 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -318,7 +318,7 @@ select_select(PyObject *self, PyObject *args)
return ret;
}
-#ifdef HAVE_POLL
+#if defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)
/*
* poll() support
*/
@@ -612,7 +612,7 @@ select_poll(PyObject *self, PyObject *args)
return NULL;
return (PyObject *)rv;
}
-#endif /* HAVE_POLL */
+#endif /* HAVE_POLL && !HAVE_BROKEN_POLL */
PyDoc_STRVAR(select_doc,
"select(rlist, wlist, xlist[, timeout]) -> (rlist, wlist, xlist)\n\
@@ -639,9 +639,9 @@ On Windows, only sockets are supported; on Unix, all file descriptors.");
static PyMethodDef select_methods[] = {
{"select", select_select, METH_VARARGS, select_doc},
-#ifdef HAVE_POLL
+#if defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)
{"poll", select_poll, METH_VARARGS, poll_doc},
-#endif /* HAVE_POLL */
+#endif /* HAVE_POLL && !HAVE_BROKEN_POLL */
{0, 0}, /* sentinel */
};
@@ -660,7 +660,7 @@ initselect(void)
SelectError = PyErr_NewException("select.error", NULL, NULL);
Py_INCREF(SelectError);
PyModule_AddObject(m, "error", SelectError);
-#ifdef HAVE_POLL
+#if defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)
poll_Type.ob_type = &PyType_Type;
PyModule_AddIntConstant(m, "POLLIN", POLLIN);
PyModule_AddIntConstant(m, "POLLPRI", POLLPRI);
@@ -684,5 +684,5 @@ initselect(void)
#ifdef POLLMSG
PyModule_AddIntConstant(m, "POLLMSG", POLLMSG);
#endif
-#endif /* HAVE_POLL */
+#endif /* HAVE_POLL && !HAVE_BROKEN_POLL */
}