Ticket #13190: patch-host-darwin.c

File patch-host-darwin.c, 1.2 KB (added by takeshi@…, 17 years ago)

additional patch 2/2

Line 
1--- ../gcc-4.0.3/gcc/config/rs6000/host-darwin.c.orig   2007-11-10 13:24:23.000000000 +0900
2+++ ../gcc-4.0.3/gcc/config/rs6000/host-darwin.c        2007-11-10 13:19:23.000000000 +0900
3@@ -33,10 +33,6 @@
4 static void segv_handler (int, siginfo_t *, void *);
5 static void darwin_rs6000_extra_signals (void);
6 
7-/* This doesn't have a prototype in signal.h in 10.2.x and earlier,
8-   fixed in later releases.  */
9-extern int sigaltstack(const struct sigaltstack *, struct sigaltstack *);
10-
11 #undef HOST_HOOKS_EXTRA_SIGNALS
12 #define HOST_HOOKS_EXTRA_SIGNALS darwin_rs6000_extra_signals
13
14@@ -60,7 +60,7 @@
15      which case the next line will segfault _again_.  Handle this case.  */
16   signal (SIGSEGV, segv_crash_handler);
17 
18-  faulting_insn = *(unsigned *)uc->uc_mcontext->ss.srr0;
19+  faulting_insn = *(unsigned *)uc->uc_mcontext->__ss.__srr0;
20 
21   /* Note that this only has to work for GCC, so we don't have to deal
22      with all the possible cases (GCC has no AltiVec code, for
23@@ -109,7 +109,7 @@
24     }
25 
26   fprintf (stderr, "[address=%08lx pc=%08x]\n",
27-          uc->uc_mcontext->es.dar, uc->uc_mcontext->ss.srr0);
28+          uc->uc_mcontext->__es.__dar, uc->uc_mcontext->__ss.__srr0);
29   internal_error ("Segmentation Fault");
30   exit (FATAL_EXIT_CODE);
31 }