From 05e75260d6952308d7c865ff67c0e3678b7ba935 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 26 Jan 2006 22:04:19 +0000 Subject: Get rid of missing prototype warnings --- libc/stdlib/atexit.c | 1 + libc/stdlib/drand48-iter.c | 3 ++- libc/stdlib/realpath.c | 1 + libc/stdlib/setenv.c | 4 +++- libc/stdlib/system.c | 8 +++++--- 5 files changed, 12 insertions(+), 5 deletions(-) (limited to 'libc/stdlib') diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c index d6bac6eee..cad25feb1 100644 --- a/libc/stdlib/atexit.c +++ b/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 * registered handlers. */ +void __cxa_finalize (void *dso_handle); void __cxa_finalize (void *dso_handle) { struct exit_function *efp; diff --git a/libc/stdlib/drand48-iter.c b/libc/stdlib/drand48-iter.c index fc2a4ae9e..45aac678e 100644 --- a/libc/stdlib/drand48-iter.c +++ b/libc/stdlib/drand48-iter.c @@ -27,7 +27,8 @@ 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) { uint64_t X; diff --git a/libc/stdlib/realpath.c b/libc/stdlib/realpath.c index f82676709..c3cc517de 100644 --- a/libc/stdlib/realpath.c +++ b/libc/stdlib/realpath.c @@ -18,6 +18,7 @@ #include /* for PATH_MAX */ #include /* for MAXPATHLEN */ #include +#include #include /* for S_IFLNK */ diff --git a/libc/stdlib/setenv.c b/libc/stdlib/setenv.c index bf154035e..e7dc26053 100644 --- a/libc/stdlib/setenv.c +++ b/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 to reuse values once generated for a `setenv' call since we can never 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) { register char **ep; diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c index 89168cc73..5f85a0819 100644 --- a/libc/stdlib/system.c +++ b/libc/stdlib/system.c @@ -9,6 +9,7 @@ #include #include #include +#include libc_hidden_proto(_exit) libc_hidden_proto(wait4) @@ -18,12 +19,13 @@ libc_hidden_proto(vfork) /* uClinux-2.0 has vfork, but Linux 2.0 doesn't */ #include -#if ! defined __NR_vfork -#define vfork fork +#ifndef __NR_vfork +# define vfork fork libc_hidden_proto(fork) #endif -int __libc_system(char *command) +extern __typeof(system) __libc_system; +int __libc_system(const char *command) { int wait_val, pid; __sighandler_t save_quit, save_int, save_chld; -- cgit v1.2.3