From 6f7dc709ed7e403af224b0fbb91e9619629eb2ec Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 14 Jan 2006 19:45:02 +0000 Subject: make DODEBUG=y happy, update sysdeps/common/* copyright --- libc/inet/addr.c | 14 ++++++++------ libc/inet/getaddrinfo.c | 4 ++-- libc/inet/getnetent.c | 6 +++--- libc/inet/getproto.c | 10 +++++----- libc/inet/getservice.c | 12 ++++++------ libc/inet/herror.c | 2 +- libc/inet/if_index.c | 6 +++--- libc/inet/inet_net.c | 3 ++- libc/inet/ntop.c | 4 ++-- libc/inet/resolv.c | 2 +- libc/inet/rpc/auth_none.c | 2 +- libc/inet/rpc/auth_unix.c | 4 ++-- libc/inet/rpc/authunix_prot.c | 2 +- libc/inet/rpc/bindresvport.c | 2 +- libc/inet/rpc/clnt_perror.c | 8 ++++---- libc/inet/rpc/clnt_tcp.c | 2 +- libc/inet/rpc/clnt_udp.c | 4 ++-- libc/inet/rpc/clnt_unix.c | 2 +- libc/inet/rpc/getrpcent.c | 10 +++++----- libc/inet/rpc/pmap_clnt.c | 4 ++-- libc/inet/rpc/pmap_getport.c | 2 +- libc/inet/rpc/pmap_rmt.c | 2 +- libc/inet/rpc/rexec.c | 2 +- libc/inet/rpc/rpc_callmsg.c | 2 +- libc/inet/rpc/rpc_dtablesize.c | 2 +- libc/inet/rpc/rpc_prot.c | 14 ++++++++------ libc/inet/rpc/rpc_thread.c | 9 +++++---- libc/inet/rpc/ruserpass.c | 3 ++- libc/inet/rpc/svc.c | 26 +++++++++++++------------- libc/inet/rpc/svc_auth.c | 2 +- libc/inet/rpc/svc_udp.c | 4 ++-- libc/inet/rpc/xdr.c | 26 +++++++++++++------------- libc/inet/rpc/xdr_array.c | 2 +- libc/inet/rpc/xdr_mem.c | 2 +- libc/inet/rpc/xdr_rec.c | 8 ++++---- libc/inet/rpc/xdr_reference.c | 2 +- libc/inet/socketcalls.c | 10 +++++----- 37 files changed, 114 insertions(+), 107 deletions(-) (limited to 'libc/inet') diff --git a/libc/inet/addr.c b/libc/inet/addr.c index 7c73e2a88..538d9fb8e 100644 --- a/libc/inet/addr.c +++ b/libc/inet/addr.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #ifdef L_inet_aton @@ -42,6 +43,7 @@ * leading 0 -> octal * all else -> decimal */ +libc_hidden_proto(inet_aton) int inet_aton(const char *cp, struct in_addr *addrptr) { in_addr_t addr; @@ -88,7 +90,6 @@ int inet_aton(const char *cp, struct in_addr *addrptr) return 1; } -libc_hidden_proto(inet_aton) libc_hidden_def(inet_aton) #endif @@ -96,6 +97,7 @@ libc_hidden_def(inet_aton) #include libc_hidden_proto(inet_aton) +libc_hidden_proto(inet_addr) in_addr_t inet_addr(const char *cp) { struct in_addr a; @@ -105,7 +107,6 @@ in_addr_t inet_addr(const char *cp) else return a.s_addr; } -libc_hidden_proto(inet_addr) libc_hidden_def(inet_addr) #endif @@ -113,6 +114,8 @@ libc_hidden_def(inet_addr) #define INET_NTOA_MAX_LEN 16 /* max 12 digits + 3 '.'s + 1 nul */ +extern char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN]); +libc_hidden_proto(inet_ntoa_r) char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN]) { in_addr_t addr = ntohl(in.s_addr); @@ -132,15 +135,14 @@ char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN]) return p+1; } -libc_hidden_proto(inet_ntoa_r) libc_hidden_def(inet_ntoa_r) +libc_hidden_proto(inet_ntoa) char *inet_ntoa(struct in_addr in) { static char buf[INET_NTOA_MAX_LEN]; return(inet_ntoa_r(in, buf)); } -libc_hidden_proto(inet_ntoa) libc_hidden_def(inet_ntoa) #endif @@ -153,6 +155,7 @@ libc_hidden_proto(memmove) * Formulate an Internet address from network + host. Used in * building addresses stored in the ifnet structure. */ +libc_hidden_proto(inet_makeaddr) struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host) { in_addr_t addr; @@ -168,7 +171,6 @@ struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host) addr = htonl(addr); return (*(struct in_addr *)&addr); } -libc_hidden_proto(inet_makeaddr) libc_hidden_def(inet_makeaddr) #endif @@ -197,6 +199,7 @@ in_addr_t inet_lnaof(struct in_addr in) * Return the network number from an internet * address; handles class a/b/c network #'s. */ +libc_hidden_proto(inet_netof) in_addr_t inet_netof(struct in_addr in) { @@ -209,6 +212,5 @@ inet_netof(struct in_addr in) else return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT); } -libc_hidden_proto(inet_netof) libc_hidden_def(inet_netof) #endif diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c index 225bc75c6..48cb3a19d 100644 --- a/libc/inet/getaddrinfo.c +++ b/libc/inet/getaddrinfo.c @@ -785,6 +785,7 @@ static struct gaih gaih[] = { PF_UNSPEC, NULL } }; +libc_hidden_proto(freeaddrinfo) void freeaddrinfo (struct addrinfo *ai) { @@ -797,9 +798,9 @@ freeaddrinfo (struct addrinfo *ai) free (p); } } -libc_hidden_proto(freeaddrinfo) libc_hidden_def(freeaddrinfo) +libc_hidden_proto(getaddrinfo) int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) @@ -899,5 +900,4 @@ getaddrinfo (const char *name, const char *service, return last_i ? -(last_i & GAIH_EAI) : EAI_NONAME; } -libc_hidden_proto(getaddrinfo) libc_hidden_def(getaddrinfo) diff --git a/libc/inet/getnetent.c b/libc/inet/getnetent.c index 4413811a3..d3fdb988a 100644 --- a/libc/inet/getnetent.c +++ b/libc/inet/getnetent.c @@ -47,6 +47,7 @@ static char *net_aliases[MAXALIASES]; int _net_stayopen attribute_hidden; +libc_hidden_proto(setnetent) void setnetent(int f) { LOCK; @@ -58,9 +59,9 @@ void setnetent(int f) UNLOCK; return; } -libc_hidden_proto(setnetent) libc_hidden_def(setnetent) +libc_hidden_proto(endnetent) void endnetent(void) { LOCK; @@ -71,7 +72,6 @@ void endnetent(void) _net_stayopen = 0; UNLOCK; } -libc_hidden_proto(endnetent) libc_hidden_def(endnetent) static char * any(register char *cp, char *match) @@ -87,6 +87,7 @@ static char * any(register char *cp, char *match) return ((char *)0); } +libc_hidden_proto(getnetent) struct netent *getnetent(void) { char *p; @@ -146,5 +147,4 @@ again: UNLOCK; return (&net); } -libc_hidden_proto(getnetent) libc_hidden_def(getnetent) diff --git a/libc/inet/getproto.c b/libc/inet/getproto.c index e5a11d2c7..0871d17c6 100644 --- a/libc/inet/getproto.c +++ b/libc/inet/getproto.c @@ -97,6 +97,7 @@ static void __initbuf(void) } } +libc_hidden_proto(setprotoent) void setprotoent(int f) { LOCK; @@ -107,9 +108,9 @@ void setprotoent(int f) proto_stayopen |= f; UNLOCK; } -libc_hidden_proto(setprotoent) libc_hidden_def(setprotoent) +libc_hidden_proto(endprotoent) void endprotoent(void) { LOCK; @@ -120,9 +121,9 @@ void endprotoent(void) proto_stayopen = 0; UNLOCK; } -libc_hidden_proto(endprotoent) libc_hidden_def(endprotoent) +libc_hidden_proto(getprotoent_r) int getprotoent_r(struct protoent *result_buf, char *buf, size_t buflen, struct protoent **result) @@ -199,7 +200,6 @@ again: UNLOCK; return 0; } -libc_hidden_proto(getprotoent_r) libc_hidden_def(getprotoent_r) struct protoent * getprotoent(void) @@ -212,6 +212,7 @@ struct protoent * getprotoent(void) } +libc_hidden_proto(getprotobyname_r) int getprotobyname_r(const char *name, struct protoent *result_buf, char *buf, size_t buflen, @@ -235,7 +236,6 @@ found: UNLOCK; return *result?0:ret; } -libc_hidden_proto(getprotobyname_r) libc_hidden_def(getprotobyname_r) @@ -249,6 +249,7 @@ struct protoent * getprotobyname(const char *name) } +libc_hidden_proto(getprotobynumber_r) int getprotobynumber_r (int proto_num, struct protoent *result_buf, char *buf, size_t buflen, @@ -266,7 +267,6 @@ int getprotobynumber_r (int proto_num, UNLOCK; return *result?0:ret; } -libc_hidden_proto(getprotobynumber_r) libc_hidden_def(getprotobynumber_r) struct protoent * getprotobynumber(int proto_num) diff --git a/libc/inet/getservice.c b/libc/inet/getservice.c index 254f638f2..9a2df8c12 100644 --- a/libc/inet/getservice.c +++ b/libc/inet/getservice.c @@ -100,6 +100,7 @@ static void __initbuf(void) } } +libc_hidden_proto(setservent) void setservent(int f) { LOCK; @@ -110,9 +111,9 @@ void setservent(int f) serv_stayopen |= f; UNLOCK; } -libc_hidden_proto(setservent) libc_hidden_def(setservent) +libc_hidden_proto(endservent) void endservent(void) { LOCK; @@ -123,9 +124,9 @@ void endservent(void) serv_stayopen = 0; UNLOCK; } -libc_hidden_proto(endservent) libc_hidden_def(endservent) +libc_hidden_proto(getservent_r) int getservent_r(struct servent * result_buf, char * buf, size_t buflen, struct servent ** result) @@ -205,7 +206,6 @@ again: UNLOCK; return 0; } -libc_hidden_proto(getservent_r) libc_hidden_def(getservent_r) struct servent * getservent(void) @@ -217,6 +217,7 @@ struct servent * getservent(void) return result; } +libc_hidden_proto(getservbyname_r) int getservbyname_r(const char *name, const char *proto, struct servent * result_buf, char * buf, size_t buflen, struct servent ** result) @@ -242,7 +243,6 @@ gotname: UNLOCK; return *result?0:ret; } -libc_hidden_proto(getservbyname_r) libc_hidden_def(getservbyname_r) struct servent *getservbyname(const char *name, const char *proto) @@ -255,6 +255,7 @@ struct servent *getservbyname(const char *name, const char *proto) } +libc_hidden_proto(getservbyport_r) int getservbyport_r(int port, const char *proto, struct servent * result_buf, char * buf, size_t buflen, struct servent ** result) @@ -274,9 +275,9 @@ int getservbyport_r(int port, const char *proto, UNLOCK; return *result?0:ret; } -libc_hidden_proto(getservbyport_r) libc_hidden_def(getservbyport_r) +libc_hidden_proto(getservbyport) struct servent * getservbyport(int port, const char *proto) { struct servent *result; @@ -285,5 +286,4 @@ struct servent * getservbyport(int port, const char *proto) getservbyport_r(port, proto, &serv, servbuf, SBUFSIZE, &result); return result; } -libc_hidden_proto(getservbyport) libc_hidden_def(getservbyport) diff --git a/libc/inet/herror.c b/libc/inet/herror.c index 6efbc2f93..cfcf0e23a 100644 --- a/libc/inet/herror.c +++ b/libc/inet/herror.c @@ -38,6 +38,7 @@ static const int h_nerr = { sizeof(h_errlist)/sizeof(h_errlist[0]) }; /* * herror -- print the error indicated by the h_errno value. */ +libc_hidden_proto(herror) void herror(const char *s) { static const char colon_space[] = ": "; @@ -54,7 +55,6 @@ void herror(const char *s) } fprintf(stderr, "%s%s%s\n", s, c, p); } -libc_hidden_proto(herror) libc_hidden_def(herror) diff --git a/libc/inet/if_index.c b/libc/inet/if_index.c index fd0b901a1..2a687bb89 100644 --- a/libc/inet/if_index.c +++ b/libc/inet/if_index.c @@ -44,6 +44,7 @@ libc_hidden_proto(close) extern int __opensock(void) attribute_hidden; +libc_hidden_proto(if_nametoindex) unsigned int if_nametoindex(const char* ifname) { @@ -71,9 +72,9 @@ if_nametoindex(const char* ifname) return ifr.ifr_ifindex; #endif } -libc_hidden_proto(if_nametoindex) libc_hidden_def(if_nametoindex) +libc_hidden_proto(if_freenameindex) void if_freenameindex (struct if_nameindex *ifn) { @@ -85,9 +86,9 @@ if_freenameindex (struct if_nameindex *ifn) } free (ifn); } -libc_hidden_proto(if_freenameindex) libc_hidden_def(if_freenameindex) +libc_hidden_proto(if_nameindex) #if !__ASSUME_NETLINK_SUPPORT struct if_nameindex * if_nameindex (void) @@ -283,7 +284,6 @@ if_nameindex (void) return idx; } #endif -libc_hidden_proto(if_nameindex) libc_hidden_def(if_nameindex) #if 0 diff --git a/libc/inet/inet_net.c b/libc/inet/inet_net.c index 29226c01a..59cf36022 100644 --- a/libc/inet/inet_net.c +++ b/libc/inet/inet_net.c @@ -36,12 +36,14 @@ #include #include #include +#include /* * Internet network address interpretation routine. * The library routines call this routine to interpret * network numbers. */ +libc_hidden_proto(inet_network) in_addr_t inet_network(const char *cp) { @@ -98,5 +100,4 @@ again: } return (val); } -libc_hidden_proto(inet_network) libc_hidden_def(inet_network) diff --git a/libc/inet/ntop.c b/libc/inet/ntop.c index 16b089f3f..88ff6a150 100644 --- a/libc/inet/ntop.c +++ b/libc/inet/ntop.c @@ -356,6 +356,7 @@ inet_pton6(const char *src, u_char *dst) * author: * Paul Vixie, 1996. */ +libc_hidden_proto(inet_ntop) const char * inet_ntop(int af, const void *src, char *dst, socklen_t size) { @@ -372,7 +373,6 @@ inet_ntop(int af, const void *src, char *dst, socklen_t size) } /* NOTREACHED */ } -libc_hidden_proto(inet_ntop) libc_hidden_def(inet_ntop) @@ -387,6 +387,7 @@ libc_hidden_def(inet_ntop) * author: * Paul Vixie, 1996. */ +libc_hidden_proto(inet_pton) int inet_pton(int af, const char *src, void *dst) { @@ -403,5 +404,4 @@ inet_pton(int af, const char *src, void *dst) } /* NOTREACHED */ } -libc_hidden_proto(inet_pton) libc_hidden_def(inet_pton) diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 1e0392059..8be057aeb 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1740,6 +1740,7 @@ int attribute_hidden __get_hosts_byaddr_r(const char * addr, int len, int type, # define min(x,y) (((x) > (y)) ? (y) : (x)) #endif /* min */ +libc_hidden_proto(getnameinfo) int getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, unsigned int flags) @@ -1926,7 +1927,6 @@ int getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host, errno = serrno; return 0; } -libc_hidden_proto(getnameinfo) libc_hidden_def(getnameinfo) #endif 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 #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 @@ -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) /* diff --git a/libc/inet/socketcalls.c b/libc/inet/socketcalls.c index e003d700c..880eab3d8 100644 --- a/libc/inet/socketcalls.c +++ b/libc/inet/socketcalls.c @@ -55,6 +55,7 @@ libc_hidden_def(accept) #endif #ifdef L_bind +libc_hidden_proto(bind) #ifdef __NR_bind _syscall3(int, bind, int, sockfd, const struct sockaddr *, myaddr, socklen_t, addrlen); #elif defined(__NR_socketcall) @@ -68,7 +69,6 @@ int bind(int sockfd, const struct sockaddr *myaddr, socklen_t addrlen) return __socketcall(SYS_BIND, args); } #endif -libc_hidden_proto(bind) libc_hidden_def(bind) #endif @@ -109,6 +109,7 @@ int getpeername(int sockfd, struct sockaddr *addr, socklen_t * paddrlen) #endif #ifdef L_getsockname +libc_hidden_proto(getsockname) #ifdef __NR_getsockname _syscall3(int, getsockname, int, sockfd, struct sockaddr *, addr, socklen_t *,paddrlen); #elif defined(__NR_socketcall) @@ -122,7 +123,6 @@ int getsockname(int sockfd, struct sockaddr *addr, socklen_t * paddrlen) return __socketcall(SYS_GETSOCKNAME, args); } #endif -libc_hidden_proto(getsockname) libc_hidden_def(getsockname) #endif @@ -146,6 +146,7 @@ int getsockopt(int fd, int level, int optname, __ptr_t optval, #endif #ifdef L_listen +libc_hidden_proto(listen) #ifdef __NR_listen _syscall2(int, listen, int, sockfd, int, backlog); #elif defined(__NR_socketcall) @@ -158,7 +159,6 @@ int listen(int sockfd, int backlog) return __socketcall(SYS_LISTEN, args); } #endif -libc_hidden_proto(listen) libc_hidden_def(listen) #endif @@ -311,6 +311,7 @@ libc_hidden_def(sendto) #endif #ifdef L_setsockopt +libc_hidden_proto(setsockopt) #ifdef __NR_setsockopt _syscall5(int, setsockopt, int, fd, int, level, int, optname, const void *, optval, socklen_t, optlen); #elif defined(__NR_socketcall) @@ -328,7 +329,6 @@ int setsockopt(int fd, int level, int optname, const void *optval, return (__socketcall(SYS_SETSOCKOPT, args)); } #endif -libc_hidden_proto(setsockopt) libc_hidden_def(setsockopt) #endif @@ -349,6 +349,7 @@ int shutdown(int sockfd, int how) #endif #ifdef L_socket +libc_hidden_proto(socket) #ifdef __NR_socket _syscall3(int, socket, int, family, int, type, int, protocol); #elif defined(__NR_socketcall) @@ -362,7 +363,6 @@ int socket(int family, int type, int protocol) return __socketcall(SYS_SOCKET, args); } #endif -libc_hidden_proto(socket) libc_hidden_def(socket) #endif -- cgit v1.2.3