[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2019-03-19 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin added a comment. Yes, I considered it. But Microsoft documentation is not clear whether it will work or not for restoring inconsistent locales. The documentation shows how to save inconsistent locales with LC_ALL but doesn't provide an example for restoring them. Repository: rL

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2019-03-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Herald added a project: LLVM. I have a bug report - https://bugs.llvm.org/show_bug.cgi?id=41131 - that says that we can reduce the number of calls in __libcpp_locale_guard from 10 to 2 by calling: `setlocale(LC_ALL, ...)` . Was this considered when this patch was

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2018-05-30 Thread Alexey Pavlov via Phabricator via cfe-commits
Alexpux added a comment. Herald added subscribers: llvm-commits, christof. I'm not be able to build libcxx with 64-bit mingw-w64 due to this commit. Have error like: [ 10%] Building CXX object projects/libcxx/lib/CMakeFiles/cxx_objects.dir/__/src/algorithm.cpp.obj In file included from

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-23 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318902: Allow to set locale on Windows. (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D40181?vs=123923=124055#toc Repository: rL LLVM https://reviews.llvm.org/D40181

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-23 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin added a comment. @EricWF, could you please commit this change? https://reviews.llvm.org/D40181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-22 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. LGTM, thanks for updating it! https://reviews.llvm.org/D40181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-22 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin updated this revision to Diff 123923. https://reviews.llvm.org/D40181 Files: include/__config include/__locale include/support/win32/locale_win32.h src/support/win32/locale_win32.cpp Index: include/__config === ---

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-22 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin added a comment. In https://reviews.llvm.org/D40181#930779, @mstorsjo wrote: > (but I think it does define some sort of dummy functions that at least will > allow it to build) Looked into MinGW-w64 sources and this is indeed the case. _configthreadlocale will return -1 and will

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-22 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin updated this revision to Diff 123921. halyavin added a comment. Herald added a subscriber: krytarowski. Fixed problem with C++98, added std for nullptr_t and switched on _l functions for MinGW. https://reviews.llvm.org/D40181 Files: include/__config include/__locale

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In order to make this work with MinGW (more or less), I had to change the `_LIBCPP_MSVCRT` into `_LIBCPP_MSVCRT_LIKE` both in `include/__locale` and in `include/__config` (where `_LIBCPP_LOCALE__L_EXTENSIONS` is defined). Normal mingw that uses msvcrt.dll doesn't have

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D40181#930602, @EricWF wrote: > This LGTM. I would love if another party interested in Windows could review > it though. I can test this in a MinGW context and see if what it uses happens to be available there or not.

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. This LGTM. I would love if another party interested in Windows could review it though. https://reviews.llvm.org/D40181 ___ cfe-commits mailing

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-17 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin created this revision. Fix the problem PR31516 with setting locale on Windows by wrapping _locale_t with a pointer-like class. Reduces 74 test failures in std/localization test suite to 47 test failures (on llvm clang, Visual Studio 2015).