curl-library
Re: Abort under HP-UX
Date: Thu, 13 Mar 2003 07:13:06 +0100 (CET)
On Wed, 12 Mar 2003, Rick Jones wrote:
> It is common to call inet_addr on a "hostname" to see if it is really a
> dotted IP string. This is done because some unenlightened implementations
> of gethostbyname get very grumpy if they are given an IP address string as
> a hostname. So, the call to inet_addr to see if the "hostname" was an IP
> address, then if that "fails" a call to gethostbyname.
It's not only because of grumpiness, but this way we also skip the name
lookup completely for IP addresses.
> Perhaps insure is simply not aware of this usage of inet_addr and so when
> that call "fails" (as it will when called with a hostname) it spits-out its
> error message.
It seems like a pretty strange assumption from insure in that case.
Both these error cases seem to be in OpenSSL code.
> Hmm - looks like the CURL code presumes that gethostbyname is not
> thread-safe and that only gethostbyname_r is threadsafe (lib/hostip.c)
Actually, it doesn't know if gethostbyname() is thread-safe or not. The
function is OK on platforms such as Windows, HPUX 11 and AIX 4.3 but not OK
on several older operating systems.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031enReceived on 2003-03-13