[cfe-dev] [PATCH] Libc++ Windows fixes (Attention all libc++ ports!!!)

Sean Hunt scshunt at csclub.uwaterloo.ca
Mon Sep 26 09:07:55 PDT 2011


On Mon, Sep 26, 2011 at 12:00, Ruben Van Boxem <vanboxem.ruben at gmail.com> wrote:
> I've though about this, but this would break for static libc++.
>
> This issue is worse/different than I first thought. The _configthreadlocale
> function needs to be called per thread, so this is frankly out of libc++'s
> control and should be left to the user.
>
> Ruben

I do not believe we can safely set this on a global basis since that
might interfere with user code.

Rather, we would have to, where POSIX code uses uselocale(), retrieve
the current setting of _configthreadlocale, set it to thread-local or
save the current locale, set the correct locale, do our operation,
reset the locale, and then restore either the previous locale or the
global setting.

Sean



More information about the cfe-dev mailing list