[uClibc-cvs] uClibc/include/rpc xdr.h,1.5,1.6

Erik Andersen andersen at uclibc.org
Wed Feb 18 01:15:36 UTC 2004


Update of /var/cvs/uClibc/include/rpc
In directory nail:/tmp/cvs-serv2424/include/rpc

Modified Files:
	xdr.h 
Log Message:
Alexandre Oliva writes:

While testing the FR-V code with GCC mainline, I ran into some
problems in the RPC code.  It relies on a GCC extension that is no
longer available, namely, the result of a cast is no longer considered
an lvalue.

This patch enables the code to compile.  I haven't been able to test
RPC though, especially in a multi-threaded environment.



Index: xdr.h
===================================================================
RCS file: /var/cvs/uClibc/include/rpc/xdr.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- xdr.h	17 Jun 2002 21:18:37 -0000	1.5
+++ xdr.h	18 Feb 2004 01:15:34 -0000	1.6
@@ -274,9 +274,9 @@
  * in the RPC code will not work on 64bit Solaris platforms !
  */
 #define IXDR_GET_LONG(buf) \
-	((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))
+	((long)ntohl((u_long)*(*(u_int32_t**)&(buf))++))
 #define IXDR_PUT_LONG(buf, v) \
-	(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))
+	(*(*(u_int32_t**)&(buf))++ = (long)htonl((u_long)(v)))
 #define IXDR_GET_U_LONG(buf)	      ((u_long)IXDR_GET_LONG(buf))
 #define IXDR_PUT_U_LONG(buf, v)	      IXDR_PUT_LONG(buf, (long)(v))
 




More information about the uClibc-cvs mailing list