summaryrefslogtreecommitdiff
path: root/libc/inet/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r--libc/inet/rpc/auth_none.c2
-rw-r--r--libc/inet/rpc/auth_unix.c4
-rw-r--r--libc/inet/rpc/authunix_prot.c2
-rw-r--r--libc/inet/rpc/bindresvport.c2
-rw-r--r--libc/inet/rpc/clnt_perror.c8
-rw-r--r--libc/inet/rpc/clnt_tcp.c2
-rw-r--r--libc/inet/rpc/clnt_udp.c4
-rw-r--r--libc/inet/rpc/clnt_unix.c2
-rw-r--r--libc/inet/rpc/getrpcent.c10
-rw-r--r--libc/inet/rpc/pmap_clnt.c4
-rw-r--r--libc/inet/rpc/pmap_getport.c2
-rw-r--r--libc/inet/rpc/pmap_rmt.c2
-rw-r--r--libc/inet/rpc/rexec.c2
-rw-r--r--libc/inet/rpc/rpc_callmsg.c2
-rw-r--r--libc/inet/rpc/rpc_dtablesize.c2
-rw-r--r--libc/inet/rpc/rpc_prot.c14
-rw-r--r--libc/inet/rpc/rpc_thread.c9
-rw-r--r--libc/inet/rpc/ruserpass.c3
-rw-r--r--libc/inet/rpc/svc.c26
-rw-r--r--libc/inet/rpc/svc_auth.c2
-rw-r--r--libc/inet/rpc/svc_udp.c4
-rw-r--r--libc/inet/rpc/xdr.c26
-rw-r--r--libc/inet/rpc/xdr_array.c2
-rw-r--r--libc/inet/rpc/xdr_mem.c2
-rw-r--r--libc/inet/rpc/xdr_rec.c8
-rw-r--r--libc/inet/rpc/xdr_reference.c2
26 files changed, 76 insertions, 72 deletions
diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c
index 06f65904a..e69dc2233 100644
--- a/libc/inet/rpc/auth_none.c
+++ b/libc/inet/rpc/auth_none.c
@@ -72,6 +72,7 @@ struct authnone_private_s {
static struct authnone_private_s *authnone_private;
#endif
+libc_hidden_proto(authnone_create)
AUTH *
authnone_create (void)
{
@@ -101,7 +102,6 @@ authnone_create (void)
}
return (&ap->no_client);
}
-libc_hidden_proto(authnone_create)
libc_hidden_def(authnone_create)
/*ARGSUSED */
diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c
index dffdc6fad..80b60b56b 100644
--- a/libc/inet/rpc/auth_unix.c
+++ b/libc/inet/rpc/auth_unix.c
@@ -109,6 +109,7 @@ static bool_t marshal_new_auth (AUTH *) internal_function;
* Create a unix style authenticator.
* Returns an auth handle with the given stuff in it.
*/
+libc_hidden_proto(authunix_create)
AUTH *
authunix_create (char *machname, uid_t uid, gid_t gid, int len,
gid_t *aup_gids)
@@ -175,13 +176,13 @@ no_memory:
marshal_new_auth (auth);
return auth;
}
-libc_hidden_proto(authunix_create)
libc_hidden_def(authunix_create)
/*
* Returns an auth handle with parameters determined by doing lots of
* syscalls.
*/
+libc_hidden_proto(authunix_create_default)
AUTH *
authunix_create_default (void)
{
@@ -215,7 +216,6 @@ authunix_create_default (void)
free (gids);
return ret_auth;
}
-libc_hidden_proto(authunix_create_default)
libc_hidden_def(authunix_create_default)
/*
diff --git a/libc/inet/rpc/authunix_prot.c b/libc/inet/rpc/authunix_prot.c
index 1587b5688..ad26f2c1e 100644
--- a/libc/inet/rpc/authunix_prot.c
+++ b/libc/inet/rpc/authunix_prot.c
@@ -49,6 +49,7 @@ libc_hidden_proto(xdr_u_long)
* XDR for unix authentication parameters.
* Unfortunately, none of these can be declared const.
*/
+libc_hidden_proto(xdr_authunix_parms)
bool_t
xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
{
@@ -69,5 +70,4 @@ xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
}
return FALSE;
}
-libc_hidden_proto(xdr_authunix_parms)
libc_hidden_def(xdr_authunix_parms)
diff --git a/libc/inet/rpc/bindresvport.c b/libc/inet/rpc/bindresvport.c
index 68b44d26a..32055cdf6 100644
--- a/libc/inet/rpc/bindresvport.c
+++ b/libc/inet/rpc/bindresvport.c
@@ -47,6 +47,7 @@ libc_hidden_proto(getpid)
/*
* Bind a socket to a privileged IP port
*/
+libc_hidden_proto(bindresvport)
int
bindresvport (int sd, struct sockaddr_in *sin)
{
@@ -90,5 +91,4 @@ bindresvport (int sd, struct sockaddr_in *sin)
return res;
}
-libc_hidden_proto(bindresvport)
libc_hidden_def(bindresvport)
diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c
index c01390598..ef3ed2d30 100644
--- a/libc/inet/rpc/clnt_perror.c
+++ b/libc/inet/rpc/clnt_perror.c
@@ -186,6 +186,7 @@ static const struct rpc_errtab rpc_errlist[] =
/*
* This interface for use by clntrpc
*/
+libc_hidden_proto(clnt_sperrno)
char *
clnt_sperrno (enum clnt_stat stat)
{
@@ -200,7 +201,6 @@ clnt_sperrno (enum clnt_stat stat)
}
return _("RPC: (unknown error code)");
}
-libc_hidden_proto(clnt_sperrno)
libc_hidden_def(clnt_sperrno)
void
@@ -217,6 +217,7 @@ clnt_perrno (enum clnt_stat num)
/*
* Print reply error info
*/
+libc_hidden_proto(clnt_sperror)
char *
clnt_sperror (CLIENT * rpch, const char *msg)
{
@@ -300,9 +301,9 @@ clnt_sperror (CLIENT * rpch, const char *msg)
*++str = '\0';
return (strstart);
}
-libc_hidden_proto(clnt_sperror)
libc_hidden_def(clnt_sperror)
+libc_hidden_proto(clnt_perror)
void
clnt_perror (CLIENT * rpch, const char *msg)
{
@@ -313,9 +314,9 @@ clnt_perror (CLIENT * rpch, const char *msg)
#endif
(void) fputs (clnt_sperror (rpch, msg), stderr);
}
-libc_hidden_proto(clnt_perror)
libc_hidden_def(clnt_perror)
+libc_hidden_proto(clnt_spcreateerror)
char *
clnt_spcreateerror (const char *msg)
{
@@ -359,7 +360,6 @@ clnt_spcreateerror (const char *msg)
*++cp = '\0';
return str;
}
-libc_hidden_proto(clnt_spcreateerror)
libc_hidden_def(clnt_spcreateerror)
void
diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c
index 8837062c9..50e5c4cc1 100644
--- a/libc/inet/rpc/clnt_tcp.c
+++ b/libc/inet/rpc/clnt_tcp.c
@@ -140,6 +140,7 @@ static struct clnt_ops tcp_ops =
* NB: The rpch->cl_auth is set null authentication. Caller may wish to set this
* something more useful.
*/
+libc_hidden_proto(clnttcp_create)
CLIENT *
clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers,
int *sockp, u_int sendsz, u_int recvsz)
@@ -257,7 +258,6 @@ fooy:
mem_free ((caddr_t) h, sizeof (CLIENT));
return ((CLIENT *) NULL);
}
-libc_hidden_proto(clnttcp_create)
libc_hidden_def(clnttcp_create)
static enum clnt_stat
diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c
index 8f3cad926..9e3444069 100644
--- a/libc/inet/rpc/clnt_udp.c
+++ b/libc/inet/rpc/clnt_udp.c
@@ -144,6 +144,7 @@ struct cu_data
* sendsz and recvsz are the maximum allowable packet sizes that can be
* sent and received.
*/
+libc_hidden_proto(clntudp_bufcreate)
CLIENT *
clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version,
struct timeval wait, int *sockp, u_int sendsz,
@@ -242,9 +243,9 @@ fooy:
mem_free ((caddr_t) cl, sizeof (CLIENT));
return (CLIENT *) NULL;
}
-libc_hidden_proto(clntudp_bufcreate)
libc_hidden_def(clntudp_bufcreate)
+libc_hidden_proto(clntudp_create)
CLIENT *
clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval wait, int *sockp)
{
@@ -252,7 +253,6 @@ clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version, struc
return clntudp_bufcreate (raddr, program, version, wait, sockp,
UDPMSGSIZE, UDPMSGSIZE);
}
-libc_hidden_proto(clntudp_create)
libc_hidden_def(clntudp_create)
static int
diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c
index 29944af0f..ee4dba6d0 100644
--- a/libc/inet/rpc/clnt_unix.c
+++ b/libc/inet/rpc/clnt_unix.c
@@ -139,6 +139,7 @@ static struct clnt_ops unix_ops =
* NB: The rpch->cl_auth is set null authentication. Caller may wish to set this
* something more useful.
*/
+libc_hidden_proto(clntunix_create)
CLIENT *
clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers,
int *sockp, u_int sendsz, u_int recvsz)
@@ -237,7 +238,6 @@ fooy:
mem_free ((caddr_t) h, sizeof (CLIENT));
return (CLIENT *) NULL;
}
-libc_hidden_proto(clntunix_create)
libc_hidden_def(clntunix_create)
static enum clnt_stat
diff --git a/libc/inet/rpc/getrpcent.c b/libc/inet/rpc/getrpcent.c
index 83dcc7e78..428fbcc31 100644
--- a/libc/inet/rpc/getrpcent.c
+++ b/libc/inet/rpc/getrpcent.c
@@ -84,6 +84,7 @@ static struct rpcdata *_rpcdata(void)
return d;
}
+libc_hidden_proto(endrpcent)
void endrpcent(void)
{
register struct rpcdata *d = _rpcdata();
@@ -101,9 +102,9 @@ void endrpcent(void)
d->rpcf = NULL;
}
}
-libc_hidden_proto(endrpcent)
libc_hidden_def(endrpcent)
+libc_hidden_proto(setrpcent)
void setrpcent(int f)
{
register struct rpcdata *d = _rpcdata();
@@ -119,7 +120,6 @@ void setrpcent(int f)
d->current = NULL;
d->stayopen |= f;
}
-libc_hidden_proto(setrpcent)
libc_hidden_def(setrpcent)
static struct rpcent *interpret(struct rpcdata *);
@@ -131,6 +131,7 @@ static struct rpcent *__get_next_rpcent(struct rpcdata *d)
return interpret(d);
}
+libc_hidden_proto(getrpcent)
struct rpcent *getrpcent(void)
{
register struct rpcdata *d = _rpcdata();
@@ -141,9 +142,9 @@ struct rpcent *getrpcent(void)
return NULL;
return __get_next_rpcent(d);
}
-libc_hidden_proto(getrpcent)
libc_hidden_def(getrpcent)
+libc_hidden_proto(getrpcbynumber)
struct rpcent *getrpcbynumber(register int number)
{
register struct rpcdata *d = _rpcdata();
@@ -159,9 +160,9 @@ struct rpcent *getrpcbynumber(register int number)
endrpcent();
return rpc;
}
-libc_hidden_proto(getrpcbynumber)
libc_hidden_def(getrpcbynumber)
+libc_hidden_proto(getrpcbyname)
struct rpcent *getrpcbyname(const char *name)
{
struct rpcent *rpc;
@@ -179,7 +180,6 @@ struct rpcent *getrpcbyname(const char *name)
endrpcent();
return NULL;
}
-libc_hidden_proto(getrpcbyname)
libc_hidden_def(getrpcbyname)
#ifdef __linux__
diff --git a/libc/inet/rpc/pmap_clnt.c b/libc/inet/rpc/pmap_clnt.c
index 8fe014186..03a1d3321 100644
--- a/libc/inet/rpc/pmap_clnt.c
+++ b/libc/inet/rpc/pmap_clnt.c
@@ -121,6 +121,7 @@ static const struct timeval tottimeout = {60, 0};
* Set a mapping between program,version and port.
* Calls the pmap service remotely to do the mapping.
*/
+libc_hidden_proto(pmap_set)
bool_t
pmap_set (u_long program, u_long version, int protocol, u_short port)
{
@@ -151,13 +152,13 @@ pmap_set (u_long program, u_long version, int protocol, u_short port)
/* (void)close(socket); CLNT_DESTROY closes it */
return rslt;
}
-libc_hidden_proto(pmap_set)
libc_hidden_def(pmap_set)
/*
* Remove the mapping between program,version and port.
* Calls the pmap service remotely to do the un-mapping.
*/
+libc_hidden_proto(pmap_unset)
bool_t
pmap_unset (u_long program, u_long version)
{
@@ -182,5 +183,4 @@ pmap_unset (u_long program, u_long version)
/* (void)close(socket); CLNT_DESTROY already closed it */
return rslt;
}
-libc_hidden_proto(pmap_unset)
libc_hidden_def(pmap_unset)
diff --git a/libc/inet/rpc/pmap_getport.c b/libc/inet/rpc/pmap_getport.c
index c841ee9ef..b5e82924d 100644
--- a/libc/inet/rpc/pmap_getport.c
+++ b/libc/inet/rpc/pmap_getport.c
@@ -56,6 +56,7 @@ static const struct timeval tottimeout =
* Calls the pmap service remotely to do the lookup.
* Returns 0 if no map exists.
*/
+libc_hidden_proto(pmap_getport)
u_short
pmap_getport (struct sockaddr_in *address, u_long program, u_long version, u_int protocol)
{
@@ -91,5 +92,4 @@ pmap_getport (struct sockaddr_in *address, u_long program, u_long version, u_int
address->sin_port = 0;
return port;
}
-libc_hidden_proto(pmap_getport)
libc_hidden_def(pmap_getport)
diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c
index 9271bffd7..1a6286ba3 100644
--- a/libc/inet/rpc/pmap_rmt.c
+++ b/libc/inet/rpc/pmap_rmt.c
@@ -88,6 +88,7 @@ static const struct timeval timeout = {3, 0};
* XDR remote call arguments
* written for XDR_ENCODE direction only
*/
+libc_hidden_proto(xdr_rmtcall_args)
bool_t
xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
{
@@ -113,7 +114,6 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
}
return FALSE;
}
-libc_hidden_proto(xdr_rmtcall_args)
libc_hidden_def(xdr_rmtcall_args)
/*
diff --git a/libc/inet/rpc/rexec.c b/libc/inet/rpc/rexec.c
index 305eaffff..bbbaac645 100644
--- a/libc/inet/rpc/rexec.c
+++ b/libc/inet/rpc/rexec.c
@@ -70,6 +70,7 @@ char ahostbuf[NI_MAXHOST] attribute_hidden;
extern int ruserpass(const char *host, const char **aname, const char **apass) attribute_hidden;
libc_hidden_proto(ruserpass)
+libc_hidden_proto(rexec_af)
int
rexec_af(char **ahost, int rport, const char *name, const char *pass, const char *cmd, int *fd2p, sa_family_t af)
{
@@ -195,7 +196,6 @@ bad:
freeaddrinfo(res0);
return (-1);
}
-libc_hidden_proto(rexec_af)
libc_hidden_def(rexec_af)
int
diff --git a/libc/inet/rpc/rpc_callmsg.c b/libc/inet/rpc/rpc_callmsg.c
index 5473ba743..b47a67c71 100644
--- a/libc/inet/rpc/rpc_callmsg.c
+++ b/libc/inet/rpc/rpc_callmsg.c
@@ -55,6 +55,7 @@ libc_hidden_proto(xdr_opaque_auth)
/*
* XDR a call message
*/
+libc_hidden_proto(xdr_callmsg)
bool_t
xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
{
@@ -211,5 +212,4 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
return xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_verf));
return FALSE;
}
-libc_hidden_proto(xdr_callmsg)
libc_hidden_def(xdr_callmsg)
diff --git a/libc/inet/rpc/rpc_dtablesize.c b/libc/inet/rpc/rpc_dtablesize.c
index 09e08b48a..11a7ad457 100644
--- a/libc/inet/rpc/rpc_dtablesize.c
+++ b/libc/inet/rpc/rpc_dtablesize.c
@@ -44,6 +44,7 @@ libc_hidden_proto(getdtablesize)
* Cache the result of getdtablesize(), so we don't have to do an
* expensive system call every time.
*/
+libc_hidden_proto(_rpc_dtablesize)
int
_rpc_dtablesize(void)
{
@@ -54,5 +55,4 @@ _rpc_dtablesize(void)
return size;
}
-libc_hidden_proto(_rpc_dtablesize)
libc_hidden_def(_rpc_dtablesize)
diff --git a/libc/inet/rpc/rpc_prot.c b/libc/inet/rpc/rpc_prot.c
index f6453950b..ebe6c3128 100644
--- a/libc/inet/rpc/rpc_prot.c
+++ b/libc/inet/rpc/rpc_prot.c
@@ -63,6 +63,7 @@ libc_hidden_proto(xdr_u_long)
* XDR an opaque authentication struct
* (see auth.h)
*/
+libc_hidden_proto(xdr_opaque_auth)
bool_t
xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
{
@@ -72,7 +73,6 @@ xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
&ap->oa_length, MAX_AUTH_BYTES);
return FALSE;
}
-libc_hidden_proto(xdr_opaque_auth)
libc_hidden_def(xdr_opaque_auth)
/*
@@ -89,6 +89,8 @@ xdr_des_block (XDR *xdrs, des_block *blkp)
/*
* XDR the MSG_ACCEPTED part of a reply message union
*/
+extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar);
+libc_hidden_proto(xdr_accepted_reply)
bool_t
xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar)
{
@@ -110,12 +112,13 @@ xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar)
}
return TRUE; /* TRUE => open ended set of problems */
}
-libc_hidden_proto(xdr_accepted_reply)
libc_hidden_def(xdr_accepted_reply)
/*
* XDR the MSG_DENIED part of a reply message union
*/
+extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr);
+libc_hidden_proto(xdr_rejected_reply)
bool_t
xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
{
@@ -134,7 +137,6 @@ xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
}
return FALSE;
}
-libc_hidden_proto(xdr_rejected_reply)
libc_hidden_def(xdr_rejected_reply)
static const struct xdr_discrim reply_dscrm[3] =
@@ -146,6 +148,7 @@ static const struct xdr_discrim reply_dscrm[3] =
/*
* XDR a reply message
*/
+libc_hidden_proto(xdr_replymsg)
bool_t
xdr_replymsg (XDR *xdrs, struct rpc_msg *rmsg)
{
@@ -157,7 +160,6 @@ xdr_replymsg (XDR *xdrs, struct rpc_msg *rmsg)
NULL_xdrproc_t);
return FALSE;
}
-libc_hidden_proto(xdr_replymsg)
libc_hidden_def(xdr_replymsg)
@@ -166,6 +168,7 @@ libc_hidden_def(xdr_replymsg)
* The fields include: rm_xid, rm_direction, rpcvers, prog, and vers.
* The rm_xid is not really static, but the user can easily munge on the fly.
*/
+libc_hidden_proto(xdr_callhdr)
bool_t
xdr_callhdr (XDR *xdrs, struct rpc_msg *cmsg)
{
@@ -181,7 +184,6 @@ xdr_callhdr (XDR *xdrs, struct rpc_msg *cmsg)
return xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers));
return FALSE;
}
-libc_hidden_proto(xdr_callhdr)
libc_hidden_def(xdr_callhdr)
/* ************************** Client utility routine ************* */
@@ -247,6 +249,7 @@ rejected (enum reject_stat rjct_stat,
/*
* given a reply message, fills in the error
*/
+libc_hidden_proto(_seterr_reply)
void
_seterr_reply (struct rpc_msg *msg,
struct rpc_err *error)
@@ -292,5 +295,4 @@ _seterr_reply (struct rpc_msg *msg,
break;
}
}
-libc_hidden_proto(_seterr_reply)
libc_hidden_def(_seterr_reply)
diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c
index 70ed62262..3b6ef7d93 100644
--- a/libc/inet/rpc/rpc_thread.c
+++ b/libc/inet/rpc/rpc_thread.c
@@ -10,6 +10,11 @@
#include <assert.h>
#include "rpc_private.h"
+libc_hidden_proto(__rpc_thread_svc_fdset)
+libc_hidden_proto(__rpc_thread_createerr)
+libc_hidden_proto(__rpc_thread_svc_pollfd)
+libc_hidden_proto(__rpc_thread_svc_max_pollfd)
+
#ifdef __UCLIBC_HAS_THREADS__
#include <bits/libc-tsd.h>
@@ -158,11 +163,7 @@ int * __rpc_thread_svc_max_pollfd (void)
#endif /* __UCLIBC_HAS_THREADS__ */
-libc_hidden_proto(__rpc_thread_svc_fdset)
libc_hidden_def(__rpc_thread_svc_fdset)
-libc_hidden_proto(__rpc_thread_createerr)
libc_hidden_def(__rpc_thread_createerr)
-libc_hidden_proto(__rpc_thread_svc_pollfd)
libc_hidden_def(__rpc_thread_svc_pollfd)
-libc_hidden_proto(__rpc_thread_svc_max_pollfd)
libc_hidden_def(__rpc_thread_svc_max_pollfd)
diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c
index 61008b9ec..97f1284b3 100644
--- a/libc/inet/rpc/ruserpass.c
+++ b/libc/inet/rpc/ruserpass.c
@@ -113,6 +113,8 @@ static const struct toktab {
+extern int ruserpass(const char *host, const char **aname, const char **apass);
+libc_hidden_proto(ruserpass)
int ruserpass(const char *host, const char **aname, const char **apass)
{
char *hdir, *buf, *tmp;
@@ -303,7 +305,6 @@ bad:
(void) fclose(cfile);
return (-1);
}
-libc_hidden_proto(ruserpass)
libc_hidden_def(ruserpass)
static int
diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c
index 76c046ad3..d3ae65b6a 100644
--- a/libc/inet/rpc/svc.c
+++ b/libc/inet/rpc/svc.c
@@ -86,6 +86,7 @@ static struct svc_callout *svc_head;
/* *************** SVCXPRT related stuff **************** */
/* Activate a transport handle. */
+libc_hidden_proto(xprt_register)
void
xprt_register (SVCXPRT *xprt)
{
@@ -126,10 +127,10 @@ xprt_register (SVCXPRT *xprt)
POLLRDNORM | POLLRDBAND);
}
}
-libc_hidden_proto(xprt_register)
libc_hidden_def(xprt_register)
/* De-activate a transport handle. */
+libc_hidden_proto(xprt_unregister)
void
xprt_unregister (SVCXPRT *xprt)
{
@@ -148,7 +149,6 @@ xprt_unregister (SVCXPRT *xprt)
svc_pollfd[i].fd = -1;
}
}
-libc_hidden_proto(xprt_unregister)
libc_hidden_def(xprt_unregister)
@@ -176,6 +176,7 @@ 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. */
+libc_hidden_proto(svc_register)
bool_t
svc_register (SVCXPRT * xprt, rpcprog_t prog, rpcvers_t vers,
void (*dispatch) (struct svc_req *, SVCXPRT *),
@@ -207,10 +208,10 @@ pmap_it:
return TRUE;
}
-libc_hidden_proto(svc_register)
libc_hidden_def(svc_register)
/* Remove a service program from the callout list. */
+libc_hidden_proto(svc_unregister)
void
svc_unregister (rpcprog_t prog, rpcvers_t vers)
{
@@ -230,12 +231,12 @@ svc_unregister (rpcprog_t prog, rpcvers_t vers)
/* now unregister the information with the local binder service */
pmap_unset (prog, vers);
}
-libc_hidden_proto(svc_unregister)
libc_hidden_def(svc_unregister)
/* ******************* REPLY GENERATION ROUTINES ************ */
/* Send a reply to an rpc request */
+libc_hidden_proto(svc_sendreply)
bool_t
svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
caddr_t xdr_location)
@@ -250,7 +251,6 @@ svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
rply.acpted_rply.ar_results.proc = xdr_results;
return SVC_REPLY (xprt, &rply);
}
-libc_hidden_proto(svc_sendreply)
libc_hidden_def(svc_sendreply)
/* No procedure error reply */
@@ -267,6 +267,7 @@ svcerr_noproc (register SVCXPRT *xprt)
}
/* Can't decode args error reply */
+libc_hidden_proto(svcerr_decode)
void
svcerr_decode (register SVCXPRT *xprt)
{
@@ -278,7 +279,6 @@ svcerr_decode (register SVCXPRT *xprt)
rply.acpted_rply.ar_stat = GARBAGE_ARGS;
SVC_REPLY (xprt, &rply);
}
-libc_hidden_proto(svcerr_decode)
libc_hidden_def(svcerr_decode)
/* Some system error */
@@ -295,6 +295,7 @@ svcerr_systemerr (register SVCXPRT *xprt)
}
/* Authentication error reply */
+libc_hidden_proto(svcerr_auth)
void
svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
{
@@ -306,7 +307,6 @@ svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
rply.rjcted_rply.rj_why = why;
SVC_REPLY (xprt, &rply);
}
-libc_hidden_proto(svcerr_auth)
libc_hidden_def(svcerr_auth)
/* Auth too weak error reply */
@@ -317,6 +317,7 @@ svcerr_weakauth (SVCXPRT *xprt)
}
/* Program unavailable error reply */
+libc_hidden_proto(svcerr_noprog)
void
svcerr_noprog (register SVCXPRT *xprt)
{
@@ -328,10 +329,10 @@ svcerr_noprog (register SVCXPRT *xprt)
rply.acpted_rply.ar_stat = PROG_UNAVAIL;
SVC_REPLY (xprt, &rply);
}
-libc_hidden_proto(svcerr_noprog)
libc_hidden_def(svcerr_noprog)
/* Program version mismatch error reply */
+libc_hidden_proto(svcerr_progvers)
void
svcerr_progvers (register SVCXPRT *xprt, rpcvers_t low_vers,
rpcvers_t high_vers)
@@ -346,7 +347,6 @@ svcerr_progvers (register SVCXPRT *xprt, rpcvers_t low_vers,
rply.acpted_rply.ar_vers.high = high_vers;
SVC_REPLY (xprt, &rply);
}
-libc_hidden_proto(svcerr_progvers)
libc_hidden_def(svcerr_progvers)
/* ******************* SERVER INPUT STUFF ******************* */
@@ -367,6 +367,7 @@ libc_hidden_def(svcerr_progvers)
* is mallocated in kernel land.
*/
+libc_hidden_proto(svc_getreq_common)
void
svc_getreq_common (const int fd)
{
@@ -456,9 +457,9 @@ svc_getreq_common (const int fd)
}
while (stat == XPRT_MOREREQS);
}
-libc_hidden_proto(svc_getreq_common)
libc_hidden_def(svc_getreq_common)
+libc_hidden_proto(svc_getreqset)
void
svc_getreqset (fd_set *readfds)
{
@@ -474,9 +475,9 @@ svc_getreqset (fd_set *readfds)
for (mask = *maskp++; (bit = ffs (mask)); mask ^= (1 << (bit - 1)))
svc_getreq_common (sock + bit - 1);
}
-libc_hidden_proto(svc_getreqset)
libc_hidden_def(svc_getreqset)
+libc_hidden_proto(svc_getreq)
void
svc_getreq (int rdfds)
{
@@ -486,9 +487,9 @@ svc_getreq (int rdfds)
readfds.fds_bits[0] = rdfds;
svc_getreqset (&readfds);
}
-libc_hidden_proto(svc_getreq)
libc_hidden_def(svc_getreq)
+libc_hidden_proto(svc_getreq_poll)
void
svc_getreq_poll (struct pollfd *pfdp, int pollretval)
{
@@ -511,7 +512,6 @@ svc_getreq_poll (struct pollfd *pfdp, int pollretval)
}
}
}
-libc_hidden_proto(svc_getreq_poll)
libc_hidden_def(svc_getreq_poll)
#ifdef __UCLIBC_HAS_THREADS__
diff --git a/libc/inet/rpc/svc_auth.c b/libc/inet/rpc/svc_auth.c
index 0e4f85436..1a5dcf0ca 100644
--- a/libc/inet/rpc/svc_auth.c
+++ b/libc/inet/rpc/svc_auth.c
@@ -101,6 +101,7 @@ svcauthsw[] =
* There is an assumption that any flavour less than AUTH_NULL is
* invalid.
*/
+libc_hidden_proto(_authenticate)
enum auth_stat
_authenticate (register struct svc_req *rqst, struct rpc_msg *msg)
{
@@ -115,7 +116,6 @@ _authenticate (register struct svc_req *rqst, struct rpc_msg *msg)
return AUTH_REJECTEDCRED;
}
-libc_hidden_proto(_authenticate)
libc_hidden_def(_authenticate)
static enum auth_stat
diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c
index 07c7661b5..fc01c2848 100644
--- a/libc/inet/rpc/svc_udp.c
+++ b/libc/inet/rpc/svc_udp.c
@@ -135,6 +135,7 @@ struct svcudp_data
* see (svc.h, xprt_register).
* The routines returns NULL if a problem occurred.
*/
+libc_hidden_proto(svcudp_bufcreate)
SVCXPRT *
svcudp_bufcreate (int sock, u_int sendsz, u_int recvsz)
{
@@ -224,16 +225,15 @@ svcudp_bufcreate (int sock, u_int sendsz, u_int recvsz)
xprt_register (xprt);
return xprt;
}
-libc_hidden_proto(svcudp_bufcreate)
libc_hidden_def(svcudp_bufcreate)
+libc_hidden_proto(svcudp_create)
SVCXPRT *
svcudp_create (int sock)
{
return svcudp_bufcreate (sock, UDPMSGSIZE, UDPMSGSIZE);
}
-libc_hidden_proto(svcudp_create)
libc_hidden_def(svcudp_create)
static enum xprt_stat
diff --git a/libc/inet/rpc/xdr.c b/libc/inet/rpc/xdr.c
index c83416343..9a7569eee 100644
--- a/libc/inet/rpc/xdr.c
+++ b/libc/inet/rpc/xdr.c
@@ -99,6 +99,7 @@ xdr_void (void)
* The definition of xdr_long() is kept for backward
* compatibility. Instead xdr_int() should be used.
*/
+libc_hidden_proto(xdr_long)
bool_t
xdr_long (XDR *xdrs, long *lp)
{
@@ -116,12 +117,12 @@ xdr_long (XDR *xdrs, long *lp)
return FALSE;
}
-libc_hidden_proto(xdr_long)
libc_hidden_def(xdr_long)
/*
* XDR short integers
*/
+libc_hidden_proto(xdr_short)
bool_t
xdr_short (XDR *xdrs, short *sp)
{
@@ -146,12 +147,12 @@ xdr_short (XDR *xdrs, short *sp)
}
return FALSE;
}
-libc_hidden_proto(xdr_short)
libc_hidden_def(xdr_short)
/*
* XDR integers
*/
+libc_hidden_proto(xdr_int)
bool_t
xdr_int (XDR *xdrs, int *ip)
{
@@ -183,7 +184,6 @@ xdr_int (XDR *xdrs, int *ip)
#error unexpected integer sizes in xdr_int()
#endif
}
-libc_hidden_proto(xdr_int)
libc_hidden_def(xdr_int)
/*
@@ -191,6 +191,7 @@ libc_hidden_def(xdr_int)
* The definition of xdr_u_long() is kept for backward
* compatibility. Instead xdr_u_int() should be used.
*/
+libc_hidden_proto(xdr_u_long)
bool_t
xdr_u_long (XDR *xdrs, u_long *ulp)
{
@@ -219,12 +220,12 @@ xdr_u_long (XDR *xdrs, u_long *ulp)
}
return FALSE;
}
-libc_hidden_proto(xdr_u_long)
libc_hidden_def(xdr_u_long)
/*
* XDR unsigned integers
*/
+libc_hidden_proto(xdr_u_int)
bool_t
xdr_u_int (XDR *xdrs, u_int *up)
{
@@ -255,13 +256,13 @@ xdr_u_int (XDR *xdrs, u_int *up)
#error unexpected integer sizes in xdr_u_int()
#endif
}
-libc_hidden_proto(xdr_u_int)
libc_hidden_def(xdr_u_int)
/*
* XDR hyper integers
* same as xdr_u_hyper - open coded to save a proc call!
*/
+libc_hidden_proto(xdr_hyper)
bool_t
xdr_hyper (XDR *xdrs, quad_t *llp)
{
@@ -289,7 +290,6 @@ xdr_hyper (XDR *xdrs, quad_t *llp)
return FALSE;
}
-libc_hidden_proto(xdr_hyper)
libc_hidden_def(xdr_hyper)
@@ -297,6 +297,7 @@ libc_hidden_def(xdr_hyper)
* XDR hyper integers
* same as xdr_hyper - open coded to save a proc call!
*/
+libc_hidden_proto(xdr_u_hyper)
bool_t
xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
{
@@ -324,7 +325,6 @@ xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
return FALSE;
}
-libc_hidden_proto(xdr_u_hyper)
libc_hidden_def(xdr_u_hyper)
bool_t
@@ -405,6 +405,7 @@ xdr_u_char (XDR *xdrs, u_char *cp)
/*
* XDR booleans
*/
+libc_hidden_proto(xdr_bool)
bool_t
xdr_bool (XDR *xdrs, bool_t *bp)
{
@@ -429,12 +430,12 @@ xdr_bool (XDR *xdrs, bool_t *bp)
}
return FALSE;
}
-libc_hidden_proto(xdr_bool)
libc_hidden_def(xdr_bool)
/*
* XDR enumerations
*/
+libc_hidden_proto(xdr_enum)
bool_t
xdr_enum (XDR *xdrs, enum_t *ep)
{
@@ -481,7 +482,6 @@ xdr_enum (XDR *xdrs, enum_t *ep)
return FALSE;
}
}
-libc_hidden_proto(xdr_enum)
libc_hidden_def(xdr_enum)
/*
@@ -489,6 +489,7 @@ libc_hidden_def(xdr_enum)
* Allows the specification of a fixed size sequence of opaque bytes.
* cp points to the opaque object and cnt gives the byte length.
*/
+libc_hidden_proto(xdr_opaque)
bool_t
xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
{
@@ -533,7 +534,6 @@ xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
}
return FALSE;
}
-libc_hidden_proto(xdr_opaque)
libc_hidden_def(xdr_opaque)
/*
@@ -541,6 +541,7 @@ libc_hidden_def(xdr_opaque)
* *cpp is a pointer to the bytes, *sizep is the count.
* If *cpp is NULL maxsize bytes are allocated
*/
+libc_hidden_proto(xdr_bytes)
bool_t
xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize)
{
@@ -599,7 +600,6 @@ xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize)
}
return FALSE;
}
-libc_hidden_proto(xdr_bytes)
libc_hidden_def(xdr_bytes)
/*
@@ -625,6 +625,7 @@ xdr_netobj (xdrs, np)
* routine may be called.
* If there is no specific or default routine an error is returned.
*/
+libc_hidden_proto(xdr_union)
bool_t
xdr_union (XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choices, xdrproc_t dfault)
{
@@ -655,7 +656,6 @@ xdr_union (XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choice
return ((dfault == NULL_xdrproc_t) ? FALSE :
(*dfault) (xdrs, unp, LASTUNSIGNED));
}
-libc_hidden_proto(xdr_union)
libc_hidden_def(xdr_union)
/*
@@ -672,6 +672,7 @@ libc_hidden_def(xdr_union)
* storage is allocated. The last parameter is the max allowed length
* of the string as specified by a protocol.
*/
+libc_hidden_proto(xdr_string)
bool_t
xdr_string (XDR *xdrs, char **cpp, u_int maxsize)
{
@@ -744,7 +745,6 @@ xdr_string (XDR *xdrs, char **cpp, u_int maxsize)
}
return FALSE;
}
-libc_hidden_proto(xdr_string)
libc_hidden_def(xdr_string)
/*
diff --git a/libc/inet/rpc/xdr_array.c b/libc/inet/rpc/xdr_array.c
index cebf44586..45faccfae 100644
--- a/libc/inet/rpc/xdr_array.c
+++ b/libc/inet/rpc/xdr_array.c
@@ -69,6 +69,7 @@ libc_hidden_proto(xdr_u_int)
* elsize is the size (in bytes) of each element, and elproc is the
* xdr procedure to call to handle each element of the array.
*/
+libc_hidden_proto(xdr_array)
bool_t
xdr_array (XDR *xdrs, caddr_t *addrp, u_int *sizep, u_int maxsize, u_int elsize, xdrproc_t elproc)
{
@@ -144,7 +145,6 @@ xdr_array (XDR *xdrs, caddr_t *addrp, u_int *sizep, u_int maxsize, u_int elsize,
}
return stat;
}
-libc_hidden_proto(xdr_array)
libc_hidden_def(xdr_array)
/*
diff --git a/libc/inet/rpc/xdr_mem.c b/libc/inet/rpc/xdr_mem.c
index c2af1393c..e4f5fc237 100644
--- a/libc/inet/rpc/xdr_mem.c
+++ b/libc/inet/rpc/xdr_mem.c
@@ -77,6 +77,7 @@ static const struct xdr_ops xdrmem_ops =
* The procedure xdrmem_create initializes a stream descriptor for a
* memory buffer.
*/
+libc_hidden_proto(xdrmem_create)
void
xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
{
@@ -87,7 +88,6 @@ xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
xdrs->x_private = xdrs->x_base = addr;
xdrs->x_handy = size;
}
-libc_hidden_proto(xdrmem_create)
libc_hidden_def(xdrmem_create)
/*
diff --git a/libc/inet/rpc/xdr_rec.c b/libc/inet/rpc/xdr_rec.c
index 429503cdc..76c9ba39c 100644
--- a/libc/inet/rpc/xdr_rec.c
+++ b/libc/inet/rpc/xdr_rec.c
@@ -147,6 +147,7 @@ static bool_t get_input_bytes (RECSTREAM *, caddr_t, int) internal_function;
* write respectively. They are like the system
* calls expect that they take an opaque handle rather than an fd.
*/
+libc_hidden_proto(xdrrec_create)
void
xdrrec_create (XDR *xdrs, u_int sendsize,
u_int recvsize, caddr_t tcp_handle,
@@ -209,7 +210,6 @@ xdrrec_create (XDR *xdrs, u_int sendsize,
rstrm->fbtbc = 0;
rstrm->last_frag = TRUE;
}
-libc_hidden_proto(xdrrec_create)
libc_hidden_def(xdrrec_create)
@@ -482,6 +482,7 @@ xdrrec_putint32 (XDR *xdrs, const int32_t *ip)
* Before reading (deserializing from the stream, one should always call
* this procedure to guarantee proper record alignment.
*/
+libc_hidden_proto(xdrrec_skiprecord)
bool_t
xdrrec_skiprecord (XDR *xdrs)
{
@@ -498,7 +499,6 @@ xdrrec_skiprecord (XDR *xdrs)
rstrm->last_frag = FALSE;
return TRUE;
}
-libc_hidden_proto(xdrrec_skiprecord)
libc_hidden_def(xdrrec_skiprecord)
/*
@@ -506,6 +506,7 @@ libc_hidden_def(xdrrec_skiprecord)
* Returns TRUE iff there is no more input in the buffer
* after consuming the rest of the current record.
*/
+libc_hidden_proto(xdrrec_eof)
bool_t
xdrrec_eof (XDR *xdrs)
{
@@ -523,7 +524,6 @@ xdrrec_eof (XDR *xdrs)
return TRUE;
return FALSE;
}
-libc_hidden_proto(xdrrec_eof)
libc_hidden_def(xdrrec_eof)
/*
@@ -532,6 +532,7 @@ libc_hidden_def(xdrrec_eof)
* (output) tcp stream. (This lets the package support batched or
* pipelined procedure calls.) TRUE => immediate flush to tcp connection.
*/
+libc_hidden_proto(xdrrec_endofrecord)
bool_t
xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
{
@@ -551,7 +552,6 @@ xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
rstrm->out_finger += BYTES_PER_XDR_UNIT;
return TRUE;
}
-libc_hidden_proto(xdrrec_endofrecord)
libc_hidden_def(xdrrec_endofrecord)
/*
diff --git a/libc/inet/rpc/xdr_reference.c b/libc/inet/rpc/xdr_reference.c
index 443ce1c8d..43a62e598 100644
--- a/libc/inet/rpc/xdr_reference.c
+++ b/libc/inet/rpc/xdr_reference.c
@@ -71,6 +71,7 @@ libc_hidden_proto(fputs)
* size is the size of the referneced structure.
* proc is the routine to handle the referenced structure.
*/
+libc_hidden_proto(xdr_reference)
bool_t
xdr_reference (XDR *xdrs, caddr_t *pp, u_int size, xdrproc_t proc)
{
@@ -111,7 +112,6 @@ xdr_reference (XDR *xdrs, caddr_t *pp, u_int size, xdrproc_t proc)
}
return stat;
}
-libc_hidden_proto(xdr_reference)
libc_hidden_def(xdr_reference)
/*