--- On Thu, 8/10/09, tom fogal <[email protected]> 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_NUMERIC, 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.

Cheers,
Chris



      

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to