patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-sunrpc.patch
changeset 330 447b203edc2e
parent 329 419d959441ed
child 331 0c05f9ea3254
     1.1 --- a/patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-sunrpc.patch	Tue Aug 14 19:32:22 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,233 +0,0 @@
     1.4 -http://sources.redhat.com/ml/libc-hacker/2004-02/msg00005.html
     1.5 -[Also in CVS, but the original patch is easier to get.]
     1.6 -
     1.7 -Fixes errors like
     1.8 -
     1.9 -clnt_perr.c: In function `_buf':
    1.10 -clnt_perr.c:67: error: invalid lvalue in assignment
    1.11 -
    1.12 -when building with gcc-3.5.
    1.13 -
    1.14 -To: libc-hacker at sources dot redhat dot com
    1.15 -Subject: Fix cast as lvalue in sunrpc
    1.16 -From: Andreas Schwab <schwab at suse dot de>
    1.17 -X-Yow: SHHHH!!  I hear SIX TATTOOED TRUCK-DRIVERS tossing ENGINE BLOCKS
    1.18 - into empty OIL DRUMS dot  dot 
    1.19 -Date: Sun, 08 Feb 2004 17:38:31 +0100
    1.20 -Message-ID: <je4qu1frw8.fsf@sykes.suse.de>
    1.21 -
    1.22 -This fixes the uses of casts as lvalue in the sunrpc code.
    1.23 -
    1.24 -Andreas.
    1.25 -
    1.26 -2004-02-08  Andreas Schwab  <schwab@suse.de>
    1.27 -
    1.28 -	* include/rpc/rpc.h: Declare thread variables with their correct
    1.29 -	type.
    1.30 -	* sunrpc/clnt_perr.c: Don't cast thread variables.
    1.31 -	* sunrpc/clnt_raw.c: Likewise.
    1.32 -	* sunrpc/clnt_simp.c: Likewise.
    1.33 -	* sunrpc/key_call.c: Likewise.
    1.34 -	* sunrpc/svcauth_des.c: Likewise.
    1.35 -	* sunrpc/svc.c: Likewise.
    1.36 -	* sunrpc/svc_raw.c: Likewise.
    1.37 -	* sunrpc/svc_simple.c: Likewise.
    1.38 -
    1.39 -Index: include/rpc/rpc.h
    1.40 -===================================================================
    1.41 -RCS file: /cvs/glibc/libc/include/rpc/rpc.h,v
    1.42 -retrieving revision 1.8
    1.43 -diff -u -p -a -r1.8 rpc.h
    1.44 ---- glibc/include/rpc/rpc.h	5 Aug 2002 22:10:59 -0000	1.8
    1.45 -+++ glibc/include/rpc/rpc.h	8 Feb 2004 14:19:14 -0000
    1.46 -@@ -17,24 +17,24 @@ struct rpc_thread_variables {
    1.47 - 	struct pollfd	*svc_pollfd_s;		/* Global, rpc_common.c */
    1.48 - 	int		svc_max_pollfd_s;	/* Global, rpc_common.c */
    1.49 - 
    1.50 --	void		*clnt_perr_buf_s;	/* clnt_perr.c */
    1.51 -+	char		*clnt_perr_buf_s;	/* clnt_perr.c */
    1.52 - 
    1.53 --	void		*clntraw_private_s;	/* clnt_raw.c */
    1.54 -+	struct clntraw_private_s *clntraw_private_s;	/* clnt_raw.c */
    1.55 - 
    1.56 --	void		*callrpc_private_s;	/* clnt_simp.c */
    1.57 -+	struct callrpc_private_s *callrpc_private_s;	/* clnt_simp.c */
    1.58 - 
    1.59 --	void		*key_call_private_s;	/* key_call.c */
    1.60 -+	struct key_call_private *key_call_private_s;	/* key_call.c */
    1.61 - 
    1.62 --	void		*authdes_cache_s;	/* svcauth_des.c */
    1.63 --	void		*authdes_lru_s;		/* svcauth_des.c */
    1.64 -+	struct cache_entry *authdes_cache_s;	/* svcauth_des.c */
    1.65 -+	int		*authdes_lru_s;		/* svcauth_des.c */
    1.66 - 
    1.67 --	void		*svc_xports_s;		/* svc.c */
    1.68 --	void		*svc_head_s;		/* svc.c */
    1.69 -+	SVCXPRT		**svc_xports_s;		/* svc.c */
    1.70 -+	struct svc_callout *svc_head_s;		/* svc.c */
    1.71 - 
    1.72 --	void		*svcraw_private_s;	/* svc_raw.c */
    1.73 -+	struct svcraw_private_s *svcraw_private_s;	/* svc_raw.c */
    1.74 - 
    1.75 --	void		*svcsimple_proglst_s;	/* svc_simple.c */
    1.76 --	void		*svcsimple_transp_s;	/* svc_simple.c */
    1.77 -+	struct proglst_ *svcsimple_proglst_s;	/* svc_simple.c */
    1.78 -+	SVCXPRT		*svcsimple_transp_s;	/* svc_simple.c */
    1.79 - };
    1.80 - 
    1.81 - extern struct rpc_thread_variables *__rpc_thread_variables(void)
    1.82 -Index: sunrpc/clnt_perr.c
    1.83 -===================================================================
    1.84 -RCS file: /cvs/glibc/libc/sunrpc/clnt_perr.c,v
    1.85 -retrieving revision 1.19
    1.86 -diff -u -p -a -r1.19 clnt_perr.c
    1.87 ---- glibc/sunrpc/clnt_perr.c	1 Nov 2002 20:43:54 -0000	1.19
    1.88 -+++ glibc/sunrpc/clnt_perr.c	8 Feb 2004 14:19:14 -0000
    1.89 -@@ -55,7 +55,7 @@ static char *auth_errmsg (enum auth_stat
    1.90 -  * buf variable in a few functions.  Overriding a global variable
    1.91 -  * with a local variable of the same name is a bad idea, anyway.
    1.92 -  */
    1.93 --#define buf ((char *)RPC_THREAD_VARIABLE(clnt_perr_buf_s))
    1.94 -+#define buf RPC_THREAD_VARIABLE(clnt_perr_buf_s)
    1.95 - #else
    1.96 - static char *buf;
    1.97 - #endif
    1.98 -Index: sunrpc/clnt_raw.c
    1.99 -===================================================================
   1.100 -RCS file: /cvs/glibc/libc/sunrpc/clnt_raw.c,v
   1.101 -retrieving revision 1.10
   1.102 -diff -u -p -a -r1.10 clnt_raw.c
   1.103 ---- glibc/sunrpc/clnt_raw.c	15 May 2002 00:21:00 -0000	1.10
   1.104 -+++ glibc/sunrpc/clnt_raw.c	8 Feb 2004 14:19:14 -0000
   1.105 -@@ -61,7 +61,7 @@ struct clntraw_private_s
   1.106 -     u_int mcnt;
   1.107 -   };
   1.108 - #ifdef _RPC_THREAD_SAFE_
   1.109 --#define clntraw_private ((struct clntraw_private_s *)RPC_THREAD_VARIABLE(clntraw_private_s))
   1.110 -+#define clntraw_private RPC_THREAD_VARIABLE(clntraw_private_s)
   1.111 - #else
   1.112 - static struct clntraw_private_s *clntraw_private;
   1.113 - #endif
   1.114 -Index: sunrpc/clnt_simp.c
   1.115 -===================================================================
   1.116 -RCS file: /cvs/glibc/libc/sunrpc/clnt_simp.c,v
   1.117 -retrieving revision 1.14
   1.118 -diff -u -p -a -r1.14 clnt_simp.c
   1.119 ---- glibc/sunrpc/clnt_simp.c	15 May 2002 00:21:00 -0000	1.14
   1.120 -+++ glibc/sunrpc/clnt_simp.c	8 Feb 2004 14:19:14 -0000
   1.121 -@@ -55,7 +55,7 @@ struct callrpc_private_s
   1.122 -     char *oldhost;
   1.123 -   };
   1.124 - #ifdef _RPC_THREAD_SAFE_
   1.125 --#define callrpc_private ((struct callrpc_private_s *)RPC_THREAD_VARIABLE(callrpc_private_s))
   1.126 -+#define callrpc_private RPC_THREAD_VARIABLE(callrpc_private_s)
   1.127 - #else
   1.128 - static struct callrpc_private_s *callrpc_private;
   1.129 - #endif
   1.130 -Index: sunrpc/key_call.c
   1.131 -===================================================================
   1.132 -RCS file: /cvs/glibc/libc/sunrpc/key_call.c,v
   1.133 -retrieving revision 1.16
   1.134 -diff -u -p -a -r1.16 key_call.c
   1.135 ---- glibc/sunrpc/key_call.c	6 Aug 2002 06:08:50 -0000	1.16
   1.136 -+++ glibc/sunrpc/key_call.c	8 Feb 2004 14:19:14 -0000
   1.137 -@@ -370,7 +370,7 @@ struct  key_call_private {
   1.138 -   uid_t   uid;            /* user-id at last authorization */
   1.139 - };
   1.140 - #ifdef _RPC_THREAD_SAFE_
   1.141 --#define key_call_private_main ((struct  key_call_private *)RPC_THREAD_VARIABLE(key_call_private_s))
   1.142 -+#define key_call_private_main RPC_THREAD_VARIABLE(key_call_private_s)
   1.143 - #else
   1.144 - static struct key_call_private *key_call_private_main;
   1.145 - #endif
   1.146 -Index: sunrpc/svc.c
   1.147 -===================================================================
   1.148 -RCS file: /cvs/glibc/libc/sunrpc/svc.c,v
   1.149 -retrieving revision 1.17
   1.150 -diff -u -p -a -r1.17 svc.c
   1.151 ---- glibc/sunrpc/svc.c	29 Aug 2003 07:45:18 -0000	1.17
   1.152 -+++ glibc/sunrpc/svc.c	8 Feb 2004 14:19:14 -0000
   1.153 -@@ -44,7 +44,7 @@
   1.154 - #include <sys/poll.h>
   1.155 - 
   1.156 - #ifdef _RPC_THREAD_SAFE_
   1.157 --#define xports ((SVCXPRT **)RPC_THREAD_VARIABLE(svc_xports_s))
   1.158 -+#define xports RPC_THREAD_VARIABLE(svc_xports_s)
   1.159 - #else
   1.160 - static SVCXPRT **xports;
   1.161 - #endif
   1.162 -@@ -63,7 +63,7 @@ struct svc_callout {
   1.163 -   void (*sc_dispatch) (struct svc_req *, SVCXPRT *);
   1.164 - };
   1.165 - #ifdef _RPC_THREAD_SAFE_
   1.166 --#define svc_head ((struct svc_callout *)RPC_THREAD_VARIABLE(svc_head_s))
   1.167 -+#define svc_head RPC_THREAD_VARIABLE(svc_head_s)
   1.168 - #else
   1.169 - static struct svc_callout *svc_head;
   1.170 - #endif
   1.171 -Index: sunrpc/svc_raw.c
   1.172 -===================================================================
   1.173 -RCS file: /cvs/glibc/libc/sunrpc/svc_raw.c,v
   1.174 -retrieving revision 1.5
   1.175 -diff -u -p -a -r1.5 svc_raw.c
   1.176 ---- glibc/sunrpc/svc_raw.c	26 Feb 2002 01:43:56 -0000	1.5
   1.177 -+++ glibc/sunrpc/svc_raw.c	8 Feb 2004 14:19:14 -0000
   1.178 -@@ -54,7 +54,7 @@ struct svcraw_private_s
   1.179 -     char verf_body[MAX_AUTH_BYTES];
   1.180 -   };
   1.181 - #ifdef _RPC_THREAD_SAFE_
   1.182 --#define svcraw_private ((struct svcraw_private_s *)RPC_THREAD_VARIABLE(svcraw_private_s))
   1.183 -+#define svcraw_private RPC_THREAD_VARIABLE(svcraw_private_s)
   1.184 - #else
   1.185 - static struct svcraw_private_s *svcraw_private;
   1.186 - #endif
   1.187 -Index: sunrpc/svc_simple.c
   1.188 -===================================================================
   1.189 -RCS file: /cvs/glibc/libc/sunrpc/svc_simple.c,v
   1.190 -retrieving revision 1.16
   1.191 -diff -u -p -a -r1.16 svc_simple.c
   1.192 ---- glibc/sunrpc/svc_simple.c	6 Aug 2002 05:10:30 -0000	1.16
   1.193 -+++ glibc/sunrpc/svc_simple.c	8 Feb 2004 14:19:14 -0000
   1.194 -@@ -61,7 +61,7 @@ struct proglst_
   1.195 -     struct proglst_ *p_nxt;
   1.196 -   };
   1.197 - #ifdef _RPC_THREAD_SAFE_
   1.198 --#define proglst ((struct proglst_ *)RPC_THREAD_VARIABLE(svcsimple_proglst_s))
   1.199 -+#define proglst RPC_THREAD_VARIABLE(svcsimple_proglst_s)
   1.200 - #else
   1.201 - static struct proglst_ *proglst;
   1.202 - #endif
   1.203 -@@ -69,7 +69,7 @@ static struct proglst_ *proglst;
   1.204 - 
   1.205 - static void universal (struct svc_req *rqstp, SVCXPRT *transp_s);
   1.206 - #ifdef _RPC_THREAD_SAFE_
   1.207 --#define transp ((SVCXPRT *)RPC_THREAD_VARIABLE(svcsimple_transp_s))
   1.208 -+#define transp RPC_THREAD_VARIABLE(svcsimple_transp_s)
   1.209 - #else
   1.210 - static SVCXPRT *transp;
   1.211 - #endif
   1.212 -Index: sunrpc/svcauth_des.c
   1.213 -===================================================================
   1.214 -RCS file: /cvs/glibc/libc/sunrpc/svcauth_des.c,v
   1.215 -retrieving revision 1.8
   1.216 -diff -u -p -a -r1.8 svcauth_des.c
   1.217 ---- glibc/sunrpc/svcauth_des.c	20 Aug 2001 06:37:09 -0000	1.8
   1.218 -+++ glibc/sunrpc/svcauth_des.c	8 Feb 2004 14:19:14 -0000
   1.219 -@@ -72,8 +72,8 @@ struct cache_entry
   1.220 -     char *localcred;		/* generic local credential */
   1.221 -   };
   1.222 - #ifdef _RPC_THREAD_SAFE_
   1.223 --#define authdes_cache ((struct cache_entry *)RPC_THREAD_VARIABLE(authdes_cache_s))
   1.224 --#define authdes_lru ((int *)RPC_THREAD_VARIABLE(authdes_lru_s))
   1.225 -+#define authdes_cache RPC_THREAD_VARIABLE(authdes_cache_s)
   1.226 -+#define authdes_lru RPC_THREAD_VARIABLE(authdes_lru_s)
   1.227 - #else
   1.228 - static struct cache_entry *authdes_cache;
   1.229 - static int *authdes_lru;
   1.230 -
   1.231 --- 
   1.232 -Andreas Schwab, SuSE Labs, schwab@suse.de
   1.233 -SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
   1.234 -Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
   1.235 -"And now for something completely different."
   1.236 -