From owner-freebsd-arch Sun Jan 27 7:20:58 2002 Delivered-To: freebsd-arch@freebsd.org Received: from columbus.cris.net (columbus.cris.net [212.110.128.65]) by hub.freebsd.org (Postfix) with ESMTP id 0038537B416; Sun, 27 Jan 2002 07:20:51 -0800 (PST) Received: from phantom.cris.net (phantom.cris.net [212.110.130.74]) by columbus.cris.net (8.9.3/8.9.3) with ESMTP id RAA31360; Sun, 27 Jan 2002 17:20:47 +0200 (EET) Received: (from ml@localhost) by phantom.cris.net (8.11.1/8.11.1) id g0RFMoR14899; Sun, 27 Jan 2002 17:22:50 +0200 (EET) (envelope-from ml) Date: Sun, 27 Jan 2002 17:22:50 +0200 From: Alexey Zelkin To: Terry Lambert Cc: Chad David , "Andrey A. Chernov" , "Brian F. Feldman" , Bruce Evans , arch@FreeBSD.ORG Subject: Re: strtod() Message-ID: <20020127172250.B14791@phantom.cris.net> References: <20020126162924.A7726@colnta.acns.ab.ca> <200201270453.g0R4rwi92912@green.bikeshed.org> <20020127070421.GA13415@nagual.pp.ru> <20020127003719.A38420@colnta.acns.ab.ca> <3C53DB0B.6547EB76@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C53DB0B.6547EB76@mindspring.com>; from tlambert2@mindspring.com on Sun, Jan 27, 2002 at 02:48:43AM -0800 X-Operating-System: FreeBSD 4.2-STABLE i386 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 hi, On Sun, Jan 27, 2002 at 02:48:43AM -0800, Terry Lambert wrote: > Chad David wrote: > > I just noticed that if you call printf() (or anything that will call > > localeconv()) before you call strtod() etc. it works as it should. It > > 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 > > isn't really strtod()'s problem, but localeconv()'s. > > Good catch! > > > The attached patch fixes this case, and probably others. Comments? > > Uh, working around the problem this way adds overhead to a > lot of places where it wasn't before. How about just > initializing the shortcut completely? > > Worse comes to worse, call localeconv() in a .init by abusing > the G++ linker set that gets run to construct virtual base > clases and template classes the first time. Heh! I'm not a linker guru, so could you please explain problem more deeply ? And in case if it's actually problem -- it will be fixed. It's important now since I am going to merge many locale specific changes to STABLE soon. And would like to have it as more clean as possible. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message