summaryrefslogtreecommitdiffstats
path: root/sys/nfs/xdr_subs.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-05-31 20:09:01 +0000
committerpeter <peter@FreeBSD.org>1998-05-31 20:09:01 +0000
commit19ad2aa63b82a877a2b1485a9812dcf6e7757ea9 (patch)
treec618465310d3c2ab3f4033443d34c221eef41ba1 /sys/nfs/xdr_subs.h
parent401c250cc40de5fcfc5f53856a8194793ba32667 (diff)
downloadFreeBSD-src-19ad2aa63b82a877a2b1485a9812dcf6e7757ea9.zip
FreeBSD-src-19ad2aa63b82a877a2b1485a9812dcf6e7757ea9.tar.gz
For the on-the-wire protocol, u_long -> u_int32_t; long -> int32_t;
int -> int32_t; u_short -> u_int16_t. Also, use mode_t instead of u_short for storing modes (mode_t is a u_int16_t). Obtained from: NetBSD
Diffstat (limited to 'sys/nfs/xdr_subs.h')
-rw-r--r--sys/nfs/xdr_subs.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/nfs/xdr_subs.h b/sys/nfs/xdr_subs.h
index 2173d11..ca4d7d3 100644
--- a/sys/nfs/xdr_subs.h
+++ b/sys/nfs/xdr_subs.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)xdr_subs.h 8.3 (Berkeley) 3/30/95
- * $Id$
+ * $Id: xdr_subs.h,v 1.9 1997/02/22 09:42:53 peter Exp $
*/
@@ -52,8 +52,8 @@
* but we cannot count on their alignment anyway.
*/
-#define fxdr_unsigned(t, v) ((t)ntohl((long)(v)))
-#define txdr_unsigned(v) (htonl((long)(v)))
+#define fxdr_unsigned(t, v) ((t)ntohl((int32_t)(v)))
+#define txdr_unsigned(v) (htonl((int32_t)(v)))
#define fxdr_nfsv2time(f, t) { \
(t)->tv_sec = ntohl(((struct nfsv2_time *)(f))->nfsv2_sec); \
@@ -80,12 +80,12 @@
}
#define fxdr_hyper(f, t) { \
- ((long *)(t))[_QUAD_HIGHWORD] = ntohl(((long *)(f))[0]); \
- ((long *)(t))[_QUAD_LOWWORD] = ntohl(((long *)(f))[1]); \
+ ((int32_t *)(t))[_QUAD_HIGHWORD] = ntohl(((int32_t *)(f))[0]); \
+ ((int32_t *)(t))[_QUAD_LOWWORD] = ntohl(((int32_t *)(f))[1]); \
}
#define txdr_hyper(f, t) { \
- ((long *)(t))[0] = htonl(((long *)(f))[_QUAD_HIGHWORD]); \
- ((long *)(t))[1] = htonl(((long *)(f))[_QUAD_LOWWORD]); \
+ ((int32_t *)(t))[0] = htonl(((int32_t *)(f))[_QUAD_HIGHWORD]); \
+ ((int32_t *)(t))[1] = htonl(((int32_t *)(f))[_QUAD_LOWWORD]); \
}
#endif
OpenPOWER on IntegriCloud