[git commit master 1/1] silence some warnings about missing prototypes

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Jun 11 17:22:42 UTC 2010


commit: http://git.uclibc.org/uClibc/commit/?id=13433395f2fd808006cd07b05b79cae193c6ecb9
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/stdlib/system.c                             |    2 +-
 libc/sysdeps/linux/common/fork.c                 |    2 +-
 libc/sysdeps/linux/common/pause.c                |    1 +
 libc/sysdeps/linux/common/select.c               |    4 ++--
 libc/sysdeps/linux/common/wait.c                 |    1 +
 libpthread/nptl/init.c                           |    2 +-
 libpthread/nptl/sysdeps/pthread/sigaction.c      |    4 +---
 libpthread/nptl/sysdeps/unix/sysv/linux/fork.c   |    2 +-
 libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c |    1 +
 9 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index 4f54d1d..acd8676 100644
--- a/libc/stdlib/system.c
+++ b/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;
diff --git a/libc/sysdeps/linux/common/fork.c b/libc/sysdeps/linux/common/fork.c
index 26a20d9..2e73006 100644
--- a/libc/sysdeps/linux/common/fork.c
+++ b/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)
diff --git a/libc/sysdeps/linux/common/pause.c b/libc/sysdeps/linux/common/pause.c
index 132ffa8..33eb409 100644
--- a/libc/sysdeps/linux/common/pause.c
+++ b/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)
 {
diff --git a/libc/sysdeps/linux/common/select.c b/libc/sysdeps/linux/common/select.c
index 0c2d919..029fb08 100644
--- a/libc/sysdeps/linux/common/select.c
+++ b/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,
diff --git a/libc/sysdeps/linux/common/wait.c b/libc/sysdeps/linux/common/wait.c
index d4b79bd..9b529eb 100644
--- a/libc/sysdeps/linux/common/wait.c
+++ b/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__
diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c
index b70de84..3e5fde3 100644
--- a/libpthread/nptl/init.c
+++ b/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;
diff --git a/libpthread/nptl/sysdeps/pthread/sigaction.c b/libpthread/nptl/sysdeps/pthread/sigaction.c
index 20cff89..e004a39 100644
--- a/libpthread/nptl/sysdeps/pthread/sigaction.c
+++ b/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)
 {
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
index 2d4cae2..6ad9053 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
+++ b/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)
 {
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
index 96e2bf4..d4de3cd 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
+++ b/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)
 {
-- 
1.7.1



More information about the uClibc-cvs mailing list