diff options
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r-- | libc/inet/rpc/auth_unix.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/bindresvport.c | 7 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_perror.c | 14 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_tcp.c | 5 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_udp.c | 14 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_unix.c | 7 | ||||
-rw-r--r-- | libc/inet/rpc/create_xid.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/get_myaddress.c | 6 | ||||
-rw-r--r-- | libc/inet/rpc/getrpcent.c | 7 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_clnt.c | 6 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_rmt.c | 13 | ||||
-rw-r--r-- | libc/inet/rpc/rcmd.c | 24 | ||||
-rw-r--r-- | libc/inet/rpc/rexec.c | 15 | ||||
-rw-r--r-- | libc/inet/rpc/rtime.c | 8 | ||||
-rw-r--r-- | libc/inet/rpc/ruserpass.c | 29 | ||||
-rw-r--r-- | libc/inet/rpc/svc.c | 11 | ||||
-rw-r--r-- | libc/inet/rpc/svc_auth_unix.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/svc_run.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/svc_simple.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/svc_tcp.c | 8 | ||||
-rw-r--r-- | libc/inet/rpc/svc_udp.c | 10 | ||||
-rw-r--r-- | libc/inet/rpc/svc_unix.c | 10 | ||||
-rw-r--r-- | libc/inet/rpc/xdr.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_stdio.c | 3 |
24 files changed, 144 insertions, 60 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_perror.c b/libc/inet/rpc/clnt_perror.c index 9173f17af..611ca998c 100644 --- a/libc/inet/rpc/clnt_perror.c +++ b/libc/inet/rpc/clnt_perror.c @@ -220,7 +220,7 @@ __clnt_sperror (CLIENT * rpch, const char *msg) return NULL; CLNT_GETERR (rpch, &e); - len = sprintf (str, "%s: ", msg); + len = __sprintf (str, "%s: ", msg); str += len; (void) __strcpy(str, __clnt_sperrno(e.re_status)); @@ -246,12 +246,12 @@ __clnt_sperror (CLIENT * rpch, const char *msg) case RPC_CANTSEND: case RPC_CANTRECV: strerror_r (e.re_errno, chrbuf, sizeof chrbuf); - len = sprintf (str, "; errno = %s", chrbuf); + len = __sprintf (str, "; errno = %s", chrbuf); str += len; break; case RPC_VERSMISMATCH: - len= sprintf (str, _("; low version = %lu, high version = %lu"), + len= __sprintf (str, _("; low version = %lu, high version = %lu"), e.re_vers.low, e.re_vers.high); str += len; break; @@ -268,20 +268,20 @@ __clnt_sperror (CLIENT * rpch, const char *msg) } else { - len = sprintf (str, _("(unknown authentication error - %d)"), + len = __sprintf (str, _("(unknown authentication error - %d)"), (int) e.re_why); str += len; } break; case RPC_PROGVERSMISMATCH: - len = sprintf (str, _("; low version = %lu, high version = %lu"), + len = __sprintf (str, _("; low version = %lu, high version = %lu"), e.re_vers.low, e.re_vers.high); str += len; break; default: /* unknown */ - len = sprintf (str, "; s1 = %lu, s2 = %lu", e.re_lb.s1, e.re_lb.s2); + len = __sprintf (str, "; s1 = %lu, s2 = %lu", e.re_lb.s1, e.re_lb.s2); str += len; break; } @@ -315,7 +315,7 @@ __clnt_spcreateerror (const char *msg) if (str == NULL) return NULL; ce = &get_rpc_createerr (); - len = sprintf (str, "%s: ", msg); + len = __sprintf (str, "%s: ", msg); cp = str + len; (void) __strcpy(cp, __clnt_sperrno (ce->cf_stat)); cp += __strlen(cp); diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c index f006c3383..c415a447d 100644 --- a/libc/inet/rpc/clnt_tcp.c +++ b/libc/inet/rpc/clnt_tcp.c @@ -60,6 +60,9 @@ 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 poll __poll #define __FORCE_GLIBC #include <features.h> @@ -173,7 +176,7 @@ __clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, */ if (*sockp < 0) { - *sockp = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); + *sockp = __socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); (void) bindresvport (*sockp, (struct sockaddr_in *) 0); if ((*sockp < 0) || (connect (*sockp, (struct sockaddr *) raddr, diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c index c59a119b9..2a9f7b135 100644 --- a/libc/inet/rpc/clnt_udp.c +++ b/libc/inet/rpc/clnt_udp.c @@ -47,6 +47,12 @@ 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 recvfrom __recvfrom +#define sendto __sendto +#define recvmsg __recvmsg +#define poll __poll #define __FORCE_GLIBC #include <features.h> @@ -195,7 +201,7 @@ __clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, { int dontblock = 1; - *sockp = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP); + *sockp = __socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (*sockp < 0) { struct rpc_createerr *ce = &get_rpc_createerr (); @@ -206,7 +212,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 +256,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..c97edba42 100644 --- a/libc/inet/rpc/clnt_unix.c +++ b/libc/inet/rpc/clnt_unix.c @@ -57,6 +57,11 @@ #define getegid __getegid #define geteuid __geteuid #define _seterr_reply __seterr_reply +#define setsockopt __setsockopt +#define connect __connect +#define recvmsg __recvmsg +#define sendmsg __sendmsg +#define poll __poll #define __FORCE_GLIBC #include <features.h> @@ -156,7 +161,7 @@ __clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, */ if (*sockp < 0) { - *sockp = socket (AF_UNIX, SOCK_STREAM, 0); + *sockp = __socket (AF_UNIX, SOCK_STREAM, 0); len = __strlen (raddr->sun_path) + sizeof (raddr->sun_family) + 1; if (*sockp < 0 || connect (*sockp, (struct sockaddr *) raddr, len) < 0) 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..bdbafa44d 100644 --- a/libc/inet/rpc/get_myaddress.c +++ b/libc/inet/rpc/get_myaddress.c @@ -65,14 +65,14 @@ get_myaddress (struct sockaddr_in *addr) struct ifreq ifreq, *ifr; int len, loopback = 0; - if ((s = socket (AF_INET, SOCK_DGRAM, 0)) < 0) + if ((s = __socket (AF_INET, SOCK_DGRAM, 0)) < 0) { __perror ("get_myaddress: socket"); exit (1); } 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..c2e101510 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,11 @@ * Copyright (c) 1985 by Sun Microsystems, Inc. */ +#define atoi __atoi +#define rewind __rewind + +#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..49cd93f4b 100644 --- a/libc/inet/rpc/pmap_clnt.c +++ b/libc/inet/rpc/pmap_clnt.c @@ -66,14 +66,14 @@ __get_myaddress (struct sockaddr_in *addr) struct ifreq ifreq, *ifr; int len, loopback = 1; - if ((s = socket (AF_INET, SOCK_DGRAM, 0)) < 0) + if ((s = __socket (AF_INET, SOCK_DGRAM, 0)) < 0) { __perror ("__get_myaddress: socket"); exit (1); } 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..dbba18378 100644 --- a/libc/inet/rpc/pmap_rmt.c +++ b/libc/inet/rpc/pmap_rmt.c @@ -46,7 +46,12 @@ 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 recvfrom __recvfrom +#define sendto __sendto +#define poll __poll #define __FORCE_GLIBC #include <features.h> @@ -193,7 +198,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 +207,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 +218,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 @@ -272,7 +277,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) * initialization: create a socket, a broadcast address, and * preserialize the arguments into a send buffer. */ - if ((sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) + if ((sock = __socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { __perror (_("Cannot create socket for broadcast rpc")); stat = RPC_CANTSEND; diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c index bbcc7b354..c2eed87d4 100644 --- a/libc/inet/rpc/rcmd.c +++ b/libc/inet/rpc/rcmd.c @@ -43,6 +43,19 @@ 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 sigblock __sigblock +#define snprintf __snprintf +#define poll __poll +#define accept __accept +#define listen __listen +#define sigsetmask __sigsetmask #define __FORCE_GLIBC #include <features.h> @@ -67,6 +80,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 +159,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 +210,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,14 +279,14 @@ bad: return -1; } -int rresvport(int *alport) +int attribute_hidden __rresvport(int *alport) { struct sockaddr_in sin; int s; sin.sin_family = AF_INET; sin.sin_addr.s_addr = INADDR_ANY; - s = socket(AF_INET, SOCK_STREAM, 0); + s = __socket(AF_INET, SOCK_STREAM, 0); if (s < 0) return -1; for (;;) { @@ -292,6 +307,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..239e87fb0 100644 --- a/libc/inet/rpc/rexec.c +++ b/libc/inet/rpc/rexec.c @@ -27,9 +27,16 @@ * 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 snprintf __snprintf +#define accept __accept +#define listen __listen #define __FORCE_GLIBC #include <features.h> @@ -89,7 +96,7 @@ __rexec_af(char **ahost, int rport, const char *name, const char *pass, const ch } __ruserpass(res0->ai_canonname, &name, &pass); retry: - s = socket(res0->ai_family, res0->ai_socktype, 0); + s = __socket(res0->ai_family, res0->ai_socktype, 0); if (s < 0) { __perror("rexec: socket"); return (-1); @@ -111,7 +118,7 @@ retry: char num[32]; int s2, sa2len; - s2 = socket(res0->ai_family, res0->ai_socktype, 0); + s2 = __socket(res0->ai_family, res0->ai_socktype, 0); if (s2 < 0) { (void) __close(s); return (-1); @@ -132,7 +139,7 @@ retry: NULL, 0, servbuff, sizeof(servbuff), NI_NUMERICSERV)) port = atoi(servbuff); - (void) sprintf(num, "%u", port); + (void) __sprintf(num, "%u", port); (void) __write(s, num, __strlen(num)+1); { socklen_t len = sizeof (from); s3 = accept(s2, (struct sockaddr *)&from, &len); diff --git a/libc/inet/rpc/rtime.c b/libc/inet/rpc/rtime.c index 554ad69eb..b4bbca19c 100644 --- a/libc/inet/rpc/rtime.c +++ b/libc/inet/rpc/rtime.c @@ -42,6 +42,12 @@ 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 recvfrom __recvfrom +#define sendto __sendto +#define poll __poll + #define __FORCE_GLIBC #include <features.h> @@ -90,7 +96,7 @@ rtime (struct sockaddr_in *addrp, struct rpc_timeval *timep, else type = SOCK_DGRAM; - s = socket (AF_INET, type, 0); + s = __socket (AF_INET, type, 0); if (s < 0) return (-1); diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c index 3c48122ac..b7bc36864 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> @@ -121,7 +122,7 @@ int attribute_hidden __ruserpass(const char *host, const char **aname, const cha cfile = fopen(buf, "r"); if (cfile == NULL) { if (errno != ENOENT) - printf("%s", buf); + __printf("%s", buf); return (0); } /* No threads use this stream. */ @@ -169,7 +170,7 @@ next: newp = malloc((unsigned) __strlen(tokval) + 1); if (newp == NULL) { - printf(_("out of memory")); + __printf(_("out of memory")); goto bad; } *aname = __strcpy(newp, tokval); @@ -183,8 +184,8 @@ next: if (__strcmp(*aname, "anonymous") && fstat(fileno(cfile), &stb) >= 0 && (stb.st_mode & 077) != 0) { - printf(_("Error: .netrc file is readable by others.")); - printf(_("Remove password or make file unreadable by others.")); + __printf(_("Error: .netrc file is readable by others.")); + __printf(_("Remove password or make file unreadable by others.")); goto bad; } if (token() && *apass == 0) { @@ -192,7 +193,7 @@ next: newp = malloc((unsigned) __strlen(tokval) + 1); if (newp == NULL) { - printf(_("out of memory")); + __printf(_("out of memory")); goto bad; } *apass = __strcpy(newp, tokval); @@ -202,8 +203,8 @@ next: #if 0 if (fstat(fileno(cfile), &stb) >= 0 && (stb.st_mode & 077) != 0) { - printf("Error: .netrc file is readable by others."); - printf("Remove account or make file unreadable by others."); + __printf("Error: .netrc file is readable by others."); + __printf("Remove account or make file unreadable by others."); goto bad; } if (token() && *aacct == 0) { @@ -221,11 +222,11 @@ next: while ((c=getc_unlocked(cfile)) != EOF && c == ' ' || c == '\t'); if (c == EOF || c == '\n') { - printf("Missing macdef name argument.\n"); + __printf("Missing macdef name argument.\n"); goto bad; } if (macnum == 16) { - printf("Limit of 16 macros have already been defined\n"); + __printf("Limit of 16 macros have already been defined\n"); goto bad; } tmp = macros[macnum].mac_name; @@ -235,7 +236,7 @@ next: *tmp++ = c; } if (c == EOF) { - printf("Macro definition missing null line terminator.\n"); + __printf("Macro definition missing null line terminator.\n"); goto bad; } *tmp = '\0'; @@ -244,7 +245,7 @@ next: && c != '\n'); } if (c == EOF) { - printf("Macro definition missing null line terminator.\n"); + __printf("Macro definition missing null line terminator.\n"); goto bad; } if (macnum == 0) { @@ -256,7 +257,7 @@ next: tmp = macros[macnum].mac_start; while (tmp != macbuf + 4096) { if ((c=getc_unlocked(cfile)) == EOF) { - printf("Macro definition missing null line terminator.\n"); + __printf("Macro definition missing null line terminator.\n"); goto bad; } *tmp = c; @@ -270,13 +271,13 @@ next: tmp++; } if (tmp == macbuf + 4096) { - printf("4K macro buffer exceeded\n"); + __printf("4K macro buffer exceeded\n"); goto bad; } #endif break; default: - printf(_("Unknown .netrc keyword %s"), tokval); + __printf(_("Unknown .netrc keyword %s"), tokval); break; } goto done; 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_auth_unix.c b/libc/inet/rpc/svc_auth_unix.c index 6c0f44f7d..0562a42fe 100644 --- a/libc/inet/rpc/svc_auth_unix.c +++ b/libc/inet/rpc/svc_auth_unix.c @@ -110,7 +110,7 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg) */ if ((5 + gid_len) * BYTES_PER_XDR_UNIT + str_len > auth_len) { - (void) printf ("bad auth_len gid %d str %d auth %d\n", + (void) __printf ("bad auth_len gid %d str %d auth %d\n", gid_len, str_len, auth_len); stat = AUTH_BADCRED; goto done; diff --git a/libc/inet/rpc/svc_run.c b/libc/inet/rpc/svc_run.c index b46320871..d2c06b895 100644 --- a/libc/inet/rpc/svc_run.c +++ b/libc/inet/rpc/svc_run.c @@ -32,6 +32,7 @@ */ #define svc_getreq_poll __svc_getreq_poll +#define poll __poll /* used by svc_[max_]pollfd */ #define __rpc_thread_svc_pollfd __rpc_thread_svc_pollfd_internal 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..1972bcf99 100644 --- a/libc/inet/rpc/svc_tcp.c +++ b/libc/inet/rpc/svc_tcp.c @@ -48,7 +48,13 @@ 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 poll __poll +#define accept __accept +#define listen __listen #define __FORCE_GLIBC #define _GNU_SOURCE @@ -163,7 +169,7 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize) if (sock == RPC_ANYSOCK) { - if ((sock = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) + if ((sock = __socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { __perror (_("svc_tcp.c - tcp socket creation problem")); return (SVCXPRT *) NULL; diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c index 197084144..62719ee33 100644 --- a/libc/inet/rpc/svc_udp.c +++ b/libc/inet/rpc/svc_udp.c @@ -40,10 +40,18 @@ 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 recvfrom __recvfrom +#define sendto __sendto +#define recvmsg __recvmsg +#define sendmsg __sendmsg #define __FORCE_GLIBC #define _GNU_SOURCE @@ -131,7 +139,7 @@ __svcudp_bufcreate (int sock, u_int sendsz, u_int recvsz) if (sock == RPC_ANYSOCK) { - if ((sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) + if ((sock = __socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { __perror (_("svcudp_create: socket creation problem")); return (SVCXPRT *) NULL; diff --git a/libc/inet/rpc/svc_unix.c b/libc/inet/rpc/svc_unix.c index 79c27ac5f..95a65ad1f 100644 --- a/libc/inet/rpc/svc_unix.c +++ b/libc/inet/rpc/svc_unix.c @@ -44,9 +44,17 @@ #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 recvmsg __recvmsg +#define sendmsg __sendmsg +#define poll __poll +#define accept __accept +#define listen __listen #define __FORCE_GLIBC #include <features.h> @@ -158,7 +166,7 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path) if (sock == RPC_ANYSOCK) { - if ((sock = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) + if ((sock = __socket (AF_UNIX, SOCK_STREAM, 0)) < 0) { __perror (_("svc_unix.c - AF_UNIX socket creation problem")); return (SVCXPRT *) NULL; diff --git a/libc/inet/rpc/xdr.c b/libc/inet/rpc/xdr.c index 3d36c4021..12315fdb5 100644 --- a/libc/inet/rpc/xdr.c +++ b/libc/inet/rpc/xdr.c @@ -728,6 +728,7 @@ __xdr_string (XDR *xdrs, char **cpp, u_int maxsize) } return FALSE; } +strong_alias(__xdr_string,xdr_string) /* * Wrapper for xdr_string that can be called directly from diff --git a/libc/inet/rpc/xdr_stdio.c b/libc/inet/rpc/xdr_stdio.c index 411cf17da..bd9ee4f1b 100644 --- a/libc/inet/rpc/xdr_stdio.c +++ b/libc/inet/rpc/xdr_stdio.c @@ -37,6 +37,9 @@ * from the stream. */ +#define fread __fread +#define fwrite __fwrite + #include <rpc/types.h> #include <stdio.h> #include <rpc/xdr.h> |