From 3c55062f3030f6dcd365f89ba9ecfea2131889b4 Mon Sep 17 00:00:00 2001 From: Bernard Banner Date: Tue, 6 Nov 2012 09:41:56 +0000 Subject: 2012-11-06 Bernard Banner * adaint.c Add file macro definitions missing on Android. * adaint.h Avoid definitions related to task affinity and CPU sets since this functionality is missing on the Android * errno.c (__set_errno): Android already contains such a named procedure so do include again. * gsocket.h: Sockets not supported on Android. * init.c: Avoid linux related code not supported on Android. * sysdep.c (sigismember, sigaddset, sigdelset, sigemptyset, sigfillset): wrapper functions since sig routines are defined as inline macros on Android. * terminals.c: Add stubs for terminal related functions not supported on Android. From-SVN: r193213 --- gcc/ada/adaint.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'gcc/ada/adaint.c') diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 54244bd..eab3ea5 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -87,8 +87,8 @@ extern "C" { #include #endif -#ifdef __vxworks -/* S_IREAD and S_IWRITE are not defined in VxWorks */ +#if defined (__vxworks) || defined (__ANDROID__) +/* S_IREAD and S_IWRITE are not defined in VxWorks or Android */ #ifndef S_IREAD #define S_IREAD (S_IRUSR | S_IRGRP | S_IROTH) #endif @@ -3763,7 +3763,16 @@ void __main (void) {} #endif #endif -#if defined (linux) +#if defined (__ANDROID__) + +#include + +void *__gnat_lwp_self (void) +{ + return (void *) pthread_self (); +} + +#elif defined (linux) /* There is no function in the glibc to retrieve the LWP of the current thread. We need to do a system call in order to retrieve this information. */ -- cgit v1.1