You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Sterling Hughes <st...@designmultimedia.com> on 2001/07/30 10:19:40 UTC
gethostby_r routines
Hi,
I was going through the APR source and I noticed that currently the
implementation of gethostbyname_r is incorrect (wrap everything i
say with an imho ;). Also, there was no implementation of the
gethostbyaddr_r() function call.
gethostbyname_r() and gethostbyaddr_r() are implemented differently
on different os's. There are three different implementations that I
know of. Currently the APR source only accounts for one of these
functions, and doesn't detect the differences. The attached patch is
a configure.in patch to detect the correct version of the gethostby_r
functions (glibc2, solaris, other), a set of wrapper functions in
sa_common.c and the necessary source code updates.
I don't have a variety of OS' to test this on, however, on a Linux
glibc2 system, the client and the server programs in the tests
directory both worked without issue. I've also used similair code
in other projects, and its worked there (ie, the concept is pretty
well tested, this implementation needs testing on the other
platforms).
Ahh, well, that's pretty much it :). Comments? Questions?
Sterling Hughes
sterling@php.net
References: The MySQL source and cURL source use similair concepts
and implementations (the configure macro is a slightly modified port
of the MySQL macro's to APR).
Re: gethostby_r routines
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Mon, Jul 30, 2001 at 04:19:40AM -0400, Sterling Hughes wrote:
> Hi,
>
> I was going through the APR source and I noticed that currently the
> implementation of gethostbyname_r is incorrect (wrap everything i
> say with an imho ;). Also, there was no implementation of the
> gethostbyaddr_r() function call.
Thanks. I committed a modified version of your patch. -- justin