Sat Jan 23 02:33:09 2016 UTC ()
u_int -> unsigned int, in some of the output.

In the bulk of the output making this change would require reworking a
bunch of the internals to allow spaces in type names, which at the
moment doesn't seem worthwhile.


(dholland)
diff -r1.37 -r1.38 src/usr.bin/rpcgen/rpc_cout.c
diff -r1.24 -r1.25 src/usr.bin/rpcgen/rpc_hout.c
diff -r1.21 -r1.22 src/usr.bin/rpcgen/rpc_parse.c
diff -r1.14 -r1.15 src/usr.bin/rpcgen/rpc_tblout.c

cvs diff -r1.37 -r1.38 src/usr.bin/rpcgen/rpc_cout.c (expand / switch to context diff)
--- src/usr.bin/rpcgen/rpc_cout.c 2015/09/20 16:57:13 1.37
+++ src/usr.bin/rpcgen/rpc_cout.c 2016/01/23 02:33:09 1.38
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_cout.c,v 1.37 2015/09/20 16:57:13 kamil Exp $	*/
+/*	$NetBSD: rpc_cout.c,v 1.38 2016/01/23 02:33:09 dholland 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
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI";
 #else
-__RCSID("$NetBSD: rpc_cout.c,v 1.37 2015/09/20 16:57:13 kamil Exp $");
+__RCSID("$NetBSD: rpc_cout.c,v 1.38 2016/01/23 02:33:09 dholland Exp $");
 #endif
 #endif
 
@@ -203,9 +203,9 @@
 print_ifsizeof(const char *prefix, const char *type)
 {
 	if (streq(type, "bool")) {
-		f_print(fout, ", (u_int)sizeof(bool_t), (xdrproc_t)xdr_bool");
+		f_print(fout, ", (unsigned int)sizeof(bool_t), (xdrproc_t)xdr_bool");
 	} else {
-		f_print(fout, ", (u_int)sizeof(");
+		f_print(fout, ", (unsigned int)sizeof(");
 		if (undefined(type) && prefix) {
 			f_print(fout, "%s ", prefix);
 		}
@@ -272,10 +272,10 @@
 			}
 			print_ifarg("(char **)(void *)");
 			if (*objname == '&') {
-				f_print(fout, "%s.%s_val, (u_int *)%s.%s_len",
+				f_print(fout, "%s.%s_val, (unsigned int *)%s.%s_len",
 				    objname, name, objname, name);
 			} else {
-				f_print(fout, "&%s->%s_val, (u_int *)&%s->%s_len",
+				f_print(fout, "&%s->%s_val, (unsigned int *)&%s->%s_len",
 				    objname, name, objname, name);
 			}
 		}

cvs diff -r1.24 -r1.25 src/usr.bin/rpcgen/rpc_hout.c (expand / switch to context diff)
--- src/usr.bin/rpcgen/rpc_hout.c 2015/09/20 15:45:07 1.24
+++ src/usr.bin/rpcgen/rpc_hout.c 2016/01/23 02:33:09 1.25
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_hout.c,v 1.24 2015/09/20 15:45:07 kamil Exp $	*/
+/*	$NetBSD: rpc_hout.c,v 1.25 2016/01/23 02:33:09 dholland 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
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI";
 #else
-__RCSID("$NetBSD: rpc_hout.c,v 1.24 2015/09/20 15:45:07 kamil Exp $");
+__RCSID("$NetBSD: rpc_hout.c,v 1.25 2016/01/23 02:33:09 dholland Exp $");
 #endif
 #endif
 
@@ -447,7 +447,7 @@
 		switch (rel) {
 		case REL_ARRAY:
 			f_print(fout, "struct {\n");
-			f_print(fout, "\tu_int %s_len;\n", name);
+			f_print(fout, "\tunsigned int %s_len;\n", name);
 			f_print(fout, "\t%s%s *%s_val;\n", prefix, old, name);
 			f_print(fout, "} %s", name);
 			break;
@@ -511,7 +511,7 @@
 		case REL_ARRAY:
 			f_print(fout, "struct {\n");
 			tabify(fout, tab);
-			f_print(fout, "\tu_int %s_len;\n", dec->name);
+			f_print(fout, "\tunsigned int %s_len;\n", dec->name);
 			tabify(fout, tab);
 			f_print(fout, "\t%s%s *%s_val;\n", prefix, type, dec->name);
 			tabify(fout, tab);

cvs diff -r1.21 -r1.22 src/usr.bin/rpcgen/rpc_parse.c (expand / switch to context diff)
--- src/usr.bin/rpcgen/rpc_parse.c 2015/05/09 23:29:51 1.21
+++ src/usr.bin/rpcgen/rpc_parse.c 2016/01/23 02:33:09 1.22
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_parse.c,v 1.21 2015/05/09 23:29:51 dholland Exp $	*/
+/*	$NetBSD: rpc_parse.c,v 1.22 2016/01/23 02:33:09 dholland 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
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI";
 #else
-__RCSID("$NetBSD: rpc_parse.c,v 1.21 2015/05/09 23:29:51 dholland Exp $");
+__RCSID("$NetBSD: rpc_parse.c,v 1.22 2016/01/23 02:33:09 dholland Exp $");
 #endif
 #endif
 
@@ -440,7 +440,7 @@
 			}
 			dec->rel = REL_ARRAY;
 			if (peekscan(TOK_RANGLE, &tok)) {
-				dec->array_max = "(u_int)~0";
+				dec->array_max = "(unsigned int)~0";
 				/* unspecified size, use * max */
 			} else {
 				scan_num(&tok);
@@ -506,7 +506,7 @@
 		}
 		dec->rel = REL_ARRAY;
 		if (peekscan(TOK_RANGLE, &tok)) {
-			dec->array_max = "(u_int)~0";
+			dec->array_max = "(unsigned int)~0";
 			/* unspecified size, use max */
 		} else {
 			scan_num(&tok);
@@ -519,7 +519,7 @@
 						 * type of argument - make it
 						 * string<> */
 			dec->rel = REL_ARRAY;
-			dec->array_max = "(u_int)~0";
+			dec->array_max = "(unsigned int)~0";
 			/* unspecified size, use max */
 		}
 	}

cvs diff -r1.14 -r1.15 src/usr.bin/rpcgen/rpc_tblout.c (expand / switch to context diff)
--- src/usr.bin/rpcgen/rpc_tblout.c 2013/12/15 00:40:17 1.14
+++ src/usr.bin/rpcgen/rpc_tblout.c 2016/01/23 02:33:09 1.15
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpc_tblout.c,v 1.14 2013/12/15 00:40:17 christos Exp $	*/
+/*	$NetBSD: rpc_tblout.c,v 1.15 2016/01/23 02:33:09 dholland 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
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)rpc_tblout.c 1.4 89/02/22 (C) 1988 SMI";
 #else
-__RCSID("$NetBSD: rpc_tblout.c,v 1.14 2013/12/15 00:40:17 christos Exp $");
+__RCSID("$NetBSD: rpc_tblout.c,v 1.15 2016/01/23 02:33:09 dholland Exp $");
 #endif
 #endif
 
@@ -66,7 +66,7 @@
  \t(xdrproc_t)xdr_void,\t\t0,\n";
 
 static const char tbl_nproc[] =
-    "u_int %s_nproc =\n\t(u_int)(sizeof(%s_table)/sizeof(%s_table[0]));\n\n";
+    "unsigned int %s_nproc =\n\t(unsigned int)(sizeof(%s_table)/sizeof(%s_table[0]));\n\n";
 
 static void write_table(definition *);
 static void printit(const char *, const char *);
@@ -172,7 +172,7 @@
 	if (streq(type, "void")) {
 		f_print(fout, "0");
 	} else {
-		f_print(fout, "(u_int)sizeof(");
+		f_print(fout, "(unsigned int)sizeof(");
 		/* XXX: should "follow" be 1 ??? */
 		ptype(prefix, type, 0);
 		f_print(fout, ")");