
On 2008 Sep 22, at 15:13, Matthias Kilian wrote:
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.
Solaris 10+ probably does, but our Solaris 9 machines don't. Linux and OSX have inet_aton. (Solaris 2 is not based on BSD, but on AT&T System V. For example, it didn't get real sockets until 2.6; before that they were emulated on top of System V streams.) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH