summaryrefslogtreecommitdiff
path: root/libc/inet/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r--libc/inet/rpc/auth_unix.c9
-rw-r--r--libc/inet/rpc/bindresvport.c7
-rw-r--r--libc/inet/rpc/clnt_generic.c11
-rw-r--r--libc/inet/rpc/clnt_perror.c24
-rw-r--r--libc/inet/rpc/clnt_simple.c9
-rw-r--r--libc/inet/rpc/getrpcport.c4
-rw-r--r--libc/inet/rpc/pmap_rmt.c5
7 files changed, 32 insertions, 37 deletions
diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c
index dcd7df98f..1f213bd8b 100644
--- a/libc/inet/rpc/auth_unix.c
+++ b/libc/inet/rpc/auth_unix.c
@@ -92,12 +92,9 @@ static bool_t marshal_new_auth();
* Create a unix style authenticator.
* Returns an auth handle with the given stuff in it.
*/
-AUTH *authunix_create(machname, uid, gid, len, aup_gids)
-char *machname;
-int uid;
-int gid;
-register int len;
-int *aup_gids;
+AUTH *authunix_create __P ((char *machname, uid_t uid,
+ gid_t gid, int len,
+ gid_t *aup_gids))
{
struct authunix_parms aup;
char mymem[MAX_AUTH_BYTES];
diff --git a/libc/inet/rpc/bindresvport.c b/libc/inet/rpc/bindresvport.c
index 6a6f385cd..e08994df6 100644
--- a/libc/inet/rpc/bindresvport.c
+++ b/libc/inet/rpc/bindresvport.c
@@ -1,6 +1,3 @@
-static char sccsid[] =
-
- "@(#)bindresvport.c 2.2 88/07/29 4.0 RPCSRC 1.8 88/02/08 SMI";
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -34,6 +31,8 @@ static char sccsid[] =
* Copyright (c) 1987 by Sun Microsystems, Inc.
*/
+#include <unistd.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/socket.h>
@@ -42,7 +41,7 @@ static char sccsid[] =
/*
* Bind a socket to a privileged IP port
*/
-bindresvport(sd, sin)
+int bindresvport(sd, sin)
int sd;
struct sockaddr_in *sin;
{
diff --git a/libc/inet/rpc/clnt_generic.c b/libc/inet/rpc/clnt_generic.c
index ba5309492..45199a4d3 100644
--- a/libc/inet/rpc/clnt_generic.c
+++ b/libc/inet/rpc/clnt_generic.c
@@ -43,11 +43,8 @@ static char sccsid[] = "@(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";
* returns client handle. Default options are set, which the user can
* change using the rpc equivalent of ioctl()'s.
*/
-CLIENT *clnt_create(hostname, prog, vers, proto)
-char *hostname;
-unsigned prog;
-unsigned vers;
-char *proto;
+CLIENT *clnt_create __P ((const char *hostname, const u_long prog,
+ const u_long vers, const char *proto))
{
struct hostent *h;
struct protoent *p;
@@ -94,7 +91,7 @@ char *proto;
return (NULL);
}
tv.tv_sec = 25;
- clnt_control(client, CLSET_TIMEOUT, &tv);
+ clnt_control(client, CLSET_TIMEOUT, (char*)&tv);
break;
case IPPROTO_TCP:
client = clnttcp_create(&sin, prog, vers, &sock, 0, 0);
@@ -103,7 +100,7 @@ char *proto;
}
tv.tv_sec = 25;
tv.tv_usec = 0;
- clnt_control(client, CLSET_TIMEOUT, &tv);
+ clnt_control(client, CLSET_TIMEOUT, (char*)&tv);
break;
default:
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c
index 84d2658ee..4ede1a43e 100644
--- a/libc/inet/rpc/clnt_perror.c
+++ b/libc/inet/rpc/clnt_perror.c
@@ -45,11 +45,12 @@ static char sccsid[] =
#include <rpc/auth.h>
#include <rpc/clnt.h>
-extern char *sys_errlist[];
-static char *auth_errmsg();
+//extern char *sys_errlist[];
+//static char *auth_errmsg();
extern char *strcpy();
+#if 0
static char *buf;
static char *_buf()
@@ -59,13 +60,12 @@ static char *_buf()
buf = (char *) malloc(256);
return (buf);
}
+#endif
/*
* Print reply error info
*/
-char *clnt_sperror(rpch, s)
-CLIENT *rpch;
-char *s;
+char *clnt_sperror __P ((CLIENT *rpch, const char *s))
{
#if 0
struct rpc_err e;
@@ -143,11 +143,10 @@ char *s;
(void) sprintf(str, "\n");
return (strstart);
#endif
+ return (0);
}
-void clnt_perror(rpch, s)
-CLIENT *rpch;
-char *s;
+void clnt_perror __P ((CLIENT *rpch, const char *s))
{
(void) fprintf(stderr, "%s", clnt_sperror(rpch, s));
}
@@ -224,8 +223,7 @@ enum clnt_stat num;
}
-char *clnt_spcreateerror(s)
-char *s;
+char *clnt_spcreateerror __P ((__const char *s))
{
#if 0
extern int sys_nerr;
@@ -256,10 +254,10 @@ char *s;
(void) strcat(str, "\n");
return (str);
#endif
+ return(0);
}
-void clnt_pcreateerror(s)
-char *s;
+extern void clnt_pcreateerror __P ((__const char *s))
{
(void) fprintf(stderr, "%s", clnt_spcreateerror(s));
}
@@ -269,6 +267,7 @@ struct auth_errtab {
char *message;
};
+#if 0
static struct auth_errtab auth_errlist[] = {
{AUTH_OK,
"Authentication OK"},
@@ -300,3 +299,4 @@ enum auth_stat stat;
}
return (NULL);
}
+#endif
diff --git a/libc/inet/rpc/clnt_simple.c b/libc/inet/rpc/clnt_simple.c
index 77657ecf3..15bf3fe68 100644
--- a/libc/inet/rpc/clnt_simple.c
+++ b/libc/inet/rpc/clnt_simple.c
@@ -41,6 +41,7 @@ static char sccsid[] =
*/
#include <stdio.h>
+#include <unistd.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
#include <netdb.h>
@@ -53,10 +54,10 @@ static struct callrpc_private {
char *oldhost;
} *callrpc_private;
-callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
-char *host;
-xdrproc_t inproc, outproc;
-char *in, *out;
+int callrpc (const char *host, const u_long prognum,
+ const u_long versnum, const u_long procnum,
+ const xdrproc_t inproc, const char *in,
+ const xdrproc_t outproc, char *out)
{
register struct callrpc_private *crp = callrpc_private;
struct sockaddr_in server_addr;
diff --git a/libc/inet/rpc/getrpcport.c b/libc/inet/rpc/getrpcport.c
index af4f7daf6..0665fbae1 100644
--- a/libc/inet/rpc/getrpcport.c
+++ b/libc/inet/rpc/getrpcport.c
@@ -40,8 +40,8 @@ static char sccsid[] = "@(#)getrpcport.c 1.3 87/08/11 SMI";
#include <netdb.h>
#include <sys/socket.h>
-getrpcport(host, prognum, versnum, proto)
-char *host;
+extern int getrpcport (const char * host, u_long prognum,
+ u_long versnum, u_int proto)
{
struct sockaddr_in addr;
struct hostent *hp;
diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c
index 1f2b47cba..80e984b77 100644
--- a/libc/inet/rpc/pmap_rmt.c
+++ b/libc/inet/rpc/pmap_rmt.c
@@ -105,11 +105,12 @@ u_long *port_ptr;
* XDR remote call arguments
* written for XDR_ENCODE direction only
*/
-bool_t xdr_rmtcall_args(xdrs, cap)
+bool_t xdr_rmtcall_args(xdrs, args)
register XDR *xdrs;
-register struct rmtcallargs *cap;
+void * arg2;
{
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))) {