Always distinguish client and server worker routines (used to be the

case only when compiling in ANSI (`-C') mode).
This commit is contained in:
pk 1995-06-24 14:59:41 +00:00
parent 1877da8b4d
commit ee0767da08
3 changed files with 12 additions and 19 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpc_main.c,v 1.6 1995/06/11 21:49:56 pk Exp $ */
/* $NetBSD: rpc_main.c,v 1.7 1995/06/24 14:59:41 pk 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
@ -31,7 +31,7 @@
#ifndef lint
static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
static char cvsid[] = "$Id: rpc_main.c,v 1.6 1995/06/11 21:49:56 pk Exp $";
static char cvsid[] = "$Id: rpc_main.c,v 1.7 1995/06/24 14:59:41 pk Exp $";
#endif
/*
@ -615,7 +615,9 @@ s_output(argc, argv, infile, define, extend, outfile, nomain, netflag)
f_print(fout, "#include <sys/types.h>\n");
f_print(fout, "#include <memory.h>\n");
if (tirpcflag)
f_print(fout, "#include <stropts.h>\n");
if (inetdflag || !tirpcflag ) {
f_print(fout, "#include <sys/socket.h>\n");
f_print(fout, "#include <netinet/in.h>\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpc_svcout.c,v 1.6 1995/06/11 21:50:05 pk Exp $ */
/* $NetBSD: rpc_svcout.c,v 1.7 1995/06/24 14:59:59 pk 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
@ -330,10 +330,7 @@ write_real_program(def)
f_print(fout, "{\n");
f_print(fout, "\treturn(");
if( Cflag )
pvname_svc(proc->proc_name, vp->vers_num);
else
pvname(proc->proc_name, vp->vers_num);
f_print(fout, "(");
if (proc->arg_num < 2) { /* single argument */
if (!streq( proc->args.decls->decl.type, "void"))
@ -450,7 +447,7 @@ write_program(def, storage)
if (newstyle) { /* new style: calls internal routine */
f_print(fout,"_");
}
if( Cflag && !newstyle )
if (!newstyle )
pvname_svc(proc->proc_name, vp->vers_num);
else
pvname(proc->proc_name, vp->vers_num);
@ -463,10 +460,7 @@ write_program(def, storage)
f_print(fout, "\t}\n");
f_print(fout, "\t(void) memset((char *)&%s, 0, sizeof (%s));\n", ARG, ARG);
if (Cflag)
printif("getargs", TRANSP, "(caddr_t) &", ARG);
else
printif("getargs", TRANSP, "&", ARG);
printerr("decode", TRANSP);
print_return("\t\t");
f_print(fout, "\t}\n");
@ -483,10 +477,7 @@ write_program(def, storage)
printerr("systemerr", TRANSP);
f_print(fout, "\t}\n");
if (Cflag)
printif("freeargs", TRANSP, "(caddr_t) &", ARG);
else
printif("freeargs", TRANSP, "&", ARG);
(void) sprintf(_errbuf, "unable to free arguments");
print_err_message("\t\t");
f_print(fout, "\t\texit(1);\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpc_tblout.c,v 1.2 1995/06/11 21:50:07 pk Exp $ */
/* $NetBSD: rpc_tblout.c,v 1.3 1995/06/24 15:00:15 pk 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
@ -116,7 +116,7 @@ write_table(def)
f_print(fout, "\n\t(char *(*)())RPCGEN_ACTION(");
/* routine to invoke */
if( Cflag && !newstyle )
if ( !newstyle)
pvname_svc(proc->proc_name, vp->vers_num);
else {
if( newstyle )