diff --git a/ndk/platforms/android-3/include/stdint.h b/ndk/platforms/android-3/include/stdint.h index 7ae2595b8..244dd4d5c 100644 --- a/ndk/platforms/android-3/include/stdint.h +++ b/ndk/platforms/android-3/include/stdint.h @@ -251,7 +251,7 @@ typedef int64_t intmax_t; /* size_t is defined by the GCC-specific */ #ifndef _SSIZE_T_DEFINED_ #define _SSIZE_T_DEFINED_ -typedef long int ssize_t; +typedef int ssize_t; #endif #define _BITSIZE 32 diff --git a/ndk/platforms/android-3/include/sys/_wchar_limits.h b/ndk/platforms/android-3/include/sys/_wchar_limits.h index 644792f77..12bc6b130 100644 --- a/ndk/platforms/android-3/include/sys/_wchar_limits.h +++ b/ndk/platforms/android-3/include/sys/_wchar_limits.h @@ -86,21 +86,14 @@ # else /* Otherwise, the value is derived from the toolchain configuration. * to avoid putting explicit CPU checks in this header. */ -# ifndef __WCHAR_MAX__ -# error "__WCHAR_MAX__ is not defined. Check your toolchain!" +# define WCHAR_MAX __WCHAR_MAX__ + + /* Clang does not define __WCHAR_MIN__ */ +# if defined(__WCHAR_UNSIGNED__) +# define WCHAR_MIN L'\0' +# else +# define WCHAR_MIN (-(WCHAR_MAX) - 1) # endif - /* Clang does define __WCHAR_MAX__, but not __WCHAR_MIN__ */ -# ifndef __WCHAR_MIN__ -# if __WCHAR_MAX__ == 4294967295 -# define __WCHAR_MIN__ (0U) -# elif __WCHAR_MAX__ == 2147483647 -# define __WCHAR_MIN__ (-2147483647 - 1) -# else -# error "Invalid __WCHAR_MAX__ value. Check your toolchain!" -# endif -# endif /* !__WCHAR_MIN__ */ -# define WCHAR_MIN __WCHAR_MIN__ -# define WCHAR_MAX __WCHAR_MAX__ # endif /* !_WCHAR_IS_ALWAYS_SIGNED */ #endif /* !WCHAR_MIN */ diff --git a/ndk/platforms/android-3/include/sys/types.h b/ndk/platforms/android-3/include/sys/types.h index 15ecb373a..f7f986c04 100644 --- a/ndk/platforms/android-3/include/sys/types.h +++ b/ndk/platforms/android-3/include/sys/types.h @@ -87,7 +87,7 @@ typedef .... pthread_t; #ifndef _SSIZE_T_DEFINED_ #define _SSIZE_T_DEFINED_ -typedef long int ssize_t; +typedef int ssize_t; #endif typedef __kernel_suseconds_t suseconds_t;