gethostbyaddr()

Rostislav Krasny rosti.bsd at gmail.com
Fri May 12 18:03:30 UTC 2006


On Sat, 13 May 2006 00:42:42 +0900
Hajimu UMEMOTO <ume at FreeBSD.org> wrote:

> 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,

Thank you!


More information about the freebsd-standards mailing list