toolchain/gcc: refresh patches
[openwrt/svn-archive/archive.git] / toolchain / gcc / patches / 4.6.3 / 002-siginfo_t.patch
1 There is one usage in boehm-gc/os_dep.c, but it is only used if
2 SUNOS5SIGS is defined, which it is only if one of SUNOS5, DRSNX, HPUX, or
3 FREEBSD is defined, which are all not using Linux-based glibc ports.
4
5 Likewise, gcc/ada/init.c has a struct __siginfo occurence, but only for
6 __FreeBSD__.
7
8 config/rs6000/linux-unwind.h uses ``char siginfo[128]'', and
9 config/s390/linux-unwind.h also uses a constant.
10
11 I tested the following patch for sh-linux-gnu. This only covers one
12 configuration, but the change is pretty mechanic anyway and every place
13 that used to refer to struct siginfo already must have had <signal.h> in
14 its include path, which is the same file that declares siginfo_t.
15
16 OK to commit? This should probably also go into any active release
17 branches, to keep them buildable once this glibc change ripples through?
18
19 gcc/
20 * config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
21 siginfo_t instead of struct siginfo.
22 * config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
23 * config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
24 * config/ia64/linux-unwind.h (ia64_fallback_frame_state)
25 (ia64_handle_unwabi): Likewise.
26 * config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
27 * config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
28 * config/sh/linux-unwind.h (shmedia_fallback_frame_state)
29 (sh_fallback_frame_state): Likewise.
30 * config/tilepro/linux-unwind.h (tile_fallback_frame_state): Likewise.
31 * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
32
33 ---
34 --- a/gcc/config/alpha/linux-unwind.h
35 +++ b/gcc/config/alpha/linux-unwind.h
36 @@ -49,7 +49,7 @@ alpha_fallback_frame_state (struct _Unwi
37 else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
38 {
39 struct rt_sigframe {
40 - struct siginfo info;
41 + siginfo_t info;
42 struct ucontext uc;
43 } *rt_ = context->cfa;
44 sc = &rt_->uc.uc_mcontext;
45 --- a/gcc/config/bfin/linux-unwind.h
46 +++ b/gcc/config/bfin/linux-unwind.h
47 @@ -48,10 +48,10 @@ bfin_fallback_frame_state (struct _Unwin
48 {
49 struct rt_sigframe {
50 int sig;
51 - struct siginfo *pinfo;
52 + siginfo_t *pinfo;
53 void *puc;
54 char retcode[8];
55 - struct siginfo info;
56 + siginfo_t info;
57 struct ucontext uc;
58 } *rt_ = context->cfa;
59
60 --- a/gcc/config/i386/linux-unwind.h
61 +++ b/gcc/config/i386/linux-unwind.h
62 @@ -133,9 +133,9 @@ x86_fallback_frame_state (struct _Unwind
63 {
64 struct rt_sigframe {
65 int sig;
66 - struct siginfo *pinfo;
67 + siginfo_t *pinfo;
68 void *puc;
69 - struct siginfo info;
70 + siginfo_t info;
71 struct ucontext uc;
72 } *rt_ = context->cfa;
73 /* The void * cast is necessary to avoid an aliasing warning.
74 --- a/gcc/config/ia64/linux-unwind.h
75 +++ b/gcc/config/ia64/linux-unwind.h
76 @@ -47,7 +47,7 @@ ia64_fallback_frame_state (struct _Unwin
77 struct sigframe {
78 char scratch[16];
79 unsigned long sig_number;
80 - struct siginfo *info;
81 + siginfo_t *info;
82 struct sigcontext *sc;
83 } *frame_ = (struct sigframe *)context->psp;
84 struct sigcontext *sc = frame_->sc;
85 @@ -137,7 +137,7 @@ ia64_handle_unwabi (struct _Unwind_Conte
86 struct sigframe {
87 char scratch[16];
88 unsigned long sig_number;
89 - struct siginfo *info;
90 + siginfo_t *info;
91 struct sigcontext *sc;
92 } *frame = (struct sigframe *)context->psp;
93 struct sigcontext *sc = frame->sc;
94 --- a/gcc/config/mips/linux-unwind.h
95 +++ b/gcc/config/mips/linux-unwind.h
96 @@ -75,7 +75,7 @@ mips_fallback_frame_state (struct _Unwin
97 struct rt_sigframe {
98 u_int32_t ass[4]; /* Argument save space for o32. */
99 u_int32_t trampoline[2];
100 - struct siginfo info;
101 + siginfo_t info;
102 _sig_ucontext_t uc;
103 } *rt_ = context->cfa;
104 sc = &rt_->uc.uc_mcontext;
105 --- a/gcc/config/pa/linux-unwind.h
106 +++ b/gcc/config/pa/linux-unwind.h
107 @@ -63,7 +63,7 @@ pa32_fallback_frame_state (struct _Unwin
108 int i;
109 struct sigcontext *sc;
110 struct rt_sigframe {
111 - struct siginfo info;
112 + siginfo_t info;
113 struct ucontext uc;
114 } *frame;
115
116 --- a/gcc/config/sh/linux-unwind.h
117 +++ b/gcc/config/sh/linux-unwind.h
118 @@ -80,9 +80,9 @@ shmedia_fallback_frame_state (struct _Un
119 && (*(unsigned long *) (pc+11) == 0x6ff0fff0))
120 {
121 struct rt_sigframe {
122 - struct siginfo *pinfo;
123 + siginfo_t *pinfo;
124 void *puc;
125 - struct siginfo info;
126 + siginfo_t info;
127 struct ucontext uc;
128 } *rt_ = context->cfa;
129 /* The void * cast is necessary to avoid an aliasing warning.
130 @@ -179,7 +179,7 @@ sh_fallback_frame_state (struct _Unwind_
131 && (*(unsigned short *) (pc+14) == 0x00ad))))
132 {
133 struct rt_sigframe {
134 - struct siginfo info;
135 + siginfo_t info;
136 struct ucontext uc;
137 } *rt_ = context->cfa;
138 /* The void * cast is necessary to avoid an aliasing warning.
139 --- a/gcc/config/xtensa/linux-unwind.h
140 +++ b/gcc/config/xtensa/linux-unwind.h
141 @@ -62,7 +62,7 @@ xtensa_fallback_frame_state (struct _Unw
142 struct sigcontext *sc;
143
144 struct rt_sigframe {
145 - struct siginfo info;
146 + siginfo_t info;
147 struct ucontext uc;
148 } *rt_;
149