Browse Source

make DODEBUG=y happy, update sysdeps/common/* copyright

Peter S. Mazinger 18 years ago
parent
commit
6f7dc709ed
100 changed files with 254 additions and 247 deletions
  1. 8 6
      libc/inet/addr.c
  2. 2 2
      libc/inet/getaddrinfo.c
  3. 3 3
      libc/inet/getnetent.c
  4. 5 5
      libc/inet/getproto.c
  5. 6 6
      libc/inet/getservice.c
  6. 1 1
      libc/inet/herror.c
  7. 3 3
      libc/inet/if_index.c
  8. 2 1
      libc/inet/inet_net.c
  9. 2 2
      libc/inet/ntop.c
  10. 1 1
      libc/inet/resolv.c
  11. 1 1
      libc/inet/rpc/auth_none.c
  12. 2 2
      libc/inet/rpc/auth_unix.c
  13. 1 1
      libc/inet/rpc/authunix_prot.c
  14. 1 1
      libc/inet/rpc/bindresvport.c
  15. 4 4
      libc/inet/rpc/clnt_perror.c
  16. 1 1
      libc/inet/rpc/clnt_tcp.c
  17. 2 2
      libc/inet/rpc/clnt_udp.c
  18. 1 1
      libc/inet/rpc/clnt_unix.c
  19. 5 5
      libc/inet/rpc/getrpcent.c
  20. 2 2
      libc/inet/rpc/pmap_clnt.c
  21. 1 1
      libc/inet/rpc/pmap_getport.c
  22. 1 1
      libc/inet/rpc/pmap_rmt.c
  23. 1 1
      libc/inet/rpc/rexec.c
  24. 1 1
      libc/inet/rpc/rpc_callmsg.c
  25. 1 1
      libc/inet/rpc/rpc_dtablesize.c
  26. 8 6
      libc/inet/rpc/rpc_prot.c
  27. 5 4
      libc/inet/rpc/rpc_thread.c
  28. 2 1
      libc/inet/rpc/ruserpass.c
  29. 13 13
      libc/inet/rpc/svc.c
  30. 1 1
      libc/inet/rpc/svc_auth.c
  31. 2 2
      libc/inet/rpc/svc_udp.c
  32. 13 13
      libc/inet/rpc/xdr.c
  33. 1 1
      libc/inet/rpc/xdr_array.c
  34. 1 1
      libc/inet/rpc/xdr_mem.c
  35. 4 4
      libc/inet/rpc/xdr_rec.c
  36. 1 1
      libc/inet/rpc/xdr_reference.c
  37. 5 5
      libc/inet/socketcalls.c
  38. 4 5
      libc/misc/ctype/ctype.c
  39. 2 1
      libc/misc/dirent/dirfd.c
  40. 4 2
      libc/misc/internals/__uClibc_main.c
  41. 11 6
      libc/misc/locale/locale.c
  42. 4 3
      libc/misc/mntent/mntent.c
  43. 4 3
      libc/misc/search/hsearch_r.c
  44. 4 3
      libc/misc/search/tsearch.c
  45. 2 1
      libc/misc/statfs/fstatfs64.c
  46. 2 1
      libc/misc/statfs/statfs64.c
  47. 15 23
      libc/misc/time/time.c
  48. 11 10
      libc/misc/wchar/wchar.c
  49. 5 5
      libc/misc/wctype/wctype.c
  50. 8 7
      libc/pwd_grp/pwd_grp.c
  51. 1 1
      libc/pwd_grp/pwd_grp_internal.c
  52. 1 1
      libc/signal/sigaddset.c
  53. 1 1
      libc/signal/sigblock.c
  54. 1 1
      libc/signal/sigdelset.c
  55. 1 1
      libc/signal/sigempty.c
  56. 1 2
      libc/signal/sigfillset.c
  57. 1 1
      libc/signal/signal.c
  58. 3 2
      libc/signal/sigpause.c
  59. 1 1
      libc/signal/sigsetmask.c
  60. 1 1
      libc/signal/sigwait.c
  61. 2 2
      libc/stdio/__fsetlocking.c
  62. 2 2
      libc/stdio/asprintf.c
  63. 1 1
      libc/stdio/fclose.c
  64. 1 1
      libc/stdio/fflush.c
  65. 3 4
      libc/stdio/fgetc.c
  66. 1 1
      libc/stdio/fgets.c
  67. 1 1
      libc/stdio/fgetwc.c
  68. 1 1
      libc/stdio/fileno.c
  69. 1 1
      libc/stdio/fopen.c
  70. 1 1
      libc/stdio/fopencookie.c
  71. 1 1
      libc/stdio/fprintf.c
  72. 3 4
      libc/stdio/fputc.c
  73. 1 1
      libc/stdio/fputs.c
  74. 1 1
      libc/stdio/fputws.c
  75. 1 1
      libc/stdio/fread.c
  76. 1 4
      libc/stdio/fseeko.c
  77. 1 4
      libc/stdio/ftello.c
  78. 1 1
      libc/stdio/fwrite.c
  79. 2 1
      libc/stdio/getdelim.c
  80. 2 1
      libc/stdio/getline.c
  81. 1 1
      libc/stdio/open_memstream.c
  82. 1 1
      libc/stdio/perror.c
  83. 1 1
      libc/stdio/printf.c
  84. 1 1
      libc/stdio/remove.c
  85. 1 1
      libc/stdio/rewind.c
  86. 3 3
      libc/stdio/scanf.c
  87. 1 1
      libc/stdio/setvbuf.c
  88. 1 1
      libc/stdio/snprintf.c
  89. 1 1
      libc/stdio/sprintf.c
  90. 1 1
      libc/stdio/ungetc.c
  91. 1 1
      libc/stdio/ungetwc.c
  92. 1 1
      libc/stdio/vasprintf.c
  93. 1 1
      libc/stdio/vdprintf.c
  94. 1 1
      libc/stdio/vfprintf.c
  95. 2 3
      libc/stdio/vsnprintf.c
  96. 2 1
      libc/stdio/vswprintf.c
  97. 1 1
      libc/stdlib/erand48_r.c
  98. 1 1
      libc/stdlib/jrand48_r.c
  99. 1 1
      libc/stdlib/lrand48_r.c
  100. 1 1
      libc/stdlib/malloc-standard/mallinfo.c

+ 8 - 6
libc/inet/addr.c

@@ -23,6 +23,7 @@
 #include <string.h>
 #include <ctype.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #include <bits/uClibc_uintmaxtostr.h>
 
 #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 <arpa/inet.h>
 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

+ 2 - 2
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)

+ 3 - 3
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)

+ 5 - 5
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)

+ 6 - 6
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)

+ 1 - 1
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)
 
 

+ 3 - 3
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

+ 2 - 1
libc/inet/inet_net.c

@@ -36,12 +36,14 @@
 #include <features.h>
 #include <ctype.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 
 /*
  * 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)

+ 2 - 2
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)

+ 1 - 1
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
 

+ 1 - 1
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 */

+ 2 - 2
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)
 
 /*

+ 1 - 1
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)

+ 1 - 1
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)

+ 4 - 4
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

+ 1 - 1
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

+ 2 - 2
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

+ 1 - 1
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

+ 5 - 5
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__

+ 2 - 2
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)

+ 1 - 1
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)

+ 1 - 1
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)
 
 /*

+ 1 - 1
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

+ 1 - 1
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)

+ 1 - 1
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)

+ 8 - 6
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)

+ 5 - 4
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)

+ 2 - 1
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

+ 13 - 13
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__

+ 1 - 1
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

+ 2 - 2
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

+ 13 - 13
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)
 
 /*

+ 1 - 1
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)
 
 /*

+ 1 - 1
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)
 
 /*

+ 4 - 4
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)
 
 /*

+ 1 - 1
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)
 
 /*

+ 5 - 5
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
 

+ 4 - 5
libc/misc/ctype/ctype.c

@@ -270,6 +270,7 @@ IS_FUNC_BODY(xdigit);
 #ifdef L_tolower
 
 #undef tolower
+libc_hidden_proto(tolower)
 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
 
 int tolower(int c)
@@ -288,7 +289,6 @@ int tolower(int c)
 }
 
 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
-libc_hidden_proto(tolower)
 libc_hidden_def(tolower)
 
 #endif
@@ -296,6 +296,7 @@ libc_hidden_def(tolower)
 #ifdef L_tolower_l
 
 #undef tolower_l
+libc_hidden_proto(tolower_l)
 int tolower_l(int c, __locale_t l)
 {
 #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
@@ -303,7 +304,6 @@ int tolower_l(int c, __locale_t l)
 #endif
 	return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_tolower[c] : c;
 }
-libc_hidden_proto(tolower_l)
 libc_hidden_def(tolower_l)
 
 #endif
@@ -311,6 +311,7 @@ libc_hidden_def(tolower_l)
 #ifdef L_toupper
 
 #undef toupper
+libc_hidden_proto(toupper)
 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
 
 int toupper(int c)
@@ -329,7 +330,6 @@ int toupper(int c)
 }
 
 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
-libc_hidden_proto(toupper)
 libc_hidden_def(toupper)
 
 #endif
@@ -337,6 +337,7 @@ libc_hidden_def(toupper)
 #ifdef L_toupper_l
 
 #undef toupper_l
+libc_hidden_proto(toupper_l)
 int toupper_l(int c, __locale_t l)
 {
 #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
@@ -344,8 +345,6 @@ int toupper_l(int c, __locale_t l)
 #endif
 	return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_toupper[c] : c;
 }
-
-libc_hidden_proto(toupper_l)
 libc_hidden_def(toupper_l)
 
 #endif

+ 2 - 1
libc/misc/dirent/dirfd.c

@@ -8,6 +8,8 @@
 #include <errno.h>
 #include "dirstream.h"
 
+libc_hidden_proto(dirfd)
+
 int dirfd(DIR * dir)
 {
 	if (!dir || dir->dd_fd == -1) {
@@ -17,5 +19,4 @@ int dirfd(DIR * dir)
 
 	return dir->dd_fd;
 }
-libc_hidden_proto(dirfd)
 libc_hidden_def(dirfd)

+ 4 - 2
libc/misc/internals/__uClibc_main.c

@@ -93,8 +93,9 @@ char **__environ = 0;
 weak_alias(__environ, environ)
 
 /* TODO: don't export __pagesize; we cant now because libpthread uses it */
-size_t __pagesize = 0;
+extern size_t __pagesize;
 libc_hidden_proto(__pagesize)
+size_t __pagesize = 0;
 libc_hidden_def(__pagesize)
 
 #ifndef O_NOFOLLOW
@@ -152,6 +153,8 @@ static int __check_suid(void)
  * __uClibc_main.
  */
 
+extern void __uClibc_init(void);
+libc_hidden_proto(__uClibc_init)
 void __uClibc_init(void)
 {
     static int been_there_done_that = 0;
@@ -199,7 +202,6 @@ void __uClibc_init(void)
 	_stdio_init();
 
 }
-libc_hidden_proto(__uClibc_init)
 libc_hidden_def(__uClibc_init)
 
 #ifdef __UCLIBC_CTOR_DTOR__

+ 11 - 6
libc/misc/locale/locale.c

@@ -1012,6 +1012,7 @@ static const unsigned char nl_data[C_LC_ALL + 1 + 90 + 320] = {
 	   ']', '\x00',    '^',    '[',    'n',    'N',    ']', '\x00', 
 };
 
+libc_hidden_proto(nl_langinfo)
 char *nl_langinfo(nl_item item)
 {
 	unsigned int c;
@@ -1025,24 +1026,26 @@ char *nl_langinfo(nl_item item)
 	}
 	return (char *) cat_start;	/* Conveniently, this is the empty string. */
 }
-libc_hidden_proto(nl_langinfo)
 libc_hidden_def(nl_langinfo)
 
 #else  /* __LOCALE_C_ONLY */
 
 #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
 
+libc_hidden_proto(nl_langinfo)
+
 libc_hidden_proto(nl_langinfo_l)
 
 char *nl_langinfo(nl_item item)
 {
 	return nl_langinfo_l(item, __UCLIBC_CURLOCALE);
 }
-libc_hidden_proto(nl_langinfo)
 libc_hidden_def(nl_langinfo)
 
 #else  /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
 
+libc_hidden_proto(__XL_NPP(nl_langinfo))
+
 static const char empty[] = "";
 
 char *__XL_NPP(nl_langinfo)(nl_item item   __LOCALE_PARAM )
@@ -1057,7 +1060,6 @@ char *__XL_NPP(nl_langinfo)(nl_item item   __LOCALE_PARAM )
 
 	return (char *) empty;
 }
-libc_hidden_proto(__XL_NPP(nl_langinfo))
 libc_hidden_def(__XL_NPP(nl_langinfo))
 
 #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
@@ -1068,6 +1070,8 @@ libc_hidden_def(__XL_NPP(nl_langinfo))
 /**********************************************************************/
 #ifdef L_newlocale
 
+libc_hidden_proto(newlocale)
+
 #ifdef __UCLIBC_MJN3_ONLY__
 #warning TODO: Move posix and utf8 strings.
 #endif
@@ -1305,13 +1309,14 @@ __locale_t newlocale(int category_mask, const char *locale, __locale_t base)
 
 	return base;
 }
-libc_hidden_proto(newlocale)
 libc_hidden_def(newlocale)
 
 #endif
 /**********************************************************************/
 #ifdef L_duplocale
 
+libc_hidden_proto(duplocale)
+
 #ifdef __UCLIBC_MJN3_ONLY__
 #warning REMINDER: When we allocate ctype tables, remember to dup them.
 #endif
@@ -1339,7 +1344,6 @@ __locale_t duplocale(__locale_t dataset)
 	}
 	return r;
 }
-libc_hidden_proto(duplocale)
 libc_hidden_def(duplocale)
 
 #endif
@@ -1363,6 +1367,8 @@ void freelocale(__locale_t dataset)
 /**********************************************************************/
 #ifdef L_uselocale
 
+libc_hidden_proto(uselocale)
+
 __locale_t uselocale(__locale_t dataset)
 {
 	__locale_t old;
@@ -1386,7 +1392,6 @@ __locale_t uselocale(__locale_t dataset)
 	}
 	return old;
 }
-libc_hidden_proto(uselocale)
 libc_hidden_def(uselocale)
 
 #endif

+ 4 - 3
libc/misc/mntent/mntent.c

@@ -9,6 +9,10 @@
 #include <string.h>
 #include <mntent.h>
 
+libc_hidden_proto(getmntent_r)
+libc_hidden_proto(setmntent)
+libc_hidden_proto(endmntent)
+
 libc_hidden_proto(strstr)
 libc_hidden_proto(strtok_r)
 libc_hidden_proto(atoi)
@@ -74,7 +78,6 @@ struct mntent *getmntent_r (FILE *filep,
 
 	return mnt;
 }
-libc_hidden_proto(getmntent_r)
 libc_hidden_def(getmntent_r)
 
 struct mntent *getmntent(FILE * filep)
@@ -116,7 +119,6 @@ FILE *setmntent(const char *name, const char *mode)
 {
 	return fopen(name, mode);
 }
-libc_hidden_proto(setmntent)
 libc_hidden_def(setmntent)
 
 int endmntent(FILE * filep)
@@ -125,5 +127,4 @@ int endmntent(FILE * filep)
 		fclose(filep);
 	return 1;
 }
-libc_hidden_proto(endmntent)
 libc_hidden_def(endmntent)

+ 4 - 3
libc/misc/search/hsearch_r.c

@@ -27,6 +27,10 @@
 
 #include <search.h>
 
+libc_hidden_proto(hcreate_r)
+libc_hidden_proto(hdestroy_r)
+libc_hidden_proto(hsearch_r)
+
 /* [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986
    [Knuth]            The Art of Computer Programming, part 3 (6.4)  */
 
@@ -96,7 +100,6 @@ int hcreate_r (size_t nel, struct hsearch_data *htab)
   /* everything went alright */
   return 1;
 }
-libc_hidden_proto(hcreate_r)
 libc_hidden_def(hcreate_r)
 #endif
 
@@ -119,7 +122,6 @@ void hdestroy_r (struct hsearch_data *htab)
   /* the sign for an existing table is an value != NULL in htable */
   htab->table = NULL;
 }
-libc_hidden_proto(hdestroy_r)
 libc_hidden_def(hdestroy_r)
 #endif
 
@@ -230,6 +232,5 @@ int hsearch_r (ENTRY item, ACTION action, ENTRY **retval,
   *retval = NULL;
   return 0;
 }
-libc_hidden_proto(hsearch_r)
 libc_hidden_def(hsearch_r)
 #endif

+ 4 - 3
libc/misc/search/tsearch.c

@@ -32,6 +32,10 @@ Cambridge, MA 02139, USA.  */
 #include <search.h>
 #include <stdlib.h>
 
+libc_hidden_proto(tsearch)
+libc_hidden_proto(tfind)
+libc_hidden_proto(tdestroy)
+
 /* This routine is not very bad. It makes many assumptions about
  * the compiler. It assumpts that the first field in node must be
  * the "key" field, which points to the datum. It is a very trick
@@ -77,7 +81,6 @@ void *tsearch(__const void *key, void **vrootp, __compar_fn_t compar)
     }
     return (q);
 }
-libc_hidden_proto(tsearch)
 libc_hidden_def(tsearch)
 #endif
 
@@ -100,7 +103,6 @@ void *tfind(__const void *key, void * __const *vrootp, __compar_fn_t compar)
     }
     return NULL;
 }
-libc_hidden_proto(tfind)
 libc_hidden_def(tfind)
 #endif
 
@@ -215,7 +217,6 @@ void tdestroy (void *vroot, __free_fn_t freefct)
 	tdestroy_recurse (root, freefct);
     }
 }
-libc_hidden_proto(tdestroy)
 libc_hidden_def(tdestroy)
 #endif
 

+ 2 - 1
libc/misc/statfs/fstatfs64.c

@@ -38,6 +38,8 @@
 #include <sys/statvfs.h>
 #include <stddef.h>
 
+libc_hidden_proto(fstatfs64)
+
 libc_hidden_proto(memcpy)
 libc_hidden_proto(fstatfs)
 
@@ -62,5 +64,4 @@ int fstatfs64 (int fd, struct statfs64 *buf)
 
     return 0;
 }
-libc_hidden_proto(fstatfs64)
 libc_hidden_def(fstatfs64)

+ 2 - 1
libc/misc/statfs/statfs64.c

@@ -36,6 +36,8 @@
 #include <stddef.h>
 #include <sys/statfs.h>
 
+libc_hidden_proto(statfs64)
+
 libc_hidden_proto(memcpy)
 libc_hidden_proto(statfs)
 
@@ -60,5 +62,4 @@ int statfs64 (const char *file, struct statfs64 *buf)
 
     return 0;
 }
-libc_hidden_proto(statfs64)
 libc_hidden_def(statfs64)

+ 15 - 23
libc/misc/time/time.c

@@ -153,6 +153,12 @@
 #include <xlocale.h>
 #endif
 
+libc_hidden_proto(asctime)
+libc_hidden_proto(asctime_r)
+libc_hidden_proto(ctime)
+libc_hidden_proto(localtime)
+libc_hidden_proto(localtime_r)
+
 libc_hidden_proto(memset)
 libc_hidden_proto(memcpy)
 libc_hidden_proto(strcmp)
@@ -245,15 +251,12 @@ extern time_t _time_mktime_tzi(struct tm *timeptr, int store_on_success,
 /**********************************************************************/
 #ifdef L_asctime
 
-libc_hidden_proto(asctime_r)
-
 static char __time_str[26];
 
 char *asctime(const struct tm *ptm)
 {
 	return asctime_r(ptm, __time_str);
 }
-libc_hidden_proto(asctime)
 libc_hidden_def(asctime)
 
 #endif
@@ -396,7 +399,6 @@ char *asctime_r(register const struct tm *__restrict ptm,
 
 	return buffer - 8;
 }
-libc_hidden_proto(asctime_r)
 libc_hidden_def(asctime_r)
 
 #endif
@@ -471,23 +473,16 @@ clock_t clock(void)
 /**********************************************************************/
 #ifdef L_ctime
 
-libc_hidden_proto(asctime)
-libc_hidden_proto(localtime)
-
 char *ctime(const time_t *clock)
 {
 	/* ANSI/ISO/SUSv3 say that ctime is equivalent to the following. */
 	return asctime(localtime(clock));
 }
-libc_hidden_proto(ctime)
 libc_hidden_def(ctime)
 #endif
 /**********************************************************************/
 #ifdef L_ctime_r
 
-libc_hidden_proto(asctime_r)
-libc_hidden_proto(localtime_r)
-
 char *ctime_r(const time_t *clock, char *buf)
 {
 	struct tm xtm;
@@ -560,8 +555,6 @@ struct tm *gmtime_r(const time_t *__restrict timer,
 /**********************************************************************/
 #ifdef L_localtime
 
-libc_hidden_proto(localtime_r)
-
 struct tm *localtime(const time_t *timer)
 {
 	register struct tm *ptm = &__time_tm;
@@ -572,7 +565,6 @@ struct tm *localtime(const time_t *timer)
 
 	return ptm;
 }
-libc_hidden_proto(localtime)
 libc_hidden_def(localtime)
 
 #endif
@@ -592,7 +584,6 @@ struct tm *localtime_r(register const time_t *__restrict timer,
 
 	return result;
 }
-libc_hidden_proto(localtime_r)
 libc_hidden_def(localtime_r)
 
 #endif
@@ -785,6 +776,8 @@ time_t timegm(struct tm *timeptr)
 
 #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
 
+libc_hidden_proto(strftime)
+
 libc_hidden_proto(strftime_l)
 
 size_t strftime(char *__restrict s, size_t maxsize,
@@ -793,7 +786,6 @@ size_t strftime(char *__restrict s, size_t maxsize,
 {
 	return strftime_l(s, maxsize, format, timeptr, __UCLIBC_CURLOCALE);
 }
-libc_hidden_proto(strftime)
 libc_hidden_def(strftime)
 
 #else  /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
@@ -994,6 +986,7 @@ static int load_field(int k, const struct tm *__restrict timeptr)
 #warning TODO: Check multibyte format string validity.
 #endif
 
+libc_hidden_proto(__XL_NPP(strftime))
 size_t __XL_NPP(strftime)(char *__restrict s, size_t maxsize,
 					  const char *__restrict format,
 					  const struct tm *__restrict timeptr   __LOCALE_PARAM )
@@ -1276,7 +1269,6 @@ size_t __XL_NPP(strftime)(char *__restrict s, size_t maxsize,
 	}
 	goto LOOP;
 }
-libc_hidden_proto(__XL_NPP(strftime))
 libc_hidden_def(__XL_NPP(strftime))
 
 #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
@@ -1295,6 +1287,8 @@ libc_hidden_def(__XL_NPP(strftime))
 
 #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
 
+libc_hidden_proto(strptime)
+
 libc_hidden_proto(strptime_l)
 
 char *strptime(const char *__restrict buf, const char *__restrict format,
@@ -1302,7 +1296,6 @@ char *strptime(const char *__restrict buf, const char *__restrict format,
 {
 	return strptime_l(buf, format, tm, __UCLIBC_CURLOCALE);
 }
-libc_hidden_proto(strptime)
 libc_hidden_def(strptime)
 
 #else  /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
@@ -1449,8 +1442,7 @@ static const unsigned char spec[] = {
 
 #define MAX_PUSH 4
 
-libc_hidden_proto(localtime_r)
-
+libc_hidden_proto(__XL_NPP(strptime))
 char *__XL_NPP(strptime)(const char *__restrict buf, const char *__restrict format,
 					 struct tm *__restrict tm   __LOCALE_PARAM)
 {
@@ -1660,7 +1652,6 @@ char *__XL_NPP(strptime)(const char *__restrict buf, const char *__restrict form
 	}
 	return NULL;
 }
-libc_hidden_proto(__XL_NPP(strptime))
 libc_hidden_def(__XL_NPP(strptime))
 
 #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
@@ -2356,6 +2347,8 @@ time_t attribute_hidden _time_mktime_tzi(struct tm *timeptr, int store_on_succes
 
 #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
 
+libc_hidden_proto(wcsftime)
+
 libc_hidden_proto(wcsftime_l)
 
 size_t wcsftime(wchar_t *__restrict s, size_t maxsize,
@@ -2364,11 +2357,11 @@ size_t wcsftime(wchar_t *__restrict s, size_t maxsize,
 {
 	return wcsftime_l(s, maxsize, format, timeptr, __UCLIBC_CURLOCALE);
 }
-libc_hidden_proto(wcsftime)
 libc_hidden_def(wcsftime)
 
 #else  /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
 
+libc_hidden_proto(__XL_NPP(wcsftime))
 size_t __XL_NPP(wcsftime)(wchar_t *__restrict s, size_t maxsize,
 					  const wchar_t *__restrict format,
 					  const struct tm *__restrict timeptr   __LOCALE_PARAM )
@@ -2376,7 +2369,6 @@ size_t __XL_NPP(wcsftime)(wchar_t *__restrict s, size_t maxsize,
 #warning wcsftime always fails
 	return 0;					/* always fail */
 }
-libc_hidden_proto(__XL_NPP(wcsftime))
 libc_hidden_def(__XL_NPP(wcsftime))
 
 #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */

+ 11 - 10
libc/misc/wchar/wchar.c

@@ -178,6 +178,7 @@ extern size_t _wchar_wcsntoutf8s(char *__restrict s, size_t n,
 
 libc_hidden_proto(mbrtowc)
 
+libc_hidden_proto(btowc)
 wint_t btowc(int c)
 {
 #ifdef __CTYPE_HAS_8_BIT_LOCALES
@@ -208,7 +209,6 @@ wint_t btowc(int c)
 
 #endif /*  __CTYPE_HAS_8_BIT_LOCALES */
 }
-libc_hidden_proto(btowc)
 libc_hidden_def(btowc)
 
 #endif
@@ -248,11 +248,11 @@ int wctob(wint_t c)
 /**********************************************************************/
 #ifdef L_mbsinit
 
+libc_hidden_proto(mbsinit)
 int mbsinit(const mbstate_t *ps)
 {
 	return !ps || !ps->__mask;
 }
-libc_hidden_proto(mbsinit)
 libc_hidden_def(mbsinit)
 
 #endif
@@ -261,13 +261,13 @@ libc_hidden_def(mbsinit)
 
 libc_hidden_proto(mbrtowc)
 
+libc_hidden_proto(mbrlen)
 size_t mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
 {
 	static mbstate_t mbstate;	/* Rely on bss 0-init. */
 
 	return mbrtowc(NULL, s, n, (ps != NULL) ? ps : &mbstate);
 }
-libc_hidden_proto(mbrlen)
 libc_hidden_def(mbrlen)
 
 #endif
@@ -276,6 +276,7 @@ libc_hidden_def(mbrlen)
 
 libc_hidden_proto(mbsnrtowcs)
 
+libc_hidden_proto(mbrtowc)
 size_t mbrtowc(wchar_t *__restrict pwc, const char *__restrict s,
 			   size_t n, mbstate_t *__restrict ps)
 {
@@ -326,7 +327,6 @@ size_t mbrtowc(wchar_t *__restrict pwc, const char *__restrict s,
 	}
 	return (size_t) r;
 }
-libc_hidden_proto(mbrtowc)
 libc_hidden_def(mbrtowc)
 
 #endif
@@ -338,6 +338,7 @@ libc_hidden_proto(wcsnrtombs)
 /* Note: We completely ignore ps in all currently supported conversions. */
 /* TODO: Check for valid state anyway? */
 
+libc_hidden_proto(wcrtomb)
 size_t wcrtomb(register char *__restrict s, wchar_t wc,
 			   mbstate_t *__restrict ps)
 {
@@ -360,7 +361,6 @@ size_t wcrtomb(register char *__restrict s, wchar_t wc,
 	r = wcsnrtombs(s, &pwc, 1, MB_LEN_MAX, ps);
 	return (r != 0) ? r : 1;
 }
-libc_hidden_proto(wcrtomb)
 libc_hidden_def(wcrtomb)
 
 #endif
@@ -369,6 +369,7 @@ libc_hidden_def(wcrtomb)
 
 libc_hidden_proto(mbsnrtowcs)
 
+libc_hidden_proto(mbsrtowcs)
 size_t mbsrtowcs(wchar_t *__restrict dst, const char **__restrict src,
 				 size_t len, mbstate_t *__restrict ps)
 {
@@ -377,7 +378,6 @@ size_t mbsrtowcs(wchar_t *__restrict dst, const char **__restrict src,
 	return mbsnrtowcs(dst, src, SIZE_MAX, len,
 						((ps != NULL) ? ps : &mbstate));
 }
-libc_hidden_proto(mbsrtowcs)
 libc_hidden_def(mbsrtowcs)
 
 #endif
@@ -390,12 +390,12 @@ libc_hidden_def(mbsrtowcs)
 
 libc_hidden_proto(wcsnrtombs)
 
+libc_hidden_proto(wcsrtombs)
 size_t wcsrtombs(char *__restrict dst, const wchar_t **__restrict src,
 				 size_t len, mbstate_t *__restrict ps)
 {
 	return wcsnrtombs(dst, src, SIZE_MAX, len, ps);
 }
-libc_hidden_proto(wcsrtombs)
 libc_hidden_def(wcsrtombs)
 
 #endif
@@ -694,6 +694,7 @@ size_t attribute_hidden _wchar_wcsntoutf8s(char *__restrict s, size_t n,
 
 /* WARNING: We treat len as SIZE_MAX when dst is NULL! */
 
+libc_hidden_proto(mbsnrtowcs)
 size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
 					size_t NMC, size_t len, mbstate_t *__restrict ps)
 {
@@ -792,7 +793,6 @@ size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
 	}
 	return len - count;
 }
-libc_hidden_proto(mbsnrtowcs)
 libc_hidden_def(mbsnrtowcs)
 
 #endif
@@ -804,6 +804,7 @@ libc_hidden_def(mbsnrtowcs)
 /* Note: We completely ignore ps in all currently supported conversions.
  * TODO: Check for valid state anyway? */
 
+libc_hidden_proto(wcsnrtombs)
 size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
 					size_t NWC, size_t len, mbstate_t *__restrict ps)
 {
@@ -912,13 +913,14 @@ size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
 	}
 	return len - count;
 }
-libc_hidden_proto(wcsnrtombs)
 libc_hidden_def(wcsnrtombs)
 
 #endif
 /**********************************************************************/
 #ifdef L_wcswidth
 
+libc_hidden_proto(wcswidth)
+
 #ifdef __UCLIBC_MJN3_ONLY__
 #warning REMINDER: If we start doing translit, wcwidth and wcswidth will need updating.
 #warning TODO: Update wcwidth to match latest by Kuhn.
@@ -1155,7 +1157,6 @@ int wcswidth(const wchar_t *pwcs, size_t n)
 
 #endif /*  __UCLIBC_HAS_LOCALE__ */
 
-libc_hidden_proto(wcswidth)
 libc_hidden_def(wcswidth)
 
 #endif

+ 5 - 5
libc/misc/wctype/wctype.c

@@ -185,21 +185,21 @@ enum {
 #ifdef __UCLIBC_DO_XLOCALE
 
 #define ISW_FUNC_BODY(NAME) \
+libc_hidden_proto(__PASTE3(isw,NAME,_l)); \
 int __PASTE3(isw,NAME,_l) (wint_t wc, __locale_t l) \
 { \
 	return iswctype_l(wc, __PASTE2(_CTYPE_is,NAME), l); \
 } \
-libc_hidden_proto(__PASTE3(isw,NAME,_l)); \
 libc_hidden_def(__PASTE3(isw,NAME,_l))
 
 #else  /* __UCLIBC_DO_XLOCALE */
 
 #define ISW_FUNC_BODY(NAME) \
+libc_hidden_proto(__PASTE2(isw,NAME)); \
 int __PASTE2(isw,NAME) (wint_t wc) \
 { \
 	return iswctype(wc, __PASTE2(_CTYPE_is,NAME)); \
 } \
-libc_hidden_proto(__PASTE2(isw,NAME)); \
 libc_hidden_def(__PASTE2(isw,NAME))
 
 #endif /* __UCLIBC_DO_XLOCALE */
@@ -500,6 +500,7 @@ libc_hidden_def(towupper)
 static const unsigned char typestring[] = __CTYPE_TYPESTRING;
 /*  extern const unsigned char typestring[]; */
 
+libc_hidden_proto(wctype)
 wctype_t wctype(const char *property)
 {
 	const unsigned char *p;
@@ -518,7 +519,6 @@ wctype_t wctype(const char *property)
 	/* TODO - Add locale-specific classifications. */
 	return 0;
 }
-libc_hidden_proto(wctype)
 libc_hidden_def(wctype)
 
 #endif
@@ -531,11 +531,11 @@ libc_hidden_def(wctype)
 
 libc_hidden_proto(wctype)
 
+libc_hidden_proto(wctype_l)
 wctype_t wctype_l (const char *property, __locale_t locale)
 {
 	return wctype(property);
 }
-libc_hidden_proto(wctype_l)
 libc_hidden_def(wctype_l)
 
 #endif
@@ -907,6 +907,7 @@ libc_hidden_def(towctrans)
 
 static const char transstring[] = __CTYPE_TRANSTRING;
 
+libc_hidden_proto(wctrans)
 wctrans_t wctrans(const char *property)
 {
 	const unsigned char *p;
@@ -925,7 +926,6 @@ wctrans_t wctrans(const char *property)
 	/* TODO - Add locale-specific translations. */
 	return 0;
 }
-libc_hidden_proto(wctrans)
 libc_hidden_def(wctrans)
 
 #endif

+ 8 - 7
libc/pwd_grp/pwd_grp.c

@@ -87,6 +87,7 @@ extern int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
 /**********************************************************************/
 #ifdef L_fgetpwent_r
 
+libc_hidden_proto(fgetpwent_r)
 int fgetpwent_r(FILE *__restrict stream, struct passwd *__restrict resultbuf,
 				char *__restrict buffer, size_t buflen,
 				struct passwd **__restrict result)
@@ -101,13 +102,13 @@ int fgetpwent_r(FILE *__restrict stream, struct passwd *__restrict resultbuf,
 
 	return rv;
 }
-libc_hidden_proto(fgetpwent_r)
 libc_hidden_def(fgetpwent_r)
 
 #endif
 /**********************************************************************/
 #ifdef L_fgetgrent_r
 
+libc_hidden_proto(fgetgrent_r)
 int fgetgrent_r(FILE *__restrict stream, struct group *__restrict resultbuf,
 				char *__restrict buffer, size_t buflen,
 				struct group **__restrict result)
@@ -122,13 +123,13 @@ int fgetgrent_r(FILE *__restrict stream, struct group *__restrict resultbuf,
 
 	return rv;
 }
-libc_hidden_proto(fgetgrent_r)
 libc_hidden_def(fgetgrent_r)
 
 #endif
 /**********************************************************************/
 #ifdef L_fgetspent_r
 
+libc_hidden_proto(fgetspent_r)
 int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
 				char *__restrict buffer, size_t buflen,
 				struct spwd **__restrict result)
@@ -143,7 +144,6 @@ int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
 
 	return rv;
 }
-libc_hidden_proto(fgetspent_r)
 libc_hidden_def(fgetspent_r)
 
 #endif
@@ -202,6 +202,7 @@ struct spwd *fgetspent(FILE *stream)
 /**********************************************************************/
 #ifdef L_sgetspent_r
 
+libc_hidden_proto(sgetspent_r)
 int sgetspent_r(const char *string, struct spwd *result_buf,
 				char *buffer, size_t buflen, struct spwd **result)
 {
@@ -229,7 +230,6 @@ int sgetspent_r(const char *string, struct spwd *result_buf,
  DONE:
 	return rv;
 }
-libc_hidden_proto(sgetspent_r)
 libc_hidden_def(sgetspent_r)
 
 #endif
@@ -479,6 +479,7 @@ void endpwent(void)
 }
 
 
+libc_hidden_proto(getpwent_r)
 int getpwent_r(struct passwd *__restrict resultbuf, 
 			   char *__restrict buffer, size_t buflen,
 			   struct passwd **__restrict result)
@@ -507,7 +508,7 @@ int getpwent_r(struct passwd *__restrict resultbuf,
 
 	return rv;
 }
-libc_hidden_proto(getpwent_r)
+libc_hidden_def(getpwent_r)
 
 #endif
 /**********************************************************************/
@@ -534,6 +535,7 @@ void endgrent(void)
 	UNLOCK;
 }
 
+libc_hidden_proto(getgrent_r)
 int getgrent_r(struct group *__restrict resultbuf,
 			   char *__restrict buffer, size_t buflen,
 			   struct group **__restrict result)
@@ -562,7 +564,6 @@ int getgrent_r(struct group *__restrict resultbuf,
 
 	return rv;
 }
-libc_hidden_proto(getgrent_r)
 libc_hidden_def(getgrent_r)
 
 #endif
@@ -590,6 +591,7 @@ void endspent(void)
 	UNLOCK;
 }
 
+libc_hidden_proto(getspent_r)
 int getspent_r(struct spwd *resultbuf, char *buffer, 
 			   size_t buflen, struct spwd **result)
 {
@@ -617,7 +619,6 @@ int getspent_r(struct spwd *resultbuf, char *buffer,
 
 	return rv;
 }
-libc_hidden_proto(getspent_r)
 libc_hidden_def(getspent_r)
 
 #endif

+ 1 - 1
libc/pwd_grp/pwd_grp_internal.c

@@ -55,6 +55,7 @@
 /**********************************************************************/
 #ifdef GETXXKEY_R_FUNC
 
+libc_hidden_proto(GETXXKEY_R_FUNC)
 int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,
 					GETXXKEY_R_ENTTYPE *__restrict resultbuf,
 					char *__restrict buffer, size_t buflen,
@@ -89,7 +90,6 @@ int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,
 
 	return rv;
 }
-libc_hidden_proto(GETXXKEY_R_FUNC)
 libc_hidden_def(GETXXKEY_R_FUNC)
 
 #endif

+ 1 - 1
libc/signal/sigaddset.c

@@ -19,6 +19,7 @@
 #include "sigsetops.h"
 
 /* Add SIGNO to SET.  */
+libc_hidden_proto(sigaddset)
 int
 sigaddset (set, signo)
      sigset_t *set;
@@ -32,5 +33,4 @@ sigaddset (set, signo)
 
   return __sigaddset (set, signo);
 }
-libc_hidden_proto(sigaddset)
 libc_hidden_def(sigaddset)

+ 1 - 1
libc/signal/sigblock.c

@@ -24,6 +24,7 @@ libc_hidden_proto(sigprocmask)
 #include "sigset-cvt-mask.h"
 
 /* Block signals in MASK, returning the old mask.  */
+libc_hidden_proto(sigblock)
 int sigblock (int mask)
 {
   sigset_t set, oset;
@@ -36,5 +37,4 @@ int sigblock (int mask)
 
   return sigset_get_old_mask (&oset);
 }
-libc_hidden_proto(sigblock)
 libc_hidden_def(sigblock)

+ 1 - 1
libc/signal/sigdelset.c

@@ -19,6 +19,7 @@
 #include "sigsetops.h"
 
 /* Add SIGNO to SET.  */
+libc_hidden_proto(sigdelset)
 int sigdelset (sigset_t *set, int signo)
 {
   if (set == NULL || signo <= 0 || signo >= NSIG)
@@ -29,5 +30,4 @@ int sigdelset (sigset_t *set, int signo)
 
   return __sigdelset (set, signo);
 }
-libc_hidden_proto(sigdelset)
 libc_hidden_def(sigdelset)

+ 1 - 1
libc/signal/sigempty.c

@@ -23,6 +23,7 @@
 libc_hidden_proto(memset)
 
 /* Clear all signals from SET.  */
+libc_hidden_proto(sigemptyset)
 int
 sigemptyset (set)
      sigset_t *set;
@@ -37,5 +38,4 @@ sigemptyset (set)
 
   return 0;
 }
-libc_hidden_proto(sigemptyset)
 libc_hidden_def(sigemptyset)

+ 1 - 2
libc/signal/sigfillset.c

@@ -21,9 +21,9 @@
 #include <string.h>
 
 libc_hidden_proto(memset)
-libc_hidden_proto(__sigdelset)
 
 /* Set all signals in SET.  */
+libc_hidden_proto(sigfillset)
 int
 sigfillset (sigset_t *set)
 {
@@ -46,5 +46,4 @@ sigfillset (sigset_t *set)
 
   return 0;
 }
-libc_hidden_proto(sigfillset)
 libc_hidden_def(sigfillset)

+ 1 - 1
libc/signal/signal.c

@@ -28,7 +28,7 @@ sigset_t _sigintr attribute_hidden;		/* Set by siginterrupt.  */
 
 /* Set the handler for the signal SIG to HANDLER,
    returning the old handler, or SIG_ERR on error.  */
-__sighandler_t
+attribute_hidden __sighandler_t
 __bsd_signal (int sig, __sighandler_t handler)
 {
   struct sigaction act, oact;

+ 3 - 2
libc/signal/sigpause.c

@@ -17,6 +17,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#define _BSD_SOURCE
 #include <errno.h>
 #include <signal.h>
 #include <stddef.h>		/* For NULL.  */
@@ -29,6 +30,7 @@ libc_hidden_proto(sigsuspend)
 
 /* Set the mask of blocked signals to MASK,
    wait for a signal to arrive, and then restore the mask.  */
+libc_hidden_proto(__sigpause)
 int __sigpause (int sig_or_mask, int is_sig)
 {
   sigset_t set;
@@ -46,7 +48,6 @@ int __sigpause (int sig_or_mask, int is_sig)
 
   return sigsuspend (&set);
 }
-libc_hidden_proto(__sigpause)
 libc_hidden_def(__sigpause)
 
 #undef sigpause
@@ -54,9 +55,9 @@ libc_hidden_def(__sigpause)
 /* We have to provide a default version of this function since the
    standards demand it.  The version which is a bit more reasonable is
    the BSD version.  So make this the default.  */
+libc_hidden_proto(sigpause)
 int sigpause (int mask)
 {
   return __sigpause (mask, 0);
 }
-libc_hidden_proto(sigpause)
 libc_hidden_def(sigpause)

+ 1 - 1
libc/signal/sigsetmask.c

@@ -24,6 +24,7 @@ libc_hidden_proto(sigprocmask)
 #include "sigset-cvt-mask.h"
 
 /* Set the mask of blocked signals to MASK, returning the old mask.  */
+libc_hidden_proto(sigsetmask)
 int
 sigsetmask (int mask)
 {
@@ -38,5 +39,4 @@ sigsetmask (int mask)
 
   return sigset_get_old_mask (&oset);
 }
-libc_hidden_proto(sigsetmask)
 libc_hidden_def(sigsetmask)

+ 1 - 1
libc/signal/sigwait.c

@@ -24,6 +24,7 @@
 
 libc_hidden_proto(sigwaitinfo)
 
+libc_hidden_proto(sigwait)
 int sigwait (const sigset_t *set, int *sig)
 {
 	int ret = 1;
@@ -33,5 +34,4 @@ int sigwait (const sigset_t *set, int *sig)
 	}
 	return 1;
 }
-libc_hidden_proto(sigwait)
 libc_hidden_def(sigwait)

+ 2 - 2
libc/stdio/__fsetlocking.c

@@ -8,6 +8,8 @@
 #include "_stdio.h"
 #include <stdio_ext.h>
 
+libc_hidden_proto(__fsetlocking)
+
 /* Not threadsafe. */
 
 /* Notes:
@@ -43,6 +45,4 @@ int __fsetlocking(FILE *stream, int locking_mode)
 	return FSETLOCKING_INTERNAL;
 #endif
 }
-
-libc_hidden_proto(__fsetlocking)
 libc_hidden_def(__fsetlocking)

+ 2 - 2
libc/stdio/asprintf.c

@@ -8,6 +8,8 @@
 #include "_stdio.h"
 #include <stdarg.h>
 
+libc_hidden_proto(asprintf)
+
 libc_hidden_proto(vasprintf)
 
 #ifndef __STDIO_HAS_VSNPRINTF
@@ -25,8 +27,6 @@ int asprintf(char **__restrict buf, const char * __restrict format, ...)
 
 	return rv;
 }
-
-libc_hidden_proto(asprintf)
 libc_hidden_def(asprintf)
 
 #endif

+ 1 - 1
libc/stdio/fclose.c

@@ -6,6 +6,7 @@
  */
 
 #include "_stdio.h"
+libc_hidden_proto(fclose)
 
 libc_hidden_proto(close)
 libc_hidden_proto(fflush_unlocked)
@@ -87,5 +88,4 @@ int fclose(register FILE *stream)
 
 	return rv;
 }
-libc_hidden_proto(fclose)
 libc_hidden_def(fclose)

+ 1 - 1
libc/stdio/fflush.c

@@ -137,6 +137,7 @@ libc_hidden_def(fflush)
 
 #elif defined __UCLIBC_HAS_THREADS__
 
+libc_hidden_proto(fflush)
 int fflush(register FILE *stream)
 {
 	int retval;
@@ -159,7 +160,6 @@ int fflush(register FILE *stream)
 
 	return retval;
 }
-libc_hidden_proto(fflush)
 libc_hidden_def(fflush)
 
 #endif

+ 3 - 4
libc/stdio/fgetc.c

@@ -13,6 +13,8 @@
 #undef getc
 #undef getc_unlocked
 
+libc_hidden_proto(__fgetc_unlocked)
+
 #ifdef __DO_UNLOCKED
 
 libc_hidden_proto(fflush_unlocked)
@@ -71,7 +73,6 @@ int __fgetc_unlocked(FILE *stream)
 
 	return EOF;
 }
-libc_hidden_proto(__fgetc_unlocked)
 libc_hidden_def(__fgetc_unlocked)
 
 strong_alias(__fgetc_unlocked,fgetc_unlocked)
@@ -94,8 +95,7 @@ strong_alias(__fgetc_unlocked,getc)
 
 #elif defined __UCLIBC_HAS_THREADS__
 
-libc_hidden_proto(__fgetc_unlocked)
-
+libc_hidden_proto(fgetc)
 int fgetc(register FILE *stream)
 {
 	if (stream->__user_locking != 0) {
@@ -108,7 +108,6 @@ int fgetc(register FILE *stream)
 		return retval;
 	}
 }
-libc_hidden_proto(fgetc)
 libc_hidden_def(fgetc)
 
 strong_alias(fgetc,getc)

+ 1 - 1
libc/stdio/fgets.c

@@ -71,6 +71,7 @@ libc_hidden_def(fgets)
 
 #elif defined __UCLIBC_HAS_THREADS__
 
+libc_hidden_proto(fgets)
 char *fgets(char *__restrict s, int n,
 			register FILE * __restrict stream)
 {
@@ -85,7 +86,6 @@ char *fgets(char *__restrict s, int n,
 
 	return retval;
 }
-libc_hidden_proto(fgets)
 libc_hidden_def(fgets)
 
 #endif

+ 1 - 1
libc/stdio/fgetwc.c

@@ -121,6 +121,7 @@ strong_alias(fgetwc_unlocked,getwc)
 
 #elif defined __UCLIBC_HAS_THREADS__
 
+libc_hidden_proto(fgetwc)
 wint_t fgetwc(register FILE *stream)
 {
 	wint_t retval;
@@ -134,7 +135,6 @@ wint_t fgetwc(register FILE *stream)
 
 	return retval;
 }
-libc_hidden_proto(fgetwc)
 libc_hidden_def(fgetwc)
 strong_alias(fgetwc,getwc)
 

+ 1 - 1
libc/stdio/fileno.c

@@ -32,6 +32,7 @@ libc_hidden_def(fileno)
 
 #elif defined __UCLIBC_HAS_THREADS__
 
+libc_hidden_proto(fileno)
 int fileno(register FILE *stream)
 {
 	int retval;
@@ -45,7 +46,6 @@ int fileno(register FILE *stream)
 
 	return retval;
 }
-libc_hidden_proto(fileno)
 libc_hidden_def(fileno)
 
 #endif

+ 1 - 1
libc/stdio/fopen.c

@@ -14,9 +14,9 @@
 #undef fopen64
 #endif
 
+libc_hidden_proto(fopen)
 FILE *fopen(const char * __restrict filename, const char * __restrict mode)
 {
 	return _stdio_fopen(((intptr_t) filename), mode, NULL, FILEDES_ARG);
 }
-libc_hidden_proto(fopen)
 libc_hidden_def(fopen)

+ 1 - 1
libc/stdio/fopencookie.c

@@ -28,6 +28,7 @@
 /* Currently no real reentrancy issues other than a possible double close(). */
 
 #ifndef __BCC__
+libc_hidden_proto(fopencookie)
 FILE *fopencookie(void * __restrict cookie, const char * __restrict mode,
 				  cookie_io_functions_t io_functions)
 #else
@@ -58,6 +59,5 @@ FILE *_fopencookie(void * __restrict cookie, const char * __restrict mode,
 	return stream;
 }
 #ifndef __BCC__
-libc_hidden_proto(fopencookie)
 libc_hidden_def(fopencookie)
 #endif

+ 1 - 1
libc/stdio/fprintf.c

@@ -10,6 +10,7 @@
 
 libc_hidden_proto(vfprintf)
 
+libc_hidden_proto(fprintf)
 int fprintf(FILE * __restrict stream, const char * __restrict format, ...)
 {
 	va_list arg;
@@ -21,5 +22,4 @@ int fprintf(FILE * __restrict stream, const char * __restrict format, ...)
 
 	return rv;
 }
-libc_hidden_proto(fprintf)
 libc_hidden_def(fprintf)

+ 3 - 4
libc/stdio/fputc.c

@@ -12,6 +12,8 @@
 #undef putc
 #undef putc_unlocked
 
+libc_hidden_proto(__fputc_unlocked)
+
 #ifdef __DO_UNLOCKED
 
 int __fputc_unlocked(int c, register FILE *stream)
@@ -68,7 +70,6 @@ int __fputc_unlocked(int c, register FILE *stream)
  BAD:
 	return EOF;
 }
-libc_hidden_proto(__fputc_unlocked)
 libc_hidden_def(__fputc_unlocked)
 
 strong_alias(__fputc_unlocked,fputc_unlocked)
@@ -86,8 +87,7 @@ libc_hidden_def(putc)
 
 #elif defined __UCLIBC_HAS_THREADS__
 
-libc_hidden_proto(__fputc_unlocked)
-
+libc_hidden_proto(fputc)
 int fputc(int c, register FILE *stream)
 {
 	if (stream->__user_locking != 0) {
@@ -100,7 +100,6 @@ int fputc(int c, register FILE *stream)
 		return retval;
 	}
 }
-libc_hidden_proto(fputc)
 libc_hidden_def(fputc)
 
 strong_alias(fputc,putc)

+ 1 - 1
libc/stdio/fputs.c

@@ -36,6 +36,7 @@ libc_hidden_def(fputs)
 
 #elif defined __UCLIBC_HAS_THREADS__
 
+libc_hidden_proto(fputs)
 int fputs(const char * __restrict s, register FILE * __restrict stream)
 {
 	int retval;
@@ -49,7 +50,6 @@ int fputs(const char * __restrict s, register FILE * __restrict stream)
 
 	return retval;
 }
-libc_hidden_proto(fputs)
 libc_hidden_def(fputs)
 
 #endif

+ 1 - 1
libc/stdio/fputws.c

@@ -30,6 +30,7 @@ libc_hidden_def(fputws)
 
 #elif defined __UCLIBC_HAS_THREADS__
 
+libc_hidden_proto(fputws)
 int fputws(const wchar_t *__restrict ws, register FILE *__restrict stream)
 {
 	int retval;
@@ -43,7 +44,6 @@ int fputws(const wchar_t *__restrict ws, register FILE *__restrict stream)
 
 	return retval;
 }
-libc_hidden_proto(fputws)
 libc_hidden_def(fputws)
 
 #endif

+ 1 - 1
libc/stdio/fread.c

@@ -97,6 +97,7 @@ libc_hidden_def(fread)
 
 #elif defined __UCLIBC_HAS_THREADS__
 
+libc_hidden_proto(fread)
 size_t fread(void * __restrict ptr, size_t size, size_t nmemb,
 			 register FILE * __restrict stream)
 {
@@ -111,7 +112,6 @@ size_t fread(void * __restrict ptr, size_t size, size_t nmemb,
 
 	return retval;
 }
-libc_hidden_proto(fread)
 libc_hidden_def(fread)
 
 #endif

+ 1 - 4
libc/stdio/fseeko.c

@@ -16,9 +16,8 @@
 # define OFFSET_TYPE   long int
 #endif
 
-#if defined(__UCLIBC_HAS_LFS__) && !defined(__DO_LARGEFILE)
 libc_hidden_proto(fseeko64)
-#endif
+libc_hidden_proto(fseek)
 
 int FSEEK(register FILE *stream, OFFSET_TYPE offset, int whence)
 {
@@ -78,10 +77,8 @@ int FSEEK(register FILE *stream, OFFSET_TYPE offset, int whence)
 }
 
 #ifdef __DO_LARGEFILE
-libc_hidden_proto(fseeko64)
 libc_hidden_def(fseeko64)
 #else
-libc_hidden_proto(fseek)
 libc_hidden_def(fseek)
 strong_alias(fseek,fseeko)
 #endif

+ 1 - 4
libc/stdio/ftello.c

@@ -7,9 +7,8 @@
 
 #include "_stdio.h"
 
-#if defined(__UCLIBC_HAS_LFS__) && !defined(__DO_LARGEFILE)
 libc_hidden_proto(ftello64)
-#endif
+libc_hidden_proto(ftell)
 
 #ifndef __DO_LARGEFILE
 # define FTELL         ftell
@@ -51,10 +50,8 @@ OFFSET_TYPE FTELL(register FILE *stream)
 }
 
 #ifdef __DO_LARGEFILE
-libc_hidden_proto(ftello64)
 libc_hidden_def(ftello64)
 #else
-libc_hidden_proto(ftell)
 libc_hidden_def(ftell)
 strong_alias(ftell,ftello)
 #endif

+ 1 - 1
libc/stdio/fwrite.c

@@ -45,6 +45,7 @@ libc_hidden_def(fwrite)
 
 #elif defined __UCLIBC_HAS_THREADS__
 
+libc_hidden_proto(fwrite)
 size_t fwrite(const void * __restrict ptr, size_t size,
 			  size_t nmemb, register FILE * __restrict stream)
 {
@@ -59,7 +60,6 @@ size_t fwrite(const void * __restrict ptr, size_t size,
 
 	return retval;
 }
-libc_hidden_proto(fwrite)
 libc_hidden_def(fwrite)
 
 #endif

+ 2 - 1
libc/stdio/getdelim.c

@@ -7,6 +7,8 @@
 
 #include "_stdio.h"
 
+libc_hidden_proto(getdelim)
+
 libc_hidden_proto(__fgetc_unlocked)
 
 /* Note: There is a defect in this function.  (size_t vs ssize_t). */
@@ -75,5 +77,4 @@ ssize_t getdelim(char **__restrict lineptr, size_t *__restrict n,
 
 	return pos;
 }
-libc_hidden_proto(getdelim)
 libc_hidden_def(getdelim)

+ 2 - 1
libc/stdio/getline.c

@@ -7,6 +7,8 @@
 
 #include "_stdio.h"
 
+libc_hidden_proto(getline)
+
 libc_hidden_proto(getdelim)
 
 ssize_t getline(char **__restrict lineptr, size_t *__restrict n,
@@ -14,5 +16,4 @@ ssize_t getline(char **__restrict lineptr, size_t *__restrict n,
 {
 	return getdelim(lineptr, n, '\n', stream);
 }
-libc_hidden_proto(getline)
 libc_hidden_def(getline)

+ 1 - 1
libc/stdio/open_memstream.c

@@ -128,6 +128,7 @@ static const cookie_io_functions_t _oms_io_funcs = {
  * (ie replace the FILE buffer with the cookie buffer and update FILE bufstart,
  * etc. whenever we seek). */
 
+libc_hidden_proto(open_memstream)
 FILE *open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc)
 {
 	register __oms_cookie *cookie;
@@ -164,5 +165,4 @@ FILE *open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc)
 
 	return NULL;
 }
-libc_hidden_proto(open_memstream)
 libc_hidden_def(open_memstream)

+ 1 - 1
libc/stdio/perror.c

@@ -14,6 +14,7 @@ libc_hidden_proto(__glibc_strerror_r)
 #warning CONSIDER: Increase buffer size for error message (non-%m case)?
 #endif
 
+libc_hidden_proto(perror)
 void perror(register const char *s)
 {
 	/* If the program is calling perror, it's a safe bet that printf and
@@ -37,5 +38,4 @@ void perror(register const char *s)
 	}
 #endif
 }
-libc_hidden_proto(perror)
 libc_hidden_def(perror)

+ 1 - 1
libc/stdio/printf.c

@@ -10,6 +10,7 @@
 
 libc_hidden_proto(vfprintf)
 
+libc_hidden_proto(printf)
 int printf(const char * __restrict format, ...)
 {
 	va_list arg;
@@ -21,5 +22,4 @@ int printf(const char * __restrict format, ...)
 
 	return rv;
 }
-libc_hidden_proto(printf)
 libc_hidden_def(printf)

+ 1 - 1
libc/stdio/remove.c

@@ -19,6 +19,7 @@ libc_hidden_proto(unlink)
  *   equivalent to rmdir(path). 
  */
 
+libc_hidden_proto(remove)
 int remove(register const char *filename)
 {
 	int saved_errno = errno;
@@ -30,5 +31,4 @@ int remove(register const char *filename)
 	}
 	return rv;
 }
-libc_hidden_proto(remove)
 libc_hidden_def(remove)

+ 1 - 1
libc/stdio/rewind.c

@@ -9,6 +9,7 @@
 
 libc_hidden_proto(fseek)
 
+libc_hidden_proto(rewind)
 void rewind(register FILE *stream)
 {
 	__STDIO_AUTO_THREADLOCK_VAR;
@@ -20,5 +21,4 @@ void rewind(register FILE *stream)
 
 	__STDIO_AUTO_THREADUNLOCK(stream);
 }
-libc_hidden_proto(rewind)
 libc_hidden_def(rewind)

+ 3 - 3
libc/stdio/scanf.c

@@ -160,6 +160,7 @@ _stdlib_strto_l(register const char * __restrict str,
 /**********************************************************************/
 #ifdef L_fscanf
 
+libc_hidden_proto(fscanf)
 int fscanf(FILE * __restrict stream, const char * __restrict format, ...)
 {
 	va_list arg;
@@ -171,7 +172,6 @@ int fscanf(FILE * __restrict stream, const char * __restrict format, ...)
 
 	return rv;
 }
-libc_hidden_proto(fscanf)
 libc_hidden_def(fscanf)
 
 #endif
@@ -196,6 +196,7 @@ int scanf(const char * __restrict format, ...)
 
 #ifdef __STDIO_HAS_VSSCANF
 
+libc_hidden_proto(sscanf)
 int sscanf(const char * __restrict str, const char * __restrict format, ...)
 {
 	va_list arg;
@@ -207,7 +208,6 @@ int sscanf(const char * __restrict str, const char * __restrict format, ...)
 
 	return rv;
 }
-libc_hidden_proto(sscanf)
 libc_hidden_def(sscanf)
 
 #else  /* __STDIO_HAS_VSSCANF */
@@ -218,11 +218,11 @@ libc_hidden_def(sscanf)
 /**********************************************************************/
 #ifdef L_vscanf
 
+libc_hidden_proto(vscanf)
 int vscanf(const char * __restrict format, va_list arg)
 {
 	return vfscanf(stdin, format, arg);
 }
-libc_hidden_proto(vscanf)
 libc_hidden_def(vscanf)
 
 #endif

+ 1 - 1
libc/stdio/setvbuf.c

@@ -14,6 +14,7 @@
 #error Assumption violated for buffering mode flags
 #endif
 
+libc_hidden_proto(setvbuf)
 int setvbuf(register FILE * __restrict stream, register char * __restrict buf,
 			int mode, size_t size)
 {
@@ -104,5 +105,4 @@ int setvbuf(register FILE * __restrict stream, register char * __restrict buf,
 
 #endif
 }
-libc_hidden_proto(setvbuf)
 libc_hidden_def(setvbuf)

+ 1 - 1
libc/stdio/snprintf.c

@@ -14,6 +14,7 @@
 
 libc_hidden_proto(vsnprintf)
 
+libc_hidden_proto(snprintf)
 int snprintf(char *__restrict buf, size_t size,
 			 const char * __restrict format, ...)
 {
@@ -25,7 +26,6 @@ int snprintf(char *__restrict buf, size_t size,
 	va_end(arg);
 	return rv;
 }
-libc_hidden_proto(snprintf)
 libc_hidden_def(snprintf)
 
 #endif

+ 1 - 1
libc/stdio/sprintf.c

@@ -14,6 +14,7 @@
 
 libc_hidden_proto(vsnprintf)
 
+libc_hidden_proto(sprintf)
 int sprintf(char *__restrict buf, const char * __restrict format, ...)
 {
 	va_list arg;
@@ -25,7 +26,6 @@ int sprintf(char *__restrict buf, const char * __restrict format, ...)
 
 	return rv;
 }
-libc_hidden_proto(sprintf)
 libc_hidden_def(sprintf)
 
 #endif

+ 1 - 1
libc/stdio/ungetc.c

@@ -24,6 +24,7 @@
  *     (See section 7.19.6.2 of the C9X rationale -- WG14/N897.)
  */
 
+libc_hidden_proto(ungetc)
 int ungetc(int c, register FILE *stream)
 {
 	__STDIO_AUTO_THREADLOCK_VAR;
@@ -75,5 +76,4 @@ int ungetc(int c, register FILE *stream)
 
 	return c;
 }
-libc_hidden_proto(ungetc)
 libc_hidden_def(ungetc)

+ 1 - 1
libc/stdio/ungetwc.c

@@ -12,6 +12,7 @@
  * as reset stream->__ungot_width[1] for use by _stdio_adjpos().
  */
 
+libc_hidden_proto(ungetwc)
 wint_t ungetwc(wint_t c, register FILE *stream)
 {
 	__STDIO_AUTO_THREADLOCK_VAR;
@@ -46,5 +47,4 @@ wint_t ungetwc(wint_t c, register FILE *stream)
 
 	return c;
 }
-libc_hidden_proto(ungetwc)
 libc_hidden_def(ungetwc)

+ 1 - 1
libc/stdio/vasprintf.c

@@ -27,6 +27,7 @@ libc_hidden_proto(vfprintf)
 libc_hidden_proto(vsnprintf)
 #endif
 
+libc_hidden_proto(vasprintf)
 int vasprintf(char **__restrict buf, const char * __restrict format,
 			 va_list arg)
 {
@@ -81,7 +82,6 @@ int vasprintf(char **__restrict buf, const char * __restrict format,
 
 #endif /* __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__ */
 }
-libc_hidden_proto(vasprintf)
 libc_hidden_def(vasprintf)
 
 #endif

+ 1 - 1
libc/stdio/vdprintf.c

@@ -11,6 +11,7 @@
 libc_hidden_proto(vfprintf)
 libc_hidden_proto(fflush_unlocked)
 
+libc_hidden_proto(vdprintf)
 int vdprintf(int filedes, const char * __restrict format, va_list arg)
 {
 	FILE f;
@@ -63,5 +64,4 @@ int vdprintf(int filedes, const char * __restrict format, va_list arg)
 
 	return rv;
 }
-libc_hidden_proto(vdprintf)
 libc_hidden_def(vdprintf)

+ 1 - 1
libc/stdio/vfprintf.c

@@ -1855,6 +1855,7 @@ static int _do_one_spec(FILE * __restrict stream,
 
 libc_hidden_proto(fprintf)
 
+libc_hidden_proto(VFPRINTF)
 int VFPRINTF (FILE * __restrict stream,
 			  register const FMT_TYPE * __restrict format,
 			  va_list arg)
@@ -1932,7 +1933,6 @@ int VFPRINTF (FILE * __restrict stream,
 
 	return count;
 }
-libc_hidden_proto(VFPRINTF)
 libc_hidden_def(VFPRINTF)
 #endif
 /**********************************************************************/

+ 2 - 3
libc/stdio/vsnprintf.c

@@ -8,6 +8,8 @@
 #include "_stdio.h"
 #include <stdarg.h>
 
+libc_hidden_proto(vsnprintf)
+
 libc_hidden_proto(vfprintf)
 
 #ifdef __UCLIBC_MJN3_ONLY__
@@ -68,7 +70,6 @@ int vsnprintf(char *__restrict buf, size_t size,
 	}
 	return rv;
 }
-libc_hidden_proto(vsnprintf)
 libc_hidden_def(vsnprintf)
 
 #elif defined(__USE_OLD_VFPRINTF__)
@@ -126,7 +127,6 @@ int vsnprintf(char *__restrict buf, size_t size,
 	}
 	return rv;
 }
-libc_hidden_proto(vsnprintf)
 libc_hidden_def(vsnprintf)
 
 #elif defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__)
@@ -207,7 +207,6 @@ int vsnprintf(char *__restrict buf, size_t size,
 
 	return rv;
 }
-libc_hidden_proto(vsnprintf)
 libc_hidden_def(vsnprintf)
 
 #else

+ 2 - 1
libc/stdio/vswprintf.c

@@ -9,6 +9,8 @@
 #include <stdarg.h>
 #include <wchar.h>
 
+libc_hidden_proto(vswprintf)
+
 libc_hidden_proto(vfwprintf)
 
 #ifndef __STDIO_BUFFERS
@@ -68,7 +70,6 @@ int vswprintf(wchar_t *__restrict buf, size_t size,
 	}
 	return rv;
 }
-libc_hidden_proto(vswprintf)
 libc_hidden_def(vswprintf)
 
 #endif /* __STDIO_BUFFERS */

+ 1 - 1
libc/stdlib/erand48_r.c

@@ -24,6 +24,7 @@
 extern int __drand48_iterate(unsigned short xsubi[3], 
 	struct drand48_data *buffer) attribute_hidden;
 
+libc_hidden_proto(erand48_r)
 int erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, double *result)
 {
     union ieee754_double temp;
@@ -45,5 +46,4 @@ int erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, double
 
     return 0;
 }
-libc_hidden_proto(erand48_r)
 libc_hidden_def(erand48_r)

+ 1 - 1
libc/stdlib/jrand48_r.c

@@ -22,6 +22,7 @@
 extern int __drand48_iterate(unsigned short xsubi[3], 
 	struct drand48_data *buffer) attribute_hidden;
 
+libc_hidden_proto(jrand48_r)
 int jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long int *result)
 {
     /* Compute next state.  */
@@ -33,5 +34,4 @@ int jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long in
 
     return 0;
 }
-libc_hidden_proto(jrand48_r)
 libc_hidden_def(jrand48_r)

+ 1 - 1
libc/stdlib/lrand48_r.c

@@ -21,6 +21,7 @@
 
 libc_hidden_proto(nrand48_r)
 
+libc_hidden_proto(lrand48_r)
 int lrand48_r (struct drand48_data *buffer, long int *result)
 {
     /* Be generous for the arguments, detect some errors.  */
@@ -29,5 +30,4 @@ int lrand48_r (struct drand48_data *buffer, long int *result)
 
     return nrand48_r (buffer->__x, buffer, result);
 }
-libc_hidden_proto(lrand48_r)
 libc_hidden_def(lrand48_r)

+ 1 - 1
libc/stdlib/malloc-standard/mallinfo.c

@@ -19,6 +19,7 @@
 libc_hidden_proto(fprintf)
 
 /* ------------------------------ mallinfo ------------------------------ */
+libc_hidden_proto(mallinfo)
 struct mallinfo mallinfo(void)
 {
     mstate av;
@@ -79,7 +80,6 @@ struct mallinfo mallinfo(void)
     UNLOCK;
     return mi;
 }
-libc_hidden_proto(mallinfo)
 libc_hidden_def(mallinfo)
 
 void malloc_stats(FILE *file)

Some files were not shown because too many files changed in this diff