New submission from Jeffrey Armstrong: On a platform with a broken poll() function (as detected during configure), Modules/selectmodule.c fails to compile. The error occurs at two points:
./Modules/selectmodule.c:2100: `select_poll' undeclared here (not in a function) ./Modules/selectmodule.c:2100: initializer element is not constant ./Modules/selectmodule.c:2100: (near initialization for `select_methods[1].ml_meth') ./Modules/selectmodule.c:2100: `poll_doc' undeclared here (not in a function) ./Modules/selectmodule.c:2100: initializer element is not constant ./Modules/selectmodule.c:2100: (near initialization for `select_methods[1].ml_doc') ./Modules/selectmodule.c: In function `PyInit_select': ./Modules/selectmodule.c:2159: `poll_Type' undeclared (first use in this function) ./Modules/selectmodule.c:2159: (Each undeclared identifier is reported only once ./Modules/selectmodule.c:2159: for each function it appears in.) The problem is occurring because both "select_poll" and "poll_Type" are undeclared if HAVE_BROKEN_POLL is declared. The fix would be on two lines: selectmodule.c:2099 #ifdef(HAVE_POLL) should be: #if defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL) selectmodule.c:2149 #if defined(HAVE_POLL) should be: #if defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL) Making these two minor changes allows selectmodule.c to compile fine in the case where the platform has a "broken" poll(). This bug was found on m68k-atari-mint compiling using gcc 2.95.3 ---------- components: Build messages: 179880 nosy: Jeffrey.Armstrong priority: normal severity: normal status: open title: select module compile errors with broken poll() versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16953> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com