diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-03-25 21:54:42 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-03-25 21:54:42 +0000 |
commit | c5ea13ea99b2682ebc06f26068296706e76d5741 (patch) | |
tree | 81d06d5d9da689303bb646ce21072009922a002e /lib/libc/rpc | |
parent | 727ad8ec981f8b214c4d2b2d4d44e603e3372e66 (diff) |
Pull prototypes into scope
Remove graticious casts
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r-- | lib/libc/rpc/auth_unix.c | 11 | ||||
-rw-r--r-- | lib/libc/rpc/clnt_tcp.c | 5 | ||||
-rw-r--r-- | lib/libc/rpc/clnt_udp.c | 7 | ||||
-rw-r--r-- | lib/libc/rpc/pmap_rmt.c | 6 | ||||
-rw-r--r-- | lib/libc/rpc/svc_run.c | 3 | ||||
-rw-r--r-- | lib/libc/rpc/svc_tcp.c | 3 | ||||
-rw-r--r-- | lib/libc/rpc/xdr_rec.c | 5 |
7 files changed, 23 insertions, 17 deletions
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c index 1310d997ebe..263635e5569 100644 --- a/lib/libc/rpc/auth_unix.c +++ b/lib/libc/rpc/auth_unix.c @@ -49,6 +49,7 @@ static char *rcsid = "$NetBSD: auth_unix.c,v 1.2 1995/02/25 03:01:35 cgd Exp $"; #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include <rpc/types.h> #include <rpc/xdr.h> @@ -84,7 +85,7 @@ struct audata { }; #define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private) -static bool_t marshal_new_auth(); +static void marshal_new_auth(); /* @@ -174,9 +175,9 @@ authunix_create_default() { register int len; char machname[MAX_MACHINE_NAME + 1]; - register int uid; - register int gid; - int gids[NGRPS]; + register uid_t uid; + register gid_t gid; + gid_t gids[NGRPS]; if (gethostname(machname, MAX_MACHINE_NAME) == -1) abort(); @@ -305,7 +306,7 @@ authunix_destroy(auth) * Marshals (pre-serializes) an auth struct. * sets private data, au_marshed and au_mpos */ -static bool_t +static void marshal_new_auth(auth) register AUTH *auth; { diff --git a/lib/libc/rpc/clnt_tcp.c b/lib/libc/rpc/clnt_tcp.c index 04a2ef86798..ce6dd3bae18 100644 --- a/lib/libc/rpc/clnt_tcp.c +++ b/lib/libc/rpc/clnt_tcp.c @@ -56,6 +56,7 @@ static char *rcsid = "$NetBSD: clnt_tcp.c,v 1.4 1995/02/25 03:01:41 cgd Exp $"; #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include <rpc/rpc.h> #include <sys/socket.h> #include <netdb.h> @@ -253,7 +254,7 @@ call_again: ct->ct_error.re_status = RPC_SUCCESS; x_id = ntohl(--(*msg_x_id)); if ((! XDR_PUTBYTES(xdrs, ct->ct_mcall, ct->ct_mpos)) || - (! XDR_PUTLONG(xdrs, &proc)) || + (! XDR_PUTLONG(xdrs, (long *)&proc)) || (! AUTH_MARSHALL(h->cl_auth, xdrs)) || (! (*xdr_args)(xdrs, args_ptr))) { if (ct->ct_error.re_status == RPC_SUCCESS) @@ -409,7 +410,7 @@ readtcp(ct, buf, len) FD_SET(ct->ct_sock, &mask); while (TRUE) { readfds = mask; - switch (select(ct->ct_sock+1, &readfds, (int*)NULL, (int*)NULL, + switch (select(ct->ct_sock+1, &readfds, NULL, NULL, &(ct->ct_wait))) { case 0: ct->ct_error.re_status = RPC_TIMEDOUT; diff --git a/lib/libc/rpc/clnt_udp.c b/lib/libc/rpc/clnt_udp.c index f2a41781e06..9c52f52bc77 100644 --- a/lib/libc/rpc/clnt_udp.c +++ b/lib/libc/rpc/clnt_udp.c @@ -43,6 +43,7 @@ static char *rcsid = "$NetBSD: clnt_udp.c,v 1.4 1995/02/25 03:01:42 cgd Exp $"; #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include <rpc/rpc.h> #include <sys/socket.h> #include <sys/ioctl.h> @@ -248,7 +249,7 @@ call_again: * the transaction is the first thing in the out buffer */ (*(u_short *)(cu->cu_outbuf))++; - if ((! XDR_PUTLONG(xdrs, &proc)) || + if ((! XDR_PUTLONG(xdrs, (long *)&proc)) || (! AUTH_MARSHALL(cl->cl_auth, xdrs)) || (! (*xargs)(xdrs, argsp))) return (cu->cu_error.re_status = RPC_CANTENCODEARGS); @@ -280,8 +281,8 @@ send_again: FD_SET(cu->cu_sock, &mask); for (;;) { readfds = mask; - switch (select(cu->cu_sock+1, &readfds, (int *)NULL, - (int *)NULL, &(cu->cu_wait))) { + switch (select(cu->cu_sock+1, &readfds, NULL, + NULL, &(cu->cu_wait))) { case 0: time_waited.tv_sec += cu->cu_wait.tv_sec; diff --git a/lib/libc/rpc/pmap_rmt.c b/lib/libc/rpc/pmap_rmt.c index fe3d6af8ec7..5e8082e2b93 100644 --- a/lib/libc/rpc/pmap_rmt.c +++ b/lib/libc/rpc/pmap_rmt.c @@ -49,6 +49,7 @@ static char *rcsid = "$NetBSD: pmap_rmt.c,v 1.6 1995/06/03 22:37:25 mycroft Exp #include <rpc/pmap_rmt.h> #include <sys/socket.h> #include <stdio.h> +#include <unistd.h> #include <errno.h> #include <string.h> #include <net/if.h> @@ -172,7 +173,7 @@ getbroadcastnets(addrs, sock, buf) struct ifreq ifreq, *ifr; struct sockaddr_in *sin; char *cp, *cplim; - int n, i = 0; + int i = 0; ifc.ifc_len = UDPMSGSIZE; ifc.ifc_buf = buf; @@ -322,8 +323,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) msg.acpted_rply.ar_results.where = (caddr_t)&r; msg.acpted_rply.ar_results.proc = xdr_rmtcallres; readfds = mask; - switch (select(sock+1, &readfds, (int *)NULL, - (int *)NULL, &t)) { + switch (select(sock+1, &readfds, NULL, NULL, &t)) { case 0: /* timed out */ stat = RPC_TIMEDOUT; diff --git a/lib/libc/rpc/svc_run.c b/lib/libc/rpc/svc_run.c index 29d7ddd94f3..fe44f8c9821 100644 --- a/lib/libc/rpc/svc_run.c +++ b/lib/libc/rpc/svc_run.c @@ -41,6 +41,7 @@ static char *rcsid = "$NetBSD: svc_run.c,v 1.6 1995/02/25 03:02:00 cgd Exp $"; */ #include <rpc/rpc.h> #include <sys/errno.h> +#include <unistd.h> void svc_run() @@ -49,7 +50,7 @@ svc_run() for (;;) { readfds = svc_fdset; - switch (select(svc_maxfd+1, &readfds, (int *)0, (int *)0, + switch (select(svc_maxfd+1, &readfds, 0, 0, (struct timeval *)0)) { case -1: if (errno == EINTR) { diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c index e39a0b0d906..5c3b2644f10 100644 --- a/lib/libc/rpc/svc_tcp.c +++ b/lib/libc/rpc/svc_tcp.c @@ -48,6 +48,7 @@ static char *rcsid = "$NetBSD: svc_tcp.c,v 1.6 1995/06/03 22:37:27 mycroft Exp $ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #include <rpc/rpc.h> #include <sys/socket.h> #include <errno.h> @@ -304,7 +305,7 @@ readtcp(xprt, buf, len) FD_SET(sock, &mask); do { readfds = mask; - if (select(sock+1, &readfds, (int*)NULL, (int*)NULL, + if (select(sock+1, &readfds, NULL, NULL, &wait_per_try) <= 0) { if (errno == EINTR) { continue; diff --git a/lib/libc/rpc/xdr_rec.c b/lib/libc/rpc/xdr_rec.c index df7b154f801..8857750660e 100644 --- a/lib/libc/rpc/xdr_rec.c +++ b/lib/libc/rpc/xdr_rec.c @@ -53,6 +53,7 @@ static char *rcsid = "$NetBSD: xdr_rec.c,v 1.5 1995/02/25 03:02:08 cgd Exp $"; #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <rpc/types.h> #include <rpc/xdr.h> #include <netinet/in.h> @@ -302,7 +303,7 @@ xdrrec_getpos(xdrs) register RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private; register long pos; - pos = lseek((off_t)(long)rstrm->tcp_handle, 0, 1); + pos = lseek((int)(long)rstrm->tcp_handle, (off_t)0, 1); if (pos != -1) switch (xdrs->x_op) { @@ -315,7 +316,7 @@ xdrrec_getpos(xdrs) break; default: - pos = (u_int) -1; + pos = -1; break; } return ((u_int) pos); |