mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Have rpcgen output the prototypes for the dispatch tables
This commit is contained in:
parent
0a679263f9
commit
7e440a74e8
1 changed files with 19 additions and 0 deletions
|
|
@ -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
|
||||
|
|
@ -298,6 +299,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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue