diff options
Diffstat (limited to '9/platforms/android-8/arch-arm/usr/include')
15 files changed, 484 insertions, 307 deletions
diff --git a/9/platforms/android-8/arch-arm/usr/include/KHR/khrplatform.h b/9/platforms/android-8/arch-arm/usr/include/KHR/khrplatform.h index 75bc551..2bca446 100644 --- a/9/platforms/android-8/arch-arm/usr/include/KHR/khrplatform.h +++ b/9/platforms/android-8/arch-arm/usr/include/KHR/khrplatform.h @@ -92,7 +92,8 @@ #elif defined (__SYMBIAN32__) # define KHRONOS_APICALL IMPORT_C #elif defined(__ANDROID__) -# define KHRONOS_APICALL __attribute__((visibility("default"))) +# include <sys/cdefs.h> +# define KHRONOS_APICALL __attribute__((visibility("default"))) __NDK_FPABI__ #else # define KHRONOS_APICALL #endif diff --git a/9/platforms/android-8/arch-arm/usr/include/inttypes.h b/9/platforms/android-8/arch-arm/usr/include/inttypes.h index 73b22db..62e12c6 100644 --- a/9/platforms/android-8/arch-arm/usr/include/inttypes.h +++ b/9/platforms/android-8/arch-arm/usr/include/inttypes.h @@ -249,8 +249,6 @@ typedef struct { } imaxdiv_t; __BEGIN_DECLS -intmax_t imaxabs(intmax_t); -imaxdiv_t imaxdiv(intmax_t, intmax_t); intmax_t strtoimax(const char *, char **, int); uintmax_t strtoumax(const char *, char **, int); diff --git a/9/platforms/android-8/arch-arm/usr/include/jni.h b/9/platforms/android-8/arch-arm/usr/include/jni.h index 495902c..21ad370 100644 --- a/9/platforms/android-8/arch-arm/usr/include/jni.h +++ b/9/platforms/android-8/arch-arm/usr/include/jni.h @@ -24,6 +24,7 @@ #ifndef JNI_H_ #define JNI_H_ +#include <sys/cdefs.h> #include <stdarg.h> /* @@ -231,12 +232,12 @@ struct JNINativeInterface { jlong (*CallLongMethod)(JNIEnv*, jobject, jmethodID, ...); jlong (*CallLongMethodV)(JNIEnv*, jobject, jmethodID, va_list); jlong (*CallLongMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); - jfloat (*CallFloatMethod)(JNIEnv*, jobject, jmethodID, ...); - jfloat (*CallFloatMethodV)(JNIEnv*, jobject, jmethodID, va_list); - jfloat (*CallFloatMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); - jdouble (*CallDoubleMethod)(JNIEnv*, jobject, jmethodID, ...); - jdouble (*CallDoubleMethodV)(JNIEnv*, jobject, jmethodID, va_list); - jdouble (*CallDoubleMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); + jfloat (*CallFloatMethod)(JNIEnv*, jobject, jmethodID, ...) __NDK_FPABI__; + jfloat (*CallFloatMethodV)(JNIEnv*, jobject, jmethodID, va_list) __NDK_FPABI__; + jfloat (*CallFloatMethodA)(JNIEnv*, jobject, jmethodID, jvalue*) __NDK_FPABI__; + jdouble (*CallDoubleMethod)(JNIEnv*, jobject, jmethodID, ...) __NDK_FPABI__; + jdouble (*CallDoubleMethodV)(JNIEnv*, jobject, jmethodID, va_list) __NDK_FPABI__; + jdouble (*CallDoubleMethodA)(JNIEnv*, jobject, jmethodID, jvalue*) __NDK_FPABI__; void (*CallVoidMethod)(JNIEnv*, jobject, jmethodID, ...); void (*CallVoidMethodV)(JNIEnv*, jobject, jmethodID, va_list); void (*CallVoidMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); @@ -284,17 +285,17 @@ struct JNINativeInterface { jlong (*CallNonvirtualLongMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*); jfloat (*CallNonvirtualFloatMethod)(JNIEnv*, jobject, jclass, - jmethodID, ...); + jmethodID, ...) __NDK_FPABI__; jfloat (*CallNonvirtualFloatMethodV)(JNIEnv*, jobject, jclass, - jmethodID, va_list); + jmethodID, va_list) __NDK_FPABI__; jfloat (*CallNonvirtualFloatMethodA)(JNIEnv*, jobject, jclass, - jmethodID, jvalue*); + jmethodID, jvalue*) __NDK_FPABI__; jdouble (*CallNonvirtualDoubleMethod)(JNIEnv*, jobject, jclass, - jmethodID, ...); + jmethodID, ...) __NDK_FPABI__; jdouble (*CallNonvirtualDoubleMethodV)(JNIEnv*, jobject, jclass, - jmethodID, va_list); + jmethodID, va_list) __NDK_FPABI__; jdouble (*CallNonvirtualDoubleMethodA)(JNIEnv*, jobject, jclass, - jmethodID, jvalue*); + jmethodID, jvalue*) __NDK_FPABI__; void (*CallNonvirtualVoidMethod)(JNIEnv*, jobject, jclass, jmethodID, ...); void (*CallNonvirtualVoidMethodV)(JNIEnv*, jobject, jclass, @@ -311,8 +312,8 @@ struct JNINativeInterface { jshort (*GetShortField)(JNIEnv*, jobject, jfieldID); jint (*GetIntField)(JNIEnv*, jobject, jfieldID); jlong (*GetLongField)(JNIEnv*, jobject, jfieldID); - jfloat (*GetFloatField)(JNIEnv*, jobject, jfieldID); - jdouble (*GetDoubleField)(JNIEnv*, jobject, jfieldID); + jfloat (*GetFloatField)(JNIEnv*, jobject, jfieldID) __NDK_FPABI__; + jdouble (*GetDoubleField)(JNIEnv*, jobject, jfieldID) __NDK_FPABI__; void (*SetObjectField)(JNIEnv*, jobject, jfieldID, jobject); void (*SetBooleanField)(JNIEnv*, jobject, jfieldID, jboolean); @@ -321,8 +322,8 @@ struct JNINativeInterface { void (*SetShortField)(JNIEnv*, jobject, jfieldID, jshort); void (*SetIntField)(JNIEnv*, jobject, jfieldID, jint); void (*SetLongField)(JNIEnv*, jobject, jfieldID, jlong); - void (*SetFloatField)(JNIEnv*, jobject, jfieldID, jfloat); - void (*SetDoubleField)(JNIEnv*, jobject, jfieldID, jdouble); + void (*SetFloatField)(JNIEnv*, jobject, jfieldID, jfloat) __NDK_FPABI__; + void (*SetDoubleField)(JNIEnv*, jobject, jfieldID, jdouble) __NDK_FPABI__; jmethodID (*GetStaticMethodID)(JNIEnv*, jclass, const char*, const char*); @@ -349,12 +350,12 @@ struct JNINativeInterface { jlong (*CallStaticLongMethod)(JNIEnv*, jclass, jmethodID, ...); jlong (*CallStaticLongMethodV)(JNIEnv*, jclass, jmethodID, va_list); jlong (*CallStaticLongMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); - jfloat (*CallStaticFloatMethod)(JNIEnv*, jclass, jmethodID, ...); - jfloat (*CallStaticFloatMethodV)(JNIEnv*, jclass, jmethodID, va_list); - jfloat (*CallStaticFloatMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); - jdouble (*CallStaticDoubleMethod)(JNIEnv*, jclass, jmethodID, ...); - jdouble (*CallStaticDoubleMethodV)(JNIEnv*, jclass, jmethodID, va_list); - jdouble (*CallStaticDoubleMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); + jfloat (*CallStaticFloatMethod)(JNIEnv*, jclass, jmethodID, ...) __NDK_FPABI__; + jfloat (*CallStaticFloatMethodV)(JNIEnv*, jclass, jmethodID, va_list) __NDK_FPABI__; + jfloat (*CallStaticFloatMethodA)(JNIEnv*, jclass, jmethodID, jvalue*) __NDK_FPABI__; + jdouble (*CallStaticDoubleMethod)(JNIEnv*, jclass, jmethodID, ...) __NDK_FPABI__; + jdouble (*CallStaticDoubleMethodV)(JNIEnv*, jclass, jmethodID, va_list) __NDK_FPABI__; + jdouble (*CallStaticDoubleMethodA)(JNIEnv*, jclass, jmethodID, jvalue*) __NDK_FPABI__; void (*CallStaticVoidMethod)(JNIEnv*, jclass, jmethodID, ...); void (*CallStaticVoidMethodV)(JNIEnv*, jclass, jmethodID, va_list); void (*CallStaticVoidMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); @@ -369,8 +370,8 @@ struct JNINativeInterface { jshort (*GetStaticShortField)(JNIEnv*, jclass, jfieldID); jint (*GetStaticIntField)(JNIEnv*, jclass, jfieldID); jlong (*GetStaticLongField)(JNIEnv*, jclass, jfieldID); - jfloat (*GetStaticFloatField)(JNIEnv*, jclass, jfieldID); - jdouble (*GetStaticDoubleField)(JNIEnv*, jclass, jfieldID); + jfloat (*GetStaticFloatField)(JNIEnv*, jclass, jfieldID) __NDK_FPABI__; + jdouble (*GetStaticDoubleField)(JNIEnv*, jclass, jfieldID) __NDK_FPABI__; void (*SetStaticObjectField)(JNIEnv*, jclass, jfieldID, jobject); void (*SetStaticBooleanField)(JNIEnv*, jclass, jfieldID, jboolean); @@ -379,8 +380,8 @@ struct JNINativeInterface { void (*SetStaticShortField)(JNIEnv*, jclass, jfieldID, jshort); void (*SetStaticIntField)(JNIEnv*, jclass, jfieldID, jint); void (*SetStaticLongField)(JNIEnv*, jclass, jfieldID, jlong); - void (*SetStaticFloatField)(JNIEnv*, jclass, jfieldID, jfloat); - void (*SetStaticDoubleField)(JNIEnv*, jclass, jfieldID, jdouble); + void (*SetStaticFloatField)(JNIEnv*, jclass, jfieldID, jfloat) __NDK_FPABI__; + void (*SetStaticDoubleField)(JNIEnv*, jclass, jfieldID, jdouble) __NDK_FPABI__; jstring (*NewString)(JNIEnv*, const jchar*, jsize); jsize (*GetStringLength)(JNIEnv*, jstring); @@ -605,6 +606,7 @@ struct _JNIEnv { { return functions->GetMethodID(this, clazz, name, sig); } #define CALL_TYPE_METHOD(_jtype, _jname) \ + __NDK_FPABI__ \ _jtype Call##_jname##Method(jobject obj, jmethodID methodID, ...) \ { \ _jtype result; \ @@ -616,10 +618,12 @@ struct _JNIEnv { return result; \ } #define CALL_TYPE_METHODV(_jtype, _jname) \ + __NDK_FPABI__ \ _jtype Call##_jname##MethodV(jobject obj, jmethodID methodID, \ va_list args) \ { return functions->Call##_jname##MethodV(this, obj, methodID, args); } #define CALL_TYPE_METHODA(_jtype, _jname) \ + __NDK_FPABI__ \ _jtype Call##_jname##MethodA(jobject obj, jmethodID methodID, \ jvalue* args) \ { return functions->Call##_jname##MethodA(this, obj, methodID, args); } @@ -652,6 +656,7 @@ struct _JNIEnv { { functions->CallVoidMethodA(this, obj, methodID, args); } #define CALL_NONVIRT_TYPE_METHOD(_jtype, _jname) \ + __NDK_FPABI__ \ _jtype CallNonvirtual##_jname##Method(jobject obj, jclass clazz, \ jmethodID methodID, ...) \ { \ @@ -664,11 +669,13 @@ struct _JNIEnv { return result; \ } #define CALL_NONVIRT_TYPE_METHODV(_jtype, _jname) \ + __NDK_FPABI__ \ _jtype CallNonvirtual##_jname##MethodV(jobject obj, jclass clazz, \ jmethodID methodID, va_list args) \ { return functions->CallNonvirtual##_jname##MethodV(this, obj, clazz, \ methodID, args); } #define CALL_NONVIRT_TYPE_METHODA(_jtype, _jname) \ + __NDK_FPABI__ \ _jtype CallNonvirtual##_jname##MethodA(jobject obj, jclass clazz, \ jmethodID methodID, jvalue* args) \ { return functions->CallNonvirtual##_jname##MethodA(this, obj, clazz, \ @@ -721,8 +728,10 @@ struct _JNIEnv { { return functions->GetIntField(this, obj, fieldID); } jlong GetLongField(jobject obj, jfieldID fieldID) { return functions->GetLongField(this, obj, fieldID); } + __NDK_FPABI__ jfloat GetFloatField(jobject obj, jfieldID fieldID) { return functions->GetFloatField(this, obj, fieldID); } + __NDK_FPABI__ jdouble GetDoubleField(jobject obj, jfieldID fieldID) { return functions->GetDoubleField(this, obj, fieldID); } @@ -740,8 +749,10 @@ struct _JNIEnv { { functions->SetIntField(this, obj, fieldID, value); } void SetLongField(jobject obj, jfieldID fieldID, jlong value) { functions->SetLongField(this, obj, fieldID, value); } + __NDK_FPABI__ void SetFloatField(jobject obj, jfieldID fieldID, jfloat value) { functions->SetFloatField(this, obj, fieldID, value); } + __NDK_FPABI__ void SetDoubleField(jobject obj, jfieldID fieldID, jdouble value) { functions->SetDoubleField(this, obj, fieldID, value); } @@ -749,6 +760,7 @@ struct _JNIEnv { { return functions->GetStaticMethodID(this, clazz, name, sig); } #define CALL_STATIC_TYPE_METHOD(_jtype, _jname) \ + __NDK_FPABI__ \ _jtype CallStatic##_jname##Method(jclass clazz, jmethodID methodID, \ ...) \ { \ @@ -761,11 +773,13 @@ struct _JNIEnv { return result; \ } #define CALL_STATIC_TYPE_METHODV(_jtype, _jname) \ + __NDK_FPABI__ \ _jtype CallStatic##_jname##MethodV(jclass clazz, jmethodID methodID, \ va_list args) \ { return functions->CallStatic##_jname##MethodV(this, clazz, methodID, \ args); } #define CALL_STATIC_TYPE_METHODA(_jtype, _jname) \ + __NDK_FPABI__ \ _jtype CallStatic##_jname##MethodA(jclass clazz, jmethodID methodID, \ jvalue* args) \ { return functions->CallStatic##_jname##MethodA(this, clazz, methodID, \ @@ -815,8 +829,10 @@ struct _JNIEnv { { return functions->GetStaticIntField(this, clazz, fieldID); } jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { return functions->GetStaticLongField(this, clazz, fieldID); } + __NDK_FPABI__ jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { return functions->GetStaticFloatField(this, clazz, fieldID); } + __NDK_FPABI__ jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { return functions->GetStaticDoubleField(this, clazz, fieldID); } @@ -834,8 +850,10 @@ struct _JNIEnv { { functions->SetStaticIntField(this, clazz, fieldID, value); } void SetStaticLongField(jclass clazz, jfieldID fieldID, jlong value) { functions->SetStaticLongField(this, clazz, fieldID, value); } + __NDK_FPABI__ void SetStaticFloatField(jclass clazz, jfieldID fieldID, jfloat value) { functions->SetStaticFloatField(this, clazz, fieldID, value); } + __NDK_FPABI__ void SetStaticDoubleField(jclass clazz, jfieldID fieldID, jdouble value) { functions->SetStaticDoubleField(this, clazz, fieldID, value); } diff --git a/9/platforms/android-8/arch-arm/usr/include/math.h b/9/platforms/android-8/arch-arm/usr/include/math.h index ef6a9e6..c1d9bd8 100644 --- a/9/platforms/android-8/arch-arm/usr/include/math.h +++ b/9/platforms/android-8/arch-arm/usr/include/math.h @@ -183,219 +183,219 @@ __BEGIN_DECLS /* * ANSI/POSIX */ -int __fpclassifyd(double) __pure2; -int __fpclassifyf(float) __pure2; -int __fpclassifyl(long double) __pure2; -int __isfinitef(float) __pure2; -int __isfinite(double) __pure2; -int __isfinitel(long double) __pure2; -int __isinff(float) __pure2; -int __isinf(double) __pure2; -int __isinfl(long double) __pure2; -int __isnanl(long double) __pure2; -int __isnormalf(float) __pure2; -int __isnormal(double) __pure2; -int __isnormall(long double) __pure2; -int __signbit(double) __pure2; -int __signbitf(float) __pure2; -int __signbitl(long double) __pure2; - -double acos(double); -double asin(double); -double atan(double); -double atan2(double, double); -double cos(double); -double sin(double); -double tan(double); - -double cosh(double); -double sinh(double); -double tanh(double); - -double exp(double); -double frexp(double, int *); /* fundamentally !__pure2 */ -double ldexp(double, int); -double log(double); -double log10(double); -double modf(double, double *); /* fundamentally !__pure2 */ - -double pow(double, double); -double sqrt(double); - -double ceil(double); -double fabs(double) __pure2; -double floor(double); -double fmod(double, double); +int __fpclassifyd(double) __NDK_FPABI_MATH__ __pure2; +int __fpclassifyf(float) __NDK_FPABI_MATH__ __pure2; +int __fpclassifyl(long double) __NDK_FPABI_MATH__ __pure2; +int __isfinitef(float) __NDK_FPABI_MATH__ __pure2; +int __isfinite(double) __NDK_FPABI_MATH__ __pure2; +int __isfinitel(long double) __NDK_FPABI_MATH__ __pure2; +int __isinff(float) __NDK_FPABI_MATH__ __pure2; +int __isinf(double) __NDK_FPABI_MATH__ __pure2; +int __isinfl(long double) __NDK_FPABI_MATH__ __pure2; +int __isnanl(long double) __NDK_FPABI_MATH__ __pure2; +int __isnormalf(float) __NDK_FPABI_MATH__ __pure2; +int __isnormal(double) __NDK_FPABI_MATH__ __pure2; +int __isnormall(long double) __NDK_FPABI_MATH__ __pure2; +int __signbit(double) __NDK_FPABI_MATH__ __pure2; +int __signbitf(float) __NDK_FPABI_MATH__ __pure2; +int __signbitl(long double) __NDK_FPABI_MATH__ __pure2; + +double acos(double) __NDK_FPABI_MATH__; +double asin(double) __NDK_FPABI_MATH__; +double atan(double) __NDK_FPABI_MATH__; +double atan2(double, double) __NDK_FPABI_MATH__; +double cos(double) __NDK_FPABI_MATH__; +double sin(double) __NDK_FPABI_MATH__; +double tan(double) __NDK_FPABI_MATH__; + +double cosh(double) __NDK_FPABI_MATH__; +double sinh(double) __NDK_FPABI_MATH__; +double tanh(double) __NDK_FPABI_MATH__; + +double exp(double) __NDK_FPABI_MATH__; +double frexp(double, int *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */ +double ldexp(double, int) __NDK_FPABI_MATH__; +double log(double) __NDK_FPABI_MATH__; +double log10(double) __NDK_FPABI_MATH__; +double modf(double, double *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */ + +double pow(double, double) __NDK_FPABI_MATH__; +double sqrt(double) __NDK_FPABI_MATH__; + +double ceil(double) __NDK_FPABI_MATH__; +double fabs(double) __NDK_FPABI_MATH__ __pure2; +double floor(double) __NDK_FPABI_MATH__; +double fmod(double, double) __NDK_FPABI_MATH__; /* * These functions are not in C90. */ /* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */ -double acosh(double); -double asinh(double); -double atanh(double); -double cbrt(double); -double erf(double); -double erfc(double); -double exp2(double); -double expm1(double); -double fma(double, double, double); -double hypot(double, double); -int ilogb(double) __pure2; -/* int (isinf)(double) __pure2; */ -int (isnan)(double) __pure2; -double lgamma(double); -long long llrint(double); -long long llround(double); -double log1p(double); -double logb(double); -long lrint(double); -long lround(double); -double nextafter(double, double); -double remainder(double, double); -double remquo(double, double, int *); -double rint(double); +double acosh(double) __NDK_FPABI_MATH__; +double asinh(double) __NDK_FPABI_MATH__; +double atanh(double) __NDK_FPABI_MATH__; +double cbrt(double) __NDK_FPABI_MATH__; +double erf(double) __NDK_FPABI_MATH__; +double erfc(double) __NDK_FPABI_MATH__; +double exp2(double) __NDK_FPABI_MATH__; +double expm1(double) __NDK_FPABI_MATH__; +double fma(double, double, double) __NDK_FPABI_MATH__; +double hypot(double, double) __NDK_FPABI_MATH__; +int ilogb(double) __NDK_FPABI_MATH__ __pure2; +/* int (isinf)(double) __NDK_FPABI_MATH__ __pure2; */ +int (isnan)(double) __NDK_FPABI_MATH__ __pure2; +double lgamma(double) __NDK_FPABI_MATH__; +long long llrint(double) __NDK_FPABI_MATH__; +long long llround(double) __NDK_FPABI_MATH__; +double log1p(double) __NDK_FPABI_MATH__; +double logb(double) __NDK_FPABI_MATH__; +long lrint(double) __NDK_FPABI_MATH__; +long lround(double) __NDK_FPABI_MATH__; +double nextafter(double, double) __NDK_FPABI_MATH__; +double remainder(double, double) __NDK_FPABI_MATH__; +double remquo(double, double, int *) __NDK_FPABI_MATH__; +double rint(double) __NDK_FPABI_MATH__; /* #endif */ /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */ /* #if __BSD_VISIBLE || __XSI_VISIBLE */ -double j0(double); -double j1(double); -double jn(int, double); -double scalb(double, double); -double y0(double); -double y1(double); -double yn(int, double); +double j0(double) __NDK_FPABI_MATH__; +double j1(double) __NDK_FPABI_MATH__; +double jn(int, double) __NDK_FPABI_MATH__; +double scalb(double, double) __NDK_FPABI_MATH__; +double y0(double) __NDK_FPABI_MATH__; +double y1(double) __NDK_FPABI_MATH__; +double yn(int, double) __NDK_FPABI_MATH__; /* #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE */ -double gamma(double); +double gamma(double) __NDK_FPABI_MATH__; /* #endif */ /* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */ /* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 */ -double copysign(double, double) __pure2; -double fdim(double, double); -double fmax(double, double) __pure2; -double fmin(double, double) __pure2; -double nearbyint(double); -double round(double); -double scalbln(double, long); -double scalbn(double, int); -double tgamma(double); -double trunc(double); +double copysign(double, double) __NDK_FPABI_MATH__ __pure2; +double fdim(double, double) __NDK_FPABI_MATH__; +double fmax(double, double) __NDK_FPABI_MATH__ __pure2; +double fmin(double, double) __NDK_FPABI_MATH__ __pure2; +double nearbyint(double) __NDK_FPABI_MATH__; +double round(double) __NDK_FPABI_MATH__; +double scalbln(double, long) __NDK_FPABI_MATH__; +double scalbn(double, int) __NDK_FPABI_MATH__; +double tgamma(double) __NDK_FPABI_MATH__; +double trunc(double) __NDK_FPABI_MATH__; /* #endif */ /* * BSD math library entry points */ /* #if __BSD_VISIBLE */ -double drem(double, double); -int finite(double) __pure2; -int isnanf(float) __pure2; +double drem(double, double) __NDK_FPABI_MATH__; +int finite(double) __NDK_FPABI_MATH__ __pure2; +int isnanf(float) __NDK_FPABI_MATH__ __pure2; /* * Reentrant version of gamma & lgamma; passes signgam back by reference * as the second argument; user must allocate space for signgam. */ -double gamma_r(double, int *); -double lgamma_r(double, int *); +double gamma_r(double, int *) __NDK_FPABI_MATH__; +double lgamma_r(double, int *) __NDK_FPABI_MATH__; /* * IEEE Test Vector */ -double significand(double); +double significand(double) __NDK_FPABI_MATH__; /* #endif */ /* __BSD_VISIBLE */ /* float versions of ANSI/POSIX functions */ /*#if __ISO_C_VISIBLE >= 1999 */ -float acosf(float); -float asinf(float); -float atanf(float); -float atan2f(float, float); -float cosf(float); -float sinf(float); -float tanf(float); - -float coshf(float); -float sinhf(float); -float tanhf(float); - -float exp2f(float); -float expf(float); -float expm1f(float); -float frexpf(float, int *); /* fundamentally !__pure2 */ -int ilogbf(float) __pure2; -float ldexpf(float, int); -float log10f(float); -float log1pf(float); -float logf(float); -float modff(float, float *); /* fundamentally !__pure2 */ - -float powf(float, float); -float sqrtf(float); - -float ceilf(float); -float fabsf(float) __pure2; -float floorf(float); -float fmodf(float, float); -float roundf(float); - -float erff(float); -float erfcf(float); -float hypotf(float, float); -float lgammaf(float); - -float acoshf(float); -float asinhf(float); -float atanhf(float); -float cbrtf(float); -float logbf(float); -float copysignf(float, float) __pure2; -long long llrintf(float); -long long llroundf(float); -long lrintf(float); -long lroundf(float); -float nearbyintf(float); -float nextafterf(float, float); -float remainderf(float, float); -float remquof(float, float, int *); -float rintf(float); -float scalblnf(float, long); -float scalbnf(float, int); -float truncf(float); - -float fdimf(float, float); -float fmaf(float, float, float); -float fmaxf(float, float) __pure2; -float fminf(float, float) __pure2; +float acosf(float) __NDK_FPABI_MATH__; +float asinf(float) __NDK_FPABI_MATH__; +float atanf(float) __NDK_FPABI_MATH__; +float atan2f(float, float) __NDK_FPABI_MATH__; +float cosf(float) __NDK_FPABI_MATH__; +float sinf(float) __NDK_FPABI_MATH__; +float tanf(float) __NDK_FPABI_MATH__; + +float coshf(float) __NDK_FPABI_MATH__; +float sinhf(float) __NDK_FPABI_MATH__; +float tanhf(float) __NDK_FPABI_MATH__; + +float exp2f(float) __NDK_FPABI_MATH__; +float expf(float) __NDK_FPABI_MATH__; +float expm1f(float) __NDK_FPABI_MATH__; +float frexpf(float, int *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */ +int ilogbf(float) __NDK_FPABI_MATH__ __pure2; +float ldexpf(float, int) __NDK_FPABI_MATH__; +float log10f(float) __NDK_FPABI_MATH__; +float log1pf(float) __NDK_FPABI_MATH__; +float logf(float) __NDK_FPABI_MATH__; +float modff(float, float *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */ + +float powf(float, float) __NDK_FPABI_MATH__; +float sqrtf(float) __NDK_FPABI_MATH__; + +float ceilf(float) __NDK_FPABI_MATH__; +float fabsf(float) __NDK_FPABI_MATH__ __pure2; +float floorf(float) __NDK_FPABI_MATH__; +float fmodf(float, float) __NDK_FPABI_MATH__; +float roundf(float) __NDK_FPABI_MATH__; + +float erff(float) __NDK_FPABI_MATH__; +float erfcf(float) __NDK_FPABI_MATH__; +float hypotf(float, float) __NDK_FPABI_MATH__; +float lgammaf(float) __NDK_FPABI_MATH__; + +float acoshf(float) __NDK_FPABI_MATH__; +float asinhf(float) __NDK_FPABI_MATH__; +float atanhf(float) __NDK_FPABI_MATH__; +float cbrtf(float) __NDK_FPABI_MATH__; +float logbf(float) __NDK_FPABI_MATH__; +float copysignf(float, float) __NDK_FPABI_MATH__ __pure2; +long long llrintf(float) __NDK_FPABI_MATH__; +long long llroundf(float) __NDK_FPABI_MATH__; +long lrintf(float) __NDK_FPABI_MATH__; +long lroundf(float) __NDK_FPABI_MATH__; +float nearbyintf(float) __NDK_FPABI_MATH__; +float nextafterf(float, float) __NDK_FPABI_MATH__; +float remainderf(float, float) __NDK_FPABI_MATH__; +float remquof(float, float, int *) __NDK_FPABI_MATH__; +float rintf(float) __NDK_FPABI_MATH__; +float scalblnf(float, long) __NDK_FPABI_MATH__; +float scalbnf(float, int) __NDK_FPABI_MATH__; +float truncf(float) __NDK_FPABI_MATH__; + +float fdimf(float, float) __NDK_FPABI_MATH__; +float fmaf(float, float, float) __NDK_FPABI_MATH__; +float fmaxf(float, float) __NDK_FPABI_MATH__ __pure2; +float fminf(float, float) __NDK_FPABI_MATH__ __pure2; /* #endif */ /* * float versions of BSD math library entry points */ /* #if __BSD_VISIBLE */ -float dremf(float, float); -int finitef(float) __pure2; -float gammaf(float); -float j0f(float); -float j1f(float); -float jnf(int, float); -float scalbf(float, float); -float y0f(float); -float y1f(float); -float ynf(int, float); +float dremf(float, float) __NDK_FPABI_MATH__; +int finitef(float) __NDK_FPABI_MATH__ __pure2; +float gammaf(float) __NDK_FPABI_MATH__; +float j0f(float) __NDK_FPABI_MATH__; +float j1f(float) __NDK_FPABI_MATH__; +float jnf(int, float) __NDK_FPABI_MATH__; +float scalbf(float, float) __NDK_FPABI_MATH__; +float y0f(float) __NDK_FPABI_MATH__; +float y1f(float) __NDK_FPABI_MATH__; +float ynf(int, float) __NDK_FPABI_MATH__; /* * Float versions of reentrant version of gamma & lgamma; passes * signgam back by reference as the second argument; user must * allocate space for signgam. */ -float gammaf_r(float, int *); -float lgammaf_r(float, int *); +float gammaf_r(float, int *) __NDK_FPABI_MATH__; +float lgammaf_r(float, int *) __NDK_FPABI_MATH__; /* * float version of IEEE Test Vector */ -float significandf(float); +float significandf(float) __NDK_FPABI_MATH__; /* #endif */ /* __BSD_VISIBLE */ /* @@ -403,82 +403,82 @@ float significandf(float); */ /* #if __ISO_C_VISIBLE >= 1999 */ #if 0 -long double acoshl(long double); -long double acosl(long double); -long double asinhl(long double); -long double asinl(long double); -long double atan2l(long double, long double); -long double atanhl(long double); -long double atanl(long double); -long double cbrtl(long double); +long double acoshl(long double) __NDK_FPABI_MATH__; +long double acosl(long double) __NDK_FPABI_MATH__; +long double asinhl(long double) __NDK_FPABI_MATH__; +long double asinl(long double) __NDK_FPABI_MATH__; +long double atan2l(long double, long double) __NDK_FPABI_MATH__; +long double atanhl(long double) __NDK_FPABI_MATH__; +long double atanl(long double) __NDK_FPABI_MATH__; +long double cbrtl(long double) __NDK_FPABI_MATH__; #endif -long double ceill(long double); -long double copysignl(long double, long double) __pure2; +long double ceill(long double) __NDK_FPABI_MATH__; +long double copysignl(long double, long double) __NDK_FPABI_MATH__ __pure2; #if 0 -long double coshl(long double); -long double cosl(long double); -long double erfcl(long double); -long double erfl(long double); -long double exp2l(long double); -long double expl(long double); -long double expm1l(long double); +long double coshl(long double) __NDK_FPABI_MATH__; +long double cosl(long double) __NDK_FPABI_MATH__; +long double erfcl(long double) __NDK_FPABI_MATH__; +long double erfl(long double) __NDK_FPABI_MATH__; +long double exp2l(long double) __NDK_FPABI_MATH__; +long double expl(long double) __NDK_FPABI_MATH__; +long double expm1l(long double) __NDK_FPABI_MATH__; #endif -long double fabsl(long double) __pure2; -long double fdiml(long double, long double); -long double floorl(long double); -long double fmal(long double, long double, long double); -long double fmaxl(long double, long double) __pure2; -long double fminl(long double, long double) __pure2; +long double fabsl(long double) __NDK_FPABI_MATH__ __pure2; +long double fdiml(long double, long double) __NDK_FPABI_MATH__; +long double floorl(long double) __NDK_FPABI_MATH__; +long double fmal(long double, long double, long double) __NDK_FPABI_MATH__; +long double fmaxl(long double, long double) __NDK_FPABI_MATH__ __pure2; +long double fminl(long double, long double) __NDK_FPABI_MATH__ __pure2; #if 0 -long double fmodl(long double, long double); +long double fmodl(long double, long double) __NDK_FPABI_MATH__; #endif -long double frexpl(long double value, int *); /* fundamentally !__pure2 */ +long double frexpl(long double value, int *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */ #if 0 -long double hypotl(long double, long double); +long double hypotl(long double, long double) __NDK_FPABI_MATH__; #endif -int ilogbl(long double) __pure2; -long double ldexpl(long double, int); +int ilogbl(long double) __NDK_FPABI_MATH__ __pure2; +long double ldexpl(long double, int) __NDK_FPABI_MATH__; #if 0 -long double lgammal(long double); -long long llrintl(long double); +long double lgammal(long double) __NDK_FPABI_MATH__; +long long llrintl(long double) __NDK_FPABI_MATH__; #endif -long long llroundl(long double); +long long llroundl(long double) __NDK_FPABI_MATH__; #if 0 -long double log10l(long double); -long double log1pl(long double); -long double log2l(long double); -long double logbl(long double); -long double logl(long double); -long lrintl(long double); +long double log10l(long double) __NDK_FPABI_MATH__; +long double log1pl(long double) __NDK_FPABI_MATH__; +long double log2l(long double) __NDK_FPABI_MATH__; +long double logbl(long double) __NDK_FPABI_MATH__; +long double logl(long double) __NDK_FPABI_MATH__; +long lrintl(long double) __NDK_FPABI_MATH__; #endif -long lroundl(long double); +long lroundl(long double) __NDK_FPABI_MATH__; #if 0 -long double modfl(long double, long double *); /* fundamentally !__pure2 */ -long double nanl(const char *) __pure2; -long double nearbyintl(long double); +long double modfl(long double, long double *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */ +long double nanl(const char *) __NDK_FPABI_MATH__ __pure2; +long double nearbyintl(long double) __NDK_FPABI_MATH__; #endif -long double nextafterl(long double, long double); -double nexttoward(double, long double); -float nexttowardf(float, long double); -long double nexttowardl(long double, long double); +long double nextafterl(long double, long double) __NDK_FPABI_MATH__; +double nexttoward(double, long double) __NDK_FPABI_MATH__; +float nexttowardf(float, long double) __NDK_FPABI_MATH__; +long double nexttowardl(long double, long double) __NDK_FPABI_MATH__; #if 0 -long double powl(long double, long double); -long double remainderl(long double, long double); -long double remquol(long double, long double, int *); -long double rintl(long double); +long double powl(long double, long double) __NDK_FPABI_MATH__; +long double remainderl(long double, long double) __NDK_FPABI_MATH__; +long double remquol(long double, long double, int *) __NDK_FPABI_MATH__; +long double rintl(long double) __NDK_FPABI_MATH__; #endif -long double roundl(long double); -long double scalblnl(long double, long); -long double scalbnl(long double, int); +long double roundl(long double) __NDK_FPABI_MATH__; +long double scalblnl(long double, long) __NDK_FPABI_MATH__; +long double scalbnl(long double, int) __NDK_FPABI_MATH__; #if 0 -long double sinhl(long double); -long double sinl(long double); -long double sqrtl(long double); -long double tanhl(long double); -long double tanl(long double); -long double tgammal(long double); +long double sinhl(long double) __NDK_FPABI_MATH__; +long double sinl(long double) __NDK_FPABI_MATH__; +long double sqrtl(long double) __NDK_FPABI_MATH__; +long double tanhl(long double) __NDK_FPABI_MATH__; +long double tanl(long double) __NDK_FPABI_MATH__; +long double tgammal(long double) __NDK_FPABI_MATH__; #endif -long double truncl(long double); +long double truncl(long double) __NDK_FPABI_MATH__; /* #endif */ /* __ISO_C_VISIBLE >= 1999 */ __END_DECLS diff --git a/9/platforms/android-8/arch-arm/usr/include/netinet/tcp.h b/9/platforms/android-8/arch-arm/usr/include/netinet/tcp.h index 9adf904..bc52249 100644 --- a/9/platforms/android-8/arch-arm/usr/include/netinet/tcp.h +++ b/9/platforms/android-8/arch-arm/usr/include/netinet/tcp.h @@ -31,4 +31,22 @@ #include <endian.h> /* Include *before* linux/tcp.h */ #include <linux/tcp.h> +__BEGIN_DECLS + +enum { + TCP_ESTABLISHED = 1, + TCP_SYN_SENT, + TCP_SYN_RECV, + TCP_FIN_WAIT1, + TCP_FIN_WAIT2, + TCP_TIME_WAIT, + TCP_CLOSE, + TCP_CLOSE_WAIT, + TCP_LAST_ACK, + TCP_LISTEN, + TCP_CLOSING +}; + +__END_DECLS + #endif /* _NETINET_TCP_H */ diff --git a/9/platforms/android-8/arch-arm/usr/include/poll.h b/9/platforms/android-8/arch-arm/usr/include/poll.h index 560be89..91068e4 100644 --- a/9/platforms/android-8/arch-arm/usr/include/poll.h +++ b/9/platforms/android-8/arch-arm/usr/include/poll.h @@ -35,8 +35,7 @@ __BEGIN_DECLS typedef unsigned int nfds_t; -/* POSIX specifies "int" for the timeout, Linux seems to use long... */ -extern int poll(struct pollfd *, nfds_t, long); +extern int poll(struct pollfd *, nfds_t, int); __END_DECLS diff --git a/9/platforms/android-8/arch-arm/usr/include/pthread.h b/9/platforms/android-8/arch-arm/usr/include/pthread.h index 7741fcf..7de3634 100644 --- a/9/platforms/android-8/arch-arm/usr/include/pthread.h +++ b/9/platforms/android-8/arch-arm/usr/include/pthread.h @@ -138,7 +138,9 @@ int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr); int pthread_create(pthread_t *thread, pthread_attr_t const * attr, void *(*start_routine)(void *), void * arg); -void pthread_exit(void * retval); + +__noreturn void pthread_exit(void * retval); + int pthread_join(pthread_t thid, void ** ret_val); int pthread_detach(pthread_t thid); diff --git a/9/platforms/android-8/arch-arm/usr/include/stdint.h b/9/platforms/android-8/arch-arm/usr/include/stdint.h index 54ea026..7ae2595 100644 --- a/9/platforms/android-8/arch-arm/usr/include/stdint.h +++ b/9/platforms/android-8/arch-arm/usr/include/stdint.h @@ -191,8 +191,13 @@ typedef uint64_t uint_fast64_t; * intptr_t & uintptr_t */ +#ifdef __LP64__ +typedef long intptr_t; +typedef unsigned long uintptr_t; +#else typedef int intptr_t; typedef unsigned int uintptr_t; +#endif #ifdef __STDINT_LIMITS # define INTPTR_MIN INT32_MIN @@ -234,11 +239,7 @@ typedef int64_t intmax_t; /* Limits of wchar_t. */ #ifdef __STDINT_LIMITS - /* Also possibly defined in <wchar.h> */ -# ifndef WCHAR_MIN -# define WCHAR_MIN INT32_MIN -# define WCHAR_MAX INT32_MAX -# endif +#include <sys/_wchar_limits.h> #endif /* Limits of wint_t. */ diff --git a/9/platforms/android-8/arch-arm/usr/include/stdlib.h b/9/platforms/android-8/arch-arm/usr/include/stdlib.h index ddaf32c..e89db56 100644 --- a/9/platforms/android-8/arch-arm/usr/include/stdlib.h +++ b/9/platforms/android-8/arch-arm/usr/include/stdlib.h @@ -57,6 +57,7 @@ extern int setenv(const char *, const char *, int); extern int unsetenv(const char *); extern int clearenv(void); +extern char *mkdtemp(char *); extern char *mktemp (char *); extern int mkstemp (char *); @@ -64,8 +65,9 @@ extern long strtol(const char *, char **, int); extern long long strtoll(const char *, char **, int); extern unsigned long strtoul(const char *, char **, int); extern unsigned long long strtoull(const char *, char **, int); -extern double strtod(const char *nptr, char **endptr); +extern double strtod(const char *nptr, char **endptr) __NDK_FPABI__; +__NDK_FPABI__ static __inline__ float strtof(const char *nptr, char **endptr) { return (float)strtod(nptr, endptr); @@ -75,6 +77,7 @@ extern int atoi(const char *); extern long atol(const char *); extern long long atoll(const char *); + __NDK_FPABI__ static __inline__ double atof(const char *nptr) { return (strtod(nptr, NULL)); @@ -106,8 +109,8 @@ extern long mrand48(void); extern long nrand48(unsigned short *); extern long lrand48(void); extern unsigned short *seed48(unsigned short*); -extern double erand48(unsigned short xsubi[3]); -extern double drand48(void); +extern double erand48(unsigned short xsubi[3]) __NDK_FPABI__; +extern double drand48(void) __NDK_FPABI__; extern void srand48(long); extern unsigned int arc4random(void); extern void arc4random_stir(void); diff --git a/9/platforms/android-8/arch-arm/usr/include/sys/_wchar_limits.h b/9/platforms/android-8/arch-arm/usr/include/sys/_wchar_limits.h new file mode 100644 index 0000000..644792f --- /dev/null +++ b/9/platforms/android-8/arch-arm/usr/include/sys/_wchar_limits.h @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#ifndef _SYS__WCHAR_LIMITS_H +#define _SYS__WCHAR_LIMITS_H + +#include <android/api-level.h> + +/* WCHAR_MIN / WCHAR_MAX can be defined by <stdint.h> or <wchar.h>. + * Due to historical reasons, their definition is a bit complex. + * + * - In NDK r8e and older, all definitions of WCHAR_MIN and WCHAR_MAX + * where 32-bit signed values (with one exception described below), + * despite the fact that wchar_t is 'unsigned' on ARM. + * See http://b.android.com/57749 + * + * This is no longer the case, unless you define _WCHAR_IS_ALWAYS_SIGNED + * at compile time to restore the old (broken) behaviour. This doesn't + * affect other CPU ABIs. + * + * - Before API level 9, on ARM, wchar_t was typedef to 'char' when + * compiling C (not C++). Also, the definitions of WCHAR_MIN and + * WCHAR_MAX differed between <stdint.h> and <wchar.h>: + * + * <stdint.h> conditionally defined them to INT32_MIN / INT32_MAX. + * <wchar.h> conditionally defined them to 0 and 255 instead. + * + * <stdint.h> would only define WCHAR_MIN and WCHAR_MAX when: + * - Compiling C sources. + * - Compiling C++ sources with __STDC_LIMIT_MACROS being defined. + * + * <wchar.h> always ends up including <stdint.h> indirectly. This + * means that: + * + * - When compiling C sources, WCHAR_MIN / WCHAR_MAX were always + * defined as INT32_MIN / INT32_MAX. + * + * - When compiling C++ sources with __STDC_LIMIT_MACROS defined, + * they were always defined to INT32_MIN / INT32_MAX + * + * - When compiling C++ sources without __STDC_LIMIT_MACROS defined, + * they were defined by <wchar.h> as 0 and 255, respectively. + * + * Keep in mind that this was ARM-specific, only for API level < 9. + * + * If _WCHAR_IS_8BIT is defined, the same broken behaviour will + * be restored. See http://b.android.com/57267 + */ +#if !defined(WCHAR_MIN) + +# if defined(_WCHAR_IS_8BIT) && defined(__arm__) && __ANDROID_API__ < 9 +# if defined(__cplusplus) && !defined(__STDC_LIMIT_MACROS) +# define WCHAR_MIN 0 +# define WCHAR_MAX 255 +# else +# define WCHAR_MIN (-2147483647 - 1) +# define WCHAR_MAX (2147483647) +# endif +# elif defined(_WCHAR_IS_ALWAYS_SIGNED) +# define WCHAR_MIN (-2147483647 - 1) +# define WCHAR_MAX (2147483647) +# 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!" +# 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 */ + +#endif /* _SYS__WCHAR_LIMITS_H */ diff --git a/9/platforms/android-8/arch-arm/usr/include/sys/cdefs.h b/9/platforms/android-8/arch-arm/usr/include/sys/cdefs.h index 88ce720..e840064 100644 --- a/9/platforms/android-8/arch-arm/usr/include/sys/cdefs.h +++ b/9/platforms/android-8/arch-arm/usr/include/sys/cdefs.h @@ -530,4 +530,31 @@ #define __BIONIC__ 1 #include <android/api-level.h> +/* __NDK_FPABI__ or __NDK_FPABI_MATH__ are applied to APIs taking or returning float or + [long] double, to ensure even at the presence of -mhard-float (which implies + -mfloat-abi=hard), calling to 32-bit Android native APIs still follow -mfloat-abi=softfp. + + __NDK_FPABI_MATH__ is applied to APIs in math.h. It normally equals to __NDK_FPABI__, + but allows use of customized libm.a compiled with -mhard-float by -D_NDK_MATH_NO_SOFTFP=1 + + NOTE: Disable for clang for now unless _NDK_MATH_NO_SOFTFP=1, because clang before 3.4 doesn't + allow change of calling convension for builtin and produces error message reads: + + a.i:564:6: error: function declared 'aapcs' here was previously declared without calling convention + int sin(double d) __attribute__((pcs("aapcs"))); + ^ + a.i:564:6: note: previous declaration is here + */ +#if defined(__ANDROID__) && !__LP64__ && defined( __arm__) +#define __NDK_FPABI__ __attribute__((pcs("aapcs"))) +#else +#define __NDK_FPABI__ +#endif + +#if (!defined(_NDK_MATH_NO_SOFTFP) || _NDK_MATH_NO_SOFTFP != 1) && !defined(__clang__) +#define __NDK_FPABI_MATH__ __NDK_FPABI__ +#else +#define __NDK_FPABI_MATH__ /* nothing */ +#endif + #endif /* !_SYS_CDEFS_H_ */ diff --git a/9/platforms/android-8/arch-arm/usr/include/sys/cdefs_elf.h b/9/platforms/android-8/arch-arm/usr/include/sys/cdefs_elf.h index 1e57470..5d2e0f3 100644 --- a/9/platforms/android-8/arch-arm/usr/include/sys/cdefs_elf.h +++ b/9/platforms/android-8/arch-arm/usr/include/sys/cdefs_elf.h @@ -32,7 +32,7 @@ #ifdef __LEADING_UNDERSCORE #define _C_LABEL(x) __CONCAT(_,x) -#define _C_LABEL_STRING(x) "_"x +#define _C_LABEL_STRING(x) "_" x #else #define _C_LABEL(x) x #define _C_LABEL_STRING(x) x diff --git a/9/platforms/android-8/arch-arm/usr/include/sys/vfs.h b/9/platforms/android-8/arch-arm/usr/include/sys/vfs.h index 4adaf5f..4ec0e0d 100644 --- a/9/platforms/android-8/arch-arm/usr/include/sys/vfs.h +++ b/9/platforms/android-8/arch-arm/usr/include/sys/vfs.h @@ -34,20 +34,42 @@ __BEGIN_DECLS -/* note: this corresponds to the kernel's statfs64 type */ +/* The kernel's __kernel_fsid_t has a 'val' member but glibc uses '__val'. */ +typedef struct { int __val[2]; } __fsid_t; + +/* Our struct statfs corresponds to the kernel's statfs64 type. */ +#ifdef __mips__ +struct statfs { + uint32_t f_type; + uint32_t f_bsize; + uint32_t f_frsize; + uint32_t __pad; + uint64_t f_blocks; + uint64_t f_bfree; + uint64_t f_files; + uint64_t f_ffree; + uint64_t f_bavail; + __fsid_t f_fsid; + uint32_t f_namelen; + uint32_t f_flags; + uint32_t f_spare[5]; +}; +#else struct statfs { - uint32_t f_type; - uint32_t f_bsize; - uint64_t f_blocks; - uint64_t f_bfree; - uint64_t f_bavail; - uint64_t f_files; - uint64_t f_ffree; - __kernel_fsid_t f_fsid; - uint32_t f_namelen; - uint32_t f_frsize; - uint32_t f_spare[5]; + uint32_t f_type; + uint32_t f_bsize; + uint64_t f_blocks; + uint64_t f_bfree; + uint64_t f_bavail; + uint64_t f_files; + uint64_t f_ffree; + __fsid_t f_fsid; + uint32_t f_namelen; + uint32_t f_frsize; + uint32_t f_flags; + uint32_t f_spare[4]; }; +#endif #define ADFS_SUPER_MAGIC 0xadf5 #define AFFS_SUPER_MAGIC 0xADFF diff --git a/9/platforms/android-8/arch-arm/usr/include/time.h b/9/platforms/android-8/arch-arm/usr/include/time.h index 6163c6d..e7ead0f 100644 --- a/9/platforms/android-8/arch-arm/usr/include/time.h +++ b/9/platforms/android-8/arch-arm/usr/include/time.h @@ -67,7 +67,7 @@ extern char* asctime(const struct tm* a); extern char* asctime_r(const struct tm* a, char* buf); /* Return the difference between TIME1 and TIME0. */ -extern double difftime (time_t __time1, time_t __time0); +extern double difftime (time_t __time1, time_t __time0) __NDK_FPABI__; extern time_t mktime (struct tm *a); extern struct tm* localtime(const time_t *t); diff --git a/9/platforms/android-8/arch-arm/usr/include/wchar.h b/9/platforms/android-8/arch-arm/usr/include/wchar.h index e67b0be..b9dfa66 100644 --- a/9/platforms/android-8/arch-arm/usr/include/wchar.h +++ b/9/platforms/android-8/arch-arm/usr/include/wchar.h @@ -40,6 +40,7 @@ #include <malloc.h> #include <stddef.h> +#include <sys/_wchar_limits.h> /* IMPORTANT: Any code that relies on wide character support is essentially * non-portable and/or broken. the only reason this header exist @@ -70,36 +71,15 @@ typedef enum { WC_TYPE_MAX } wctype_t; -/* TECHNICAL NOTE: This is tricky! - * - * Due to the following inclusion chain: - * <wchar.h> -> <stdio.h> -> <sys/types.h> -> <stdint.h> - * - * WCHAR_MIN / WCHAR_MAX will already be defined to INT32_MIN / INT32_MAX - * when reaching this line in the following cases: - * - Compiling C source code. - * - Compiling C++ source code AND having __STDC_LIMIT_MACROS defined. - * - * When _WCHAR_IS_8BIT is defined, it should emulate the old behaviour. - * which was to set the values to 0 and 255, respectively. - */ -#ifndef WCHAR_MAX -# ifdef _WCHAR_IS_8BIT -# define WCHAR_MAX 255 -# define WCHAR_MIN 0 -# else -/* Same values as INT32_MIN/INT32_MAX, without including <stdint.h> */ -# define WCHAR_MAX (2147483647) -# define WCHAR_MIN (-1-2147483647) -# endif -#endif - -/* Similarly, WEOF used to be defined as simply -1, which is +/* WEOF used to be defined as simply -1, which is * invalid (the standard mandates that the expression must have wint_t - * type). There is no difference in C, but there is one in C++!! - * - * Revert to the old broken behaviour is _WCHAR_IS_8BIT is defined. - */ + * type). Revert to the old broken behaviour is _WCHAR_IS_8BIT is defined. + * See http://b.android.com/57267 */ +#ifdef _WCHAR_IS_8BIT +#define WEOF (-1) +#else +#define WEOF ((wint_t)-1) +#endif #ifdef _WCHAR_IS_8BIT #define WEOF (-1) #else @@ -160,7 +140,7 @@ extern wchar_t *wcsrchr(const wchar_t *, wchar_t); extern size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *); extern size_t wcsspn(const wchar_t *, const wchar_t *); extern wchar_t *wcsstr(const wchar_t *, const wchar_t *); -extern double wcstod(const wchar_t *, wchar_t **); +extern double wcstod(const wchar_t *, wchar_t **) __NDK_FPABI__; extern wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **); extern long int wcstol(const wchar_t *, wchar_t **, int); extern size_t wcstombs(char *, const wchar_t *, size_t); |