(lib network) Should inet_aton be called instead of inet_addr ?
Matthias Kilian
kili at outback.escape.de
Mon Sep 22 15:13:41 EDT 2008
On Mon, Sep 22, 2008 at 07:45:48PM +0100, Ian Lynagh wrote:
> > Reading http://linux.die.net/man/3/inet_addr I noticed that
> > inet_addr is obsolete and inet_aton should be used because inet_addr
> > indicates error by returning -1 which is a valid address (255.255.255.0)
> > as well.
> > Don't know wether it's worth changing or wether inet_aton is peresent on
> > all systems
>
> It sounds like we shouldchange, although I too don't know how portable
> inet_aton is.
It isn't POSIX, but it's historically from 4.3BSD, so all the BSDs,
MacOS X should support it, too. I also just verified that it's
available on a good old IRIX 5.3 ;-)
And since Solaris was originally based on BSD, it may have inet_aton,
too. No idea about other systems.
Ciao,
Kili
More information about the Libraries
mailing list