cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl_strerror and strerror_r on glibc

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 25 Mar 2004 13:12:50 +0100 (CET)

On Thu, 25 Mar 2004, Tor Arntsen wrote:

> But glibc (despite the confusing manpage on at least some Linux distros) has
> an old, incompatible implementation that *appears* to be similar enough, but
> isn't:

Crap. Ok, so I extend the strerror_r() configure check to also attempt to
detect what kind of API it features.

HAVE_POSIX_STRERROR_R and HAVE_GLIBC_STRERROR_R will be defined accordingly.

> There's a problem with configure too, because it sets HAVE_STRERROR_R on my
> Linux box (which won't work), but it doesn't set it on AIX, which indeed
> does have a working POSIX strerror_r()... (it even has a glibc-compatible
> version for Linux compatibility, with another name and a #define in case you
> set _LINUX_SOURCE_COMPAT.. but never mind that. Oh, it seems you have to set
> _THREAD_SAFE to get access to strerror_r() (the POSIX one) on AIX. Maybe
> that's why configure doesn't find it).

Hm, I'll try to make it set _THREAD_SAFE and check again. It comes with the
same commit as the extension mentioned above.

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-03-25