Browse Source

Fix the worst of the damage so it actually compiles now (though, strictly
speaking the entire pile of rpc dung is infect damage). Anyway, hopefully
NFS using things may now be able to work...
-Erik

Eric Andersen 23 years ago
parent
commit
9156548dc7
3 changed files with 9 additions and 17 deletions
  1. 3 6
      libc/inet/rpc/pmap_rmt.c
  2. 2 6
      libc/inet/rpc/svc.c
  3. 4 5
      libc/inet/rpc/xdr.c

+ 3 - 6
libc/inet/rpc/pmap_rmt.c

@@ -108,12 +108,9 @@ u_long *port_ptr;
  * XDR remote call arguments
  * written for XDR_ENCODE direction only
  */
-bool_t xdr_rmtcall_args(xdrs, arg2)
-register XDR *xdrs;
-void * arg2;
+bool_t xdr_rmtcall_args(XDR *xdrs, struct rmtcallargs *cap)
 {
 	u_int lenposition, argposition, position;
-	register struct rmtcallargs *cap = arg2;
 
 	if (xdr_u_long(xdrs, &(cap->prog)) &&
 		xdr_u_long(xdrs, &(cap->vers)) && xdr_u_long(xdrs, &(cap->proc))) {
@@ -226,8 +223,8 @@ char *buf;						/* why allocxate more when we can use existing... */
 #endif
 }
 
-typedef bool_t(*resultproc_t) ();
-void _rpc_dtablesize(void );
+//typedef bool_t(*resultproc_t) ();
+//void _rpc_dtablesize(void );
 
 
 enum clnt_stat

+ 2 - 6
libc/inet/rpc/svc.c

@@ -132,12 +132,8 @@ SVCXPRT *xprt;
  * The dispatch routine will be called when a rpc request for this
  * program number comes in.
  */
-bool_t svc_register(xprt, prog, vers, dispatch, protocol)
-SVCXPRT *xprt;
-u_long prog;
-u_long vers;
-void (*dispatch) ();
-int protocol;
+bool_t svc_register (SVCXPRT *xprt, u_long prog, 
+	u_long vers, __dispatch_fn_t dispatch, u_long protocol)
 {
 	struct svc_callout *prev;
 	register struct svc_callout *s;

+ 4 - 5
libc/inet/rpc/xdr.c

@@ -41,6 +41,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <stdlib.h>
 #include <rpc/types.h>
 #include <rpc/xdr.h>
@@ -238,9 +239,7 @@ char *cp;
 /*
  * XDR an unsigned char
  */
-bool_t xdr_u_char(xdrs, cp)
-XDR *xdrs;
-char *cp;
+bool_t xdr_u_char (XDR *xdrs, u_char *cp)
 {
 	u_int u;
 
@@ -317,7 +316,7 @@ caddr_t cp;
 register u_int cnt;
 {
 	register u_int rndup;
-	static crud[BYTES_PER_XDR_UNIT];
+	static u_long crud[BYTES_PER_XDR_UNIT];
 
 	/*
 	 * if no data we are done
@@ -439,7 +438,7 @@ bool_t xdr_union(xdrs, dscmp, unp, choices, dfault)
 register XDR *xdrs;
 enum_t *dscmp;					/* enum to decide which arm to work on */
 char *unp;						/* the union itself */
-struct xdr_discrim *choices;	/* [value, xdr proc] for each arm */
+const struct xdr_discrim *choices;	/* [value, xdr proc] for each arm */
 xdrproc_t dfault;				/* default xdr routine */
 {
 	register enum_t dscm;