#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
};
#define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private)
-static bool_t marshal_new_auth();
+static void marshal_new_auth();
/*
{
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();
* 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;
{
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
#include <netdb.h>
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)
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;
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
* 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);
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;
#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>
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;
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;
*/
#include <rpc/rpc.h>
#include <sys/errno.h>
+#include <unistd.h>
void
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) {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
#include <errno.h>
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;
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <netinet/in.h>
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) {
break;
default:
- pos = (u_int) -1;
+ pos = -1;
break;
}
return ((u_int) pos);