[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-09-06 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> compile error ___ Python tracker ___

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c8b6e03ebfe by Charles-François Natali in branch 'default': Issue #12871: sched_get_priority_(min|max) might not be defined even though http://hg.python.org/cpython/rev/5c8b6e03ebfe -- nosy: +python-dev ___

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-09-04 Thread Remi Pointel
Remi Pointel added the comment: Hi, it seems to solve the problem (tested on OpenBSD 4.9 and OpenBSD-current). * test_posix.py on OpenBSD 4.9: [...] Ran 79 tests in 0.508s OK (skipped=35) * test_posix.py on OpenBSD-current: it continues to segfault, but I have opened an other ticket for this

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-09-04 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch adding a configure-time check. Since the functions are checked without being linked explicitely with pthread, it should do the trick (I couldn't test it on OpenBSD though). I also added a skipTest to test_posix.test_sched_priority(). ---

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-09-02 Thread STINNER Victor
STINNER Victor added the comment: >> It builds correctly with -pthread or -lpthread, but it fails to build >> without these options. >> > > Not on Linux: this is specific to OpenBSD. Oh, I forgot to specify: yes, I tested on OpenBSD (5.0). >> sched_get_priority_max() and sched_get_priority_mi

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-09-01 Thread Charles-François Natali
Charles-François Natali added the comment: > It builds correctly with -pthread or -lpthread, but it fails to build without > these options. > Not on Linux: this is specific to OpenBSD. > sched_get_priority_max() and sched_get_priority_min() come from libpthread on > OpenBSD, whereas Python o

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-09-01 Thread STINNER Victor
STINNER Victor added the comment: > For example, the following snippet builds correctly on Linux It builds correctly with -pthread or -lpthread, but it fails to build without these options. sched_get_priority_max() and sched_get_priority_min() come from libpthread on OpenBSD, whereas Python

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-08-31 Thread Charles-François Natali
Charles-François Natali added the comment: There's no reason to disable sched_get_priority_(min|max) when Python is built without threads: those libraries control the scheduling policy, and should be available even without pthread. However, it's really likely that pthread has its own implement

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-08-31 Thread Nadeem Vawda
Nadeem Vawda added the comment: I haven't been able to reproduce this on Linux (2.6.38; Ubuntu 11.04). Some searching around seems to suggest that OpenBSD doesn't provide those functions (or didn't until recently). Modules/posixmodule.c and configure.in seem to assume that these functions are av

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-08-31 Thread STINNER Victor
New submission from STINNER Victor : If Pyton is configured without thread support (--without-threads), the compilation fails on OpenBSD : $ make [...] ./Modules/posixmodule.c:4582: undefined reference to `sched_get_priority_min' libpython3.3m.a(posixmodule.o)(.text+0x430b): In function `posix