Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 May 2006 00:42:42 +0900
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        Rostislav Krasny <rosti.bsd@gmail.com>
Cc:        freebsd-standards@FreeBSD.org
Subject:   Re: gethostbyaddr()
Message-ID:  <yge3bffw8p9.wl%ume@mahoroba.org>
In-Reply-To: <20060303204512.50b7f709.rosti.bsd@gmail.com>
References:  <20060303204512.50b7f709.rosti.bsd@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

>>>>> On Fri, 3 Mar 2006 20:45:12 +0200
>>>>> Rostislav Krasny <rosti.bsd@gmail.com> said:

rosti> IEEE Std 1003.1 has following gethostbyaddr() prototype:

rosti> struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type);

rosti> http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyaddr.html

rosti> However FreeBSD has differnet prototype of that function:

rosti> struct hostent *gethostbyaddr(const char *addr, int len, int type);

rosti> As you can see, types of first two arguments are different. Is there a
rosti> good reason for that and could the gethostbyaddr() prototype be adjusted?

Yup, perhaps, it is just because historical reason.  I've just
committed the fix into HEAD.
However, it breaks ABI compatibility on 64 bit arch.  So, the 2nd
argument is still `int' on 64 bit arch.  I'll change it when libc
major version will be bumped.

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?yge3bffw8p9.wl%ume>