[cfe-dev] [PATCH] Libc++ Windows fixes

Ruben Van Boxem vanboxem.ruben at gmail.com
Wed Sep 28 13:17:59 PDT 2011


Hi,

I have removed Windows' dependency on the ugly <locale> part that is going
to be refactored by mirrorring Mac and FreeBSD through implementing all the
necessary *_l functions and dependents.

Other notable changes:
 - support/win32/locale.h: fixed uselocale to enable per-thread locale,
because the POSIX definition of this function requires that it only set the
current thread's locale. Consequence is that after a call to this function,
per-thread locale will remain enabled. This is intended behavior as far as I
can see. As a result, I'm fairly confident the __locale_raii trick works as
it should even in multithreaded contexts.
 - include/locale: I still included the variadic template alternatives to
the vararg functions. As these wrappers are going to be removed, You could
leave this out, but libc++ won't compile for GCC without them.
 - include/cwchar: I included the support header in order to get the
functions required by the standard. this solves the cwchar test issue, but
the <wchar.h> test will need to do this manually for _WIN32.

Please comment or apply, thanks.

Ruben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110928/cc18289d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: windows.patch
Type: application/octet-stream
Size: 12624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110928/cc18289d/attachment.obj>


More information about the cfe-dev mailing list