<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 23, 2014 at 12:51 PM, Dan Albert <span dir="ltr"><<a href="mailto:danalbert@google.com" target="_blank">danalbert@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Without this patch only a-f get matched as hex digits, and 0-9 do not. IMO this is a deficiency in the C library, but for backward compatibility reasons we can't change our ctype implementation.</div>
</blockquote><div><br></div><div>Is this function used heavily? Since it seems to be broken, apps probably can't rely on it – and the ones that do probably don't know that the function is broken and would work better if this changed. Do you have data on how many apps call this function?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br>

</div><div>One other idea I had toyed with was just adding a less broken ctable implementation (probably netbsd's) to bionic for use with libc++ (and perhaps the LP64 ABIs?) while still leaving the openbsd one around for compatibility, but I don't think having two ctype implementations in bionic is a very good solution either.</div>
<span class="HOEnZb"><font color="#888888">

<div><br></div><div>- Dan</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 12:45 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>On Wed, Jul 23, 2014 at 12:32 PM, Dan Albert <span dir="ltr"><<a href="mailto:danalbert@google.com" target="_blank">danalbert@google.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: danalbert<br>
Date: Wed Jul 23 14:32:03 2014<br>
New Revision: 213785<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=213785&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=213785&view=rev</a><br>
Log:<br>
Fix ctype_base::xdigit for Android.<br>
<br>
Android's ctype implementation comes from openbsd, which for some reason<br>
doesn't consider numbers to be hex digits.<br></blockquote><div><br></div></div><div>That seems broken. What happens without this patch? libc++ and C library don't agree on what hex digits are?</div><div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Modified:<br>
    libcxx/trunk/include/__locale<br>
<br>
Modified: libcxx/trunk/include/__locale<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__locale?rev=213785&r1=213784&r2=213785&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__locale?rev=213785&r1=213784&r2=213785&view=diff</a><br>




==============================================================================<br>
--- libcxx/trunk/include/__locale (original)<br>
+++ libcxx/trunk/include/__locale Wed Jul 23 14:32:03 2014<br>
@@ -366,7 +366,12 @@ public:<br>
     static const mask alpha  = _CTYPE_A;<br>
     static const mask digit  = _CTYPE_D;<br>
     static const mask punct  = _CTYPE_P;<br>
+# if defined(__ANDROID__)<br>
+    static const mask xdigit = _CTYPE_X | _CTYPE_D;<br>
+# else<br>
     static const mask xdigit = _CTYPE_X;<br>
+# endif<br>
+<br>
 # if defined(__NetBSD__)<br>
     static const mask blank  = _CTYPE_BL;<br>
 # else<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>