On Thu, 2009-10-08 at 16:32 -0600, Brian Paul wrote:
> Chris Rankin wrote:
> > --- On Thu, 8/10/09, tom fogal <tfo...@alumni.unh.edu> wrote:
> >> What about
> >>
> >>   char *lang = getenv("LANG");
> >>   setenv("LANG", "POSIX", 1);
> >>   strtod(...);
> >>   setenv("LANG", lang, 1);
> >>
> >> i.e. push / pop the LANG value?
> > 
> > The neater way to implement that solution would be to use
> > 
> > char *oldLocale = setlocale(LC_NUMERI-C, NULL);
> > setlocale(LC_NUMERIC, "C");
> > strtod(...);
> > setlocale(LC_NUMERIC, oldLocale);
> > 
> > However, I suspect that there would be a nasty performance penalty for 
> > repeatedly switching the locale, as well as there being multi-threading 
> > considerations for other functions.
> 
> I think that we could just bracket the call to _slang_compile() with 
> the set/restore-locale calls.

The thread-unsafety seems like a showstopper.

-- 
Eric Anholt
e...@anholt.net                         eric.anh...@intel.com


Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to