From owner-cvs-all Thu Dec 27 9:36:15 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id E617237B417; Thu, 27 Dec 2001 09:36:09 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id EAA18116; Fri, 28 Dec 2001 04:35:44 +1100 Date: Fri, 28 Dec 2001 04:35:43 +1100 (EST) From: Bruce Evans X-X-Sender: To: "Andrey A. Chernov" Cc: Bill Fenner , , Subject: Re: cvs commit: src/lib/libc/stdlib atof.c atoi.c atol.3 atol.c atoll.c In-Reply-To: <20011227015438.GA78208@nagual.pp.ru> Message-ID: <20011228041938.F1378-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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