Date: Fri, 28 Dec 2001 04:35:43 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: "Andrey A. Chernov" <ache@nagual.pp.ru> Cc: Bill Fenner <fenner@research.att.com>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/lib/libc/stdlib atof.c atoi.c atol.3 atol.c atoll.c Message-ID: <20011228041938.F1378-100000@gamplex.bde.org> In-Reply-To: <20011227015438.GA78208@nagual.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Dec 2001, Andrey A. Chernov wrote: > On Wed, Dec 26, 2001 at 17:41:16 -0800, Bill Fenner wrote: > > > > > "The functions atof, atoi, atol, and atoll need not > > > affect the value of the integer expression errno on an > > > error. If the value of the result cannot be represented, > > > > I would have read "need not" as "are not required to", i.e. they are > > permitted to. Since they're also permitted not to, this change is > > also conformant. Yes, the change just a pessimization. I complained about it. > > I additionally check POSIX and SUSv2 in that area, both have > > ERRORS > No errors defined > > section which means that no any errno producing allowed. No, this means the same as the C standard: errors have no defined effect on errno. It is just poorly worded. At least in the C standard, even non-errors may affect errno for any function unless the documentation of the function explicitly says otherwise. POSIX does say otherwise in some cases where it wants to require more than the C standard (e.g., for strerror()), so I assume that it follows this rule. > As I believe, > initially, when ato*() was not implemented via strto*() but use their own > way, there was no errno changes in them. Yes. The V7 manual has atof() but not strtod(), and doesn't mention any error numbers for atof(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011228041938.F1378-100000>
