diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2014-04-08 20:35:14 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2014-04-08 20:35:14 +0000 |
commit | edb2b1b1fa0af901ab22ed58a4644115d3f4bbff (patch) | |
tree | 2b9c54c7b795270c7b18bc5b4d3ac27af14a14e8 /gcc/ada/sigtramp.h | |
parent | 98e6ecab8caecd055780ee085e59c9858886169c (diff) | |
download | gcc-edb2b1b1fa0af901ab22ed58a4644115d3f4bbff.zip gcc-edb2b1b1fa0af901ab22ed58a4644115d3f4bbff.tar.gz gcc-edb2b1b1fa0af901ab22ed58a4644115d3f4bbff.tar.bz2 |
re PR ada/60411 (Ada bootstrap failure on ARM)
PR ada/60411
* sigtramp.h: Add Android support.
From-SVN: r209227
Diffstat (limited to 'gcc/ada/sigtramp.h')
-rw-r--r-- | gcc/ada/sigtramp.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/gcc/ada/sigtramp.h b/gcc/ada/sigtramp.h index cf5f470..7419e17 100644 --- a/gcc/ada/sigtramp.h +++ b/gcc/ada/sigtramp.h @@ -6,7 +6,7 @@ * * * C Header File * * * - * Copyright (C) 2011-2013, Free Software Foundation, Inc. * + * Copyright (C) 2011-2014, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -41,10 +41,29 @@ extern "C" { #endif - typedef void sighandler_t (int signo, void *siginfo, void *sigcontext); +#ifdef __ANDROID__ +#include <stdlib.h> +#include <asm/signal.h> +#include <asm/sigcontext.h> + +/* Android SDK doesn't define these structs */ +typedef struct sigcontext mcontext_t; + +typedef struct ucontext + { + unsigned long uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; +} ucontext_t; +#endif + + /* This typedef signature sometimes conflicts with the sighandler_t from + system headers so call it something unique. */ + typedef void __sigtramphandler_t (int signo, void *siginfo, void *sigcontext); void __gnat_sigtramp (int signo, void *siginfo, void *sigcontext, - sighandler_t * handler); + __sigtramphandler_t * handler); /* To be called from an established signal handler. Setup the DWARF CFI bits letting unwinders walk through the signal frame up into the |