gethostbyaddr()

Hajimu UMEMOTO ume at FreeBSD.org
Fri May 12 15:42:59 UTC 2006


Hi,

>>>>> On Fri, 3 Mar 2006 20:45:12 +0200
>>>>> Rostislav Krasny <rosti.bsd at 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 at mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/


More information about the freebsd-standards mailing list