summaryrefslogtreecommitdiffstats
path: root/include/rpc
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 16:35:30 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 16:35:30 +0000
commit8a8d4b95c50316e31c15b68ed349233d5db28292 (patch)
tree585c088bb8df4739f5db46e63c854477083b9f84 /include/rpc
parent6622bc38bc3ed737fbd41e1c620a2dc27f1376f7 (diff)
downloaduClibc-alpine-8a8d4b95c50316e31c15b68ed349233d5db28292.tar.bz2
uClibc-alpine-8a8d4b95c50316e31c15b68ed349233d5db28292.tar.xz
Merge from trunk.
Diffstat (limited to 'include/rpc')
-rw-r--r--include/rpc/xdr.h31
1 files changed, 8 insertions, 23 deletions
diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h
index 4b2bb0e97..25dd214ee 100644
--- a/include/rpc/xdr.h
+++ b/include/rpc/xdr.h
@@ -39,13 +39,10 @@
#ifdef _LIBC
/* Some adjustments to make the libc source from glibc
* compile more easily with uClibc... */
-#ifndef __FORCE_GLIBC
-#define __FORCE_GLIBC
-#endif
-#ifndef _GNU_SOUCE
-#define _GNU_SOUCE
-#endif
-#define _(X) X
+# ifndef __FORCE_GLIBC
+# define __FORCE_GLIBC
+# endif
+# define _(X) X
#endif
#include <features.h>
#include <sys/types.h>
@@ -137,7 +134,7 @@ struct XDR
/* returns bytes off from beginning */
bool_t (*x_setpostn) (XDR *__xdrs, u_int __pos);
/* lets you reposition the stream */
- int32_t *(*x_inline) (XDR *__xdrs, int __len);
+ int32_t *(*x_inline) (XDR *__xdrs, u_int __len);
/* buf quick ptr to buffered data */
void (*x_destroy) (XDR *__xdrs);
/* free privates of this xdr_stream */
@@ -150,7 +147,7 @@ struct XDR
caddr_t x_public; /* users' data */
caddr_t x_private; /* pointer to private data */
caddr_t x_base; /* private used for position info */
- int x_handy; /* extra private word */
+ u_int x_handy; /* extra private word */
};
/*
@@ -273,20 +270,8 @@ struct xdr_discrim
* and shouldn't be used any longer. Code which use this defines or longs
* in the RPC code will not work on 64bit Solaris platforms !
*/
-/* #define IXDR_GET_LONG(buf) \ */
-/* ((long)ntohl((u_long)*(*(u_int32_t**)&(buf))++)) */
-/* #define IXDR_PUT_LONG(buf, v) \ */
-/* (*(*(u_int32_t**)&(buf))++ = (long)htonl((u_long)(v))) */
-
-/* WARNING: These macros are not safe against side effects for the 'buf'
- * argument. But the old versions they're replacing took the address of
- * 'buf' and were probably not safe in that situation either. */
-#define IXDR_GET_LONG(buf) \
- ((long) ntohl((u_long) (((u_int32_t *)(buf = (void *)(((char *) buf) + sizeof(u_int32_t))))[-1]) ))
-#define IXDR_PUT_LONG(buf, v) \
- (((u_int32_t *)(buf = (void *)(((char *) buf) + sizeof(u_int32_t))))[-1]) = (long)htonl((u_long)(v))
-
-
+#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))
+#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (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))