[libcxx] r213785 - Fix ctype_base::xdigit for Android.

Nico Weber thakis at chromium.org
Wed Jul 23 12:45:25 PDT 2014


On Wed, Jul 23, 2014 at 12:32 PM, Dan Albert <danalbert at google.com> wrote:

> Author: danalbert
> Date: Wed Jul 23 14:32:03 2014
> New Revision: 213785
>
> URL: http://llvm.org/viewvc/llvm-project?rev=213785&view=rev
> Log:
> Fix ctype_base::xdigit for Android.
>
> Android's ctype implementation comes from openbsd, which for some reason
> doesn't consider numbers to be hex digits.
>

That seems broken. What happens without this patch? libc++ and C library
don't agree on what hex digits are?


>
> Modified:
>     libcxx/trunk/include/__locale
>
> Modified: libcxx/trunk/include/__locale
> URL:
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__locale?rev=213785&r1=213784&r2=213785&view=diff
>
> ==============================================================================
> --- libcxx/trunk/include/__locale (original)
> +++ libcxx/trunk/include/__locale Wed Jul 23 14:32:03 2014
> @@ -366,7 +366,12 @@ public:
>      static const mask alpha  = _CTYPE_A;
>      static const mask digit  = _CTYPE_D;
>      static const mask punct  = _CTYPE_P;
> +# if defined(__ANDROID__)
> +    static const mask xdigit = _CTYPE_X | _CTYPE_D;
> +# else
>      static const mask xdigit = _CTYPE_X;
> +# endif
> +
>  # if defined(__NetBSD__)
>      static const mask blank  = _CTYPE_BL;
>  # else
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140723/8b02fccf/attachment.html>


More information about the cfe-commits mailing list