Get rid of eclipse fiels once and for all.
Homogenise the references to crosstool-NG:
- the project is named "crosstool-NG"
- the front-end is named "ct-ng"
- don't use shortcuts (such as "ct-ng" to stand for "crosstool-NG")
Default action is to print help.
Don't speak of make rules when dumping help, just speak of actions.
1 http://sources.redhat.com/ml/libc-hacker/2004-02/msg00005.html
2 [Also in CVS, but the original patch is easier to get.]
6 clnt_perr.c: In function `_buf':
7 clnt_perr.c:67: error: invalid lvalue in assignment
9 when building with gcc-3.5.
11 To: libc-hacker at sources dot redhat dot com
12 Subject: Fix cast as lvalue in sunrpc
13 From: Andreas Schwab <schwab at suse dot de>
14 X-Yow: SHHHH!! I hear SIX TATTOOED TRUCK-DRIVERS tossing ENGINE BLOCKS
15 into empty OIL DRUMS dot dot
16 Date: Sun, 08 Feb 2004 17:38:31 +0100
17 Message-ID: <je4qu1frw8.fsf@sykes.suse.de>
19 This fixes the uses of casts as lvalue in the sunrpc code.
23 2004-02-08 Andreas Schwab <schwab@suse.de>
25 * include/rpc/rpc.h: Declare thread variables with their correct
27 * sunrpc/clnt_perr.c: Don't cast thread variables.
28 * sunrpc/clnt_raw.c: Likewise.
29 * sunrpc/clnt_simp.c: Likewise.
30 * sunrpc/key_call.c: Likewise.
31 * sunrpc/svcauth_des.c: Likewise.
32 * sunrpc/svc.c: Likewise.
33 * sunrpc/svc_raw.c: Likewise.
34 * sunrpc/svc_simple.c: Likewise.
36 Index: include/rpc/rpc.h
37 ===================================================================
38 RCS file: /cvs/glibc/libc/include/rpc/rpc.h,v
39 retrieving revision 1.8
40 diff -u -p -a -r1.8 rpc.h
41 --- glibc/include/rpc/rpc.h 5 Aug 2002 22:10:59 -0000 1.8
42 +++ glibc/include/rpc/rpc.h 8 Feb 2004 14:19:14 -0000
43 @@ -17,24 +17,24 @@ struct rpc_thread_variables {
44 struct pollfd *svc_pollfd_s; /* Global, rpc_common.c */
45 int svc_max_pollfd_s; /* Global, rpc_common.c */
47 - void *clnt_perr_buf_s; /* clnt_perr.c */
48 + char *clnt_perr_buf_s; /* clnt_perr.c */
50 - void *clntraw_private_s; /* clnt_raw.c */
51 + struct clntraw_private_s *clntraw_private_s; /* clnt_raw.c */
53 - void *callrpc_private_s; /* clnt_simp.c */
54 + struct callrpc_private_s *callrpc_private_s; /* clnt_simp.c */
56 - void *key_call_private_s; /* key_call.c */
57 + struct key_call_private *key_call_private_s; /* key_call.c */
59 - void *authdes_cache_s; /* svcauth_des.c */
60 - void *authdes_lru_s; /* svcauth_des.c */
61 + struct cache_entry *authdes_cache_s; /* svcauth_des.c */
62 + int *authdes_lru_s; /* svcauth_des.c */
64 - void *svc_xports_s; /* svc.c */
65 - void *svc_head_s; /* svc.c */
66 + SVCXPRT **svc_xports_s; /* svc.c */
67 + struct svc_callout *svc_head_s; /* svc.c */
69 - void *svcraw_private_s; /* svc_raw.c */
70 + struct svcraw_private_s *svcraw_private_s; /* svc_raw.c */
72 - void *svcsimple_proglst_s; /* svc_simple.c */
73 - void *svcsimple_transp_s; /* svc_simple.c */
74 + struct proglst_ *svcsimple_proglst_s; /* svc_simple.c */
75 + SVCXPRT *svcsimple_transp_s; /* svc_simple.c */
78 extern struct rpc_thread_variables *__rpc_thread_variables(void)
79 Index: sunrpc/clnt_perr.c
80 ===================================================================
81 RCS file: /cvs/glibc/libc/sunrpc/clnt_perr.c,v
82 retrieving revision 1.19
83 diff -u -p -a -r1.19 clnt_perr.c
84 --- glibc/sunrpc/clnt_perr.c 1 Nov 2002 20:43:54 -0000 1.19
85 +++ glibc/sunrpc/clnt_perr.c 8 Feb 2004 14:19:14 -0000
86 @@ -55,7 +55,7 @@ static char *auth_errmsg (enum auth_stat
87 * buf variable in a few functions. Overriding a global variable
88 * with a local variable of the same name is a bad idea, anyway.
90 -#define buf ((char *)RPC_THREAD_VARIABLE(clnt_perr_buf_s))
91 +#define buf RPC_THREAD_VARIABLE(clnt_perr_buf_s)
95 Index: sunrpc/clnt_raw.c
96 ===================================================================
97 RCS file: /cvs/glibc/libc/sunrpc/clnt_raw.c,v
98 retrieving revision 1.10
99 diff -u -p -a -r1.10 clnt_raw.c
100 --- glibc/sunrpc/clnt_raw.c 15 May 2002 00:21:00 -0000 1.10
101 +++ glibc/sunrpc/clnt_raw.c 8 Feb 2004 14:19:14 -0000
102 @@ -61,7 +61,7 @@ struct clntraw_private_s
105 #ifdef _RPC_THREAD_SAFE_
106 -#define clntraw_private ((struct clntraw_private_s *)RPC_THREAD_VARIABLE(clntraw_private_s))
107 +#define clntraw_private RPC_THREAD_VARIABLE(clntraw_private_s)
109 static struct clntraw_private_s *clntraw_private;
111 Index: sunrpc/clnt_simp.c
112 ===================================================================
113 RCS file: /cvs/glibc/libc/sunrpc/clnt_simp.c,v
114 retrieving revision 1.14
115 diff -u -p -a -r1.14 clnt_simp.c
116 --- glibc/sunrpc/clnt_simp.c 15 May 2002 00:21:00 -0000 1.14
117 +++ glibc/sunrpc/clnt_simp.c 8 Feb 2004 14:19:14 -0000
118 @@ -55,7 +55,7 @@ struct callrpc_private_s
121 #ifdef _RPC_THREAD_SAFE_
122 -#define callrpc_private ((struct callrpc_private_s *)RPC_THREAD_VARIABLE(callrpc_private_s))
123 +#define callrpc_private RPC_THREAD_VARIABLE(callrpc_private_s)
125 static struct callrpc_private_s *callrpc_private;
127 Index: sunrpc/key_call.c
128 ===================================================================
129 RCS file: /cvs/glibc/libc/sunrpc/key_call.c,v
130 retrieving revision 1.16
131 diff -u -p -a -r1.16 key_call.c
132 --- glibc/sunrpc/key_call.c 6 Aug 2002 06:08:50 -0000 1.16
133 +++ glibc/sunrpc/key_call.c 8 Feb 2004 14:19:14 -0000
134 @@ -370,7 +370,7 @@ struct key_call_private {
135 uid_t uid; /* user-id at last authorization */
137 #ifdef _RPC_THREAD_SAFE_
138 -#define key_call_private_main ((struct key_call_private *)RPC_THREAD_VARIABLE(key_call_private_s))
139 +#define key_call_private_main RPC_THREAD_VARIABLE(key_call_private_s)
141 static struct key_call_private *key_call_private_main;
144 ===================================================================
145 RCS file: /cvs/glibc/libc/sunrpc/svc.c,v
146 retrieving revision 1.17
147 diff -u -p -a -r1.17 svc.c
148 --- glibc/sunrpc/svc.c 29 Aug 2003 07:45:18 -0000 1.17
149 +++ glibc/sunrpc/svc.c 8 Feb 2004 14:19:14 -0000
151 #include <sys/poll.h>
153 #ifdef _RPC_THREAD_SAFE_
154 -#define xports ((SVCXPRT **)RPC_THREAD_VARIABLE(svc_xports_s))
155 +#define xports RPC_THREAD_VARIABLE(svc_xports_s)
157 static SVCXPRT **xports;
159 @@ -63,7 +63,7 @@ struct svc_callout {
160 void (*sc_dispatch) (struct svc_req *, SVCXPRT *);
162 #ifdef _RPC_THREAD_SAFE_
163 -#define svc_head ((struct svc_callout *)RPC_THREAD_VARIABLE(svc_head_s))
164 +#define svc_head RPC_THREAD_VARIABLE(svc_head_s)
166 static struct svc_callout *svc_head;
168 Index: sunrpc/svc_raw.c
169 ===================================================================
170 RCS file: /cvs/glibc/libc/sunrpc/svc_raw.c,v
171 retrieving revision 1.5
172 diff -u -p -a -r1.5 svc_raw.c
173 --- glibc/sunrpc/svc_raw.c 26 Feb 2002 01:43:56 -0000 1.5
174 +++ glibc/sunrpc/svc_raw.c 8 Feb 2004 14:19:14 -0000
175 @@ -54,7 +54,7 @@ struct svcraw_private_s
176 char verf_body[MAX_AUTH_BYTES];
178 #ifdef _RPC_THREAD_SAFE_
179 -#define svcraw_private ((struct svcraw_private_s *)RPC_THREAD_VARIABLE(svcraw_private_s))
180 +#define svcraw_private RPC_THREAD_VARIABLE(svcraw_private_s)
182 static struct svcraw_private_s *svcraw_private;
184 Index: sunrpc/svc_simple.c
185 ===================================================================
186 RCS file: /cvs/glibc/libc/sunrpc/svc_simple.c,v
187 retrieving revision 1.16
188 diff -u -p -a -r1.16 svc_simple.c
189 --- glibc/sunrpc/svc_simple.c 6 Aug 2002 05:10:30 -0000 1.16
190 +++ glibc/sunrpc/svc_simple.c 8 Feb 2004 14:19:14 -0000
191 @@ -61,7 +61,7 @@ struct proglst_
192 struct proglst_ *p_nxt;
194 #ifdef _RPC_THREAD_SAFE_
195 -#define proglst ((struct proglst_ *)RPC_THREAD_VARIABLE(svcsimple_proglst_s))
196 +#define proglst RPC_THREAD_VARIABLE(svcsimple_proglst_s)
198 static struct proglst_ *proglst;
200 @@ -69,7 +69,7 @@ static struct proglst_ *proglst;
202 static void universal (struct svc_req *rqstp, SVCXPRT *transp_s);
203 #ifdef _RPC_THREAD_SAFE_
204 -#define transp ((SVCXPRT *)RPC_THREAD_VARIABLE(svcsimple_transp_s))
205 +#define transp RPC_THREAD_VARIABLE(svcsimple_transp_s)
207 static SVCXPRT *transp;
209 Index: sunrpc/svcauth_des.c
210 ===================================================================
211 RCS file: /cvs/glibc/libc/sunrpc/svcauth_des.c,v
212 retrieving revision 1.8
213 diff -u -p -a -r1.8 svcauth_des.c
214 --- glibc/sunrpc/svcauth_des.c 20 Aug 2001 06:37:09 -0000 1.8
215 +++ glibc/sunrpc/svcauth_des.c 8 Feb 2004 14:19:14 -0000
216 @@ -72,8 +72,8 @@ struct cache_entry
217 char *localcred; /* generic local credential */
219 #ifdef _RPC_THREAD_SAFE_
220 -#define authdes_cache ((struct cache_entry *)RPC_THREAD_VARIABLE(authdes_cache_s))
221 -#define authdes_lru ((int *)RPC_THREAD_VARIABLE(authdes_lru_s))
222 +#define authdes_cache RPC_THREAD_VARIABLE(authdes_cache_s)
223 +#define authdes_lru RPC_THREAD_VARIABLE(authdes_lru_s)
225 static struct cache_entry *authdes_cache;
226 static int *authdes_lru;
229 Andreas Schwab, SuSE Labs, schwab@suse.de
230 SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
231 Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
232 "And now for something completely different."