[libcxx-commits] [libcxx] [libc++] Avoid calling `setlocale` in `do_unshift` when unnecessary (PR #117153)

Michael Maltsev via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 20 08:01:30 PST 2024


m417z wrote:

> Offhand I don't know of any good way to avoid that problem, short of manually implementing them

My thought was that replacing `setlocale` + `wcrtomb` with `wcrtomb_l` will work, but looks like MS doesn't offer `wcrtomb_l`, although it does offer other `_l` functions such as [`_wctomb_l`](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/wctomb-wctomb-l?view=msvc-170). Given that, perhaps the only solution in this case is indeed having a manual implementation, which is not ideal.

https://github.com/llvm/llvm-project/pull/117153


More information about the libcxx-commits mailing list