1 #include <android/api-level.h>
2 
3 #if !__LP64__ && !defined(__arm__) || __ANDROID_API__ == 3
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 except ARM.
7 #include <wchar.h>
8 
9 #define CONCAT(x,y) CONCAT_(x,y)
10 #define CONCAT_(x,y) x ## y
11 
12 #define STATIC_ASSERT(condition) \
13   static char CONCAT(dummy_,__LINE__)[1 - 2*(!(condition))];
14 
15 STATIC_ASSERT(sizeof(wchar_t) == 4);
16 
17 #if defined(__arm__)
18 STATIC_ASSERT(WCHAR_MIN == 0U);
19 STATIC_ASSERT(WCHAR_MAX == 2*2147483647U + 1U);
20 #else
21 STATIC_ASSERT(WCHAR_MIN == -1-2147483647);
22 STATIC_ASSERT(WCHAR_MAX == 2147483647);
23 #endif
24 
25 #endif