from netbsd; treat arrays used with XDR_INLINE as arrays of 'int32_t's,
authorderaadt <deraadt@openbsd.org>
Tue, 10 Dec 1996 15:29:34 +0000 (15:29 +0000)
committerderaadt <deraadt@openbsd.org>
Tue, 10 Dec 1996 15:29:34 +0000 (15:29 +0000)
rather than arrays of 'long's.

usr.bin/rpcgen/rpc_cout.c

index cdbf281..c611c09 100644 (file)
@@ -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");