]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR ada/60411 (Ada bootstrap failure on ARM)
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 8 Apr 2014 20:35:14 +0000 (20:35 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 8 Apr 2014 20:35:14 +0000 (20:35 +0000)
PR ada/60411
* sigtramp.h: Add Android support.

From-SVN: r209227

gcc/ada/ChangeLog
gcc/ada/sigtramp.h

index 3353b89867a684539396d99f1be7085713fbc36c..e3a690ad0ec4f7979d665179d0476bd23fb124d1 100644 (file)
@@ -5,6 +5,7 @@
        * s-linux-android.ads: New file.
        * s-intman-android.adb: Likewise.
        * sigtramp-armdroid.c: Likewise.
+       * sigtramp.h: Add Android support.
 
 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
 
index cf5f4707ee340c679aed62f1dc286d46720499d5..7419e172510e3bb3aaf24153f156d1e0e1b0740b 100644 (file)
@@ -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- *
 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