Browse Source

Get rid of missing prototype warnings

Peter S. Mazinger 19 years ago
parent
commit
05e75260d6
98 changed files with 203 additions and 66 deletions
  1. 1 0
      ldso/ldso/dl-elf.c
  2. 2 1
      ldso/ldso/ldso.c
  3. 2 1
      ldso/libdl/libdl.c
  4. 13 8
      libc/inet/ntohl.c
  5. 2 1
      libc/inet/opensock.c
  6. 10 2
      libc/inet/resolv.c
  7. 2 1
      libc/inet/rpc/create_xid.c
  8. 3 0
      libc/inet/rpc/rcmd.c
  9. 2 1
      libc/inet/rpc/sa_len.c
  10. 4 2
      libc/inet/rpc/svc_authux.c
  11. 2 0
      libc/inet/rpc/svc_simple.c
  12. 2 0
      libc/inet/rpc/svc_tcp.c
  13. 1 0
      libc/inet/rpc/svc_udp.c
  14. 2 0
      libc/inet/rpc/svc_unix.c
  15. 8 0
      libc/inet/socketcalls.c
  16. 6 6
      libc/misc/error/error.c
  17. 2 2
      libc/misc/sysvipc/ipc.h
  18. 1 0
      libc/pwd_grp/lckpwdf.c
  19. 1 0
      libc/signal/allocrtsig.c
  20. 2 1
      libc/signal/raise.c
  21. 1 1
      libc/signal/sigjmp.c
  22. 1 0
      libc/signal/signal.c
  23. 2 1
      libc/signal/sigwait.c
  24. 3 1
      libc/stdio/_fpmaxtostr.c
  25. 2 1
      libc/stdio/_load_inttype.c
  26. 2 1
      libc/stdio/_store_inttype.c
  27. 1 0
      libc/stdlib/atexit.c
  28. 2 1
      libc/stdlib/drand48-iter.c
  29. 1 0
      libc/stdlib/realpath.c
  30. 3 1
      libc/stdlib/setenv.c
  31. 5 3
      libc/stdlib/system.c
  32. 1 0
      libc/string/__xpg_basename.c
  33. 1 0
      libc/string/dirname.c
  34. 1 0
      libc/string/psignal.c
  35. 3 1
      libc/string/strlcpy.c
  36. 2 1
      libc/sysdeps/linux/arm/__syscall_error.c
  37. 2 0
      libc/sysdeps/linux/arm/sigaction.c
  38. 2 1
      libc/sysdeps/linux/common/__socketcall.c
  39. 2 1
      libc/sysdeps/linux/common/__syscall_ipc.c
  40. 2 2
      libc/sysdeps/linux/common/__syscall_rt_sigaction.c
  41. 2 2
      libc/sysdeps/linux/common/__syscall_sigaction.c
  42. 1 0
      libc/sysdeps/linux/common/capget.c
  43. 1 0
      libc/sysdeps/linux/common/capset.c
  44. 1 0
      libc/sysdeps/linux/common/close.c
  45. 3 0
      libc/sysdeps/linux/common/create_module.c
  46. 1 0
      libc/sysdeps/linux/common/delete_module.c
  47. 1 0
      libc/sysdeps/linux/common/fork.c
  48. 1 0
      libc/sysdeps/linux/common/fsync.c
  49. 1 0
      libc/sysdeps/linux/common/get_kernel_syms.c
  50. 1 0
      libc/sysdeps/linux/common/getpagesize.c
  51. 1 0
      libc/sysdeps/linux/common/getpgid.c
  52. 1 0
      libc/sysdeps/linux/common/getpid.c
  53. 1 0
      libc/sysdeps/linux/common/getresgid.c
  54. 1 0
      libc/sysdeps/linux/common/getresuid.c
  55. 1 0
      libc/sysdeps/linux/common/init_module.c
  56. 1 0
      libc/sysdeps/linux/common/ioperm.c
  57. 1 0
      libc/sysdeps/linux/common/iopl.c
  58. 1 0
      libc/sysdeps/linux/common/klogctl.c
  59. 2 0
      libc/sysdeps/linux/common/llseek.c
  60. 2 1
      libc/sysdeps/linux/common/longjmp.c
  61. 1 0
      libc/sysdeps/linux/common/madvise.c
  62. 1 0
      libc/sysdeps/linux/common/mincore.c
  63. 1 0
      libc/sysdeps/linux/common/modify_ldt.c
  64. 1 0
      libc/sysdeps/linux/common/msync.c
  65. 1 1
      libc/sysdeps/linux/common/nanosleep.c
  66. 2 0
      libc/sysdeps/linux/common/noophooks.c
  67. 1 0
      libc/sysdeps/linux/common/open64.c
  68. 1 0
      libc/sysdeps/linux/common/pause.c
  69. 1 0
      libc/sysdeps/linux/common/pivot_root.c
  70. 2 1
      libc/sysdeps/linux/common/prctl.c
  71. 7 0
      libc/sysdeps/linux/common/pread_write.c
  72. 2 0
      libc/sysdeps/linux/common/query_module.c
  73. 1 0
      libc/sysdeps/linux/common/read.c
  74. 1 0
      libc/sysdeps/linux/common/reboot.c
  75. 2 2
      libc/sysdeps/linux/common/ssp-local.c
  76. 6 4
      libc/sysdeps/linux/common/ssp.c
  77. 4 0
      libc/sysdeps/linux/common/sysctl.c
  78. 1 0
      libc/sysdeps/linux/common/uselib.c
  79. 2 0
      libc/sysdeps/linux/common/wait.c
  80. 2 1
      libc/sysdeps/linux/common/waitpid.c
  81. 1 0
      libc/sysdeps/linux/common/write.c
  82. 2 1
      libc/sysdeps/linux/common/xattr.c
  83. 2 1
      libc/sysdeps/linux/hppa/__syscall_error.c
  84. 2 1
      libc/sysdeps/linux/i386/__syscall_error.c
  85. 1 0
      libc/sysdeps/linux/i386/sigaction.c
  86. 2 1
      libc/sysdeps/linux/m68k/__syscall_error.c
  87. 1 1
      libc/sysdeps/linux/mips/__longjmp.c
  88. 2 1
      libc/sysdeps/linux/mips/__syscall_error.c
  89. 2 1
      libc/sysdeps/linux/mips/sigaction.c
  90. 2 1
      libc/sysdeps/linux/powerpc/__syscall_error.c
  91. 2 1
      libc/sysdeps/linux/sparc/__syscall_error.c
  92. 2 1
      libc/sysdeps/linux/x86_64/__syscall_error.c
  93. 3 1
      libc/sysdeps/linux/x86_64/sigaction.c
  94. 1 0
      libc/termios/tcdrain.c
  95. 1 0
      libc/unistd/getlogin.c
  96. 2 1
      libcrypt/des.c
  97. 1 0
      libm/w_gamma_r.c
  98. 2 0
      libpthread/linuxthreads.old/internals.h

+ 1 - 0
ldso/ldso/dl-elf.c

@@ -797,6 +797,7 @@ void _dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void
 /* we want this in ldso.so and libdl.a but nowhere else */
 /* we want this in ldso.so and libdl.a but nowhere else */
 #ifdef __USE_GNU
 #ifdef __USE_GNU
 #if defined IS_IN_rtld || (defined IS_IN_libdl && ! defined SHARED)
 #if defined IS_IN_rtld || (defined IS_IN_libdl && ! defined SHARED)
+extern __typeof(dl_iterate_phdr) __dl_iterate_phdr;
 int
 int
 __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data)
 __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data)
 {
 {

+ 2 - 1
ldso/ldso/ldso.c

@@ -74,7 +74,8 @@ static int _dl_suid_ok(void);
  * can set an internal breakpoint on it, so that we are notified when the
  * can set an internal breakpoint on it, so that we are notified when the
  * address mapping is changed in some way.
  * address mapping is changed in some way.
  */
  */
-void _dl_debug_state(void)
+void _dl_debug_state(void);
+void _dl_debug_state()
 {
 {
 }
 }
 
 

+ 2 - 1
ldso/libdl/libdl.c

@@ -125,7 +125,8 @@ static const char *dl_error_names[] = {
 	"Unable to resolve symbol"
 	"Unable to resolve symbol"
 };
 };
 
 
-void __attribute__ ((destructor)) dl_cleanup(void)
+void dl_cleanup(void) __attribute__ ((destructor));
+void dl_cleanup(void)
 {
 {
 	struct dyn_elf *d;
 	struct dyn_elf *d;
 	for (d = _dl_handles; d; d = d->next_handle) {
 	for (d = _dl_handles; d; d = d->next_handle) {

+ 13 - 8
libc/inet/ntohl.c

@@ -22,43 +22,48 @@
 #include <endian.h>
 #include <endian.h>
 #include <byteswap.h>
 #include <byteswap.h>
 
 
+uint32_t ntohl (uint32_t x);
+uint16_t ntohs (uint16_t x);
+uint32_t htonl (uint32_t x);
+uint16_t htons (uint16_t x);
+
 #if __BYTE_ORDER == __BIG_ENDIAN
 #if __BYTE_ORDER == __BIG_ENDIAN
-extern uint32_t ntohl (uint32_t x)
+uint32_t ntohl (uint32_t x)
 {
 {
 	return x;
 	return x;
 }
 }
 
 
-extern uint16_t ntohs (uint16_t x)
+uint16_t ntohs (uint16_t x)
 {
 {
 	return x;
 	return x;
 }
 }
 
 
-extern uint32_t htonl (uint32_t x)
+uint32_t htonl (uint32_t x)
 {
 {
 	return x;
 	return x;
 }
 }
 
 
-extern uint16_t htons (uint16_t x)
+uint16_t htons (uint16_t x)
 {
 {
 	return x;
 	return x;
 }
 }
 #elif __BYTE_ORDER == __LITTLE_ENDIAN
 #elif __BYTE_ORDER == __LITTLE_ENDIAN
-extern uint32_t ntohl (uint32_t x)
+uint32_t ntohl (uint32_t x)
 {
 {
 	return __bswap_32(x);
 	return __bswap_32(x);
 }
 }
 
 
-extern uint16_t ntohs (uint16_t x)
+uint16_t ntohs (uint16_t x)
 {
 {
 	return __bswap_16(x);
 	return __bswap_16(x);
 }
 }
 
 
-extern uint32_t htonl (uint32_t x)
+uint32_t htonl (uint32_t x)
 {
 {
 	return __bswap_32(x);
 	return __bswap_32(x);
 }
 }
 
 
-extern uint16_t htons (uint16_t x)
+uint16_t htons (uint16_t x)
 {
 {
 	return __bswap_16(x);
 	return __bswap_16(x);
 }
 }

+ 2 - 1
libc/inet/opensock.c

@@ -29,7 +29,8 @@ libc_hidden_proto(socket)
 
 
 /* Return a socket of any type.  The socket can be used in subsequent
 /* Return a socket of any type.  The socket can be used in subsequent
    ioctl calls to talk to the kernel.  */
    ioctl calls to talk to the kernel.  */
-int attribute_hidden
+int __opensock(void) attribute_hidden;
+int
 __opensock (void)
 __opensock (void)
 {
 {
   int fd;
   int fd;

+ 10 - 2
libc/inet/resolv.c

@@ -600,7 +600,13 @@ int attribute_hidden __decode_answer(unsigned char *message, int offset,
 #endif
 #endif
 
 
 #ifdef L_encodep
 #ifdef L_encodep
-int attribute_hidden __encode_packet(struct resolv_header *h,
+int __encode_packet(struct resolv_header *h,
+	struct resolv_question **q,
+	struct resolv_answer **an,
+	struct resolv_answer **ns,
+	struct resolv_answer **ar,
+	unsigned char *dest, int maxlen) attribute_hidden;
+int __encode_packet(struct resolv_header *h,
 	struct resolv_question **q,
 	struct resolv_question **q,
 	struct resolv_answer **an,
 	struct resolv_answer **an,
 	struct resolv_answer **ns,
 	struct resolv_answer **ns,
@@ -657,13 +663,15 @@ int attribute_hidden __encode_packet(struct resolv_header *h,
 #endif
 #endif
 
 
 #ifdef L_decodep
 #ifdef L_decodep
-int attribute_hidden __decode_packet(unsigned char *data, struct resolv_header *h)
+int __decode_packet(unsigned char *data, struct resolv_header *h) attribute_hidden;
+int __decode_packet(unsigned char *data, struct resolv_header *h)
 {
 {
 	return __decode_header(data, h);
 	return __decode_header(data, h);
 }
 }
 #endif
 #endif
 
 
 #ifdef L_formquery
 #ifdef L_formquery
+int __form_query(int id, const char *name, int type, unsigned char *packet, int maxlen);
 int __form_query(int id, const char *name, int type, unsigned char *packet,
 int __form_query(int id, const char *name, int type, unsigned char *packet,
 			   int maxlen)
 			   int maxlen)
 {
 {

+ 2 - 1
libc/inet/rpc/create_xid.c

@@ -41,7 +41,8 @@ static pthread_mutex_t createxid_lock = PTHREAD_MUTEX_INITIALIZER;
 static int is_initialized;
 static int is_initialized;
 static struct drand48_data __rpc_lrand48_data;
 static struct drand48_data __rpc_lrand48_data;
 
 
-u_long attribute_hidden _create_xid (void)
+u_long _create_xid (void) attribute_hidden;
+u_long _create_xid (void)
 {
 {
   unsigned long res;
   unsigned long res;
 
 

+ 3 - 0
libc/inet/rpc/rcmd.c

@@ -532,6 +532,7 @@ iruserok2 (raddr, superuser, ruser, luser, rhost)
 }
 }
 
 
 /* This is the exported version.  */
 /* This is the exported version.  */
+int iruserok (u_int32_t raddr, int superuser, const char * ruser, const char * luser);
 int iruserok (u_int32_t raddr, int superuser, const char * ruser, const char * luser)
 int iruserok (u_int32_t raddr, int superuser, const char * ruser, const char * luser)
 {
 {
 	return iruserok2 (raddr, superuser, ruser, luser, "-");
 	return iruserok2 (raddr, superuser, ruser, luser, "-");
@@ -550,6 +551,8 @@ int iruserok (u_int32_t raddr, int superuser, const char * ruser, const char * l
  * Returns 0 if ok, -1 if not ok.
  * Returns 0 if ok, -1 if not ok.
  */
  */
 int
 int
+__ivaliduser(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser);
+int
 __ivaliduser(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser)
 __ivaliduser(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser)
 {
 {
 	return __ivaliduser2(hostf, raddr, luser, ruser, "-");
 	return __ivaliduser2(hostf, raddr, luser, ruser, "-");

+ 2 - 1
libc/inet/rpc/sa_len.c

@@ -31,7 +31,8 @@
 #include <netrose/rose.h>
 #include <netrose/rose.h>
 #endif
 #endif
 
 
-int attribute_hidden __libc_sa_len (sa_family_t af)
+int __libc_sa_len (sa_family_t af) attribute_hidden;
+int __libc_sa_len (sa_family_t af)
 {
 {
   switch (af)
   switch (af)
     {
     {

+ 4 - 2
libc/inet/rpc/svc_authux.c

@@ -54,7 +54,8 @@ libc_hidden_proto(xdr_authunix_parms)
 /*
 /*
  * Unix longhand authenticator
  * Unix longhand authenticator
  */
  */
-attribute_hidden
+enum auth_stat
+_svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg) attribute_hidden;
 enum auth_stat
 enum auth_stat
 _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg)
 _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg)
 {
 {
@@ -153,7 +154,8 @@ done:
  * Looks up longhand in a cache.
  * Looks up longhand in a cache.
  */
  */
 /*ARGSUSED */
 /*ARGSUSED */
-attribute_hidden
+enum auth_stat
+_svcauth_short (struct svc_req *rqst attribute_unused, struct rpc_msg *msg attribute_unused) attribute_hidden;
 enum auth_stat
 enum auth_stat
 _svcauth_short (struct svc_req *rqst attribute_unused, struct rpc_msg *msg attribute_unused)
 _svcauth_short (struct svc_req *rqst attribute_unused, struct rpc_msg *msg attribute_unused)
 {
 {

+ 2 - 0
libc/inet/rpc/svc_simple.c

@@ -90,6 +90,8 @@ static void universal (struct svc_req *rqstp, SVCXPRT *transp_s);
 static SVCXPRT *transp;
 static SVCXPRT *transp;
 #endif
 #endif
 
 
+int registerrpc (u_long prognum, u_long versnum, u_long procnum,
+	     char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc);
 int
 int
 registerrpc (u_long prognum, u_long versnum, u_long procnum,
 registerrpc (u_long prognum, u_long versnum, u_long procnum,
 	     char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc)
 	     char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc)

+ 2 - 0
libc/inet/rpc/svc_tcp.c

@@ -232,6 +232,8 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize)
  * descriptor as its first input.
  * descriptor as its first input.
  */
  */
 SVCXPRT *
 SVCXPRT *
+svcfd_create (int fd, u_int sendsize, u_int recvsize);
+SVCXPRT *
 svcfd_create (int fd, u_int sendsize, u_int recvsize)
 svcfd_create (int fd, u_int sendsize, u_int recvsize)
 {
 {
   return makefd_xprt (fd, sendsize, recvsize);
   return makefd_xprt (fd, sendsize, recvsize);

+ 1 - 0
libc/inet/rpc/svc_udp.c

@@ -486,6 +486,7 @@ struct udp_cache
  * Enable use of the cache.
  * Enable use of the cache.
  * Note: there is no disable.
  * Note: there is no disable.
  */
  */
+int svcudp_enablecache (SVCXPRT *transp, u_long size);
 int
 int
 svcudp_enablecache (SVCXPRT *transp, u_long size)
 svcudp_enablecache (SVCXPRT *transp, u_long size)
 {
 {

+ 2 - 0
libc/inet/rpc/svc_unix.c

@@ -231,6 +231,8 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path)
  * descriptor as its first input.
  * descriptor as its first input.
  */
  */
 SVCXPRT *
 SVCXPRT *
+svcunixfd_create (int fd, u_int sendsize, u_int recvsize);
+SVCXPRT *
 svcunixfd_create (int fd, u_int sendsize, u_int recvsize)
 svcunixfd_create (int fd, u_int sendsize, u_int recvsize)
 {
 {
   return makefd_xprt (fd, sendsize, recvsize);
   return makefd_xprt (fd, sendsize, recvsize);

+ 8 - 0
libc/inet/socketcalls.c

@@ -35,6 +35,7 @@ extern int __socketcall(int call, unsigned long *args) attribute_hidden;
 
 
 
 
 #ifdef L_accept
 #ifdef L_accept
+extern __typeof(accept) __libc_accept;
 #ifdef __NR_accept
 #ifdef __NR_accept
 #define __NR___libc_accept  __NR_accept
 #define __NR___libc_accept  __NR_accept
 _syscall3(int, __libc_accept, int, call, struct sockaddr *, addr, socklen_t *,addrlen);
 _syscall3(int, __libc_accept, int, call, struct sockaddr *, addr, socklen_t *,addrlen);
@@ -73,6 +74,7 @@ libc_hidden_def(bind)
 #endif
 #endif
 
 
 #ifdef L_connect
 #ifdef L_connect
+extern __typeof(connect) __libc_connect;
 #ifdef __NR_connect
 #ifdef __NR_connect
 #define __NR___libc_connect __NR_connect
 #define __NR___libc_connect __NR_connect
 _syscall3(int, __libc_connect, int, sockfd, const struct sockaddr *, saddr, socklen_t, addrlen);
 _syscall3(int, __libc_connect, int, sockfd, const struct sockaddr *, saddr, socklen_t, addrlen);
@@ -163,6 +165,7 @@ libc_hidden_def(listen)
 #endif
 #endif
 
 
 #ifdef L_recv
 #ifdef L_recv
+extern __typeof(recv) __libc_recv;
 #ifdef __NR_recv
 #ifdef __NR_recv
 #define __NR___libc_recv __NR_recv
 #define __NR___libc_recv __NR_recv
 _syscall4(ssize_t, __libc_recv, int, sockfd, __ptr_t, buffer, size_t, len, int, flags);
 _syscall4(ssize_t, __libc_recv, int, sockfd, __ptr_t, buffer, size_t, len, int, flags);
@@ -191,6 +194,7 @@ libc_hidden_def(recv)
 #endif
 #endif
 
 
 #ifdef L_recvfrom
 #ifdef L_recvfrom
+extern __typeof(recvfrom) __libc_recvfrom;
 #ifdef __NR_recvfrom
 #ifdef __NR_recvfrom
 #define __NR___libc_recvfrom __NR_recvfrom
 #define __NR___libc_recvfrom __NR_recvfrom
 _syscall6(ssize_t, __libc_recvfrom, int, sockfd, __ptr_t, buffer, size_t, len, int, flags, 
 _syscall6(ssize_t, __libc_recvfrom, int, sockfd, __ptr_t, buffer, size_t, len, int, flags, 
@@ -217,6 +221,7 @@ libc_hidden_def(recvfrom)
 #endif
 #endif
 
 
 #ifdef L_recvmsg
 #ifdef L_recvmsg
+extern __typeof(recvmsg) __libc_recvmsg;
 #ifdef __NR_recvmsg
 #ifdef __NR_recvmsg
 #define __NR___libc_recvmsg __NR_recvmsg
 #define __NR___libc_recvmsg __NR_recvmsg
 _syscall3(ssize_t, __libc_recvmsg, int, sockfd, struct msghdr *, msg, int, flags);
 _syscall3(ssize_t, __libc_recvmsg, int, sockfd, struct msghdr *, msg, int, flags);
@@ -237,6 +242,7 @@ libc_hidden_def(recvmsg)
 #endif
 #endif
 
 
 #ifdef L_send
 #ifdef L_send
+extern __typeof(send) __libc_send;
 #ifdef __NR_send
 #ifdef __NR_send
 #define __NR___libc_send    __NR_send
 #define __NR___libc_send    __NR_send
 _syscall4(ssize_t, __libc_send, int, sockfd, const void *, buffer, size_t, len, int, flags);
 _syscall4(ssize_t, __libc_send, int, sockfd, const void *, buffer, size_t, len, int, flags);
@@ -265,6 +271,7 @@ libc_hidden_def(send)
 #endif
 #endif
 
 
 #ifdef L_sendmsg
 #ifdef L_sendmsg
+extern __typeof(sendmsg) __libc_sendmsg;
 #ifdef __NR_sendmsg
 #ifdef __NR_sendmsg
 #define __NR___libc_sendmsg __NR_sendmsg
 #define __NR___libc_sendmsg __NR_sendmsg
 _syscall3(ssize_t, __libc_sendmsg, int, sockfd, const struct msghdr *, msg, int, flags);
 _syscall3(ssize_t, __libc_sendmsg, int, sockfd, const struct msghdr *, msg, int, flags);
@@ -285,6 +292,7 @@ libc_hidden_def(sendmsg)
 #endif
 #endif
 
 
 #ifdef L_sendto
 #ifdef L_sendto
+extern __typeof(sendto) __libc_sendto;
 #ifdef __NR_sendto
 #ifdef __NR_sendto
 #define __NR___libc_sendto  __NR_sendto
 #define __NR___libc_sendto  __NR_sendto
 _syscall6(ssize_t, __libc_sendto, int, sockfd, const void *, buffer, size_t, len, 
 _syscall6(ssize_t, __libc_sendto, int, sockfd, const void *, buffer, size_t, len, 

+ 6 - 6
libc/misc/error/error.c

@@ -50,8 +50,8 @@ int error_one_per_line;
    function without parameters instead.  */
    function without parameters instead.  */
 void (*error_print_progname) (void) = NULL;
 void (*error_print_progname) (void) = NULL;
 
 
-
+extern __typeof(error) __error attribute_hidden;
-attribute_hidden void __error (int status, int errnum, const char *message, ...)
+void __error (int status, int errnum, const char *message, ...)
 {
 {
     va_list args;
     va_list args;
 
 
@@ -69,7 +69,8 @@ attribute_hidden void __error (int status, int errnum, const char *message, ...)
 	exit (status);
 	exit (status);
 }
 }
 
 
-attribute_hidden void __error_at_line (int status, int errnum, const char *file_name,
+extern __typeof(error_at_line) __error_at_line attribute_hidden;
+void __error_at_line (int status, int errnum, const char *file_name,
 	       unsigned int line_number, const char *message, ...)
 	       unsigned int line_number, const char *message, ...)
 {
 {
     va_list args;
     va_list args;
@@ -105,7 +106,6 @@ attribute_hidden void __error_at_line (int status, int errnum, const char *file_
 	exit (status);
 	exit (status);
 }
 }
 
 
-#undef error
+/* psm: keep this weak, to many use this outside of libc */
-#undef error_at_line
+weak_alias(__error,error)
-strong_alias(__error,error)
 strong_alias(__error_at_line,error_at_line)
 strong_alias(__error_at_line,error_at_line)

+ 2 - 2
libc/misc/sysvipc/ipc.h

@@ -12,8 +12,8 @@
 #ifdef __NR_ipc
 #ifdef __NR_ipc
 
 
 /* The actual system call: all functions are multiplexed by this.  */
 /* The actual system call: all functions are multiplexed by this.  */
-extern int __syscall_ipc __P((unsigned int __call, int __first, int __second,
+extern int __syscall_ipc (unsigned int __call, int __first, int __second,
-					  int __third, void *__ptr)) attribute_hidden;
+					  int __third, void *__ptr) attribute_hidden;
 
 
 
 
 /* The codes for the functions to use the multiplexer `__syscall_ipc'.  */
 /* The codes for the functions to use the multiplexer `__syscall_ipc'.  */

+ 1 - 0
libc/pwd_grp/lckpwdf.c

@@ -26,6 +26,7 @@
 #include <unistd.h>
 #include <unistd.h>
 #include <sys/file.h>
 #include <sys/file.h>
 #include <paths.h>
 #include <paths.h>
+#include <shadow.h>
 
 
 libc_hidden_proto(memset)
 libc_hidden_proto(memset)
 libc_hidden_proto(open)
 libc_hidden_proto(open)

+ 1 - 0
libc/signal/allocrtsig.c

@@ -55,6 +55,7 @@ int __libc_current_sigrtmax (void)
 /* Allocate real-time signal with highest/lowest available
 /* Allocate real-time signal with highest/lowest available
    priority.  Please note that we don't use a lock since we assume
    priority.  Please note that we don't use a lock since we assume
    this function to be called at program start.  */
    this function to be called at program start.  */
+int __libc_allocate_rtsig (int high);
 int __libc_allocate_rtsig (int high)
 int __libc_allocate_rtsig (int high)
 {
 {
   if (current_rtmin == -1 || current_rtmin > current_rtmax)
   if (current_rtmin == -1 || current_rtmin > current_rtmax)

+ 2 - 1
libc/signal/raise.c

@@ -12,7 +12,8 @@
 libc_hidden_proto(getpid)
 libc_hidden_proto(getpid)
 libc_hidden_proto(kill)
 libc_hidden_proto(kill)
 
 
-int attribute_hidden __raise(int signo)
+int __raise (int signo)  attribute_hidden;
+int __raise(int signo)
 {
 {
     return kill(getpid(), signo);
     return kill(getpid(), signo);
 }
 }

+ 1 - 1
libc/signal/sigjmp.c

@@ -27,7 +27,7 @@ libc_hidden_proto(sigprocmask)
    before doing a `__setjmp' on ENV[0].__jmpbuf.
    before doing a `__setjmp' on ENV[0].__jmpbuf.
    Always return zero.  */
    Always return zero.  */
 
 
-attribute_hidden
+int __sigjmp_save (sigjmp_buf env, int savemask) attribute_hidden;
 int __sigjmp_save (sigjmp_buf env, int savemask)
 int __sigjmp_save (sigjmp_buf env, int savemask)
 {
 {
     env[0].__mask_was_saved = (savemask && 
     env[0].__mask_was_saved = (savemask && 

+ 1 - 0
libc/signal/signal.c

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

+ 2 - 1
libc/signal/sigwait.c

@@ -24,7 +24,8 @@
 
 
 libc_hidden_proto(sigwaitinfo)
 libc_hidden_proto(sigwaitinfo)
 
 
-int attribute_hidden __sigwait (const sigset_t *set, int *sig)
+int __sigwait (const sigset_t *set, int *sig) attribute_hidden;
+int __sigwait (const sigset_t *set, int *sig)
 {
 {
 	int ret = 1;
 	int ret = 1;
 	if ((ret = sigwaitinfo(set, NULL)) != -1) {
 	if ((ret = sigwaitinfo(set, NULL)) != -1) {

+ 3 - 1
libc/stdio/_fpmaxtostr.c

@@ -203,7 +203,9 @@ static const __fpmax_t exp16_table[] = {
 #define FPO_STR_WIDTH   (0x80 | ' ');
 #define FPO_STR_WIDTH   (0x80 | ' ');
 #define FPO_STR_PREC    'p'
 #define FPO_STR_PREC    'p'
 
 
-ssize_t attribute_hidden _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
+ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
+					__fp_outfunc_t fp_outfunc) attribute_hidden;
+ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
 					__fp_outfunc_t fp_outfunc)
 					__fp_outfunc_t fp_outfunc)
 {
 {
 #ifdef __UCLIBC_HAS_HEXADECIMAL_FLOATS__
 #ifdef __UCLIBC_HAS_HEXADECIMAL_FLOATS__

+ 2 - 1
libc/stdio/_load_inttype.c

@@ -8,7 +8,8 @@
 #include "_stdio.h"
 #include "_stdio.h"
 #include <printf.h>
 #include <printf.h>
 
 
-uintmax_t attribute_hidden _load_inttype(int desttype, register const void *src, int uflag)
+uintmax_t _load_inttype(int desttype, register const void *src, int uflag) attribute_hidden;
+uintmax_t _load_inttype(int desttype, register const void *src, int uflag)
 {
 {
 	if (uflag >= 0) {			/* unsigned */
 	if (uflag >= 0) {			/* unsigned */
 #if LONG_MAX != INT_MAX
 #if LONG_MAX != INT_MAX

+ 2 - 1
libc/stdio/_store_inttype.c

@@ -28,7 +28,8 @@
 
 
 /* We assume int may be short or long, but short and long are different. */
 /* We assume int may be short or long, but short and long are different. */
 
 
-void attribute_hidden _store_inttype(register void *dest, int desttype, uintmax_t val)
+void _store_inttype(register void *dest, int desttype, uintmax_t val) attribute_hidden;
+void _store_inttype(register void *dest, int desttype, uintmax_t val)
 {
 {
 	if (desttype == __PA_FLAG_CHAR) { /* assume char not int */
 	if (desttype == __PA_FLAG_CHAR) { /* assume char not int */
 		*((unsigned char *) dest) = val;
 		*((unsigned char *) dest) = val;

+ 1 - 0
libc/stdlib/atexit.c

@@ -186,6 +186,7 @@ extern int __cxa_atexit (cxaefuncp func, void *arg, void *dso_handle)
  *  with the same dso handle.  Otherwise, if D is NULL, call all of the
  *  with the same dso handle.  Otherwise, if D is NULL, call all of the
  *  registered handlers.
  *  registered handlers.
  */
  */
+void __cxa_finalize (void *dso_handle);
 void __cxa_finalize (void *dso_handle)
 void __cxa_finalize (void *dso_handle)
 {
 {
     struct exit_function *efp;
     struct exit_function *efp;

+ 2 - 1
libc/stdlib/drand48-iter.c

@@ -27,7 +27,8 @@
 struct drand48_data __libc_drand48_data attribute_hidden;
 struct drand48_data __libc_drand48_data attribute_hidden;
 
 
 
 
-int attribute_hidden
+int __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) attribute_hidden;
+int
 __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer)
 __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer)
 {
 {
   uint64_t X;
   uint64_t X;

+ 1 - 0
libc/stdlib/realpath.c

@@ -18,6 +18,7 @@
 #include <limits.h>				/* for PATH_MAX */
 #include <limits.h>				/* for PATH_MAX */
 #include <sys/param.h>			/* for MAXPATHLEN */
 #include <sys/param.h>			/* for MAXPATHLEN */
 #include <errno.h>
 #include <errno.h>
+#include <stdlib.h>
 
 
 #include <sys/stat.h>			/* for S_IFLNK */
 #include <sys/stat.h>			/* for S_IFLNK */
 
 

+ 3 - 1
libc/stdlib/setenv.c

@@ -52,7 +52,9 @@ static char **last_environ;
    must be used directly.  This is all complicated by the fact that we try
    must be used directly.  This is all complicated by the fact that we try
    to reuse values once generated for a `setenv' call since we can never
    to reuse values once generated for a `setenv' call since we can never
    free the strings.  */
    free the strings.  */
-int attribute_hidden __add_to_environ (const char *name, const char *value, 
+int __add_to_environ (const char *name, const char *value, 
+	const char *combined, int replace) attribute_hidden;
+int __add_to_environ (const char *name, const char *value, 
 	const char *combined, int replace)
 	const char *combined, int replace)
 {
 {
     register char **ep;
     register char **ep;

+ 5 - 3
libc/stdlib/system.c

@@ -9,6 +9,7 @@
 #include <signal.h>
 #include <signal.h>
 #include <unistd.h>
 #include <unistd.h>
 #include <sys/wait.h>
 #include <sys/wait.h>
+#include <stdlib.h>
 
 
 libc_hidden_proto(_exit)
 libc_hidden_proto(_exit)
 libc_hidden_proto(wait4)
 libc_hidden_proto(wait4)
@@ -18,12 +19,13 @@ libc_hidden_proto(vfork)
 
 
 /* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
 /* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
 #include <sys/syscall.h>
 #include <sys/syscall.h>
-#if ! defined __NR_vfork
+#ifndef __NR_vfork
-#define vfork fork	
+# define vfork fork	
 libc_hidden_proto(fork)
 libc_hidden_proto(fork)
 #endif
 #endif
 
 
-int __libc_system(char *command)
+extern __typeof(system) __libc_system;
+int __libc_system(const char *command)
 {
 {
 	int wait_val, pid;
 	int wait_val, pid;
 	__sighandler_t save_quit, save_int, save_chld;
 	__sighandler_t save_quit, save_int, save_chld;

+ 1 - 0
libc/string/__xpg_basename.c

@@ -6,6 +6,7 @@
  */
  */
 
 
 #include "_string.h"
 #include "_string.h"
+#include <libgen.h>
 
 
 char *__xpg_basename(register char *path)
 char *__xpg_basename(register char *path)
 {
 {

+ 1 - 0
libc/string/dirname.c

@@ -6,6 +6,7 @@
  */
  */
 
 
 #include "_string.h"
 #include "_string.h"
+#include <libgen.h>
 
 
 char *dirname(char *path)
 char *dirname(char *path)
 {
 {

+ 1 - 0
libc/string/psignal.c

@@ -8,6 +8,7 @@
 #include <features.h>
 #include <features.h>
 #include <stdio.h>
 #include <stdio.h>
 #include <string.h>
 #include <string.h>
+#include <signal.h>
 
 
 libc_hidden_proto(fprintf)
 libc_hidden_proto(fprintf)
 libc_hidden_proto(strsignal)
 libc_hidden_proto(strsignal)

+ 3 - 1
libc/string/strlcpy.c

@@ -22,7 +22,9 @@ libc_hidden_proto(strlcpy)
  * Returns strlen(src), so truncation occurred if the return value is >= n. */
  * Returns strlen(src), so truncation occurred if the return value is >= n. */
 
 
 #ifdef WANT_WIDE
 #ifdef WANT_WIDE
-attribute_hidden
+size_t Wstrlcpy(register Wchar *__restrict dst,
+				  register const Wchar *__restrict src,
+				  size_t n) attribute_hidden;
 #endif
 #endif
 size_t Wstrlcpy(register Wchar *__restrict dst,
 size_t Wstrlcpy(register Wchar *__restrict dst,
 				  register const Wchar *__restrict src,
 				  register const Wchar *__restrict src,

+ 2 - 1
libc/sysdeps/linux/arm/__syscall_error.c

@@ -10,7 +10,8 @@
 
 
 /* This routine is jumped to by all the syscall handlers, to stash
 /* This routine is jumped to by all the syscall handlers, to stash
  * an error number into errno.  */
  * an error number into errno.  */
-int attribute_hidden __syscall_error(int err_no)
+int __syscall_error(int err_no) attribute_hidden;
+int __syscall_error(int err_no)
 {
 {
 	__set_errno(-err_no);
 	__set_errno(-err_no);
 	return -1;
 	return -1;

+ 2 - 0
libc/sysdeps/linux/arm/sigaction.c

@@ -29,6 +29,8 @@
 extern void __default_sa_restorer(void);
 extern void __default_sa_restorer(void);
 extern void __default_rt_sa_restorer(void);
 extern void __default_rt_sa_restorer(void);
 
 
+extern __typeof(sigaction) __libc_sigaction;
+
 /* When RT signals are in use we need to use a different return stub.  */
 /* When RT signals are in use we need to use a different return stub.  */
 #ifdef __NR_rt_sigreturn
 #ifdef __NR_rt_sigreturn
 #define choose_restorer(flags)					\
 #define choose_restorer(flags)					\

+ 2 - 1
libc/sysdeps/linux/common/__socketcall.c

@@ -10,5 +10,6 @@
 #include "syscalls.h"
 #include "syscalls.h"
 #ifdef __NR_socketcall
 #ifdef __NR_socketcall
 #define __NR___socketcall __NR_socketcall
 #define __NR___socketcall __NR_socketcall
-attribute_hidden _syscall2(int, __socketcall, int, call, unsigned long *, args);
+int __socketcall(int __call, unsigned long *__args) attribute_hidden;
+_syscall2(int, __socketcall, int, call, unsigned long *, args);
 #endif
 #endif

+ 2 - 1
libc/sysdeps/linux/common/__syscall_ipc.c

@@ -11,6 +11,7 @@
 
 
 #ifdef __NR_ipc
 #ifdef __NR_ipc
 #define __NR___syscall_ipc __NR_ipc
 #define __NR___syscall_ipc __NR_ipc
-attribute_hidden _syscall5(int, __syscall_ipc, unsigned int, call, int, first, int, second, int,
+#include "../../../misc/sysvipc/ipc.h"
+_syscall5(int, __syscall_ipc, unsigned int, call, int, first, int, second, int,
 		  third, void *, ptr);
 		  third, void *, ptr);
 #endif
 #endif

+ 2 - 2
libc/sysdeps/linux/common/__syscall_rt_sigaction.c

@@ -12,9 +12,9 @@
 #ifdef __NR_rt_sigaction
 #ifdef __NR_rt_sigaction
 #include <signal.h>
 #include <signal.h>
 
 
+int __syscall_rt_sigaction (int __signum, const struct sigaction *__act, struct sigaction *__oldact, size_t __size) attribute_hidden;
 #define __NR___syscall_rt_sigaction __NR_rt_sigaction
 #define __NR___syscall_rt_sigaction __NR_rt_sigaction
-#undef sigaction
+_syscall4(int, __syscall_rt_sigaction, int, signum,
-attribute_hidden _syscall4(int, __syscall_rt_sigaction, int, signum,
 		  const struct sigaction *, act, struct sigaction *, oldact,
 		  const struct sigaction *, act, struct sigaction *, oldact,
 		  size_t, size);
 		  size_t, size);
 #endif
 #endif

+ 2 - 2
libc/sysdeps/linux/common/__syscall_sigaction.c

@@ -12,8 +12,8 @@
 #ifndef __NR_rt_sigaction
 #ifndef __NR_rt_sigaction
 #define __NR___syscall_sigaction __NR_sigaction
 #define __NR___syscall_sigaction __NR_sigaction
 #include <signal.h>
 #include <signal.h>
-#undef sigaction
+int __syscall_sigaction (int __signum, const struct sigaction *__act, struct sigaction *__oldact) attribute_hidden;
-attribute_hidden _syscall3(int, __syscall_sigaction, int, signum, const struct sigaction *,
+_syscall3(int, __syscall_sigaction, int, signum, const struct sigaction *,
 		  act, struct sigaction *, oldact);
 		  act, struct sigaction *, oldact);
 #endif
 #endif
 
 

+ 1 - 0
libc/sysdeps/linux/common/capget.c

@@ -8,6 +8,7 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+int capget(void *header, void *data);
 #ifdef __NR_capget
 #ifdef __NR_capget
 _syscall2(int, capget, void *, header, void *, data);
 _syscall2(int, capget, void *, header, void *, data);
 #else
 #else

+ 1 - 0
libc/sysdeps/linux/common/capset.c

@@ -8,6 +8,7 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+int capset(void *header, const void *data);
 #ifdef __NR_capset
 #ifdef __NR_capset
 _syscall2(int, capset, void *, header, const void *, data);
 _syscall2(int, capset, void *, header, const void *, data);
 #else
 #else

+ 1 - 0
libc/sysdeps/linux/common/close.c

@@ -10,6 +10,7 @@
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 
 
+extern __typeof(close) __libc_close;
 #define __NR___libc_close __NR_close
 #define __NR___libc_close __NR_close
 _syscall1(int, __libc_close, int, fd);
 _syscall1(int, __libc_close, int, fd);
 libc_hidden_proto(close)
 libc_hidden_proto(close)

+ 3 - 0
libc/sysdeps/linux/common/create_module.c

@@ -13,6 +13,8 @@
 
 
 #ifdef __NR_create_module
 #ifdef __NR_create_module
 
 
+unsigned long create_module(const char *name, size_t size);
+
 #if defined(__UCLIBC_BROKEN_CREATE_MODULE__)
 #if defined(__UCLIBC_BROKEN_CREATE_MODULE__)
 # define __NR___create_module  __NR_create_module
 # define __NR___create_module  __NR_create_module
 static inline _syscall2(long, __create_module, const char *, name, size_t, size);
 static inline _syscall2(long, __create_module, const char *, name, size_t, size);
@@ -46,6 +48,7 @@ _syscall2(unsigned long, create_module, const char *, name, size_t, size);
 #endif
 #endif
 
 
 #else /* !__NR_create_module */
 #else /* !__NR_create_module */
+caddr_t create_module(const char *name attribute_unused, size_t size attribute_unused);
 caddr_t create_module(const char *name attribute_unused, size_t size attribute_unused)
 caddr_t create_module(const char *name attribute_unused, size_t size attribute_unused)
 {
 {
 	__set_errno(ENOSYS);
 	__set_errno(ENOSYS);

+ 1 - 0
libc/sysdeps/linux/common/delete_module.c

@@ -7,6 +7,7 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+int delete_module(const char *name);
 #ifdef __NR_delete_module
 #ifdef __NR_delete_module
 _syscall1(int, delete_module, const char *, name);
 _syscall1(int, delete_module, const char *, name);
 #else
 #else

+ 1 - 0
libc/sysdeps/linux/common/fork.c

@@ -12,6 +12,7 @@
 
 
 #ifdef __ARCH_HAS_MMU__
 #ifdef __ARCH_HAS_MMU__
 #ifdef __NR_fork
 #ifdef __NR_fork
+extern __typeof(fork) __libc_fork;
 #define __NR___libc_fork __NR_fork
 #define __NR___libc_fork __NR_fork
 _syscall0(pid_t, __libc_fork);
 _syscall0(pid_t, __libc_fork);
 libc_hidden_proto(fork)
 libc_hidden_proto(fork)

+ 1 - 0
libc/sysdeps/linux/common/fsync.c

@@ -10,6 +10,7 @@
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 
 
+extern __typeof(fsync) __libc_fsync;
 #define __NR___libc_fsync __NR_fsync
 #define __NR___libc_fsync __NR_fsync
 _syscall1(int, __libc_fsync, int, fd);
 _syscall1(int, __libc_fsync, int, fd);
 weak_alias(__libc_fsync, fsync)
 weak_alias(__libc_fsync, fsync)

+ 1 - 0
libc/sysdeps/linux/common/get_kernel_syms.c

@@ -10,6 +10,7 @@
 #include "syscalls.h"
 #include "syscalls.h"
 
 
 struct kernel_sym;
 struct kernel_sym;
+int get_kernel_syms(struct kernel_sym *table attribute_unused);
 #ifdef __NR_get_kernel_syms
 #ifdef __NR_get_kernel_syms
 _syscall1(int, get_kernel_syms, struct kernel_sym *, table);
 _syscall1(int, get_kernel_syms, struct kernel_sym *, table);
 #else
 #else

+ 1 - 0
libc/sysdeps/linux/common/getpagesize.c

@@ -25,6 +25,7 @@ libc_hidden_proto(__pagesize)
 
 
 /* Return the system page size.  */
 /* Return the system page size.  */
 /* couldn't make __getpagesize hidden, because shm.h uses it in a macro */
 /* couldn't make __getpagesize hidden, because shm.h uses it in a macro */
+extern __typeof(getpagesize) __getpagesize;
 int __getpagesize(void)
 int __getpagesize(void)
 {
 {
   if (__pagesize != 0)
   if (__pagesize != 0)

+ 1 - 0
libc/sysdeps/linux/common/getpgid.c

@@ -8,6 +8,7 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+#include <unistd.h>
 
 
 #define __NR___syscall_getpgid __NR_getpgid
 #define __NR___syscall_getpgid __NR_getpgid
 static inline _syscall1(__kernel_pid_t, __syscall_getpgid, __kernel_pid_t, pid);
 static inline _syscall1(__kernel_pid_t, __syscall_getpgid, __kernel_pid_t, pid);

+ 1 - 0
libc/sysdeps/linux/common/getpid.c

@@ -10,6 +10,7 @@
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 
 
+extern __typeof(getpid) __libc_getpid;
 #if defined __NR_getxpid
 #if defined __NR_getxpid
 # define __NR_getpid __NR_getxpid
 # define __NR_getpid __NR_getxpid
 #endif
 #endif

+ 1 - 0
libc/sysdeps/linux/common/getresgid.c

@@ -8,6 +8,7 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+#include <unistd.h>
 
 
 #ifdef __NR_getresgid
 #ifdef __NR_getresgid
 # define __NR___syscall_getresgid __NR_getresgid
 # define __NR___syscall_getresgid __NR_getresgid

+ 1 - 0
libc/sysdeps/linux/common/getresuid.c

@@ -8,6 +8,7 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+#include <unistd.h>
 
 
 #ifdef __NR_getresuid
 #ifdef __NR_getresuid
 # define __NR___syscall_getresuid __NR_getresuid
 # define __NR___syscall_getresuid __NR_getresuid

+ 1 - 0
libc/sysdeps/linux/common/init_module.c

@@ -8,6 +8,7 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+int init_module(void *first, void *second, void *third, void *fourth, void *fifth);
 #ifdef __NR_init_module
 #ifdef __NR_init_module
 /* This may have 5 arguments (for old 2.0 kernels) or 2 arguments
 /* This may have 5 arguments (for old 2.0 kernels) or 2 arguments
  * (for 2.2 and 2.4 kernels).  Use the greatest common denominator,
  * (for 2.2 and 2.4 kernels).  Use the greatest common denominator,

+ 1 - 0
libc/sysdeps/linux/common/ioperm.c

@@ -9,5 +9,6 @@
 
 
 #include "syscalls.h"
 #include "syscalls.h"
 #if defined __ARCH_HAS_MMU__ && defined __NR_ioperm
 #if defined __ARCH_HAS_MMU__ && defined __NR_ioperm
+#include <sys/perm.h>
 _syscall3(int, ioperm, unsigned long, from, unsigned long, num, int, turn_on);
 _syscall3(int, ioperm, unsigned long, from, unsigned long, num, int, turn_on);
 #endif
 #endif

+ 1 - 0
libc/sysdeps/linux/common/iopl.c

@@ -10,5 +10,6 @@
 #include "syscalls.h"
 #include "syscalls.h"
 /* Tuns out the m68k unistd.h kernel header is broken */
 /* Tuns out the m68k unistd.h kernel header is broken */
 #if defined __ARCH_HAS_MMU__ && defined __NR_iopl && ( !defined(__mc68000__))
 #if defined __ARCH_HAS_MMU__ && defined __NR_iopl && ( !defined(__mc68000__))
+#include <sys/perm.h>
 _syscall1(int, iopl, int, level);
 _syscall1(int, iopl, int, level);
 #endif
 #endif

+ 1 - 0
libc/sysdeps/linux/common/klogctl.c

@@ -9,6 +9,7 @@
 
 
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
+#include <sys/klog.h>
 #define __NR__syslog		__NR_syslog
 #define __NR__syslog		__NR_syslog
 static inline _syscall3(int, _syslog, int, type, char *, buf, int, len);
 static inline _syscall3(int, _syslog, int, type, char *, buf, int, len);
 int klogctl(int type, char *buf, int len)
 int klogctl(int type, char *buf, int len)

+ 2 - 0
libc/sysdeps/linux/common/llseek.c

@@ -10,6 +10,8 @@
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 
 
+extern __typeof(lseek64) __libc_lseek64;
+
 #if defined __NR__llseek && defined __UCLIBC_HAS_LFS__
 #if defined __NR__llseek && defined __UCLIBC_HAS_LFS__
 
 
 # ifndef INLINE_SYSCALL
 # ifndef INLINE_SYSCALL

+ 2 - 1
libc/sysdeps/linux/common/longjmp.c

@@ -25,10 +25,11 @@ libc_hidden_proto(sigprocmask)
 extern void __longjmp (__jmp_buf __env, int __val) attribute_noreturn;
 extern void __longjmp (__jmp_buf __env, int __val) attribute_noreturn;
 libc_hidden_proto(__longjmp)
 libc_hidden_proto(__longjmp)
 
 
+extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
 /* Set the signal mask to the one specified in ENV, and jump
 /* Set the signal mask to the one specified in ENV, and jump
    to the position specified in ENV, causing the setjmp
    to the position specified in ENV, causing the setjmp
    call there to return VAL, or 1 if VAL is 0.  */
    call there to return VAL, or 1 if VAL is 0.  */
-void attribute_noreturn __libc_longjmp (sigjmp_buf env, int val)
+void __libc_longjmp (sigjmp_buf env, int val)
 {
 {
 #if 0
 #if 0
   /* Perform any cleanups needed by the frames being unwound.  */
   /* Perform any cleanups needed by the frames being unwound.  */

+ 1 - 0
libc/sysdeps/linux/common/madvise.c

@@ -8,6 +8,7 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+#include <sys/mman.h>
 #ifdef __NR_madvise
 #ifdef __NR_madvise
 _syscall3(int, madvise, void *, __addr, size_t, __len, int, __advice);
 _syscall3(int, madvise, void *, __addr, size_t, __len, int, __advice);
 #endif
 #endif

+ 1 - 0
libc/sysdeps/linux/common/mincore.c

@@ -8,6 +8,7 @@
 
 
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
+#include <sys/mman.h>
 
 
 #ifdef __NR_mincore
 #ifdef __NR_mincore
 _syscall3(int, mincore, void *, start, size_t, length, unsigned char *, vec);
 _syscall3(int, mincore, void *, start, size_t, length, unsigned char *, vec);

+ 1 - 0
libc/sysdeps/linux/common/modify_ldt.c

@@ -9,6 +9,7 @@
 
 
 #include "syscalls.h"
 #include "syscalls.h"
 
 
+int modify_ldt (int func, void *ptr, unsigned long bytecount);
 #ifdef __NR_modify_ldt
 #ifdef __NR_modify_ldt
 _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount);
 _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount);
 #endif
 #endif

+ 1 - 0
libc/sysdeps/linux/common/msync.c

@@ -11,6 +11,7 @@
 #include <unistd.h>
 #include <unistd.h>
 #include <sys/mman.h>
 #include <sys/mman.h>
 
 
+extern __typeof(msync) __libc_msync;
 #define __NR___libc_msync __NR_msync
 #define __NR___libc_msync __NR_msync
 _syscall3(int, __libc_msync, void *, addr, size_t, length, int, flags);
 _syscall3(int, __libc_msync, void *, addr, size_t, length, int, flags);
 weak_alias(__libc_msync,msync)
 weak_alias(__libc_msync,msync)

+ 1 - 1
libc/sysdeps/linux/common/nanosleep.c

@@ -10,7 +10,7 @@
 #include "syscalls.h"
 #include "syscalls.h"
 #include <time.h>
 #include <time.h>
 
 
-
+extern __typeof(nanosleep) __libc_nanosleep;
 #define __NR___libc_nanosleep __NR_nanosleep
 #define __NR___libc_nanosleep __NR_nanosleep
 _syscall2(int, __libc_nanosleep, const struct timespec *, req,
 _syscall2(int, __libc_nanosleep, const struct timespec *, req,
 		  struct timespec *, rem);
 		  struct timespec *, rem);

+ 2 - 0
libc/sysdeps/linux/common/noophooks.c

@@ -20,6 +20,8 @@
 
 
 #include <libc-internal.h>
 #include <libc-internal.h>
 
 
+void
+__cyg_profile_func_enter (attribute_unused void *this_fn, attribute_unused void *call_site);
 void
 void
 __cyg_profile_func_enter (attribute_unused void *this_fn, attribute_unused void *call_site)
 __cyg_profile_func_enter (attribute_unused void *this_fn, attribute_unused void *call_site)
 {
 {

+ 1 - 0
libc/sysdeps/linux/common/open64.c

@@ -14,6 +14,7 @@
 # define O_LARGEFILE	0100000
 # define O_LARGEFILE	0100000
 #endif
 #endif
 
 
+extern __typeof(open64) __libc_open64;
 extern __typeof(open) __libc_open;
 extern __typeof(open) __libc_open;
 libc_hidden_proto(__libc_open)
 libc_hidden_proto(__libc_open)
 
 

+ 1 - 0
libc/sysdeps/linux/common/pause.c

@@ -11,6 +11,7 @@
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 
 
+extern __typeof(pause) __libc_pause;
 #ifdef __NR_pause
 #ifdef __NR_pause
 #define __NR___libc_pause __NR_pause
 #define __NR___libc_pause __NR_pause
 _syscall0(int, __libc_pause);
 _syscall0(int, __libc_pause);

+ 1 - 0
libc/sysdeps/linux/common/pivot_root.c

@@ -9,6 +9,7 @@
 
 
 #include "syscalls.h"
 #include "syscalls.h"
 
 
+int pivot_root(const char *new_root, const char *put_old);
 #ifdef __NR_pivot_root
 #ifdef __NR_pivot_root
 _syscall2(int, pivot_root, const char *, new_root, const char *, put_old);
 _syscall2(int, pivot_root, const char *, new_root, const char *, put_old);
 #else
 #else

+ 2 - 1
libc/sysdeps/linux/common/prctl.c

@@ -9,5 +9,6 @@
 
 
 #include "syscalls.h"
 #include "syscalls.h"
 #include <stdarg.h>
 #include <stdarg.h>
-//#include <sys/prctl.h>
+/* psm: including sys/prctl.h would depend on kernel headers */
+extern int prctl (int, int, int, int, int);
 _syscall5(int, prctl, int, a, int, b, int, c, int, d, int, e);
 _syscall5(int, prctl, int, a, int, b, int, c, int, d, int, e);

+ 7 - 0
libc/sysdeps/linux/common/pread_write.c

@@ -17,6 +17,13 @@
 #include <unistd.h>
 #include <unistd.h>
 #include <stdint.h>
 #include <stdint.h>
 
 
+extern __typeof(pread) __libc_pread;
+extern __typeof(pwrite) __libc_pwrite;
+#ifdef __UCLIBC_HAS_LFS__
+extern __typeof(pread64) __libc_pread64;
+extern __typeof(pwrite64) __libc_pwrite64;
+#endif
+
 #ifdef __NR_pread
 #ifdef __NR_pread
 
 
 # define __NR___syscall_pread __NR_pread 
 # define __NR___syscall_pread __NR_pread 

+ 2 - 0
libc/sysdeps/linux/common/query_module.c

@@ -8,6 +8,8 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+int query_module(const char *name attribute_unused, int which attribute_unused,
+				 void *buf attribute_unused, size_t bufsize attribute_unused, size_t * ret attribute_unused);
 #ifdef __NR_query_module
 #ifdef __NR_query_module
 _syscall5(int, query_module, const char *, name, int, which,
 _syscall5(int, query_module, const char *, name, int, which,
 		  void *, buf, size_t, bufsize, size_t *, ret);
 		  void *, buf, size_t, bufsize, size_t *, ret);

+ 1 - 0
libc/sysdeps/linux/common/read.c

@@ -10,6 +10,7 @@
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 
 
+extern __typeof(read) __libc_read;
 #define __NR___libc_read __NR_read
 #define __NR___libc_read __NR_read
 _syscall3(ssize_t, __libc_read, int, fd, __ptr_t, buf, size_t, count);
 _syscall3(ssize_t, __libc_read, int, fd, __ptr_t, buf, size_t, count);
 libc_hidden_proto(read)
 libc_hidden_proto(read)

+ 1 - 0
libc/sysdeps/linux/common/reboot.c

@@ -8,6 +8,7 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+#include <sys/reboot.h>
 #define __NR__reboot __NR_reboot
 #define __NR__reboot __NR_reboot
 static inline _syscall3(int, _reboot, int, magic, int, magic2, int, flag);
 static inline _syscall3(int, _reboot, int, magic, int, magic2, int, flag);
 int reboot(int flag)
 int reboot(int flag)

+ 2 - 2
libc/sysdeps/linux/common/ssp-local.c

@@ -28,8 +28,8 @@ extern void __stack_chk_fail (void) attribute_noreturn;
 /* On some architectures, this helps needless PIC pointer setup
 /* On some architectures, this helps needless PIC pointer setup
    that would be needed just for the __stack_chk_fail call.  */
    that would be needed just for the __stack_chk_fail call.  */
 
 
-void attribute_noreturn attribute_hidden
+void __stack_chk_fail_local (void) attribute_noreturn attribute_hidden;
-__stack_chk_fail_local (void)
+void __stack_chk_fail_local (void)
 {
 {
   __stack_chk_fail ();
   __stack_chk_fail ();
 }
 }

+ 6 - 4
libc/sysdeps/linux/common/ssp.c

@@ -80,8 +80,8 @@ static attribute_noreturn void terminate(void)
 	_exit(127);
 	_exit(127);
 }
 }
 
 
-void attribute_noreturn __stack_smash_handler(char func[], int damaged __attribute__ ((unused)));
+void __stack_smash_handler(char func[], int damaged __attribute__ ((unused))) attribute_noreturn;
-void attribute_noreturn __stack_smash_handler(char func[], int damaged)
+void __stack_smash_handler(char func[], int damaged)
 {
 {
 	static const char message[] = ": stack smashing attack in function ";
 	static const char message[] = ": stack smashing attack in function ";
 
 
@@ -94,7 +94,8 @@ void attribute_noreturn __stack_smash_handler(char func[], int damaged)
 		terminate();
 		terminate();
 }
 }
 
 
-void attribute_noreturn __stack_chk_fail(void)
+void __stack_chk_fail(void) attribute_noreturn;
+void __stack_chk_fail(void)
 {
 {
 	static const char msg1[] = "stack smashing detected: ";
 	static const char msg1[] = "stack smashing detected: ";
 	static const char msg3[] = " terminated";
 	static const char msg3[] = " terminated";
@@ -109,7 +110,8 @@ void attribute_noreturn __stack_chk_fail(void)
 }
 }
 
 
 #if 0
 #if 0
-void attribute_noreturn __chk_fail(void)
+void __chk_fail(void) attribute_noreturn;
+void __chk_fail(void)
 {
 {
 	static const char msg1[] = "buffer overflow detected: ";
 	static const char msg1[] = "buffer overflow detected: ";
 	static const char msg3[] = " terminated";
 	static const char msg3[] = " terminated";

+ 4 - 0
libc/sysdeps/linux/common/sysctl.c

@@ -8,6 +8,10 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+/* psm: including sys/sysctl.h would depend on kernel headers */
+extern int sysctl (int *__name, int __nlen, void *__oldval,
+		   size_t *__oldlenp, void *__newval, size_t __newlen) __THROW;
+
 struct __sysctl_args {
 struct __sysctl_args {
 	int *name;
 	int *name;
 	int nlen;
 	int nlen;

+ 1 - 0
libc/sysdeps/linux/common/uselib.c

@@ -10,5 +10,6 @@
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 #ifdef __NR_uselib
 #ifdef __NR_uselib
+int uselib (const char *library);
 _syscall1(int, uselib, const char *, library);
 _syscall1(int, uselib, const char *, library);
 #endif
 #endif

+ 2 - 0
libc/sysdeps/linux/common/wait.c

@@ -12,6 +12,8 @@
 
 
 libc_hidden_proto(wait4)
 libc_hidden_proto(wait4)
 
 
+extern __typeof(wait) __libc_wait;
+
 /* Wait for a child to die.  When one does, put its status in *STAT_LOC
 /* Wait for a child to die.  When one does, put its status in *STAT_LOC
  * and return its process ID.  For errors, return (pid_t) -1.  */
  * and return its process ID.  For errors, return (pid_t) -1.  */
 __pid_t __libc_wait (__WAIT_STATUS_DEFN stat_loc)
 __pid_t __libc_wait (__WAIT_STATUS_DEFN stat_loc)

+ 2 - 1
libc/sysdeps/linux/common/waitpid.c

@@ -11,7 +11,8 @@
 #include <sys/resource.h>
 #include <sys/resource.h>
 
 
 libc_hidden_proto(wait4)
 libc_hidden_proto(wait4)
-
+	
+extern __typeof(waitpid) __libc_waitpid;
 __pid_t __libc_waitpid(__pid_t pid, int *wait_stat, int options)
 __pid_t __libc_waitpid(__pid_t pid, int *wait_stat, int options)
 {
 {
     return wait4(pid, wait_stat, options, NULL);
     return wait4(pid, wait_stat, options, NULL);

+ 1 - 0
libc/sysdeps/linux/common/write.c

@@ -10,6 +10,7 @@
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
 
 
+extern __typeof(write) __libc_write;
 #define __NR___libc_write __NR_write
 #define __NR___libc_write __NR_write
 _syscall3(ssize_t, __libc_write, int, fd, const __ptr_t, buf, size_t, count);
 _syscall3(ssize_t, __libc_write, int, fd, const __ptr_t, buf, size_t, count);
 libc_hidden_proto(write)
 libc_hidden_proto(write)

+ 2 - 1
libc/sysdeps/linux/common/xattr.c

@@ -23,6 +23,7 @@
 
 
 #include "syscalls.h"
 #include "syscalls.h"
 #include <unistd.h>
 #include <unistd.h>
+#include <sys/xattr.h>
 
 
 /* sets */
 /* sets */
 #ifdef __NR_setxattr
 #ifdef __NR_setxattr
@@ -122,7 +123,7 @@ ssize_t llistxattr(__const char *__path, char *__list, size_t __size)
 #endif
 #endif
 
 
 #ifdef __NR_flistxattr
 #ifdef __NR_flistxattr
-_syscall3(size_t, flistxattr, int, filedes, char *, list, size_t, size);
+_syscall3(ssize_t, flistxattr, int, filedes, char *, list, size_t, size);
 #else
 #else
 ssize_t flistxattr(int __fd, char *__list, size_t __size)
 ssize_t flistxattr(int __fd, char *__list, size_t __size)
 {
 {

+ 2 - 1
libc/sysdeps/linux/hppa/__syscall_error.c

@@ -10,7 +10,8 @@
 
 
 /* This routine is jumped to by all the syscall handlers, to stash
 /* This routine is jumped to by all the syscall handlers, to stash
  * an error number into errno.  */
  * an error number into errno.  */
-int attribute_hidden __syscall_error(int err_no)
+int __syscall_error(int err_no) attribute_hidden;
+int __syscall_error(int err_no)
 {
 {
 	__set_errno(err_no);
 	__set_errno(err_no);
 	return -1;
 	return -1;

+ 2 - 1
libc/sysdeps/linux/i386/__syscall_error.c

@@ -25,7 +25,8 @@
 #include <errno.h>
 #include <errno.h>
 #include <features.h>
 #include <features.h>
 
 
-int attribute_hidden __syscall_error(void)
+int __syscall_error(void) attribute_hidden;
+int __syscall_error(void)
 {
 {
 	register int edx __asm__ ("%edx");
 	register int edx __asm__ ("%edx");
 	__asm__ ("mov %eax, %edx\n\t"
 	__asm__ ("mov %eax, %edx\n\t"

+ 1 - 0
libc/sysdeps/linux/i386/sigaction.c

@@ -27,6 +27,7 @@
 
 
 #define SA_RESTORER	0x04000000
 #define SA_RESTORER	0x04000000
 
 
+extern __typeof(sigaction) __libc_sigaction;
 
 
 #if defined __NR_rt_sigaction
 #if defined __NR_rt_sigaction
 libc_hidden_proto(memcpy)
 libc_hidden_proto(memcpy)

+ 2 - 1
libc/sysdeps/linux/m68k/__syscall_error.c

@@ -10,7 +10,8 @@
 
 
 /* This routine is jumped to by all the syscall handlers, to stash
 /* This routine is jumped to by all the syscall handlers, to stash
  * an error number into errno.  */
  * an error number into errno.  */
-int attribute_hidden __syscall_error(void)
+int __syscall_error(void) attribute_hidden;
+int __syscall_error(void)
 {
 {
 	register int err_no asm("%d0");
 	register int err_no asm("%d0");
 	__set_errno(-err_no);
 	__set_errno(-err_no);

+ 1 - 1
libc/sysdeps/linux/mips/__longjmp.c

@@ -28,7 +28,7 @@
 extern void __longjmp (__jmp_buf __env, int __val) attribute_noreturn;
 extern void __longjmp (__jmp_buf __env, int __val) attribute_noreturn;
 libc_hidden_proto(__longjmp)
 libc_hidden_proto(__longjmp)
 
 
-void attribute_noreturn __longjmp (__jmp_buf env, int val_arg)
+void __longjmp (__jmp_buf env, int val_arg)
 {
 {
     /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before
     /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before
        the hack around it); force it to use $a1 for the longjmp value.
        the hack around it); force it to use $a1 for the longjmp value.

+ 2 - 1
libc/sysdeps/linux/mips/__syscall_error.c

@@ -10,7 +10,8 @@
 
 
 /* This routine is jumped to by all the syscall handlers, to stash
 /* This routine is jumped to by all the syscall handlers, to stash
  * an error number into errno.  */
  * an error number into errno.  */
-int attribute_hidden __syscall_error(int err_no)
+int __syscall_error(int err_no) attribute_hidden;
+int __syscall_error(int err_no)
 {
 {
 	__set_errno(err_no);
 	__set_errno(err_no);
 	return -1;
 	return -1;

+ 2 - 1
libc/sysdeps/linux/mips/sigaction.c

@@ -27,8 +27,9 @@
 
 
 #define SA_RESTORER	0x04000000
 #define SA_RESTORER	0x04000000
 
 
+extern __typeof(sigaction) __libc_sigaction;
 
 
-#if defined __NR_rt_sigaction
+#ifdef __NR_rt_sigaction
 
 
 libc_hidden_proto(memcpy)
 libc_hidden_proto(memcpy)
 
 

+ 2 - 1
libc/sysdeps/linux/powerpc/__syscall_error.c

@@ -10,7 +10,8 @@
 
 
 /* This routine is jumped to by all the syscall handlers, to stash
 /* This routine is jumped to by all the syscall handlers, to stash
  * an error number into errno.  */
  * an error number into errno.  */
-int attribute_hidden __syscall_error(int err_no)
+int __syscall_error(int err_no) attribute_hidden;
+int __syscall_error(int err_no)
 {
 {
 	__set_errno(err_no);
 	__set_errno(err_no);
 	return -1;
 	return -1;

+ 2 - 1
libc/sysdeps/linux/sparc/__syscall_error.c

@@ -10,7 +10,8 @@
 
 
 /* This routine is jumped to by all the syscall handlers, to stash
 /* This routine is jumped to by all the syscall handlers, to stash
  * an error number into errno.  */
  * an error number into errno.  */
-int attribute_hidden __syscall_error(int err_no)
+int __syscall_error(int err_no) attribute_hidden;
+int __syscall_error(int err_no)
 {
 {
 	__set_errno(err_no);
 	__set_errno(err_no);
 	return -1;
 	return -1;

+ 2 - 1
libc/sysdeps/linux/x86_64/__syscall_error.c

@@ -10,7 +10,8 @@
 
 
 /* This routine is jumped to by all the syscall handlers, to stash
 /* This routine is jumped to by all the syscall handlers, to stash
  * an error number into errno.  */
  * an error number into errno.  */
-int attribute_hidden __syscall_error(void)
+int __syscall_error(void) attribute_hidden;
+int __syscall_error(void)
 {
 {
 	register int err_no asm("%rax");
 	register int err_no asm("%rax");
 	__set_errno(-err_no);
 	__set_errno(-err_no);

+ 3 - 1
libc/sysdeps/linux/x86_64/sigaction.c

@@ -33,7 +33,9 @@
 /* We do not globally define the SA_RESTORER flag so do it here.  */
 /* We do not globally define the SA_RESTORER flag so do it here.  */
 #define SA_RESTORER 0x04000000
 #define SA_RESTORER 0x04000000
 
 
-#if defined __NR_rt_sigaction
+extern __typeof(sigaction) __libc_sigaction;
+
+#ifdef __NR_rt_sigaction
 /* Using the hidden attribute here does not change the code but it
 /* Using the hidden attribute here does not change the code but it
    helps to avoid warnings.  */
    helps to avoid warnings.  */
 extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
 extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;

+ 1 - 0
libc/termios/tcdrain.c

@@ -22,6 +22,7 @@
 
 
 libc_hidden_proto(ioctl)
 libc_hidden_proto(ioctl)
 
 
+extern __typeof(tcdrain) __libc_tcdrain;
 /* Wait for pending output to be written on FD.  */
 /* Wait for pending output to be written on FD.  */
 int __libc_tcdrain (int fd)
 int __libc_tcdrain (int fd)
 {
 {

+ 1 - 0
libc/unistd/getlogin.c

@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
 #include <unistd.h>
 #include <unistd.h>
+#include <stdio.h>
 
 
 libc_hidden_proto(strcpy)
 libc_hidden_proto(strcpy)
 libc_hidden_proto(strncpy)
 libc_hidden_proto(strncpy)

+ 2 - 1
libcrypt/des.c

@@ -638,7 +638,8 @@ encrypt(char *block, int flag)
 			block[(i << 5) | j] = (io[i] & bits32[j]) ? 1 : 0;
 			block[(i << 5) | j] = (io[i] & bits32[j]) ? 1 : 0;
 }
 }
 
 
-char attribute_hidden *
+char *__des_crypt(const char *key, const char *setting) attribute_hidden;
+char *
 __des_crypt(const char *key, const char *setting)
 __des_crypt(const char *key, const char *setting)
 {
 {
 	u_int32_t	count, salt, l, r0, r1, keybuf[2];
 	u_int32_t	count, salt, l, r0, r1, keybuf[2];

+ 1 - 0
libm/w_gamma_r.c

@@ -22,6 +22,7 @@ static char rcsid[] = "$NetBSD: w_gamma_r.c,v 1.7 1995/11/20 22:06:45 jtc Exp $"
 #include "math_private.h"
 #include "math_private.h"
 
 
 
 
+double gamma_r(double x, int *signgamp);
 #ifdef __STDC__
 #ifdef __STDC__
 	double gamma_r(double x, int *signgamp) /* wrapper lgamma_r */
 	double gamma_r(double x, int *signgamp) /* wrapper lgamma_r */
 #else
 #else

+ 2 - 0
libpthread/linuxthreads.old/internals.h

@@ -470,6 +470,8 @@ void __fresetlockfiles(void);
 void __pthread_manager_adjust_prio(int thread_prio);
 void __pthread_manager_adjust_prio(int thread_prio);
 void __pthread_initialize_minimal (void);
 void __pthread_initialize_minimal (void);
 
 
+extern void __pthread_exit (void *retval);
+
 extern int __pthread_attr_setguardsize __P ((pthread_attr_t *__attr,
 extern int __pthread_attr_setguardsize __P ((pthread_attr_t *__attr,
 					     size_t __guardsize));
 					     size_t __guardsize));
 extern int __pthread_attr_getguardsize __P ((__const pthread_attr_t *__attr,
 extern int __pthread_attr_getguardsize __P ((__const pthread_attr_t *__attr,