diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1998-08-19 22:27:00 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1998-08-19 22:27:00 +0000 |
commit | 4f33eb81fbef9647018f71c9bf4d7ed43e4c2d08 (patch) | |
tree | b45b211bdf0335b68592edffed8941bea472efad /sys/nfs/xdr_subs.h | |
parent | 1f1c73524add8181e3f63eebdebc2fb3aa31e62d (diff) |
Change fxdr_hyper to return a u_quad_t. This minimizes the evil clobbering
of lvalues that ANSI abhors.
And it fixes df on NFS version 3 mounts on Sparcs.
Diffstat (limited to 'sys/nfs/xdr_subs.h')
-rw-r--r-- | sys/nfs/xdr_subs.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/nfs/xdr_subs.h b/sys/nfs/xdr_subs.h index d5f6c40da5c..eb828d93d80 100644 --- a/sys/nfs/xdr_subs.h +++ b/sys/nfs/xdr_subs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xdr_subs.h,v 1.4 1996/03/31 13:16:27 mickey Exp $ */ +/* $OpenBSD: xdr_subs.h,v 1.5 1998/08/19 22:26:59 csapuntz Exp $ */ /* $NetBSD: xdr_subs.h,v 1.11 1996/02/18 11:54:12 fvdl Exp $ */ /* @@ -81,10 +81,11 @@ ((struct nfsv3_time *)(t))->nfsv3_nsec = htonl((f)->tv_nsec); \ } -#define fxdr_hyper(f, t) { \ - ((int32_t *)(t))[_QUAD_HIGHWORD] = ntohl(((int32_t *)(f))[0]); \ - ((int32_t *)(t))[_QUAD_LOWWORD] = ntohl(((int32_t *)(f))[1]); \ -} +#define fxdr_hyper(f) \ + ((((u_quad_t)ntohl(((int32_t *)(f))[0])) << 32) | \ + (u_quad_t)(ntohl(((int32_t *)(f))[1]))) + + #define txdr_hyper(f, t) { \ ((int32_t *)(t))[0] = htonl(((int32_t *)(f))[_QUAD_HIGHWORD]); \ ((int32_t *)(t))[1] = htonl(((int32_t *)(f))[_QUAD_LOWWORD]); \ |