[Patches] [Patch #100927] Fix for broken gethostbyname("0")

noreply@sourceforge.net noreply@sourceforge.net
Sun, 13 Aug 2000 19:49:57 -0700


Patch #100927 has been updated. 

Project: 
Category: Modules
Status: Open
Summary: Fix for broken gethostbyname("0")

Follow-Ups:

Date: 2000-Jul-19 01:46
By: effbot

Comment:
why should this work?  why is "gethostbyname" broken if it doesn't support "0" and "-1"?  if it's important to support these values, shouldn't they be passed to the function as integers, not as strings?  etc.

(sorry, I'm usually able to make some kind of sense out of patches, but this one was a bit too cryptic ;-)
-------------------------------------------------------

Date: 2000-Jul-20 23:13
By: ppessi

Comment:
It is not important to support "-1".

"0" is INADDR_ANY in dot notation - same as "0.0.0.0" or "0.0.0" or "0.0". gethostbyname() should understand dot notation as well as domain names. For some reason, Windows gethostbyname() does not support "0" (obviously I'm a lazy typer, since I have not noticed that it does not support 0.0 nor 0.0.0 nor 0.0.0.0) unlike Unix platforms.

I'll supply another patch ACN.
-------------------------------------------------------

Date: 2000-Aug-13 19:49
By: nowonder

Comment:
As linux supports "0" (as well as "0.0" and friends), this would be nice to reduce platform dependency.

But "00" is just as valid (not sure what Windows does with it), so to check this I think a bit more work has to be done.
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=100927&group_id=5470