Thanks for poking me again. I worked on it this evening and have just pushed a commit into git that makes us use getaddrinfo. I don't think it really adds value right now because AFAIK none of the chess servers use IPv6 or have more than one IP address. But it's still good to do for future readiness.
The current OpenTCP() API is a little awkward for this because it wants to return an errno, but Posix IP name lookup doesn't return an errno -- it returns an error code in a different space. That was an issue before my change too, so I didn't make it worse. At least I added the real error string to the debug log. (I almost displayed it as a popup, but then you get two popups, one on top of the other, and that is really crappy.) If we still need to compile on older Unix-style systems that don't have getaddrinfo, we'll have to pull the old code back out of git, wrap #if HAVE_GETADDRINFO / #else / #endif around the two implementations, and make sure the configure script has code to check for getaddrinfo. I didn't do any of that on this checkin, sigh. On Tue, Apr 26, 2011 at 2:25 PM, Arun Persaud <[email protected]> wrote: > Hi > > just wanted to check in and see if you had time to look into porting > gethostbyname() to getaddrinfo(). > > Apart from that we had a few people showing interest in contributing, > but so far nothing has come out of it... making slow progress in getting > XBoard and Winboard merged as far as improving the front-end back-end > separation goes. > > HGM added some nice features lately though and we soon should have a > version that supports 5-6 languages and then will hand the translation > task off to the translation project... > > cheers > ARUN >
