Author ntai
Recipients ntai
Date 2009-05-01.16:37:52
SpamBayes Score 2.94209e-15
Marked as misclassified No
Message-id <1241195874.94.0.470854501498.issue5895@psf.upfronthosting.co.za>
In-reply-to
Content
Python can build without _XOPEN_SOURCE_EXTENDED on HPUX ia64 but the
socket module is bust.
This is because APIs like getsockname() do not use socklen_t*. Instead
it is defined using int* for some of arguments.
In socketmodule.c, it consistently use socklent_t which is the right
thing for the rest of world.
Because socklent_t is 64bit (same as size_t) and int is 32bit, it
compiles with warnings of different types of pointer but it compiles anyway.
The result is that, getsockname(), etc. take a look at the 32bit out of
64bit value thinking it is "zero" (big endian machine).
APIs succeed without error but the result does not come back since the
API calls think that the return value buffer size is 0.

My Python build is 2.5. I think the same is true for all versions
thereafter. I wish I could give you a diff but I don't know well enough
the socketmodule.c what's the right thing to do.
I cannot use _XOPEN_SOURCE_EXTENDED as I have other python bindings and
modules built without _XOPEN_SOURCE_EXTENDED.
History
Date User Action Args
2009-05-01 16:37:55ntaisetrecipients: + ntai
2009-05-01 16:37:54ntaisetmessageid: <1241195874.94.0.470854501498.issue5895@psf.upfronthosting.co.za>
2009-05-01 16:37:53ntailinkissue5895 messages
2009-05-01 16:37:52ntaicreate