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.

classification
Title: socketmodule inet_ntop built when IPV6 is disabled
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: cjohns, loewis
Priority: normal Keywords: patch

Created on 2003-05-01 05:05 by cjohns, last changed 2022-04-10 16:08 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sockmodule.diff cjohns, 2003-05-01 05:05 socketmodule diff against CVS
Messages (3)
msg43561 - (view) Author: Chris Johns (cjohns) Date: 2003-05-01 05:05
RTEMS does not support IPV6 and so does not define
ENABLE_IPV6 for Python.

RTEMS contains an aging port of the FreeBSD stack and
the port contains some IPV6 things such as inet_ntop
and inet_pton. This causes HAVE_INET_PTON to be defined
to 1 causing the current socketmodule.c to compile the
socket_inet_ntop code. The assumption being these
functions are only present with IPV6 stacks. This
assumption is valid, how-ever RTEMS breaks this
assuption and fixing this in RTEMS is not pratical.

Removing the HAVE_INET_PTON definition causes
socketmodule.c to compile in a private version. The
private versions have a slightly different prototype to
RTEMS and so the compiler stops with an error.

This patch seems the simplest solutions given it does
not effect other platforms.
msg43562 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-05-10 07:44
Logged In: YES 
user_id=21627

I believe this patch is now superceded by #734231. It
appears that the problem of inet_pton is shared on many
platforms, so the code now wraps the buffer declaration with
ENABLE_IPV6.

Can you please retry the current CVS, and indicate whether
further changes are needed?
msg43563 - (view) Author: Chris Johns (cjohns) Date: 2003-05-15 03:56
Logged In: YES 
user_id=197074

I have tested socketmodule.c version 1.268 with RTEMS and it
compiles and works.  No further changes are needed.

I added to RTEMS the INET_ADDRSTRLEN define as it was not in
netinet/in.h and the addition took a little longer than
expected.

An RTEMS maintainer raised the point the SUS standard that
defines INET_ADDRSTRLEN is new(ish!) and so Python may not
be as robust on older systems that do not have
INET_ADDRSTRLEN defined.

Thanks for the prompt resolution.
History
Date User Action Args
2022-04-10 16:08:29adminsetgithub: 38414
2003-05-01 05:05:14cjohnscreate