<div class="gmail_quote">2011/9/29 Ruben Van Boxem <span dir="ltr"><<a href="mailto:vanboxem.ruben@gmail.com">vanboxem.ruben@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div><div></div><div class="h5">2011/9/29 Howard Hinnant <span dir="ltr"><<a href="mailto:hhinnant@apple.com" target="_blank">hhinnant@apple.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div></div><div><br>
On Sep 28, 2011, at 6:17 PM, David Chisnall wrote:<br>
<br>
> On 28 Sep 2011, at 22:45, Howard Hinnant wrote:<br>
><br>
>> I think FreeBSD should define _LLIBCPP_STABLE_APPLE_ABI too.  David?  And maybe with David's latest patch to FreeBSD, should also #define _LIBCPP_GET_C_LOCALE 0.<br>
><br>
> FreeBSD should now be mirroring the Apple implementation for anything xlocale related.  If there are any discrepancies, they are bugs and I'll fix them in libc, rather than hack around them in libc++.<br>
><br>
> I'm not entirely sure what defining _LLIBCPP_STABLE_APPLE_ABI means - perhaps it could be replaced with a more descriptive name?<br>
<br>
</div></div>See revision 140734, and let me know what needs fixing (hopefully nothing).<br></blockquote></div></div><div><br>This improves the behavior on Windows (uses the C locale instead of returning NULL like for Linux). Attached patch also removes unreachable code (_LIBCPP_HAS_DEFAULTRUNELOCALE is defined for both __APPLE__ and __FreeBSD__, so the additional checks in locale.cpp are never reached).<br>

<br>I'm now also wondering about _LIBCPP_WCTYPE_IS_MASK. I've been looking at MSDN, but can't figure out if it matches. I did find a warning that if a plain "char" is passed to Windows is* functions, unexpected results are obtained (<a href="http://msdn.microsoft.com/en-us/library/4yc6feha%28v=vs.80%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/4yc6feha%28v=vs.80%29.aspx</a>). It seems that char_type could be char in the common case, and this could yield unreliable behavior?<br>

<br>Ruben<br></div></div></blockquote><div><br>Never mind this patch. It's broken. Is there any reason not to call plain "toupper" in do_toupper directly? Or at least "toupper_(c,__cloc())"?<br><br>
Ruben<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

<font color="#888888"><br>
Howard<br>
<br>
</font></blockquote></div><br>
</blockquote></div><br>