aboutsummaryrefslogtreecommitdiff
path: root/sys/nfs/xdr_subs.h
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1998-05-31 20:09:01 +0000
committerPeter Wemm <peter@FreeBSD.org>1998-05-31 20:09:01 +0000
commit4152886f7adcb7208344c876a63c50eed827553b (patch)
tree0b98e79503b50c91712c2753ef65a9ec65713b2f /sys/nfs/xdr_subs.h
parent75c6892c1616d0c3afd0a9b4c96a08685bba79a5 (diff)
downloadsrc-4152886f7adcb7208344c876a63c50eed827553b.tar.gz
src-4152886f7adcb7208344c876a63c50eed827553b.zip
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
Notes
Notes: svn path=/head/; revision=36541
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 2173d113c898..ca4d7d335bbf 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