From 5ab6e9a4cfe5f58236c77f68aeb9fd8aefaef3a2 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 10 Dec 1996 15:29:34 +0000 Subject: [PATCH] from netbsd; treat arrays used with XDR_INLINE as arrays of 'int32_t's, rather than arrays of 'long's. --- usr.bin/rpcgen/rpc_cout.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/usr.bin/rpcgen/rpc_cout.c b/usr.bin/rpcgen/rpc_cout.c index cdbf2819a45..c611c095aed 100644 --- a/usr.bin/rpcgen/rpc_cout.c +++ b/usr.bin/rpcgen/rpc_cout.c @@ -1,5 +1,5 @@ -/* $OpenBSD: rpc_cout.c,v 1.2 1996/06/26 05:38:35 deraadt Exp $ */ -/* $NetBSD: rpc_cout.c,v 1.5 1995/08/29 23:05:49 cgd Exp $ */ +/* $OpenBSD: rpc_cout.c,v 1.3 1996/12/10 15:29:34 deraadt Exp $ */ +/* $NetBSD: rpc_cout.c,v 1.6 1996/10/01 04:13:53 cgd Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -174,7 +174,7 @@ print_header(def) if (inline == 0) return; /* May cause lint to complain. but ... */ - f_print(fout, "\t register long *buf;\n\n"); + f_print(fout, "\t register int32_t *buf;\n\n"); } @@ -529,16 +529,16 @@ emit_struct(def) /* were already looking at a * xdr_inlineable structure */ if (sizestr == NULL) - f_print(fout, "\t buf = (long *)XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);", + f_print(fout, "\t buf = (int32_t *)XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);", size); else if (size == 0) f_print(fout, - "\t buf = (long *)XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);", + "\t buf = (int32_t *)XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);", sizestr); else f_print(fout, - "\t buf = (long *)XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);", + "\t buf = (int32_t *)XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);", size, sizestr); f_print(fout, "\n\t if (buf == NULL) {\n"); @@ -579,16 +579,16 @@ emit_struct(def) /* were already looking at a xdr_inlineable * structure */ if (sizestr == NULL) - f_print(fout, "\t\tbuf = (long *)XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);", + f_print(fout, "\t\tbuf = (int32_t *)XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);", size); else if (size == 0) f_print(fout, - "\t\tbuf = (long *)XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);", + "\t\tbuf = (int32_t *)XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);", sizestr); else f_print(fout, - "\t\tbuf = (long *)XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);", + "\t\tbuf = (int32_t *)XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);", size, sizestr); f_print(fout, "\n\t\tif (buf == NULL) {\n"); -- 2.20.1