Module Name: src
Committed By: christos
Date: Tue Jun 18 21:31:35 UTC 2024
Modified Files:
src/usr.bin/rpcgen: rpc_svcout.c
Log Message:
Add prototype for the foo_freeresult() functions used in the thread-safe
versions of the code (Anthony Mallet)
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 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.31 src/usr.bin/rpcgen/rpc_svcout.c:1.32
--- src/usr.bin/rpcgen/rpc_svcout.c:1.31 Sat Nov 7 20:59:31 2015
+++ src/usr.bin/rpcgen/rpc_svcout.c Tue Jun 18 17:31:35 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_svcout.c,v 1.31 2015/11/08 01:59:31 christos Exp $ */
+/* $NetBSD: rpc_svcout.c,v 1.32 2024/06/18 21:31:35 christos 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.31 2015/11/08 01:59:31 christos Exp $");
+__RCSID("$NetBSD: rpc_svcout.c,v 1.32 2024/06/18 21:31:35 christos Exp $");
#endif
#endif
@@ -353,7 +353,18 @@ write_program(definition *def, const cha
pvname(def->def_name, vp->vers_num);
f_print(fout, "(struct svc_req *%s, ", RQSTP);
f_print(fout, "SVCXPRT *%s);\n", TRANSP);
+
+ if (Mflag) {
+ if (storage != NULL) {
+ f_print(fout, "%s ", storage);
+ }
+ f_print(fout, "int ");
+ pvname(def->def_name, vp->vers_num);
+ f_print(fout, "_freeresult"
+ "(SVCXPRT *, xdrproc_t, caddr_t);\n");
+ }
f_print(fout, "\n");
+
if (storage != NULL) {
f_print(fout, "%s ", storage);
}