Module Name: src Committed By: christos Date: Sun Jun 16 16:01:44 UTC 2019
Modified Files: src/common/include/rpc: types.h xdr.h src/common/lib/libc/rpc: xdr.c xdr_array.c Log Message: get rid of caddr_t To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/include/rpc/types.h cvs rdiff -u -r1.1 -r1.2 src/common/include/rpc/xdr.h cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/rpc/xdr.c \ src/common/lib/libc/rpc/xdr_array.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/common/include/rpc/types.h diff -u src/common/include/rpc/types.h:1.2 src/common/include/rpc/types.h:1.3 --- src/common/include/rpc/types.h:1.2 Wed Jun 5 12:25:43 2019 +++ src/common/include/rpc/types.h Sun Jun 16 12:01:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.2 2019/06/05 16:25:43 hannken Exp $ */ +/* $NetBSD: types.h,v 1.3 2019/06/16 16:01:44 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -66,8 +66,6 @@ typedef int32_t rpc_inline_t; #define warn(msg,...) /**/ -typedef __caddr_t caddr_t; - #include <sys/kmem.h> #define mem_alloc(bsize) kmem_alloc(bsize, KM_SLEEP) Index: src/common/include/rpc/xdr.h diff -u src/common/include/rpc/xdr.h:1.1 src/common/include/rpc/xdr.h:1.2 --- src/common/include/rpc/xdr.h:1.1 Tue Jun 4 11:07:55 2019 +++ src/common/include/rpc/xdr.h Sun Jun 16 12:01:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: xdr.h,v 1.1 2019/06/04 15:07:55 hannken Exp $ */ +/* $NetBSD: xdr.h,v 1.2 2019/06/16 16:01:44 christos Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -364,7 +364,7 @@ extern bool_t xdrrec_skiprecord(XDR *); /* true if no more input */ extern bool_t xdrrec_eof(XDR *); -extern unsigned xdrrec_readbytes(XDR *, caddr_t, unsigned int); +extern unsigned xdrrec_readbytes(XDR *, char *, unsigned int); __END_DECLS #endif /* !_RPC_XDR_H_ */ Index: src/common/lib/libc/rpc/xdr.c diff -u src/common/lib/libc/rpc/xdr.c:1.2 src/common/lib/libc/rpc/xdr.c:1.3 --- src/common/lib/libc/rpc/xdr.c:1.2 Wed Jun 5 12:25:43 2019 +++ src/common/lib/libc/rpc/xdr.c Sun Jun 16 12:01:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: xdr.c,v 1.2 2019/06/05 16:25:43 hannken Exp $ */ +/* $NetBSD: xdr.c,v 1.3 2019/06/16 16:01:44 christos Exp $ */ /* * Copyright (c) 2010, Oracle America, Inc. @@ -37,7 +37,7 @@ static char *sccsid = "@(#)xdr.c 1.35 87/08/12"; static char *sccsid = "@(#)xdr.c 2.1 88/07/29 4.0 RPCSRC"; #else -__RCSID("$NetBSD: xdr.c,v 1.2 2019/06/05 16:25:43 hannken Exp $"); +__RCSID("$NetBSD: xdr.c,v 1.3 2019/06/16 16:01:44 christos Exp $"); #endif #endif @@ -546,7 +546,7 @@ xdr_enum(XDR *xdrs, enum_t *ep) * cp points to the opaque object and cnt gives the byte length. */ bool_t -xdr_opaque(XDR *xdrs, caddr_t cp, u_int cnt) +xdr_opaque(XDR *xdrs, char *cp, u_int cnt) { u_int rndup; static int crud[BYTES_PER_XDR_UNIT]; @@ -572,7 +572,7 @@ xdr_opaque(XDR *xdrs, caddr_t cp, u_int } if (rndup == 0) return (TRUE); - return (XDR_GETBYTES(xdrs, (caddr_t)(void *)crud, rndup)); + return (XDR_GETBYTES(xdrs, (void *)crud, rndup)); } if (xdrs->x_op == XDR_ENCODE) { Index: src/common/lib/libc/rpc/xdr_array.c diff -u src/common/lib/libc/rpc/xdr_array.c:1.2 src/common/lib/libc/rpc/xdr_array.c:1.3 --- src/common/lib/libc/rpc/xdr_array.c:1.2 Wed Jun 5 12:25:43 2019 +++ src/common/lib/libc/rpc/xdr_array.c Sun Jun 16 12:01:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: xdr_array.c,v 1.2 2019/06/05 16:25:43 hannken Exp $ */ +/* $NetBSD: xdr_array.c,v 1.3 2019/06/16 16:01:44 christos Exp $ */ /* * Copyright (c) 2010, Oracle America, Inc. @@ -37,7 +37,7 @@ static char *sccsid = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro"; static char *sccsid = "@(#)xdr_array.c 2.1 88/07/29 4.0 RPCSRC"; #else -__RCSID("$NetBSD: xdr_array.c,v 1.2 2019/06/05 16:25:43 hannken Exp $"); +__RCSID("$NetBSD: xdr_array.c,v 1.3 2019/06/16 16:01:44 christos Exp $"); #endif #endif @@ -85,11 +85,11 @@ __weak_alias(xdr_vector,_xdr_vector) * xdr procedure to call to handle each element of the array. */ bool_t -xdr_array(XDR *xdrs, caddr_t *addrp, u_int *sizep, u_int maxsize, u_int elsize, +xdr_array(XDR *xdrs, char **addrp, u_int *sizep, u_int maxsize, u_int elsize, xdrproc_t elproc) { u_int i; - caddr_t target = *addrp; + char *target = *addrp; u_int c; /* the actual element count */ bool_t stat = TRUE; u_int nodesize;