Module Name: src
Committed By: kamil
Date: Sun Sep 20 15:52:11 UTC 2015
Modified Files:
src/usr.bin/rpcgen: rpc_svcout.c
Log Message:
Correct newstyle code generation
For newstyle we used to generate oldstyle code. This bug has been fixed in
FreeBSD on 13 Dec 1995 by wpaul.
https://github.com/freebsd/freebsd/commit/15a1e09c3d41cb01afc70a2ea4d20c5a0d09348a
Reviewed by <christos>, <pgoyette>
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/rpcgen/rpc_svcout.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/rpcgen/rpc_svcout.c
diff -u src/usr.bin/rpcgen/rpc_svcout.c:1.29 src/usr.bin/rpcgen/rpc_svcout.c:1.30
--- src/usr.bin/rpcgen/rpc_svcout.c:1.29 Sat May 9 21:44:47 2015
+++ src/usr.bin/rpcgen/rpc_svcout.c Sun Sep 20 15:52:11 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_svcout.c,v 1.29 2015/05/09 21:44:47 christos Exp $ */
+/* $NetBSD: rpc_svcout.c,v 1.30 2015/09/20 15:52:11 kamil 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_svcout.c 1.29 89/03/30 (C) 1987 SMI";
#else
-__RCSID("$NetBSD: rpc_svcout.c,v 1.29 2015/05/09 21:44:47 christos Exp $");
+__RCSID("$NetBSD: rpc_svcout.c,v 1.30 2015/09/20 15:52:11 kamil Exp $");
#endif
#endif
@@ -449,9 +449,12 @@ write_program(definition *def, const cha
"\t\t%s = (char *(*)(char *, struct svc_req *))",
ROUTINE);
- if (newstyle) /* new style: calls internal routine */
+ if (newstyle) { /* new style: calls internal routine */
f_print(fout, "_");
- pvname_svc(proc->proc_name, vp->vers_num);
+ pvname(proc->proc_name, vp->vers_num);
+ } else {
+ pvname_svc(proc->proc_name, vp->vers_num);
+ }
f_print(fout, ";\n");
f_print(fout, "\t\tbreak;\n\n");
}