Mercurial > cpython-lru_cache-weakref
diff Modules/selectmodule.c @ 31761:f4a4ac7331ec legacy-trunk
Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Fixes SF Bug #850981
| author | Nicholas Bastin <nick.bastin@gmail.com> |
|---|---|
| date | Sun, 21 Mar 2004 23:45:42 +0000 |
| parents | 3b59fa5d25b1 |
| children | 9fb2e30f26be |
line wrap: on
line diff
--- a/Modules/selectmodule.c Sun Mar 21 23:38:41 2004 +0000 +++ b/Modules/selectmodule.c Sun Mar 21 23:45:42 2004 +0000 @@ -318,7 +318,7 @@ return ret; } -#ifdef HAVE_POLL +#if defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL) /* * poll() support */ @@ -612,7 +612,7 @@ 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 @@ 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 @@ 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 @@ #ifdef POLLMSG PyModule_AddIntConstant(m, "POLLMSG", POLLMSG); #endif -#endif /* HAVE_POLL */ +#endif /* HAVE_POLL && !HAVE_BROKEN_POLL */ }
