summaryrefslogtreecommitdiffstats
path: root/usr.bin/rpcgen
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-11-13 11:08:29 +0000
committeralfred <alfred@FreeBSD.org>2001-11-13 11:08:29 +0000
commitae8c4c565e16ab2948916667f1a33417b33f49d9 (patch)
treec78ad60d95d7cd37c874a1e7e842436c420459dc /usr.bin/rpcgen
parent5abbadc48337c606c9095c8c0689a4ef9d8122b6 (diff)
downloadFreeBSD-src-ae8c4c565e16ab2948916667f1a33417b33f49d9.zip
FreeBSD-src-ae8c4c565e16ab2948916667f1a33417b33f49d9.tar.gz
Have rpcgen output the prototypes for the dispatch tables
Diffstat (limited to 'usr.bin/rpcgen')
-rw-r--r--usr.bin/rpcgen/rpc_hout.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/usr.bin/rpcgen/rpc_hout.c b/usr.bin/rpcgen/rpc_hout.c
index 8dce77de..6a12663 100644
--- a/usr.bin/rpcgen/rpc_hout.c
+++ b/usr.bin/rpcgen/rpc_hout.c
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -299,6 +300,20 @@ pfreeprocdef(char * name, char *vers, int mode)
}
static void
+pdispatch(char * name, char *vers, int mode)
+{
+
+ f_print(fout, "void ");
+ pvname(name, vers);
+ if (mode == 1)
+ f_print(fout,
+ "(struct svc_req *rqstp, register SVCXPRT *transp);\n");
+ else
+ f_print(fout,"();\n");
+
+}
+
+static void
pprogramdef(def)
definition *def;
{
@@ -328,6 +343,8 @@ pprogramdef(def)
if(!Cflag){
ext = "extern ";
+ f_print(fout, "%s", ext);
+ pdispatch(def->def_name, vers->vers_num, 2);
for (proc = vers->procs; proc != NULL;
proc = proc->next) {
if (!define_printed(proc,
@@ -355,6 +372,8 @@ pprogramdef(def)
ext = "extern ";
}
+ f_print(fout, "%s", ext);
+ pdispatch(def->def_name, vers->vers_num, i);
for (proc = vers->procs; proc != NULL;
proc = proc->next) {
if (!define_printed(proc,
OpenPOWER on IntegriCloud