From owner-freebsd-standards Fri Dec 13 9: 3:11 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A526737B401; Fri, 13 Dec 2002 09:03:08 -0800 (PST) Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF20E43EB2; Fri, 13 Dec 2002 09:03:06 -0800 (PST) (envelope-from brandt@fokus.gmd.de) Received: from beagle (beagle [193.175.132.100]) by mailhub.fokus.gmd.de (8.11.6/8.11.6) with ESMTP id gBDH34J18110; Fri, 13 Dec 2002 18:03:04 +0100 (MET) Date: Fri, 13 Dec 2002 18:03:04 +0100 (CET) From: Harti Brandt To: Mike Barcroft Cc: standards@FreeBSD.ORG Subject: Re: strerror() In-Reply-To: <20021213114038.A61753@espresso.q9media.com> Message-ID: <20021213175700.W904-100000@beagle.fokus.gmd.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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