[Python-Dev] inet_addr usage in Modules/socketmodule.c? (original) (raw)

Martin v. Loewis martin@v.loewis.de
05 Mar 2002 07:46:09 +0100


Skip Montanaro <skip@pobox.com> writes:

Your thoughts?

I'd agree that inet_aton should be use if available; autoconf is capable of finding that out. I do not think that the platform INADDR_NONE should be changed if available. On this specific platform, there seems to be a bug: INADDR_NONE is 0xffffffff, yet inet_addr returns -1. According to my Linux manpage, inet_addr ought to return INADDR_NONE on failure, so that should be defined as (or the return value of inet_addr should be different).

I guess most people share the problem of having no access to an SX installation, so if anything is done about this, the original poster would have to come up with a patch.

Regards, Martin