From owner-freebsd-arch Sun Jan 27 0:35:47 2002 Delivered-To: freebsd-arch@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id 9E9E537B417; Sun, 27 Jan 2002 00:35:43 -0800 (PST) Received: (from ache@localhost) by nagual.pp.ru (8.11.6/8.11.6) id g0R8ZXh14013; Sun, 27 Jan 2002 11:35:33 +0300 (MSK) (envelope-from ache) Date: Sun, 27 Jan 2002 11:35:30 +0300 From: "Andrey A. Chernov" To: Chad David Cc: "Brian F. Feldman" , Bruce Evans , arch@FreeBSD.ORG Subject: Re: strtod() Message-ID: <20020127083529.GA13957@nagual.pp.ru> References: <20020126162924.A7726@colnta.acns.ab.ca> <200201270453.g0R4rwi92912@green.bikeshed.org> <20020127070421.GA13415@nagual.pp.ru> <20020127003719.A38420@colnta.acns.ab.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020127003719.A38420@colnta.acns.ab.ca> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Jan 27, 2002 at 00:37:19 -0700, Chad David wrote: > is the first call to localeconv() that causes errno to be updated when > it calls strtol(). After that localeconv() takes a short cut. So it It is because localeconv() cache its result. > isn't really strtod()'s problem, but localeconv()'s. It looks like it is not localeconv() problem, but incorrect locale problem. > The attached patch fixes this case, and probably others. Comments? Don't do that, fix locale instead. cnv() expected to be called on valid numeric fields only. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message