Home | History | Annotate | Download | only in jni
      1 #include <android/api-level.h>
      2 
      3 #if !__LP64__ && !defined(__arm__) || __ANDROID_API__ < 9
      4 
      5 // This checks that, by default, wchar_t is 32-bit and
      6 // WCHAR_MIN/WCHAR_MAX are 32-bit signed on all platforms when
      7 // _WCHAR_IS_ALWAYS_SIGNED is defined.
      8 #define _WCHAR_IS_ALWAYS_SIGNED 1
      9 #include <wchar.h>
     10 
     11 #define CONCAT(x,y) CONCAT_(x,y)
     12 #define CONCAT_(x,y) x ## y
     13 
     14 #define STATIC_ASSERT(condition) \
     15   static char CONCAT(dummy_,__LINE__)[1 - 2*(!(condition))];
     16 
     17 STATIC_ASSERT(sizeof(wchar_t) == 4);
     18 
     19 STATIC_ASSERT(WCHAR_MIN == -1-2147483647);
     20 STATIC_ASSERT(WCHAR_MAX == 2147483647);
     21 
     22 #endif