diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-07 00:50:06 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-07 00:50:06 +0000 |
commit | 21237865a7b9e4898516678382a98163a9248592 (patch) | |
tree | 26f66ceabe878c6d867046f5ae0f47e09b564493 /libc/inet | |
parent | dec40863edc983e258161516a57413659b7fcfb9 (diff) |
Hide *clnt|pmap|svc* and some rpc. inet/rpc is full of relocs ...
Diffstat (limited to 'libc/inet')
-rw-r--r-- | libc/inet/rpc/auth_unix.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_generic.c | 4 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_perror.c | 211 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_raw.c | 3 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_simple.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_tcp.c | 5 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_udp.c | 17 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_unix.c | 5 | ||||
-rw-r--r-- | libc/inet/rpc/get_myaddress.c | 6 | ||||
-rw-r--r-- | libc/inet/rpc/getrpcent.c | 103 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_clnt.c | 14 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_getmaps.c | 3 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_getport.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_rmt.c | 15 | ||||
-rw-r--r-- | libc/inet/rpc/rcmd.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/rexec.c | 10 | ||||
-rw-r--r-- | libc/inet/rpc/rpc_prot.c | 3 | ||||
-rw-r--r-- | libc/inet/rpc/svc.c | 139 | ||||
-rw-r--r-- | libc/inet/rpc/svc_run.c | 4 | ||||
-rw-r--r-- | libc/inet/rpc/svc_simple.c | 4 | ||||
-rw-r--r-- | libc/inet/rpc/svc_tcp.c | 4 | ||||
-rw-r--r-- | libc/inet/rpc/svc_udp.c | 19 | ||||
-rw-r--r-- | libc/inet/rpc/svc_unix.c | 4 | ||||
-rw-r--r-- | libc/inet/rpc/xdr.c | 22 |
24 files changed, 317 insertions, 286 deletions
diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c index 9c16774fd..ca4e89bab 100644 --- a/libc/inet/rpc/auth_unix.c +++ b/libc/inet/rpc/auth_unix.c @@ -322,7 +322,7 @@ marshal_new_auth (AUTH *auth) xdrmem_create (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE); if ((!xdr_opaque_auth (xdrs, &(auth->ah_cred))) || (!xdr_opaque_auth (xdrs, &(auth->ah_verf)))) - perror (_("auth_none.c - Fatal marshalling problem")); + __perror (_("auth_none.c - Fatal marshalling problem")); else au->au_mpos = XDR_GETPOS (xdrs); diff --git a/libc/inet/rpc/clnt_generic.c b/libc/inet/rpc/clnt_generic.c index 3e2998477..1b30d2e1c 100644 --- a/libc/inet/rpc/clnt_generic.c +++ b/libc/inet/rpc/clnt_generic.c @@ -30,6 +30,10 @@ * Copyright (C) 1987, Sun Microsystems, Inc. */ +#define clnttcp_create __clnttcp_create +#define clntudp_create __clntudp_create +#define clntunix_create __clntunix_create + #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c index 6561e2631..9173f17af 100644 --- a/libc/inet/rpc/clnt_perror.c +++ b/libc/inet/rpc/clnt_perror.c @@ -71,105 +71,6 @@ _buf (void) return buf; } -/* - * Print reply error info - */ -char * -clnt_sperror (CLIENT * rpch, const char *msg) -{ - char chrbuf[1024]; - struct rpc_err e; - char *err; - char *str = _buf (); - char *strstart = str; - int len; - - if (str == NULL) - return NULL; - CLNT_GETERR (rpch, &e); - - len = sprintf (str, "%s: ", msg); - str += len; - - (void) __strcpy(str, clnt_sperrno(e.re_status)); - str += __strlen(str); - - switch (e.re_status) - { - case RPC_SUCCESS: - case RPC_CANTENCODEARGS: - case RPC_CANTDECODERES: - case RPC_TIMEDOUT: - case RPC_PROGUNAVAIL: - case RPC_PROCUNAVAIL: - case RPC_CANTDECODEARGS: - case RPC_SYSTEMERROR: - case RPC_UNKNOWNHOST: - case RPC_UNKNOWNPROTO: - case RPC_PMAPFAILURE: - case RPC_PROGNOTREGISTERED: - case RPC_FAILED: - break; - - case RPC_CANTSEND: - case RPC_CANTRECV: - strerror_r (e.re_errno, chrbuf, sizeof chrbuf); - len = sprintf (str, "; errno = %s", chrbuf); - str += len; - break; - - case RPC_VERSMISMATCH: - len= sprintf (str, _("; low version = %lu, high version = %lu"), - e.re_vers.low, e.re_vers.high); - str += len; - break; - - case RPC_AUTHERROR: - err = auth_errmsg (e.re_why); - (void) __strcpy(str, _("; why = ")); - str += __strlen(str); - - if (err != NULL) - { - (void) __strcpy(str, err); - str += __strlen(str); - } - else - { - 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"), - 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); - str += len; - break; - } - *str = '\n'; - *++str = '\0'; - return (strstart); -} - -void -clnt_perror (CLIENT * rpch, const char *msg) -{ -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) __fwprintf (stderr, L"%s", clnt_sperror (rpch, msg)); - else -#endif - (void) fputs (clnt_sperror (rpch, msg), stderr); -} - - struct rpc_errtab { enum clnt_stat status; @@ -275,8 +176,8 @@ static const struct rpc_errtab rpc_errlist[] = /* * This interface for use by clntrpc */ -char * -clnt_sperrno (enum clnt_stat stat) +char attribute_hidden * +__clnt_sperrno (enum clnt_stat stat) { size_t i; @@ -289,18 +190,118 @@ clnt_sperrno (enum clnt_stat stat) } return _("RPC: (unknown error code)"); } +strong_alias(__clnt_sperrno,clnt_sperrno) void clnt_perrno (enum clnt_stat num) { #ifdef USE_IN_LIBIO if (_IO_fwide (stderr, 0) > 0) - (void) __fwprintf (stderr, L"%s", clnt_sperrno (num)); + (void) __fwprintf (stderr, L"%s", __clnt_sperrno (num)); else #endif - (void) fputs (clnt_sperrno (num), stderr); + (void) fputs (__clnt_sperrno (num), stderr); +} + +/* + * Print reply error info + */ +char attribute_hidden * +__clnt_sperror (CLIENT * rpch, const char *msg) +{ + char chrbuf[1024]; + struct rpc_err e; + char *err; + char *str = _buf (); + char *strstart = str; + int len; + + if (str == NULL) + return NULL; + CLNT_GETERR (rpch, &e); + + len = sprintf (str, "%s: ", msg); + str += len; + + (void) __strcpy(str, __clnt_sperrno(e.re_status)); + str += __strlen(str); + + switch (e.re_status) + { + case RPC_SUCCESS: + case RPC_CANTENCODEARGS: + case RPC_CANTDECODERES: + case RPC_TIMEDOUT: + case RPC_PROGUNAVAIL: + case RPC_PROCUNAVAIL: + case RPC_CANTDECODEARGS: + case RPC_SYSTEMERROR: + case RPC_UNKNOWNHOST: + case RPC_UNKNOWNPROTO: + case RPC_PMAPFAILURE: + case RPC_PROGNOTREGISTERED: + case RPC_FAILED: + break; + + case RPC_CANTSEND: + case RPC_CANTRECV: + strerror_r (e.re_errno, chrbuf, sizeof chrbuf); + len = sprintf (str, "; errno = %s", chrbuf); + str += len; + break; + + case RPC_VERSMISMATCH: + len= sprintf (str, _("; low version = %lu, high version = %lu"), + e.re_vers.low, e.re_vers.high); + str += len; + break; + + case RPC_AUTHERROR: + err = auth_errmsg (e.re_why); + (void) __strcpy(str, _("; why = ")); + str += __strlen(str); + + if (err != NULL) + { + (void) __strcpy(str, err); + str += __strlen(str); + } + else + { + 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"), + 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); + str += len; + break; + } + *str = '\n'; + *++str = '\0'; + return (strstart); } +strong_alias(__clnt_sperror,clnt_sperror) +void attribute_hidden +__clnt_perror (CLIENT * rpch, const char *msg) +{ +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", __clnt_sperror (rpch, msg)); + else +#endif + (void) fputs (__clnt_sperror (rpch, msg), stderr); +} +strong_alias(__clnt_perror,clnt_perror) char attribute_hidden * __clnt_spcreateerror (const char *msg) @@ -316,7 +317,7 @@ __clnt_spcreateerror (const char *msg) ce = &get_rpc_createerr (); len = sprintf (str, "%s: ", msg); cp = str + len; - (void) __strcpy(cp, clnt_sperrno (ce->cf_stat)); + (void) __strcpy(cp, __clnt_sperrno (ce->cf_stat)); cp += __strlen(cp); switch (ce->cf_stat) @@ -325,7 +326,7 @@ __clnt_spcreateerror (const char *msg) (void) __strcpy(cp, " - "); cp += __strlen(cp); - (void) __strcpy(cp, clnt_sperrno (ce->cf_error.re_status)); + (void) __strcpy(cp, __clnt_sperrno (ce->cf_error.re_status)); cp += __strlen(cp); break; diff --git a/libc/inet/rpc/clnt_raw.c b/libc/inet/rpc/clnt_raw.c index 41143496a..1dbbbb8a8 100644 --- a/libc/inet/rpc/clnt_raw.c +++ b/libc/inet/rpc/clnt_raw.c @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro"; #define authnone_create __authnone_create #define xdrmem_create __xdrmem_create +#define svc_getreq __svc_getreq #define __FORCE_GLIBC #include <features.h> @@ -116,7 +117,7 @@ clntraw_create (u_long prog, u_long vers) xdrmem_create (xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); if (!xdr_callhdr (xdrs, &call_msg)) { - perror (_ ("clnt_raw.c - Fatal header serialization error.")); + __perror (_ ("clnt_raw.c - Fatal header serialization error.")); } clp->mcnt = XDR_GETPOS (xdrs); XDR_DESTROY (xdrs); diff --git a/libc/inet/rpc/clnt_simple.c b/libc/inet/rpc/clnt_simple.c index dede4a028..9105fc266 100644 --- a/libc/inet/rpc/clnt_simple.c +++ b/libc/inet/rpc/clnt_simple.c @@ -38,6 +38,8 @@ static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro"; * Copyright (C) 1984, Sun Microsystems, Inc. */ +#define clntudp_create __clntudp_create + #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c index c04265d8f..99c5751eb 100644 --- a/libc/inet/rpc/clnt_tcp.c +++ b/libc/inet/rpc/clnt_tcp.c @@ -122,8 +122,8 @@ static struct clnt_ops tcp_ops = * NB: The rpch->cl_auth is set null authentication. Caller may wish to set this * something more useful. */ -CLIENT * -clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, +CLIENT attribute_hidden * +__clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, int *sockp, u_int sendsz, u_int recvsz) { CLIENT *h; @@ -239,6 +239,7 @@ fooy: mem_free ((caddr_t) h, sizeof (CLIENT)); return ((CLIENT *) NULL); } +strong_alias(__clnttcp_create,clnttcp_create) static enum clnt_stat clnttcp_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout) diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c index 4aba505b2..81fe9f7bc 100644 --- a/libc/inet/rpc/clnt_udp.c +++ b/libc/inet/rpc/clnt_udp.c @@ -129,8 +129,8 @@ struct cu_data * sendsz and recvsz are the maximum allowable packet sizes that can be * sent and received. */ -CLIENT * -clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, +CLIENT attribute_hidden * +__clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval wait, int *sockp, u_int sendsz, u_int recvsz) { @@ -227,19 +227,16 @@ fooy: mem_free ((caddr_t) cl, sizeof (CLIENT)); return (CLIENT *) NULL; } +strong_alias(__clntudp_bufcreate,clntudp_bufcreate) -CLIENT * -clntudp_create (raddr, program, version, wait, sockp) - struct sockaddr_in *raddr; - u_long program; - u_long version; - struct timeval wait; - int *sockp; +CLIENT attribute_hidden * +__clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval wait, int *sockp) { - return clntudp_bufcreate (raddr, program, version, wait, sockp, + return __clntudp_bufcreate (raddr, program, version, wait, sockp, UDPMSGSIZE, UDPMSGSIZE); } +strong_alias(__clntudp_create,clntudp_create) static int is_network_up (int sock) diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c index 3af68d9c8..3dbcc8d36 100644 --- a/libc/inet/rpc/clnt_unix.c +++ b/libc/inet/rpc/clnt_unix.c @@ -120,8 +120,8 @@ static struct clnt_ops unix_ops = * NB: The rpch->cl_auth is set null authentication. Caller may wish to set this * something more useful. */ -CLIENT * -clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, +CLIENT attribute_hidden * +__clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, int *sockp, u_int sendsz, u_int recvsz) { CLIENT *h; @@ -218,6 +218,7 @@ fooy: mem_free ((caddr_t) h, sizeof (CLIENT)); return (CLIENT *) NULL; } +strong_alias(__clntunix_create,clntunix_create) static enum clnt_stat clntunix_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout) diff --git a/libc/inet/rpc/get_myaddress.c b/libc/inet/rpc/get_myaddress.c index ef2c2f52e..684e4d7ec 100644 --- a/libc/inet/rpc/get_myaddress.c +++ b/libc/inet/rpc/get_myaddress.c @@ -67,14 +67,14 @@ get_myaddress (struct sockaddr_in *addr) if ((s = socket (AF_INET, SOCK_DGRAM, 0)) < 0) { - perror ("get_myaddress: socket"); + __perror ("get_myaddress: socket"); exit (1); } ifc.ifc_len = sizeof (buf); ifc.ifc_buf = buf; if (ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0) { - perror (_("get_myaddress: ioctl (get interface configuration)")); + __perror (_("get_myaddress: ioctl (get interface configuration)")); exit (1); } @@ -85,7 +85,7 @@ get_myaddress (struct sockaddr_in *addr) ifreq = *ifr; if (ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0) { - perror ("get_myaddress: ioctl"); + __perror ("get_myaddress: ioctl"); exit (1); } if ((ifreq.ifr_flags & IFF_UP) && (ifr->ifr_addr.sa_family == AF_INET) diff --git a/libc/inet/rpc/getrpcent.c b/libc/inet/rpc/getrpcent.c index 47a0b0c13..bc6ab7057 100644 --- a/libc/inet/rpc/getrpcent.c +++ b/libc/inet/rpc/getrpcent.c @@ -73,41 +73,26 @@ static struct rpcdata *_rpcdata(void) return d; } -struct rpcent *getrpcbynumber(register int number) +void attribute_hidden __endrpcent(void) { register struct rpcdata *d = _rpcdata(); - register struct rpcent *rpc; if (d == NULL) - return NULL; - setrpcent(0); - while ((rpc = getrpcent())) { - if (rpc->r_number == number) - break; + return; + if (d->stayopen) + return; + if (d->current) { + free(d->current); + d->current = NULL; } - endrpcent(); - return rpc; -} - -struct rpcent *getrpcbyname(const char *name) -{ - struct rpcent *rpc; - char **rp; - - setrpcent(0); - while ((rpc = getrpcent())) { - if (__strcmp(rpc->r_name, name) == 0) - return rpc; - for (rp = rpc->r_aliases; *rp != NULL; rp++) { - if (__strcmp(*rp, name) == 0) - return rpc; - } + if (d->rpcf) { + fclose(d->rpcf); + d->rpcf = NULL; } - endrpcent(); - return NULL; } +strong_alias(__endrpcent,endrpcent) -void setrpcent(int f) +void attribute_hidden __setrpcent(int f) { register struct rpcdata *d = _rpcdata(); @@ -122,24 +107,7 @@ void setrpcent(int f) d->current = NULL; d->stayopen |= f; } - -void endrpcent() -{ - register struct rpcdata *d = _rpcdata(); - - if (d == NULL) - return; - if (d->stayopen) - return; - if (d->current) { - free(d->current); - d->current = NULL; - } - if (d->rpcf) { - fclose(d->rpcf); - d->rpcf = NULL; - } -} +strong_alias(__setrpcent,setrpcent) static struct rpcent *interpret(struct rpcdata *); @@ -150,7 +118,7 @@ static struct rpcent *__get_next_rpcent(struct rpcdata *d) return interpret(d); } -struct rpcent *getrpcent() +struct rpcent attribute_hidden *__getrpcent(void) { register struct rpcdata *d = _rpcdata(); @@ -160,6 +128,43 @@ struct rpcent *getrpcent() return NULL; return __get_next_rpcent(d); } +strong_alias(__getrpcent,getrpcent) + +struct rpcent attribute_hidden *__getrpcbynumber(register int number) +{ + register struct rpcdata *d = _rpcdata(); + register struct rpcent *rpc; + + if (d == NULL) + return NULL; + __setrpcent(0); + while ((rpc = __getrpcent())) { + if (rpc->r_number == number) + break; + } + __endrpcent(); + return rpc; +} +strong_alias(__getrpcbynumber,getrpcbynumber) + +struct rpcent attribute_hidden *__getrpcbyname(const char *name) +{ + struct rpcent *rpc; + char **rp; + + __setrpcent(0); + while ((rpc = __getrpcent())) { + if (__strcmp(rpc->r_name, name) == 0) + return rpc; + for (rp = rpc->r_aliases; *rp != NULL; rp++) { + if (__strcmp(*rp, name) == 0) + return rpc; + } + } + __endrpcent(); + return NULL; +} +strong_alias(__getrpcbyname,getrpcbyname) #ifdef __linux__ static char *firstwhite(char *s) @@ -319,7 +324,7 @@ int getrpcbynumber_r(int number, struct rpcent *result_buf, char *buffer, { int ret; LOCK; - ret = __copy_rpcent(getrpcbynumber(number), result_buf, buffer, buflen, result); + ret = __copy_rpcent(__getrpcbynumber(number), result_buf, buffer, buflen, result); UNLOCK; return ret; } @@ -329,7 +334,7 @@ int getrpcbyname_r(const char *name, struct rpcent *result_buf, char *buffer, { int ret; LOCK; - ret = __copy_rpcent(getrpcbyname(name), result_buf, buffer, buflen, result); + ret = __copy_rpcent(__getrpcbyname(name), result_buf, buffer, buflen, result); UNLOCK; return ret; } @@ -339,7 +344,7 @@ int getrpcent_r(struct rpcent *result_buf, char *buffer, { int ret; LOCK; - ret = __copy_rpcent(getrpcent(), result_buf, buffer, buflen, result); + ret = __copy_rpcent(__getrpcent(), result_buf, buffer, buflen, result); UNLOCK; return ret; } diff --git a/libc/inet/rpc/pmap_clnt.c b/libc/inet/rpc/pmap_clnt.c index 39d846f3b..666745442 100644 --- a/libc/inet/rpc/pmap_clnt.c +++ b/libc/inet/rpc/pmap_clnt.c @@ -34,6 +34,9 @@ * Client interface to pmap rpc service. */ +#define clnt_perror __clnt_perror +#define clntudp_bufcreate __clntudp_bufcreate + #define __FORCE_GLIBC #include <features.h> @@ -64,14 +67,14 @@ __get_myaddress (struct sockaddr_in *addr) if ((s = socket (AF_INET, SOCK_DGRAM, 0)) < 0) { - perror ("__get_myaddress: socket"); + __perror ("__get_myaddress: socket"); exit (1); } ifc.ifc_len = sizeof (buf); ifc.ifc_buf = buf; if (ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0) { - perror (_("__get_myaddress: ioctl (get interface configuration)")); + __perror (_("__get_myaddress: ioctl (get interface configuration)")); exit (1); } @@ -82,7 +85,7 @@ __get_myaddress (struct sockaddr_in *addr) ifreq = *ifr; if (ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0) { - perror ("__get_myaddress: ioctl"); + __perror ("__get_myaddress: ioctl"); exit (1); } if ((ifreq.ifr_flags & IFF_UP) && (ifr->ifr_addr.sa_family == AF_INET) @@ -148,8 +151,8 @@ strong_alias(__pmap_set,pmap_set) * Remove the mapping between program,version and port. * Calls the pmap service remotely to do the un-mapping. */ -bool_t -pmap_unset (u_long program, u_long version) +bool_t attribute_hidden +__pmap_unset (u_long program, u_long version) { struct sockaddr_in myaddress; int socket = -1; @@ -172,3 +175,4 @@ pmap_unset (u_long program, u_long version) /* (void)__close(socket); CLNT_DESTROY already closed it */ return rslt; } +strong_alias(__pmap_unset,pmap_unset) diff --git a/libc/inet/rpc/pmap_getmaps.c b/libc/inet/rpc/pmap_getmaps.c index 4ec2d40e9..84736e03e 100644 --- a/libc/inet/rpc/pmap_getmaps.c +++ b/libc/inet/rpc/pmap_getmaps.c @@ -39,6 +39,9 @@ static char sccsid[] = "@(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro"; * Copyright (C) 1984, Sun Microsystems, Inc. */ +#define clnt_perror __clnt_perror +#define clnttcp_create __clnttcp_create + #include <rpc/rpc.h> #include <rpc/pmap_prot.h> #include <rpc/pmap_clnt.h> diff --git a/libc/inet/rpc/pmap_getport.c b/libc/inet/rpc/pmap_getport.c index 79492747b..1981cfaa1 100644 --- a/libc/inet/rpc/pmap_getport.c +++ b/libc/inet/rpc/pmap_getport.c @@ -38,6 +38,8 @@ static char sccsid[] = "@(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro"; * Copyright (C) 1984, Sun Microsystems, Inc. */ +#define clntudp_bufcreate __clntudp_bufcreate + #include <rpc/rpc.h> #include <rpc/pmap_prot.h> #include <rpc/pmap_clnt.h> diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c index 5a78ba2c9..d612bec4d 100644 --- a/libc/inet/rpc/pmap_rmt.c +++ b/libc/inet/rpc/pmap_rmt.c @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; #define authunix_create_default __authunix_create_default #define xdrmem_create __xdrmem_create #define inet_makeaddr __inet_makeaddr +#define clntudp_create __clntudp_create #define __FORCE_GLIBC #include <features.h> @@ -189,7 +190,7 @@ getbroadcastnets (struct in_addr *addrs, int sock, char *buf) ifc.ifc_buf = buf; if (ioctl (sock, SIOCGIFCONF, (char *) &ifc) < 0) { - perror (_("broadcast: ioctl (get interface configuration)")); + __perror (_("broadcast: ioctl (get interface configuration)")); return (0); } ifr = ifc.ifc_req; @@ -198,7 +199,7 @@ getbroadcastnets (struct in_addr *addrs, int sock, char *buf) ifreq = *ifr; if (ioctl (sock, SIOCGIFFLAGS, (char *) &ifreq) < 0) { - perror (_("broadcast: ioctl (get interface flags)")); + __perror (_("broadcast: ioctl (get interface flags)")); continue; } if ((ifreq.ifr_flags & IFF_BROADCAST) && @@ -268,14 +269,14 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) */ if ((sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { - perror (_("Cannot create socket for broadcast rpc")); + __perror (_("Cannot create socket for broadcast rpc")); stat = RPC_CANTSEND; goto done_broad; } #ifdef SO_BROADCAST if (setsockopt (sock, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) < 0) { - perror (_("Cannot set socket option SO_BROADCAST")); + __perror (_("Cannot set socket option SO_BROADCAST")); stat = RPC_CANTSEND; goto done_broad; } @@ -326,7 +327,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) (struct sockaddr *) &baddr, sizeof (struct sockaddr)) != outlen) { - perror (_("Cannot send broadcast packet")); + __perror (_("Cannot send broadcast packet")); stat = RPC_CANTSEND; goto done_broad; } @@ -351,7 +352,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) case -1: /* some kind of error */ if (errno == EINTR) goto recv_again; - perror (_("Broadcast poll problem")); + __perror (_("Broadcast poll problem")); stat = RPC_CANTRECV; goto done_broad; @@ -364,7 +365,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) { if (errno == EINTR) goto try_again; - perror (_("Cannot receive reply to broadcast")); + __perror (_("Cannot receive reply to broadcast")); stat = RPC_CANTRECV; goto done_broad; } diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c index 43fe44cc2..bd95a7e0c 100644 --- a/libc/inet/rpc/rcmd.c +++ b/libc/inet/rpc/rcmd.c @@ -173,7 +173,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p) (void)fprintf(stderr, "connect to address %s: ", inet_ntoa(sin.sin_addr)); __set_errno (oerrno); - perror(0); + __perror(0); hp->h_addr_list++; bcopy(hp->h_addr_list[0], &sin.sin_addr, MIN (sizeof (sin.sin_addr), hp->h_length)); diff --git a/libc/inet/rpc/rexec.c b/libc/inet/rpc/rexec.c index b93cf7644..e5e8d42de 100644 --- a/libc/inet/rpc/rexec.c +++ b/libc/inet/rpc/rexec.c @@ -87,7 +87,7 @@ __rexec_af(char **ahost, int rport, const char *name, const char *pass, const ch retry: s = socket(res0->ai_family, res0->ai_socktype, 0); if (s < 0) { - perror("rexec: socket"); + __perror("rexec: socket"); return (-1); } if (connect(s, res0->ai_addr, res0->ai_addrlen) < 0) { @@ -97,7 +97,7 @@ retry: timo *= 2; goto retry; } - perror(res0->ai_canonname); + __perror(res0->ai_canonname); return (-1); } if (fd2p == 0) { @@ -115,7 +115,7 @@ retry: listen(s2, 1); sa2len = sizeof (sa2); if (getsockname(s2, (struct sockaddr *)&sa2, &sa2len) < 0) { - perror("getsockname"); + __perror("getsockname"); (void) __close(s2); goto bad; } else if (sa2len != SA_LEN((struct sockaddr *)&sa2)) { @@ -134,7 +134,7 @@ retry: s3 = accept(s2, (struct sockaddr *)&from, &len); __close(s2); if (s3 < 0) { - perror("accept"); + __perror("accept"); port = 0; goto bad; } @@ -154,7 +154,7 @@ retry: free ((char *) pass); if (__read(s, &c, 1) != 1) { - perror(*ahost); + __perror(*ahost); goto bad; } if (c != 0) { diff --git a/libc/inet/rpc/rpc_prot.c b/libc/inet/rpc/rpc_prot.c index c64ddf8f0..bbe7b57f2 100644 --- a/libc/inet/rpc/rpc_prot.c +++ b/libc/inet/rpc/rpc_prot.c @@ -44,6 +44,9 @@ static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro"; * routines are also in this program. */ +#define xdr_bytes __xdr_bytes +#define xdr_union __xdr_union + #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c index faccab58e..727abcbd8 100644 --- a/libc/inet/rpc/svc.c +++ b/libc/inet/rpc/svc.c @@ -37,6 +37,7 @@ */ #define pmap_set __pmap_set +#define pmap_unset __pmap_unset #define _authenticate _authenticate_internal #define _rpc_dtablesize _rpc_dtablesize_internal @@ -174,8 +175,8 @@ done: /* Add a service program to the callout list. The dispatch routine will be called when a rpc request for this program number comes in. */ -bool_t -svc_register (SVCXPRT * xprt, rpcprog_t prog, rpcvers_t vers, +bool_t attribute_hidden +__svc_register (SVCXPRT * xprt, rpcprog_t prog, rpcvers_t vers, void (*dispatch) (struct svc_req *, SVCXPRT *), rpcproc_t protocol) { @@ -205,10 +206,11 @@ pmap_it: return TRUE; } +strong_alias(__svc_register,svc_register) /* Remove a service program from the callout list. */ -void -svc_unregister (rpcprog_t prog, rpcvers_t vers) +void attribute_hidden +__svc_unregister (rpcprog_t prog, rpcvers_t vers) { struct svc_callout *prev; register struct svc_callout *s; @@ -226,6 +228,7 @@ svc_unregister (rpcprog_t prog, rpcvers_t vers) /* now unregister the information with the local binder service */ pmap_unset (prog, vers); } +strong_alias(__svc_unregister,svc_unregister) /* ******************* REPLY GENERATION ROUTINES ************ */ @@ -260,8 +263,8 @@ svcerr_noproc (register SVCXPRT *xprt) } /* Can't decode args error reply */ -void -svcerr_decode (register SVCXPRT *xprt) +void attribute_hidden +_ |