summaryrefslogtreecommitdiff
path: root/libc/inet/rpc
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-08 14:29:53 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-08 14:29:53 +0000
commit11b9aee8ff8c9ab70ef6e5b6d68f75cd8a44c4d5 (patch)
tree40fa6c344cdb770bfb6edd104b41417fe6a8ba88 /libc/inet/rpc
parentab9d3f10ea97362d3c8ed875f2a721bf56c0f0ed (diff)
Again rpc ;-( , all *inet*, *addr*
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r--libc/inet/rpc/auth_unix.c1
-rw-r--r--libc/inet/rpc/bindresvport.c7
-rw-r--r--libc/inet/rpc/clnt_tcp.c2
-rw-r--r--libc/inet/rpc/clnt_udp.c8
-rw-r--r--libc/inet/rpc/clnt_unix.c2
-rw-r--r--libc/inet/rpc/create_xid.c1
-rw-r--r--libc/inet/rpc/get_myaddress.c4
-rw-r--r--libc/inet/rpc/getrpcent.c6
-rw-r--r--libc/inet/rpc/pmap_clnt.c4
-rw-r--r--libc/inet/rpc/pmap_rmt.c8
-rw-r--r--libc/inet/rpc/rcmd.c16
-rw-r--r--libc/inet/rpc/rexec.c6
-rw-r--r--libc/inet/rpc/rtime.c3
-rw-r--r--libc/inet/rpc/ruserpass.c1
-rw-r--r--libc/inet/rpc/svc.c11
-rw-r--r--libc/inet/rpc/svc_simple.c1
-rw-r--r--libc/inet/rpc/svc_tcp.c3
-rw-r--r--libc/inet/rpc/svc_udp.c4
-rw-r--r--libc/inet/rpc/svc_unix.c3
19 files changed, 67 insertions, 24 deletions
diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c
index 87852f36e..85fb98a63 100644
--- a/libc/inet/rpc/auth_unix.c
+++ b/libc/inet/rpc/auth_unix.c
@@ -46,6 +46,7 @@
#define xdrmem_create __xdrmem_create
#define xdr_authunix_parms __xdr_authunix_parms
#define xdr_opaque_auth __xdr_opaque_auth
+#define gettimeofday __gettimeofday
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/bindresvport.c b/libc/inet/rpc/bindresvport.c
index 1fb80d701..530df52b3 100644
--- a/libc/inet/rpc/bindresvport.c
+++ b/libc/inet/rpc/bindresvport.c
@@ -30,6 +30,8 @@
* Copyright (c) 1987 by Sun Microsystems, Inc.
*/
+#define bind __bind
+
#define __FORCE_GLIBC
#include <features.h>
@@ -43,8 +45,8 @@
/*
* Bind a socket to a privileged IP port
*/
-int
-bindresvport (int sd, struct sockaddr_in *sin)
+int attribute_hidden
+__bindresvport (int sd, struct sockaddr_in *sin)
{
int res;
static short port;
@@ -86,3 +88,4 @@ bindresvport (int sd, struct sockaddr_in *sin)
return res;
}
+strong_alias(__bindresvport,bindresvport)
diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c
index f006c3383..50300d591 100644
--- a/libc/inet/rpc/clnt_tcp.c
+++ b/libc/inet/rpc/clnt_tcp.c
@@ -60,6 +60,8 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
#define xdrmem_create __xdrmem_create
#define pmap_getport __pmap_getport
#define _seterr_reply __seterr_reply
+#define connect __connect
+#define bindresvport __bindresvport
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c
index c59a119b9..217650bf5 100644
--- a/libc/inet/rpc/clnt_udp.c
+++ b/libc/inet/rpc/clnt_udp.c
@@ -47,6 +47,8 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
#define xdr_opaque_auth __xdr_opaque_auth
#define pmap_getport __pmap_getport
#define _seterr_reply __seterr_reply
+#define setsockopt __setsockopt
+#define bindresvport __bindresvport
#define __FORCE_GLIBC
#include <features.h>
@@ -206,7 +208,7 @@ __clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version,
/* attempt to bind to prov port */
(void) bindresvport (*sockp, (struct sockaddr_in *) 0);
/* the sockets rpc controls are non-blocking */
- (void) ioctl (*sockp, FIONBIO, (char *) &dontblock);
+ (void) __ioctl (*sockp, FIONBIO, (char *) &dontblock);
#ifdef IP_RECVERR
{
int on = 1;
@@ -250,13 +252,13 @@ is_network_up (int sock)
ifc.ifc_len = sizeof (buf);
ifc.ifc_buf = buf;
- if (ioctl(sock, SIOCGIFCONF, (char *) &ifc) == 0)
+ if (__ioctl(sock, SIOCGIFCONF, (char *) &ifc) == 0)
{
ifr = ifc.ifc_req;
for (n = ifc.ifc_len / sizeof (struct ifreq); n > 0; n--, ifr++)
{
ifreq = *ifr;
- if (ioctl (sock, SIOCGIFFLAGS, (char *) &ifreq) < 0)
+ if (__ioctl (sock, SIOCGIFFLAGS, (char *) &ifreq) < 0)
break;
if ((ifreq.ifr_flags & IFF_UP)
diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c
index efdd39005..23154bab3 100644
--- a/libc/inet/rpc/clnt_unix.c
+++ b/libc/inet/rpc/clnt_unix.c
@@ -57,6 +57,8 @@
#define getegid __getegid
#define geteuid __geteuid
#define _seterr_reply __seterr_reply
+#define setsockopt __setsockopt
+#define connect __connect
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/create_xid.c b/libc/inet/rpc/create_xid.c
index 3dbf7af61..69b83ff59 100644
--- a/libc/inet/rpc/create_xid.c
+++ b/libc/inet/rpc/create_xid.c
@@ -19,6 +19,7 @@
#define lrand48_r __lrand48_r
#define srand48_r __srand48_r
+#define gettimeofday __gettimeofday
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/get_myaddress.c b/libc/inet/rpc/get_myaddress.c
index 684e4d7ec..51674656e 100644
--- a/libc/inet/rpc/get_myaddress.c
+++ b/libc/inet/rpc/get_myaddress.c
@@ -72,7 +72,7 @@ get_myaddress (struct sockaddr_in *addr)
}
ifc.ifc_len = sizeof (buf);
ifc.ifc_buf = buf;
- if (ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
+ if (__ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
{
__perror (_("get_myaddress: ioctl (get interface configuration)"));
exit (1);
@@ -83,7 +83,7 @@ get_myaddress (struct sockaddr_in *addr)
for (len = ifc.ifc_len; len; len -= sizeof ifreq)
{
ifreq = *ifr;
- if (ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0)
+ if (__ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0)
{
__perror ("get_myaddress: ioctl");
exit (1);
diff --git a/libc/inet/rpc/getrpcent.c b/libc/inet/rpc/getrpcent.c
index bc6ab7057..90e8b70d4 100644
--- a/libc/inet/rpc/getrpcent.c
+++ b/libc/inet/rpc/getrpcent.c
@@ -1,6 +1,4 @@
/* @(#)getrpcent.c 2.2 88/07/29 4.0 RPCSRC */
-#define __FORCE_GLIBC
-#include <features.h>
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,6 +33,10 @@
* Copyright (c) 1985 by Sun Microsystems, Inc.
*/
+#define atoi __atoi
+
+#define __FORCE_GLIBC
+#include <features.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
diff --git a/libc/inet/rpc/pmap_clnt.c b/libc/inet/rpc/pmap_clnt.c
index dbd3e3198..0abe646a1 100644
--- a/libc/inet/rpc/pmap_clnt.c
+++ b/libc/inet/rpc/pmap_clnt.c
@@ -73,7 +73,7 @@ __get_myaddress (struct sockaddr_in *addr)
}
ifc.ifc_len = sizeof (buf);
ifc.ifc_buf = buf;
- if (ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
+ if (__ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
{
__perror (_("__get_myaddress: ioctl (get interface configuration)"));
exit (1);
@@ -84,7 +84,7 @@ __get_myaddress (struct sockaddr_in *addr)
for (len = ifc.ifc_len; len; len -= sizeof ifreq)
{
ifreq = *ifr;
- if (ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0)
+ if (__ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0)
{
__perror ("__get_myaddress: ioctl");
exit (1);
diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c
index 8a42d78ee..2a814795a 100644
--- a/libc/inet/rpc/pmap_rmt.c
+++ b/libc/inet/rpc/pmap_rmt.c
@@ -46,7 +46,9 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
#define xdr_reference __xdr_reference
#define xdr_u_long __xdr_u_long
#define inet_makeaddr __inet_makeaddr
+#define inet_netof __inet_netof
#define clntudp_create __clntudp_create
+#define setsockopt __setsockopt
#define __FORCE_GLIBC
#include <features.h>
@@ -193,7 +195,7 @@ getbroadcastnets (struct in_addr *addrs, int sock, char *buf)
ifc.ifc_len = UDPMSGSIZE;
ifc.ifc_buf = buf;
- if (ioctl (sock, SIOCGIFCONF, (char *) &ifc) < 0)
+ if (__ioctl (sock, SIOCGIFCONF, (char *) &ifc) < 0)
{
__perror (_("broadcast: ioctl (get interface configuration)"));
return (0);
@@ -202,7 +204,7 @@ getbroadcastnets (struct in_addr *addrs, int sock, char *buf)
for (i = 0, n = ifc.ifc_len / sizeof (struct ifreq); n > 0; n--, ifr++)
{
ifreq = *ifr;
- if (ioctl (sock, SIOCGIFFLAGS, (char *) &ifreq) < 0)
+ if (__ioctl (sock, SIOCGIFFLAGS, (char *) &ifreq) < 0)
{
__perror (_("broadcast: ioctl (get interface flags)"));
continue;
@@ -213,7 +215,7 @@ getbroadcastnets (struct in_addr *addrs, int sock, char *buf)
{
sin = (struct sockaddr_in *) &ifr->ifr_addr;
#ifdef SIOCGIFBRDADDR /* 4.3BSD */
- if (ioctl (sock, SIOCGIFBRDADDR, (char *) &ifreq) < 0)
+ if (__ioctl (sock, SIOCGIFBRDADDR, (char *) &ifreq) < 0)
{
addrs[i++] = inet_makeaddr (inet_netof
/* Changed to pass struct instead of s_addr member
diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c
index bbcc7b354..55f9e4042 100644
--- a/libc/inet/rpc/rcmd.c
+++ b/libc/inet/rpc/rcmd.c
@@ -43,6 +43,13 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
#define getpwnam_r __getpwnam_r
#define gethostbyname __gethostbyname
#define gethostbyname_r __gethostbyname_r
+#define fileno __fileno
+#define sleep __sleep
+#define inet_addr __inet_addr
+#define inet_ntoa __inet_ntoa
+#define herror __herror
+#define bind __bind
+#define connect __connect
#define __FORCE_GLIBC
#include <features.h>
@@ -67,6 +74,8 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
#include <arpa/inet.h>
+extern int __rresvport(int *alport) attribute_hidden;
+
/* some forward declarations */
static int __ivaliduser2(FILE *hostf, u_int32_t raddr,
const char *luser, const char *ruser, const char *rhost);
@@ -144,7 +153,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
*ahost = hp->h_name;
oldmask = sigblock(sigmask(SIGURG)); /* __sigblock */
for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
- s = rresvport(&lport);
+ s = __rresvport(&lport);
if (s < 0) {
if (errno == EAGAIN)
(void)fprintf(stderr,
@@ -195,7 +204,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
lport = 0;
} else {
char num[8];
- int s2 = rresvport(&lport), s3;
+ int s2 = __rresvport(&lport), s3;
socklen_t len = sizeof(from);
if (s2 < 0)
@@ -264,7 +273,7 @@ bad:
return -1;
}
-int rresvport(int *alport)
+int attribute_hidden __rresvport(int *alport)
{
struct sockaddr_in sin;
int s;
@@ -292,6 +301,7 @@ int rresvport(int *alport)
return -1;
}
+strong_alias(__rresvport,rresvport)
int __check_rhosts_file = 1;
char *__rcmd_errstr;
diff --git a/libc/inet/rpc/rexec.c b/libc/inet/rpc/rexec.c
index 98a8bf32e..6312366eb 100644
--- a/libc/inet/rpc/rexec.c
+++ b/libc/inet/rpc/rexec.c
@@ -27,9 +27,13 @@
* SUCH DAMAGE.
*/
+#define getsockname __getsockname
#define getnameinfo __getnameinfo
#define getaddrinfo __getaddrinfo
-#define getsockname __getsockname
+#define freeaddrinfo __freeaddrinfo
+#define sleep __sleep
+#define atoi __atoi
+#define connect __connect
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/rtime.c b/libc/inet/rpc/rtime.c
index 554ad69eb..2e20621f9 100644
--- a/libc/inet/rpc/rtime.c
+++ b/libc/inet/rpc/rtime.c
@@ -42,6 +42,9 @@ static char sccsid[] = "@(#)rtime.c 2.2 88/08/10 4.0 RPCSRC; from 1.8 88/02/08 S
* subtract seconds before Jan 1, 1970 to get
* what unix uses.
*/
+
+#define connect __connect
+
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c
index 3c48122ac..a3408dee0 100644
--- a/libc/inet/rpc/ruserpass.c
+++ b/libc/inet/rpc/ruserpass.c
@@ -33,6 +33,7 @@
#define getegid __getegid
#define geteuid __geteuid
#define gethostname __gethostname
+#define fileno __fileno
#define __FORCE_GLIBC
#include <features.h>
diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c
index 727abcbd8..168c6e406 100644
--- a/libc/inet/rpc/svc.c
+++ b/libc/inet/rpc/svc.c
@@ -36,16 +36,14 @@
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
+#define ffs __ffs
#define pmap_set __pmap_set
#define pmap_unset __pmap_unset
-
#define _authenticate _authenticate_internal
#define _rpc_dtablesize _rpc_dtablesize_internal
-
/* used by svc_[max_]pollfd */
#define __rpc_thread_svc_pollfd __rpc_thread_svc_pollfd_internal
#define __rpc_thread_svc_max_pollfd __rpc_thread_svc_max_pollfd_internal
-
/* used by svc_fdset */
#define __rpc_thread_svc_fdset __rpc_thread_svc_fdset_internal
@@ -131,8 +129,8 @@ __xprt_register (SVCXPRT *xprt)
strong_alias(__xprt_register,xprt_register)
/* De-activate a transport handle. */
-void
-xprt_unregister (SVCXPRT *xprt)
+void attribute_hidden
+__xprt_unregister (SVCXPRT *xprt)
{
register int sock = xprt->xp_sock;
register int i;
@@ -149,6 +147,7 @@ xprt_unregister (SVCXPRT *xprt)
svc_pollfd[i].fd = -1;
}
}
+strong_alias(__xprt_unregister,xprt_unregister)
/* ********************** CALLOUT list related stuff ************* */
@@ -494,7 +493,7 @@ __svc_getreq_poll (struct pollfd *pfdp, int pollretval)
++fds_found;
if (p->revents & POLLNVAL)
- xprt_unregister (xports[p->fd]);
+ __xprt_unregister (xports[p->fd]);
else
__svc_getreq_common (p->fd);
}
diff --git a/libc/inet/rpc/svc_simple.c b/libc/inet/rpc/svc_simple.c
index e0509be70..6b8fe7103 100644
--- a/libc/inet/rpc/svc_simple.c
+++ b/libc/inet/rpc/svc_simple.c
@@ -43,6 +43,7 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";
#define svcerr_decode __svcerr_decode
#define svcudp_create __svcudp_create
#define pmap_unset __pmap_unset
+#define asprintf __asprintf
#define __FORCE_GLIBC
#define _GNU_SOURCE
diff --git a/libc/inet/rpc/svc_tcp.c b/libc/inet/rpc/svc_tcp.c
index 32b3cc995..b3cd83fa8 100644
--- a/libc/inet/rpc/svc_tcp.c
+++ b/libc/inet/rpc/svc_tcp.c
@@ -48,7 +48,10 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
#define xdr_callmsg __xdr_callmsg
#define xdr_replymsg __xdr_replymsg
#define xprt_register __xprt_register
+#define xprt_unregister __xprt_unregister
#define getsockname __getsockname
+#define bind __bind
+#define bindresvport __bindresvport
#define __FORCE_GLIBC
#define _GNU_SOURCE
diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c
index 197084144..0f731a6ba 100644
--- a/libc/inet/rpc/svc_udp.c
+++ b/libc/inet/rpc/svc_udp.c
@@ -40,10 +40,14 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
*/
#define xprt_register __xprt_register
+#define xprt_unregister __xprt_unregister
#define xdrmem_create __xdrmem_create
#define xdr_callmsg __xdr_callmsg
#define xdr_replymsg __xdr_replymsg
#define getsockname __getsockname
+#define setsockopt __setsockopt
+#define bind __bind
+#define bindresvport __bindresvport
#define __FORCE_GLIBC
#define _GNU_SOURCE
diff --git a/libc/inet/rpc/svc_unix.c b/libc/inet/rpc/svc_unix.c
index 79c27ac5f..8b1e8b2d5 100644
--- a/libc/inet/rpc/svc_unix.c
+++ b/libc/inet/rpc/svc_unix.c
@@ -44,9 +44,12 @@
#define xdr_callmsg __xdr_callmsg
#define xdr_replymsg __xdr_replymsg
#define xprt_register __xprt_register
+#define xprt_unregister __xprt_unregister
#define getegid __getegid
#define geteuid __geteuid
#define getsockname __getsockname
+#define setsockopt __setsockopt
+#define bind __bind
#define __FORCE_GLIBC
#include <features.h>