This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] codecvt<wchar_t, char, mbstate_t> support for UTF-8
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Pétur Runólfsson <peturr02 at ru dot is>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 27 Jan 2003 11:55:46 -0600
- Subject: Re: [PATCH] codecvt<wchar_t, char, mbstate_t> support for UTF-8
- References: <07D05A69A3D0C14FAEA60C3ACE8E5564028F550B@nike.hir.is>
>> Am I mistaken in thinking that this introduces even more
>> thread-unsafe
>> code sequences into the library?
>
>I was under the impression that __use_locale only changes the locale for
>the current thread, so this should be thread-safe on glibc 2.3 systems.
>Is this correct?
You are correct.
>You are of course right that MB_CUR_MAX is not thread-safe in general
>(since it depends on the global locale set by setlocale). This however
>seems to be a general problem with the generic locale implementation
>(including codecvt<wchar_t, char, mbstate_t>::do_in and do_out).
This is also correct.
-benjamin