cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl_strerror and strerror_r on glibc

From: Holger Rauch <holger.rauch_at_heitec.de>
Date: Thu, 25 Mar 2004 12:55:05 +0100

Hi Tor!

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:
>
> char *strerror_r(int errnum, char *buf, size_t n);
>
> What this one does is to return the error string (no surprises there), but
> it doesn't usually copy anything into buf! The 'buf' and 'n' parameters are
> only meant as an optional working area, in case strerror_r needs it. A quick
> test on a few systems shows that it's generally not touched at all. In other
> words, on Linux and other glibc-based OS'es the construct in Curl_strerror()
> will return an empty string.
> [...]

To which versions of glibc does this apply, 2.2.5, 2.3.2, or both?

Greetings,

        Holger
Received on 2004-03-25