[toolchain] gcc: backport struct siginfo -> siginfo_t renaming
[openwrt/svn-archive/archive.git] / toolchain / gcc / patches / 4.6.2 / 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 diff -urN gcc-linaro-4.6-2012.02/gcc/config/alpha/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/alpha/linux-unwind.h
35 --- gcc-linaro-4.6-2012.02/gcc/config/alpha/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
36 +++ gcc-linaro-4.6-2012.02.new/gcc/config/alpha/linux-unwind.h 2012-09-13 10:25:52.919072751 +0200
37 @@ -49,7 +49,7 @@
38 else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
39 {
40 struct rt_sigframe {
41 - struct siginfo info;
42 + siginfo_t info;
43 struct ucontext uc;
44 } *rt_ = context->cfa;
45 sc = &rt_->uc.uc_mcontext;
46 diff -urN gcc-linaro-4.6-2012.02/gcc/config/bfin/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/bfin/linux-unwind.h
47 --- gcc-linaro-4.6-2012.02/gcc/config/bfin/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
48 +++ gcc-linaro-4.6-2012.02.new/gcc/config/bfin/linux-unwind.h 2012-09-13 10:26:14.819073313 +0200
49 @@ -48,10 +48,10 @@
50 {
51 struct rt_sigframe {
52 int sig;
53 - struct siginfo *pinfo;
54 + siginfo_t *pinfo;
55 void *puc;
56 char retcode[8];
57 - struct siginfo info;
58 + siginfo_t info;
59 struct ucontext uc;
60 } *rt_ = context->cfa;
61
62 diff -urN gcc-linaro-4.6-2012.02/gcc/config/i386/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/i386/linux-unwind.h
63 --- gcc-linaro-4.6-2012.02/gcc/config/i386/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
64 +++ gcc-linaro-4.6-2012.02.new/gcc/config/i386/linux-unwind.h 2012-09-13 10:26:41.891074005 +0200
65 @@ -133,9 +133,9 @@
66 {
67 struct rt_sigframe {
68 int sig;
69 - struct siginfo *pinfo;
70 + siginfo_t *pinfo;
71 void *puc;
72 - struct siginfo info;
73 + siginfo_t info;
74 struct ucontext uc;
75 } *rt_ = context->cfa;
76 /* The void * cast is necessary to avoid an aliasing warning.
77 diff -urN gcc-linaro-4.6-2012.02/gcc/config/ia64/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/ia64/linux-unwind.h
78 --- gcc-linaro-4.6-2012.02/gcc/config/ia64/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
79 +++ gcc-linaro-4.6-2012.02.new/gcc/config/ia64/linux-unwind.h 2012-09-13 10:26:59.251074450 +0200
80 @@ -47,7 +47,7 @@
81 struct sigframe {
82 char scratch[16];
83 unsigned long sig_number;
84 - struct siginfo *info;
85 + siginfo_t *info;
86 struct sigcontext *sc;
87 } *frame_ = (struct sigframe *)context->psp;
88 struct sigcontext *sc = frame_->sc;
89 @@ -137,7 +137,7 @@
90 struct sigframe {
91 char scratch[16];
92 unsigned long sig_number;
93 - struct siginfo *info;
94 + siginfo_t *info;
95 struct sigcontext *sc;
96 } *frame = (struct sigframe *)context->psp;
97 struct sigcontext *sc = frame->sc;
98 diff -urN gcc-linaro-4.6-2012.02/gcc/config/mips/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/mips/linux-unwind.h
99 --- gcc-linaro-4.6-2012.02/gcc/config/mips/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
100 +++ gcc-linaro-4.6-2012.02.new/gcc/config/mips/linux-unwind.h 2012-09-13 10:27:17.947074929 +0200
101 @@ -75,7 +75,7 @@
102 struct rt_sigframe {
103 u_int32_t ass[4]; /* Argument save space for o32. */
104 u_int32_t trampoline[2];
105 - struct siginfo info;
106 + siginfo_t info;
107 _sig_ucontext_t uc;
108 } *rt_ = context->cfa;
109 sc = &rt_->uc.uc_mcontext;
110 diff -urN gcc-linaro-4.6-2012.02/gcc/config/pa/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/pa/linux-unwind.h
111 --- gcc-linaro-4.6-2012.02/gcc/config/pa/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
112 +++ gcc-linaro-4.6-2012.02.new/gcc/config/pa/linux-unwind.h 2012-09-13 10:27:27.491075173 +0200
113 @@ -63,7 +63,7 @@
114 int i;
115 struct sigcontext *sc;
116 struct rt_sigframe {
117 - struct siginfo info;
118 + siginfo_t info;
119 struct ucontext uc;
120 } *frame;
121
122 diff -urN gcc-linaro-4.6-2012.02/gcc/config/sh/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/sh/linux-unwind.h
123 --- gcc-linaro-4.6-2012.02/gcc/config/sh/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
124 +++ gcc-linaro-4.6-2012.02.new/gcc/config/sh/linux-unwind.h 2012-09-13 10:27:58.551075969 +0200
125 @@ -80,9 +80,9 @@
126 && (*(unsigned long *) (pc+11) == 0x6ff0fff0))
127 {
128 struct rt_sigframe {
129 - struct siginfo *pinfo;
130 + siginfo_t *pinfo;
131 void *puc;
132 - struct siginfo info;
133 + siginfo_t info;
134 struct ucontext uc;
135 } *rt_ = context->cfa;
136 /* The void * cast is necessary to avoid an aliasing warning.
137 @@ -179,7 +179,7 @@
138 && (*(unsigned short *) (pc+14) == 0x00ad))))
139 {
140 struct rt_sigframe {
141 - struct siginfo info;
142 + siginfo_t info;
143 struct ucontext uc;
144 } *rt_ = context->cfa;
145 /* The void * cast is necessary to avoid an aliasing warning.
146 diff -urN gcc-linaro-4.6-2012.02/gcc/config/xtensa/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/xtensa/linux-unwind.h
147 --- gcc-linaro-4.6-2012.02/gcc/config/xtensa/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
148 +++ gcc-linaro-4.6-2012.02.new/gcc/config/xtensa/linux-unwind.h 2012-09-13 10:28:13.827076359 +0200
149 @@ -62,7 +62,7 @@
150 struct sigcontext *sc;
151
152 struct rt_sigframe {
153 - struct siginfo info;
154 + siginfo_t info;
155 struct ucontext uc;
156 } *rt_;
157