Browse Source

silence some warnings about missing prototypes

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 14 years ago
parent
commit
13433395f2

+ 1 - 1
libc/stdlib/system.c

@@ -17,6 +17,7 @@
 #include <sysdep-cancel.h>
 #endif
 
+extern __typeof(system) __libc_system;
 
 /* TODO: the cancellable version breaks on sparc currently,
  * need to figure out why still
@@ -28,7 +29,6 @@
 # define vfork fork
 #endif
 
-extern __typeof(system) __libc_system;
 int __libc_system(const char *command)
 {
 	int wait_val, pid;

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

@@ -10,10 +10,10 @@
 #include <sys/syscall.h>
 #include <unistd.h>
 
+extern __typeof(fork) __libc_fork;
 #ifdef __ARCH_USE_MMU__
 
 #ifdef __NR_fork
-extern __typeof(fork) __libc_fork;
 #define __NR___libc_fork __NR_fork
 _syscall0(pid_t, __libc_fork)
 weak_alias(__libc_fork,fork)

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

@@ -19,6 +19,7 @@
 
 /* Suspend the process until a signal arrives.
    This always returns -1 and sets errno to EINTR.  */
+extern __typeof(pause) __libc_pause;
 int
 __libc_pause (void)
 {

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

@@ -23,7 +23,7 @@ extern __typeof(select) __libc_select;
 
 #if !defined(__NR__newselect) && !defined(__NR_select) && defined __USE_XOPEN2K
 # define __NR___libc_pselect6 __NR_pselect6
-_syscall6(int, __libc_pselect6, int, n, fd_set *, readfds, fd_set *, writefds,
+static _syscall6(int, __libc_pselect6, int, n, fd_set *, readfds, fd_set *, writefds,
         fd_set *, exceptfds, const struct timespec *, timeout,
         const sigset_t *, sigmask)
 
@@ -71,7 +71,7 @@ int __libc_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
 # define __NR___syscall_select __NR_select
 #endif
 
-_syscall5(int, __syscall_select, int, n, fd_set *, readfds,
+static _syscall5(int, __syscall_select, int, n, fd_set *, readfds,
 		fd_set *, writefds, fd_set *, exceptfds, struct timeval *, timeout);
 
 int __libc_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,

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

@@ -10,6 +10,7 @@
 #include <sys/wait.h>
 #include <sys/resource.h>
 
+extern __typeof(wait) __libc_wait;
 /* 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.  */
 #ifdef __UCLIBC_HAS_THREADS_NATIVE__

+ 1 - 1
libpthread/nptl/init.c

@@ -34,8 +34,8 @@
 #include <smp.h>
 #include <lowlevellock.h>
 #include <bits/kernel-features.h>
-
 #include <stdio.h>
+extern __typeof(sigaction) __libc_sigaction;
 
 /* Size and alignment of static TLS block.  */
 size_t __static_tls_size;

+ 1 - 3
libpthread/nptl/sysdeps/pthread/sigaction.c

@@ -26,9 +26,7 @@
 #define LIBC_SIGACTION	1
 #include <sigaction.c>
 
-int
-sigaction (int sig, const struct sigaction *act, struct sigaction *oact);
- 
+extern __typeof(sigaction) __sigaction;
 int
 __sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 {

+ 1 - 1
libpthread/nptl/sysdeps/unix/sysv/linux/fork.c

@@ -58,7 +58,7 @@ fresetlockfiles (void)
 #endif
 }
 
-
+extern __typeof(fork) __libc_fork;
 pid_t
 __libc_fork (void)
 {

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c

@@ -46,6 +46,7 @@ really_getpid (pid_t oldval)
 }
 #endif
 
+extern __typeof(getpid) __getpid;
 pid_t
 __getpid (void)
 {