This patch moves the test for a broken poll() implementation from configure-time to runtime. The reason for creating this patch is that we'd like to have one python binary for OSX 10.3 and later. OSX 10.3 has a broken version of poll, while 10.4 doesn't. With this patch you'll have select.poll when it is available and working indepent of the version of the OS where python was build.
Logged In: YES user_id=580910 I've uploaded a new version of the patch, and removed the earlier one, because the first version also contained an unrelated patch. Also note that this patch updates configure.in, hence autoconf should be run before checking it in. And finally: the original author of this patch is Bob Ipollito (etrepum), I've harvested this from the python24-fat tree.
Logged In: YES user_id=21627 I'm -1 for this patch in its current form. Python shouldn't perform "unnecessary" system calls, even if they are as cheap as creating a pipe. It's fine that you want to use the same binary across OSX releases; please rewrite the patch to be Mac-specific: Always run the configure test for a broken poll, but ignore its outcome on OSX. The easiest way to achieve this on top of your current patch might be the following: - #undef HAVE_BROKEN_POLL on OSX in selectmodule.c - implement select_have_broken_poll to return 0 (i.e. just the last statement) on anything but OSX.
Logged In: YES user_id=580910 I don't quite understand why runtime testing is considered bad here, although I guess the time used by a lot of runtime tests could add up. But anyway, broken-poll-at-runtime-2.patch implements your suggestion.