Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/lib/libc/rpc Pullup from trunk: use explicit 32 bit ope...
details: https://anonhg.NetBSD.org/src/rev/a5898dc3253f
branches: netbsd-1-5
changeset: 488517:a5898dc3253f
user: fvdl <fvdl%NetBSD.org@localhost>
date: Fri Jul 14 16:48:12 2000 +0000
description:
Pullup from trunk: use explicit 32 bit operations and types where
appropriate, to make things work on 64bit BE systems.
diffstat:
lib/libc/rpc/clnt_dg.c | 4 +-
lib/libc/rpc/clnt_raw.c | 6 ++--
lib/libc/rpc/clnt_vc.c | 6 ++--
lib/libc/rpc/rpc_callmsg.c | 36 ++++++++++++---------------
lib/libc/rpc/rpcb_clnt.c | 10 +++---
lib/libc/rpc/rpcb_prot.c | 8 +++---
lib/libc/rpc/rpcb_st_xdr.c | 26 ++++++++++----------
lib/libc/rpc/svc_auth_unix.c | 16 ++++++------
lib/libc/rpc/xdr_float.c | 57 ++++++++++++++++---------------------------
9 files changed, 75 insertions(+), 94 deletions(-)
diffs (truncated from 470 to 300 lines):
diff -r 8b9e7138a08e -r a5898dc3253f lib/libc/rpc/clnt_dg.c
--- a/lib/libc/rpc/clnt_dg.c Fri Jul 14 16:46:33 2000 +0000
+++ b/lib/libc/rpc/clnt_dg.c Fri Jul 14 16:48:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clnt_dg.c,v 1.2 2000/06/04 03:55:20 thorpej Exp $ */
+/* $NetBSD: clnt_dg.c,v 1.2.2.1 2000/07/14 16:48:12 fvdl Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -350,7 +350,7 @@
* the transaction is the first thing in the out buffer
*/
(*(u_int32_t *)(cu->cu_outbuf))++;
- if ((! XDR_PUTLONG(xdrs, (long *)&proc)) ||
+ if ((! XDR_PUTINT32(xdrs, &proc)) ||
(! AUTH_MARSHALL(cl->cl_auth, xdrs)) ||
(! (*xargs)(xdrs, argsp))) {
release_fd_lock(cu->cu_fd, mask);
diff -r 8b9e7138a08e -r a5898dc3253f lib/libc/rpc/clnt_raw.c
--- a/lib/libc/rpc/clnt_raw.c Fri Jul 14 16:46:33 2000 +0000
+++ b/lib/libc/rpc/clnt_raw.c Fri Jul 14 16:48:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clnt_raw.c,v 1.17 2000/06/02 23:11:08 fvdl Exp $ */
+/* $NetBSD: clnt_raw.c,v 1.17.2.1 2000/07/14 16:48:12 fvdl Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
static char *sccsid = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)clnt_raw.c 2.2 88/08/01 4.0 RPCSRC";
#else
-__RCSID("$NetBSD: clnt_raw.c,v 1.17 2000/06/02 23:11:08 fvdl Exp $");
+__RCSID("$NetBSD: clnt_raw.c,v 1.17.2.1 2000/07/14 16:48:12 fvdl Exp $");
#endif
#endif
@@ -185,7 +185,7 @@
XDR_SETPOS(xdrs, 0);
clp->u.mashl_rpcmsg.rm_xid ++ ;
if ((! XDR_PUTBYTES(xdrs, clp->u.mashl_callmsg, clp->mcnt)) ||
- (! XDR_PUTLONG(xdrs, (long *)&proc)) ||
+ (! XDR_PUTINT32(xdrs, &proc)) ||
(! AUTH_MARSHALL(h->cl_auth, xdrs)) ||
(! (*xargs)(xdrs, argsp))) {
return (RPC_CANTENCODEARGS);
diff -r 8b9e7138a08e -r a5898dc3253f lib/libc/rpc/clnt_vc.c
--- a/lib/libc/rpc/clnt_vc.c Fri Jul 14 16:46:33 2000 +0000
+++ b/lib/libc/rpc/clnt_vc.c Fri Jul 14 16:48:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clnt_vc.c,v 1.2 2000/06/04 03:55:20 thorpej Exp $ */
+/* $NetBSD: clnt_vc.c,v 1.2.2.1 2000/07/14 16:48:12 fvdl Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -36,7 +36,7 @@
static char *sccsid = "@(#)clnt_tcp.c 2.2 88/08/01 4.0 RPCSRC";
static char sccsid[] = "@(#)clnt_vc.c 1.19 89/03/16 Copyr 1988 Sun Micro";
#else
-__RCSID("$NetBSD: clnt_vc.c,v 1.2 2000/06/04 03:55:20 thorpej Exp $");
+__RCSID("$NetBSD: clnt_vc.c,v 1.2.2.1 2000/07/14 16:48:12 fvdl Exp $");
#endif
#endif
@@ -367,7 +367,7 @@
ct->ct_error.re_status = RPC_SUCCESS;
x_id = ntohl(--(*msg_x_id));
if ((! XDR_PUTBYTES(xdrs, ct->ct_u.ct_mcallc, ct->ct_mpos)) ||
- (! XDR_PUTLONG(xdrs, (long *)&proc)) ||
+ (! XDR_PUTINT32(xdrs, &proc)) ||
(! AUTH_MARSHALL(h->cl_auth, xdrs)) ||
(! (*xdr_args)(xdrs, args_ptr))) {
if (ct->ct_error.re_status == RPC_SUCCESS)
diff -r 8b9e7138a08e -r a5898dc3253f lib/libc/rpc/rpc_callmsg.c
--- a/lib/libc/rpc/rpc_callmsg.c Fri Jul 14 16:46:33 2000 +0000
+++ b/lib/libc/rpc/rpc_callmsg.c Fri Jul 14 16:48:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_callmsg.c,v 1.15 2000/01/22 22:19:18 mycroft Exp $ */
+/* $NetBSD: rpc_callmsg.c,v 1.15.4.1 2000/07/14 16:48:12 fvdl Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
static char *sccsid = "@(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)rpc_callmsg.c 2.1 88/07/29 4.0 RPCSRC";
#else
-__RCSID("$NetBSD: rpc_callmsg.c,v 1.15 2000/01/22 22:19:18 mycroft Exp $");
+__RCSID("$NetBSD: rpc_callmsg.c,v 1.15.4.1 2000/07/14 16:48:12 fvdl Exp $");
#endif
#endif
@@ -86,28 +86,28 @@
+ 2 * BYTES_PER_XDR_UNIT
+ RNDUP(cmsg->rm_call.cb_verf.oa_length));
if (buf != NULL) {
- IXDR_PUT_LONG(buf, cmsg->rm_xid);
+ IXDR_PUT_INT32(buf, cmsg->rm_xid);
IXDR_PUT_ENUM(buf, cmsg->rm_direction);
if (cmsg->rm_direction != CALL) {
return (FALSE);
}
- IXDR_PUT_LONG(buf, cmsg->rm_call.cb_rpcvers);
+ IXDR_PUT_INT32(buf, cmsg->rm_call.cb_rpcvers);
if (cmsg->rm_call.cb_rpcvers != RPC_MSG_VERSION) {
return (FALSE);
}
- IXDR_PUT_LONG(buf, cmsg->rm_call.cb_prog);
- IXDR_PUT_LONG(buf, cmsg->rm_call.cb_vers);
- IXDR_PUT_LONG(buf, cmsg->rm_call.cb_proc);
+ IXDR_PUT_INT32(buf, cmsg->rm_call.cb_prog);
+ IXDR_PUT_INT32(buf, cmsg->rm_call.cb_vers);
+ IXDR_PUT_INT32(buf, cmsg->rm_call.cb_proc);
oa = &cmsg->rm_call.cb_cred;
IXDR_PUT_ENUM(buf, oa->oa_flavor);
- IXDR_PUT_LONG(buf, oa->oa_length);
+ IXDR_PUT_INT32(buf, oa->oa_length);
if (oa->oa_length) {
memmove(buf, oa->oa_base, oa->oa_length);
buf += RNDUP(oa->oa_length) / sizeof (int32_t);
}
oa = &cmsg->rm_call.cb_verf;
IXDR_PUT_ENUM(buf, oa->oa_flavor);
- IXDR_PUT_LONG(buf, oa->oa_length);
+ IXDR_PUT_INT32(buf, oa->oa_length);
if (oa->oa_length) {
memmove(buf, oa->oa_base, oa->oa_length);
/* no real need....
@@ -120,25 +120,21 @@
if (xdrs->x_op == XDR_DECODE) {
buf = XDR_INLINE(xdrs, 8 * BYTES_PER_XDR_UNIT);
if (buf != NULL) {
- cmsg->rm_xid = (u_int32_t)IXDR_GET_LONG(buf);
+ cmsg->rm_xid = IXDR_GET_U_INT32(buf);
cmsg->rm_direction = IXDR_GET_ENUM(buf, enum msg_type);
if (cmsg->rm_direction != CALL) {
return (FALSE);
}
- cmsg->rm_call.cb_rpcvers =
- (u_int32_t)IXDR_GET_LONG(buf);
+ cmsg->rm_call.cb_rpcvers = IXDR_GET_U_INT32(buf);
if (cmsg->rm_call.cb_rpcvers != RPC_MSG_VERSION) {
return (FALSE);
}
- cmsg->rm_call.cb_prog =
- (u_int32_t)IXDR_GET_LONG(buf);
- cmsg->rm_call.cb_vers =
- (u_int32_t)IXDR_GET_LONG(buf);
- cmsg->rm_call.cb_proc =
- (u_int32_t)IXDR_GET_LONG(buf);
+ cmsg->rm_call.cb_prog = IXDR_GET_U_INT32(buf);
+ cmsg->rm_call.cb_vers = IXDR_GET_U_INT32(buf);
+ cmsg->rm_call.cb_proc = IXDR_GET_U_INT32(buf);
oa = &cmsg->rm_call.cb_cred;
oa->oa_flavor = IXDR_GET_ENUM(buf, enum_t);
- oa->oa_length = (u_int)IXDR_GET_LONG(buf);
+ oa->oa_length = (u_int)IXDR_GET_U_INT32(buf);
if (oa->oa_length) {
if (oa->oa_length > MAX_AUTH_BYTES) {
return (FALSE);
@@ -173,7 +169,7 @@
}
} else {
oa->oa_flavor = IXDR_GET_ENUM(buf, enum_t);
- oa->oa_length = (u_int)IXDR_GET_LONG(buf);
+ oa->oa_length = (u_int)IXDR_GET_U_INT32(buf);
}
if (oa->oa_length) {
if (oa->oa_length > MAX_AUTH_BYTES) {
diff -r 8b9e7138a08e -r a5898dc3253f lib/libc/rpc/rpcb_clnt.c
--- a/lib/libc/rpc/rpcb_clnt.c Fri Jul 14 16:46:33 2000 +0000
+++ b/lib/libc/rpc/rpcb_clnt.c Fri Jul 14 16:48:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpcb_clnt.c,v 1.3 2000/06/11 16:26:53 assar Exp $ */
+/* $NetBSD: rpcb_clnt.c,v 1.3.2.1 2000/07/14 16:48:12 fvdl Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -677,7 +677,7 @@
if (strcmp(nconf->nc_protofmly, NC_INET) == 0) {
u_short port = 0;
struct netbuf remote;
- u_long pmapvers = 2;
+ rpcvers_t pmapvers = 2;
struct pmap pmapparms;
/*
@@ -989,7 +989,7 @@
rpcblist_ptr head = (rpcblist_ptr)NULL;
register CLIENT *client;
enum clnt_stat clnt_st;
- long vers = 0;
+ rpcvers_t vers = 0;
client = getclnthandle(host, nconf, (char **)NULL);
if (client == (CLIENT *)NULL) {
@@ -1052,7 +1052,7 @@
enum clnt_stat stat;
struct r_rpcb_rmtcallargs a;
struct r_rpcb_rmtcallres r;
- long rpcb_vers;
+ rpcvers_t rpcb_vers;
client = getclnthandle(host, nconf, (char **)NULL);
@@ -1120,7 +1120,7 @@
CLIENT *client = NULL;
void *handle;
struct netconfig *nconf;
- long vers;
+ rpcvers_t vers;
enum clnt_stat st;
diff -r 8b9e7138a08e -r a5898dc3253f lib/libc/rpc/rpcb_prot.c
--- a/lib/libc/rpc/rpcb_prot.c Fri Jul 14 16:46:33 2000 +0000
+++ b/lib/libc/rpc/rpcb_prot.c Fri Jul 14 16:48:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpcb_prot.c,v 1.1 2000/06/02 23:11:15 fvdl Exp $ */
+/* $NetBSD: rpcb_prot.c,v 1.1.2.1 2000/07/14 16:48:12 fvdl Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -275,9 +275,9 @@
return (FALSE);
}
} else {
- IXDR_PUT_U_LONG(buf, objp->prog);
- IXDR_PUT_U_LONG(buf, objp->vers);
- IXDR_PUT_U_LONG(buf, objp->proc);
+ IXDR_PUT_U_INT32(buf, objp->prog);
+ IXDR_PUT_U_INT32(buf, objp->vers);
+ IXDR_PUT_U_INT32(buf, objp->proc);
}
/*
diff -r 8b9e7138a08e -r a5898dc3253f lib/libc/rpc/rpcb_st_xdr.c
--- a/lib/libc/rpc/rpcb_st_xdr.c Fri Jul 14 16:46:33 2000 +0000
+++ b/lib/libc/rpc/rpcb_st_xdr.c Fri Jul 14 16:48:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpcb_st_xdr.c,v 1.1 2000/06/02 23:11:15 fvdl Exp $ */
+/* $NetBSD: rpcb_st_xdr.c,v 1.1.2.1 2000/07/14 16:48:12 fvdl Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -115,12 +115,12 @@
return (FALSE);
}
} else {
- IXDR_PUT_U_LONG(buf, objp->prog);
- IXDR_PUT_U_LONG(buf, objp->vers);
- IXDR_PUT_U_LONG(buf, objp->proc);
- IXDR_PUT_LONG(buf, objp->success);
- IXDR_PUT_LONG(buf, objp->failure);
- IXDR_PUT_LONG(buf, objp->indirect);
+ IXDR_PUT_U_INT32(buf, objp->prog);
+ IXDR_PUT_U_INT32(buf, objp->vers);
+ IXDR_PUT_U_INT32(buf, objp->proc);
+ IXDR_PUT_INT32(buf, objp->success);
+ IXDR_PUT_INT32(buf, objp->failure);
+ IXDR_PUT_INT32(buf, objp->indirect);
}
if (!xdr_string(xdrs, &objp->netid, ~0)) {
return (FALSE);
@@ -153,12 +153,12 @@
return (FALSE);
}
} else {
- objp->prog = IXDR_GET_U_LONG(buf);
- objp->vers = IXDR_GET_U_LONG(buf);
- objp->proc = IXDR_GET_U_LONG(buf);
- objp->success = IXDR_GET_LONG(buf);
- objp->failure = IXDR_GET_LONG(buf);
- objp->indirect = IXDR_GET_LONG(buf);
+ objp->prog = IXDR_GET_U_INT32(buf);
+ objp->vers = IXDR_GET_U_INT32(buf);
+ objp->proc = IXDR_GET_U_INT32(buf);
+ objp->success = IXDR_GET_INT32(buf);
+ objp->failure = IXDR_GET_INT32(buf);
+ objp->indirect = IXDR_GET_INT32(buf);
}
if (!xdr_string(xdrs, &objp->netid, ~0)) {
return (FALSE);
diff -r 8b9e7138a08e -r a5898dc3253f lib/libc/rpc/svc_auth_unix.c
--- a/lib/libc/rpc/svc_auth_unix.c Fri Jul 14 16:46:33 2000 +0000
+++ b/lib/libc/rpc/svc_auth_unix.c Fri Jul 14 16:48:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svc_auth_unix.c,v 1.15 1999/09/20 04:39:24 lukem Exp $ */
+/* $NetBSD: svc_auth_unix.c,v 1.15.8.1 2000/07/14 16:48:13 fvdl Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
static char *sccsid = "@(#)svc_auth_unix.c 1.28 88/02/08 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)svc_auth_unix.c 2.3 88/08/01 4.0 RPCSRC";
#else
-__RCSID("$NetBSD: svc_auth_unix.c,v 1.15 1999/09/20 04:39:24 lukem Exp $");
+__RCSID("$NetBSD: svc_auth_unix.c,v 1.15.8.1 2000/07/14 16:48:13 fvdl Exp $");
#endif
#endif
@@ -90,8 +90,8 @@
Home |
Main Index |
Thread Index |
Old Index