On Fri, Jul 20, 2001 at 08:02:55PM -0700, Ian Holsman wrote:
> > | Wait, if you're running this on sol8, you should be using getaddrinfo(),
> > | not gethostbyname*. Right? sol8 *should* satisfy the #ifdef in
> > | sa_common.c for getaddrinfo()
I bet that Ian didn't enable IPv6 on that Solaris 8 machine. That
would force it to get the gethostbyname{_r}() path.
Ideally, we should try to use getaddrinfo() even in the normal case
(i.e. we don't have IPv6). I don't have time/inclination now to do
so, but I'll see about adding it to the STATUS file. Patches
welcomed. =)
> http://lxr.webperf.org/search.cgi?string=gethostbyname
> shows 3 others, mod_unqiue_id, proxy_util, and util.c as well as a
> support program.
> sounds like we need a apr_gethostbyname() function.
>
> getaddrinfo() is only used in sa_common.c
<rant about sa_common.c>
While I understand why we have sa_common.c (to achieve some level of
platform independence), it just seems like a mess. Can't we achieve
similar results with Makefile tweaks? When I modify sa_common.c, I have
to delete sockaddr.{o|lo} and recompile. Yuuuuck.
</rant about sa_common.c>
apr_sockaddr_info_get is probably what you want. But, it is a bit
higher level than just returning the hostent. Looking at util.c, I
think we could replace it with calls to apr_sockaddr_info_get instead,
but I'd have to stare at it after some sleep. -- justin