#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <netdb.h>
/*
#include <stdio.h>
#include <unistd.h>
#include <rpc/rpc.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/socket.h>
#include <rpc/pmap_clnt.h>
#ifdef USE_IN_LIBIO
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <rpc/clnt.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netdb.h>
#include <unistd.h>
#include <rpc/rpc.h>
#include <sys/uio.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/socket.h>
#include <rpc/pmap_clnt.h>
#ifdef USE_IN_LIBIO
__UCLIBC_MUTEX_STATIC(mylock, PTHREAD_MUTEX_INITIALIZER);
static smallint is_initialized;
-static struct drand48_data __rpc_lrand48_data;
u_long _create_xid (void) attribute_hidden;
u_long _create_xid (void)
struct timeval now;
gettimeofday (&now, (struct timezone *) 0);
- srand48_r (now.tv_sec ^ now.tv_usec, &__rpc_lrand48_data);
+ srand48 (now.tv_sec ^ now.tv_usec);
is_initialized = 1;
}
- lrand48_r (&__rpc_lrand48_data, &res);
+ res = lrand48();
__UCLIBC_MUTEX_UNLOCK(mylock);
#include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h>
#include <rpc/pmap_rmt.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/socket.h>
#include <stdio.h>
#include <errno.h>
#define __UCLIBC_HIDE_DEPRECATED__
#include <features.h>
#include <sys/param.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/socket.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
#include <sys/uio.h>
+#ifndef _PATH_HEQUIV
+#define _PATH_HEQUIV "/etc/hosts.equiv"
+#endif
+
+int rresvport(int *alport);
/* some forward declarations */
static int __ivaliduser2(FILE *hostf, u_int32_t raddr,
struct hostent *hp;
struct sockaddr_in sin, from;
struct pollfd pfd[2];
- int32_t oldmask;
+ sigset_t sig, osig;
pid_t pid;
int s, lport, timo;
char c;
pfd[1].events = POLLIN;
*ahost = hp->h_name;
- oldmask = sigblock(sigmask(SIGURG)); /* __sigblock */
+ sigemptyset(&sig);
+ sigaddset(&sig, SIGURG);
+ sigprocmask(SIG_BLOCK, &sig, &osig);
for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
s = rresvport(&lport);
if (s < 0) {
"rcmd: socket: All ports in use\n");
else
(void)fprintf(stderr, "rcmd: socket: %m\n");
- sigsetmask(oldmask); /* sigsetmask */
+ sigprocmask(SIG_SETMASK, &osig, NULL);
return -1;
}
fcntl(s, F_SETOWN, pid);
continue;
}
(void)fprintf(stderr, "%s: %m\n", hp->h_name);
- sigsetmask(oldmask); /* __sigsetmask */
+ sigprocmask(SIG_SETMASK, &osig, NULL);
return -1;
}
lport--;
}
goto bad2;
}
- sigsetmask(oldmask);
+ sigprocmask(SIG_SETMASK, &osig, NULL);
return s;
bad2:
if (lport)
(void)close(*fd2p);
bad:
(void)close(s);
- sigsetmask(oldmask);
+ sigprocmask(SIG_SETMASK, &osig, NULL);
return -1;
}
#define __UCLIBC_HAS_THREADS__
#endif
-#include <sys/poll.h>
+#include <poll.h>
#include <pthread.h>
#ifdef __UCLIBC__
#define _RPC_NETDB_H 1
#include <features.h>
+#include <netdb.h>
#define __need_size_t
#include <stddef.h>
#include "types.h"
+#ifndef NETDB_INTERNAL
+#define NETDB_INTERNAL -1
+#endif
+
__BEGIN_DECLS
struct rpcent
#include <sys/types.h>
#endif
-#ifndef __u_char_defined
-typedef __u_char u_char;
-typedef __u_short u_short;
-typedef __u_int u_int;
-typedef __u_long u_long;
-typedef __quad_t quad_t;
-typedef __u_quad_t u_quad_t;
-typedef __fsid_t fsid_t;
-# define __u_char_defined
-#endif
-#ifndef __daddr_t_defined
-typedef __daddr_t daddr_t;
-typedef __caddr_t caddr_t;
-# define __daddr_t_defined
-#endif
-
#include <sys/time.h>
#include <sys/param.h>
* Mountain View, California 94043
*/
#include <rpc/rpc.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/select.h>
#undef svc_fdset
#include <rpc/rpc.h>
#include <rpc/clnt.h>
#include <sys/types.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <rpc/auth_des.h>
#include <errno.h>
#include <netinet/in.h>
+#ifndef IPPORT_TIMESERVER
+#define IPPORT_TIMESERVER 37
+#endif
#define NYEARS (u_long)(1970 - 1900)
#define TOFFSET (u_long)(60*60*24*(365*NYEARS + (NYEARS/4)))
#include <features.h>
#include <sys/socket.h>
#include <netinet/in.h>
-#include <netipx/ipx.h>
#include <sys/un.h>
#if 0
+#include <netipx/ipx.h>
#include <netash/ash.h>
#include <netatalk/at.h>
#include <netax25/ax25.h>
return sizeof (struct sockaddr_rose);
case AF_PACKET:
return sizeof (struct sockaddr_ll);
+ case AF_IPX:
+ return sizeof (struct sockaddr_ipx);
#endif
case AF_INET:
return sizeof (struct sockaddr_in);
case AF_INET6:
return sizeof (struct sockaddr_in6);
- case AF_IPX:
- return sizeof (struct sockaddr_ipx);
case AF_LOCAL:
return sizeof (struct sockaddr_un);
}
#include "rpc_private.h"
#include <rpc/svc.h>
#include <rpc/pmap_clnt.h>
-#include <sys/poll.h>
+#include <poll.h>
/* used by svc_[max_]pollfd */
/* used by svc_fdset */
#include <errno.h>
#include <unistd.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <rpc/rpc.h>
/* used by svc_[max_]pollfd */
#include <string.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <errno.h>
#include <stdlib.h>
#include <rpc/svc.h>
#include <sys/socket.h>
#include <sys/uio.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <errno.h>
#include <stdlib.h>
* This routine works on Suns (Sky / 68000's) and Vaxen.
*/
-#define LSW (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
+#define LSW (__BYTE_ORDER == __BIG_ENDIAN)
#ifdef vax