Date: Sun, 27 Jan 2002 17:22:50 +0200 From: Alexey Zelkin <phantom@FreeBSD.ORG> To: Terry Lambert <tlambert2@mindspring.com> Cc: Chad David <davidc@acns.ab.ca>, "Andrey A. Chernov" <ache@nagual.pp.ru>, "Brian F. Feldman" <green@FreeBSD.ORG>, Bruce Evans <bde@zeta.org.au>, arch@FreeBSD.ORG Subject: Re: strtod() Message-ID: <20020127172250.B14791@phantom.cris.net> In-Reply-To: <3C53DB0B.6547EB76@mindspring.com>; from tlambert2@mindspring.com on Sun, Jan 27, 2002 at 02:48:43AM -0800 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020127172250.B14791>