diff --git a/ndk/platforms/android-3/include/limits.h b/ndk/platforms/android-3/include/limits.h index 1de8ea611..0bde5a2d9 100644 --- a/ndk/platforms/android-3/include/limits.h +++ b/ndk/platforms/android-3/include/limits.h @@ -89,6 +89,22 @@ #include #endif +/* GLibc compatibility definitions. + Note that these are defined by GCC's + only when __GNU_LIBRARY__ is defined, i.e. when + targetting GLibc. */ +#ifndef LONG_LONG_MIN +#define LONG_LONG_MIN LLONG_MIN +#endif + +#ifndef LONG_LONG_MAX +#define LONG_LONG_MAX LLONG_MAX +#endif + +#ifndef ULONG_LONG_MAX +#define ULONG_LONG_MAX ULLONG_MAX +#endif + #ifndef PAGESIZE #define PAGESIZE PAGE_SIZE #endif diff --git a/ndk/platforms/android-3/include/pthread.h b/ndk/platforms/android-3/include/pthread.h index 2a6029d64..ae55782f1 100644 --- a/ndk/platforms/android-3/include/pthread.h +++ b/ndk/platforms/android-3/include/pthread.h @@ -235,9 +235,4 @@ extern void __pthread_cleanup_pop(__pthread_cleanup_t* c, } /* extern "C" */ #endif -/************ TO FIX ************/ - -#define LONG_LONG_MAX __LONG_LONG_MAX__ -#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1) - #endif /* _PTHREAD_H_ */ diff --git a/ndk/platforms/android-5/include/pthread.h b/ndk/platforms/android-5/include/pthread.h index a20a52de1..ba40fa1af 100644 --- a/ndk/platforms/android-5/include/pthread.h +++ b/ndk/platforms/android-5/include/pthread.h @@ -262,9 +262,4 @@ extern void __pthread_cleanup_pop(__pthread_cleanup_t* c, } /* extern "C" */ #endif -/************ TO FIX ************/ - -#define LONG_LONG_MAX __LONG_LONG_MAX__ -#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1) - #endif /* _PTHREAD_H_ */ diff --git a/ndk/platforms/android-8/include/pthread.h b/ndk/platforms/android-8/include/pthread.h index f7a596acb..7741fcf23 100644 --- a/ndk/platforms/android-8/include/pthread.h +++ b/ndk/platforms/android-8/include/pthread.h @@ -267,9 +267,4 @@ extern void __pthread_cleanup_pop(__pthread_cleanup_t* c, } /* extern "C" */ #endif -/************ TO FIX ************/ - -#define LONG_LONG_MAX __LONG_LONG_MAX__ -#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1) - #endif /* _PTHREAD_H_ */ diff --git a/ndk/platforms/android-9/include/pthread.h b/ndk/platforms/android-9/include/pthread.h index 4baf82f75..4cfc9b01f 100644 --- a/ndk/platforms/android-9/include/pthread.h +++ b/ndk/platforms/android-9/include/pthread.h @@ -306,9 +306,4 @@ extern void __pthread_cleanup_pop(__pthread_cleanup_t* c, } /* extern "C" */ #endif -/************ TO FIX ************/ - -#define LONG_LONG_MAX __LONG_LONG_MAX__ -#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1) - #endif /* _PTHREAD_H_ */