Allow to set locale on Windows.
authorMartin Storsjo <martin@martin.st>
Thu, 23 Nov 2017 10:38:18 +0000 (10:38 +0000)
committerMartin Storsjo <martin@martin.st>
Thu, 23 Nov 2017 10:38:18 +0000 (10:38 +0000)
commit771edc7949f6738bad0763fdbdd3ccef3eed18ec
tree5f751f9ad1a9f7ad4078fcff367346adf428b308
parent391804f54b2a98f163b685ee72f8f890c8094405
Allow to set locale on Windows.

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). Number of test failures
doesn't depend on the platform (x86 or x64).

Patch by Andrey Khalyavin.

Differential Revision: https://reviews.llvm.org/D40181

llvm-svn: 318902
libcxx/include/__config
libcxx/include/__locale
libcxx/include/support/win32/locale_win32.h
libcxx/src/support/win32/locale_win32.cpp