Oh, how annoying. In going back over some old email messages in my way-too-full mailbox, I just noticed these replies to my message that I'd never read! I apologize for not replying before.

On Mar 9, 2005, at 11:23, Andreas Rottmann wrote:
Marius Vollmer <[EMAIL PROTECTED]> writes:
Ken Raeburn <[EMAIL PROTECTED]> writes:
If at all possible, this code should be switched to use get*by*_r, or
in the gethostby* cases, perhaps getaddrinfo and getnameinfo.
Yes, definitely.  Could you help with that?
FWIW, I just stole some code from GNet (http://www.gnetlibrary.org)
for another project. You might want to have a glance at how they do
this stuff, since it seems there are different flavours of
gethostbyname_r (glibc, HPUX, Solaris). The relevant code is in
inetaddr.c and configure.ac (detection). GNet is LGPL-licenced BTW.

I've spent some time dealing with getaddrinfo/gethostbyname_r/etc for work, and found this to be a rather annoying morass to dive into. There are at least three variants of gethostbyname_r among the systems I'm supporting, and some (even modern systems like NetBSD and Mac OS X) don't have it at all; almost all of the systems have getaddrinfo, though different implementations have different minor bugs. I've also gone through writing code to determine which flavors of which routines are available, and implementing a wrapper to deal with all the variants.

In the long term, I think getaddrinfo is what we want to be using. But for the short term, hacking up the gethostby* routines to use the _r versions when they're available shouldn't be that hard. I'll look into it.

(Oh, eww, we've got 'gethostent' support too. Bleah. Well, glibc at least seems to have a gethostent_r...)

Ken


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

Reply via email to