Python 2.5: Undefine _POSIX_C_SOURCE on Lion to fix 8-byte strings from socket.inet_aton() #80

Merged
merged 1 commit into from Dec 24, 2012

Conversation

Projects
None yet
2 participants
Contributor

saj commented May 8, 2012

socket.inet_aton() in Python 2.5.6 was returning 8-byte strings when built with Pythonbrew on OS X 10.7.3. The 8-byte strings were a result of a broken type cast identified in:

Part of the problem was that autoconf was failing to pick up on C lib's inet_aton(), exposing the broken type cast mentioned in the bug reports above. I found an existing precedence for suppressing _POSIX_C_SOURCE on older Darwins, which, when extended to cover 10.7.3, magically makes this bug go away.

Undefine _POSIX_C_SOURCE to fix socket.inet_aton()
socket.inet_aton() in Python 2.5.6 was returning 8-byte strings when
built with Pythonbrew on OS X 10.7.3.  The 8-byte strings were a result
of a broken type cast identified in:

- http://bugs.python.org/issue767150
- http://bugs.python.org/issue1008086

Part of the problem was that autoconf was failing to pick up on C lib's
inet_aton(), exposing the broken type cast mentioned in the bug reports
above.  I found an existing precedence for suppressing _POSIX_C_SOURCE
on older Darwins, which, when extended to cover 10.7.3, magically makes
this bug go away.

@utahta utahta merged commit 2c17fd4 into utahta:master Dec 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment