This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jeffrey.Armstrong
Recipients Jeffrey.Armstrong
Date 2013-01-13.15:16:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358090207.46.0.168893562031.issue16953@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-01-13 15:16:47Jeffrey.Armstrongsetrecipients: + Jeffrey.Armstrong
2013-01-13 15:16:47Jeffrey.Armstrongsetmessageid: <1358090207.46.0.168893562031.issue16953@psf.upfronthosting.co.za>
2013-01-13 15:16:47Jeffrey.Armstronglinkissue16953 messages
2013-01-13 15:16:46Jeffrey.Armstrongcreate