summaryrefslogtreecommitdiff
path: root/sys/nfs/xdr_subs.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/nfs/xdr_subs.h')
-rw-r--r--sys/nfs/xdr_subs.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/sys/nfs/xdr_subs.h b/sys/nfs/xdr_subs.h
index a0dfcc4146e..cf3cfe9769f 100644
--- a/sys/nfs/xdr_subs.h
+++ b/sys/nfs/xdr_subs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: xdr_subs.h,v 1.8 1995/01/13 16:15:02 mycroft Exp $ */
+/* $NetBSD: xdr_subs.h,v 1.9 1995/12/19 23:08:30 cgd Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -49,35 +49,35 @@
* 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_nfstime(f, t) { \
- (t)->ts_sec = ntohl(((struct nfsv2_time *)(f))->nfs_sec); \
- if (((struct nfsv2_time *)(f))->nfs_usec != 0xffffffff) \
- (t)->ts_nsec = 1000 * ntohl(((struct nfsv2_time *)(f))->nfs_usec); \
+ (t)->ts_sec = ntohl((f)->nfs_sec); \
+ if ((f)->nfs_usec != 0xffffffff) \
+ (t)->ts_nsec = 1000 * ntohl((f)->nfs_usec); \
else \
(t)->ts_nsec = 0; \
}
#define txdr_nfstime(f, t) { \
- ((struct nfsv2_time *)(t))->nfs_sec = htonl((f)->ts_sec); \
- ((struct nfsv2_time *)(t))->nfs_usec = htonl((f)->ts_nsec) / 1000; \
+ (t)->nfs_sec = htonl((f)->ts_sec); \
+ (t)->nfs_usec = htonl((f)->ts_nsec) / 1000; \
}
#define fxdr_nqtime(f, t) { \
- (t)->ts_sec = ntohl(((struct nqnfs_time *)(f))->nq_sec); \
- (t)->ts_nsec = ntohl(((struct nqnfs_time *)(f))->nq_nsec); \
+ (t)->ts_sec = ntohl((f)->nq_sec); \
+ (t)->ts_nsec = ntohl((f)->nq_nsec); \
}
#define txdr_nqtime(f, t) { \
- ((struct nqnfs_time *)(t))->nq_sec = htonl((f)->ts_sec); \
- ((struct nqnfs_time *)(t))->nq_nsec = htonl((f)->ts_nsec); \
+ (t)->nq_sec = htonl((f)->ts_sec); \
+ (t)->nq_nsec = htonl((f)->ts_nsec); \
}
#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]); \
}