diff options
author | Bernard Banner <banner@adacore.com> | 2012-11-06 09:41:56 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-11-06 10:41:56 +0100 |
commit | 3c55062f3030f6dcd365f89ba9ecfea2131889b4 (patch) | |
tree | 592dfa4c5da0b2f747924e5303aa856760fe858d /gcc/ada/adaint.c | |
parent | 055311ddefe5674b074075c3720e23693370f062 (diff) | |
download | gcc-3c55062f3030f6dcd365f89ba9ecfea2131889b4.zip gcc-3c55062f3030f6dcd365f89ba9ecfea2131889b4.tar.gz gcc-3c55062f3030f6dcd365f89ba9ecfea2131889b4.tar.bz2 |
2012-11-06 Bernard Banner <banner@adacore.com>
* 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
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 15 |
1 files changed, 12 insertions, 3 deletions
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 <unixio.h> #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 <pthread.h> + +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. */ |