Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Dec 2002 18:03:04 +0100 (CET)
From:      Harti Brandt <brandt@fokus.gmd.de>
To:        Mike Barcroft <mike@FreeBSD.ORG>
Cc:        standards@FreeBSD.ORG
Subject:   Re: strerror()
Message-ID:  <20021213175700.W904-100000@beagle.fokus.gmd.de>
In-Reply-To: <20021213114038.A61753@espresso.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 13 Dec 2002, Mike Barcroft wrote:

MB>
MB>I'm working on fixing strerror_r() in light of PR 44356.  I'm
MB>wondering if anyone can explain why strerror() has an inline itoa
MB>procedure, instead of using snprintf(3).  The comment says:
MB>/* Do this by hand, so we don't link to stdio(3). */
MB>...and the commit log says:
MB>revision 5.6
MB>date: 1991/05/04 13:45:45;  author: bostic;  state: Exp;  lines: +20 -6
MB>don't include stdio(3), do itoa inline
MB>
MB>I thought it may have been to make strerror() async-signal-safe, but
MB>POSIX doesn't list it as an async-signal-safe function.

That is probably because programs that use strerror() but don't use any
of the stdio functions don't get all the stdio-cruft linked in.

harti
-- 
harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
              brandt@fokus.gmd.de, brandt@fokus.fhg.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021213175700.W904-100000>