Home | History | Annotate | Download | only in patches.android
      1 From cee395a0340092c61a4024a2021842e9d43bc544 Mon Sep 17 00:00:00 2001
      2 From: Pavel Chupin <pavel.v.chupin (a] intel.com>
      3 Date: Sun, 27 Apr 2014 22:23:39 -0700
      4 Subject: [PATCH 09/12] Fix locale stuff for LP64
      5 
      6 ---
      7  include/__locale                       | 13 +++++++++++++
      8  src/support/android/locale_android.cpp | 14 ++++++++++++++
      9  2 files changed, 27 insertions(+)
     10 
     11 diff --git a/include/__locale b/include/__locale
     12 index c793cfe..d078810 100644
     13 --- a/include/__locale
     14 +++ b/include/__locale
     15 @@ -376,6 +376,19 @@ public:
     16      static const mask xdigit = _ISXDIGIT;
     17      static const mask blank  = _ISBLANK;
     18  #elif defined(__ANDROID__)
     19 +# if !defined(_U)
     20 +#   if !defined(_CTYPE_U)
     21 +#    error Bionic header ctype.h does not define either _U nor _CTYPE_U
     22 +#   endif
     23 +#   define _U _CTYPE_U
     24 +#   define _L _CTYPE_L
     25 +#   define _N _CTYPE_N
     26 +#   define _S _CTYPE_S
     27 +#   define _P _CTYPE_P
     28 +#   define _C _CTYPE_C
     29 +#   define _X _CTYPE_X
     30 +#   define _B _CTYPE_B
     31 +# endif
     32      typedef unsigned short mask;
     33      static const mask space  = _S;
     34      static const mask print  = _P | _U | _L | _N | _B;
     35 diff --git a/src/support/android/locale_android.cpp b/src/support/android/locale_android.cpp
     36 index 7193028..9716458 100644
     37 --- a/src/support/android/locale_android.cpp
     38 +++ b/src/support/android/locale_android.cpp
     39 @@ -43,6 +43,20 @@
     40  //
     41  extern "C" const unsigned short* const _ctype_android;
     42  
     43 +#if !defined(_U)
     44 +#  if !defined(_CTYPE_U)
     45 +#   error Bionic header ctype.h does not define either _U nor _CTYPE_U
     46 +#  endif
     47 +#  define _U _CTYPE_U
     48 +#  define _L _CTYPE_L
     49 +#  define _N _CTYPE_N
     50 +#  define _S _CTYPE_S
     51 +#  define _P _CTYPE_P
     52 +#  define _C _CTYPE_C
     53 +#  define _X _CTYPE_X
     54 +#  define _B _CTYPE_B
     55 +#endif
     56 +
     57  static const unsigned short ctype_android_tab[256+128] = {
     58         /* -128..-1 */
     59          _C,     _C,           _C,     _C,     _C,     _C,     _C,     _C, /* 80 */
     60 -- 
     61 1.9.1.423.g4596e3a
     62 
     63