Martin Sebor wrote:
>
>Travis Vitek wrote:
>>  
>> 
>> Right. It seems that for this to be mt-safe with respect to other
>> library code that calls setlocale(), we would need to lock the
>> same lock that is used by _RW::__rw_setlocale. If don't use the
>> same lock it would be possible for the std::locale::global() call
>> to change the locale while some other library code is reading
>> locale specific data under protection of an active
>> _RW::__rw_setlocale instance.
>
>Good point. That probably means extending the __rw_setlocale
>interface to release the lock without restoring the original
>locale name.
>
>

Is there a chance that such a change would not be forward binary
compatible? 

C:\Build\stdcxx\trunk\msvc-8.0\12d\lib>dumpbin /exports libstd12d.dll |
find "setlocale"
        123   7A 000114C0 [EMAIL PROTECTED]@@[EMAIL PROTECTED]@Z =
[EMAIL PROTECTED]@@[EMAIL PROTECTED]@Z (public: __thiscall
__rw::__rw_setlocale::__rw_setlocale(char const *,int,int))
        245   F4 00011610 [EMAIL PROTECTED]@@[EMAIL PROTECTED] =
[EMAIL PROTECTED]@@[EMAIL PROTECTED] (public: __thiscall
__rw::__rw_setlocale::~__rw_setlocale(void))
        523  20A 00002C20 [EMAIL PROTECTED]@@QAEXXZ =
[EMAIL PROTECTED]@@QAEXXZ (public: void __thiscall
__rw::__rw_setlocale::`default constructor closure'(void))
       1693  69C 00002C10 [EMAIL PROTECTED]@__rw@@QBEPBDXZ =
[EMAIL PROTECTED]@__rw@@QBEPBDXZ (public: char const * __thiscall
__rw::__rw_setlocale::name(void)const )

Travis

Reply via email to