Subject: bin/4411: rpcgen sample server code doesn't compile
To: None <>
From: Greg Hudson <>
List: netbsd-bugs
Date: 11/01/1997 13:54:49
>Number:         4411
>Category:       bin
>Synopsis:       sample server code doesn't use _svc routines
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov  1 11:05:00 1997
>Originator:     Greg Hudson
>Release:        October 4, 1997 or thereabouts
System: NetBSD 1.2G NetBSD 1.2G (LOLA-GRANOLA) #0: Sat Oct 4 18:21:18 EDT 1997 i386

A while back, rpcgen was changed to always distinguish client calls from
server handlers, since they take different arguments.  However, the
sample server code generated by -Ss never reflected that change.

rpcgen /usr/include/rpcsvc/rwall.x
rpcgen -Ss /usr/include/rpcsvc/rwall.x > s.c
cc -c s.c

and notice that it doesn't compile.

Very straightforward:

Index: rpc_sample.c
RCS file: /cvsroot/src/usr.bin/rpcgen/rpc_sample.c,v
retrieving revision 1.5
diff -c -r1.5 rpc_sample.c
*** rpc_sample.c	1997/10/18 10:54:01	1.5
--- rpc_sample.c	1997/11/01 18:51:03
*** 183,192 ****
  			f_print(fout, "*\n");
! 			if (Cflag)
! 				pvname_svc(proc->proc_name, vp->vers_num);
! 			else
! 				pvname(proc->proc_name, vp->vers_num);
  			printarglist(proc, RQSTP, "struct svc_req *");
  			f_print(fout, "{\n");
--- 183,189 ----
  			f_print(fout, "*\n");
! 			pvname_svc(proc->proc_name, vp->vers_num);
  			printarglist(proc, RQSTP, "struct svc_req *");
  			f_print(fout, "{\n");