Re: [PATCH 2/3] git-daemon: use getnameinfo to resolve hostname
On Wednesday 2009-01-14 12:33, Junio C Hamano wrote:
Show 7 quoted lines
>> git-daemon: use getnameinfo to resolve hostname
>>
>> This is much shorter than inet_ntop'ing, and also translated
>> unresolvable addresses into a string.
>
>translated? (I think you meant "translates" but my English is bad, so I
>am double checking).
yes, keyboard slipped away.
>This indeed is much nicer, provided if it is available at least as widely
>as inet_ntop() is.
Both inet_ntop and getnameinfo are in POSIX.1-2001.
Show 8 quoted lines
> (1) Do we need similar compat/ function for getnameinfo()? I am guessing
> that most likely places are the ones that need NO_INET_NTOP and
> NO_INET_PTON, and googling seems to indicate old Cygwin and HP-UX
> 11.00 may be among them.
>
> (2) Do we still use inet_ntop() elsewhere, and if not, can we remove the
> compat/ definitions?
>
Yes, it is still used elsewhere.