diff --git a/ChangeLog b/ChangeLog index 9a17077db3..8be24d6d88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,13 @@ 2000-12-31 Andreas Jaeger + * include/libc-internal.h: Add prototype for __libc_freeres. + * sysdeps/unix/sysv/linux/init-first.c: Include for prototypes, remove redundant prototypes. * gmon/gmon.c: Likewise. * sysdeps/unix/i386/i586/clock_getres.c: Likewise. * sysdeps/unix/i386/i586/clock_gettime.c: Likewise. + * malloc/mtrace.c: Likewise. * sysdeps/generic/enbl-secure.c: Include for prototypes. @@ -15,6 +18,7 @@ * debug/pcprofile.c: Likewise. * sysdeps/unix/sysv/linux/i386/get_clockfreq.c: Likewise. * sysdeps/generic/get_clockfreq.c: Likewise. + * malloc/set-freeres.c: Likewise. * locale/localeinfo.h: Add internal prototypes. diff --git a/debug/noophooks.c b/debug/noophooks.c index 5c1ae01960..7f2517801d 100644 --- a/debug/noophooks.c +++ b/debug/noophooks.c @@ -1,5 +1,5 @@ /* Noop hooks for the instrumenting functions. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1999. @@ -18,6 +18,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + void __cyg_profile_func_enter (void *this_fn, void *call_site) { diff --git a/debug/pcprofile.c b/debug/pcprofile.c index 11447deb7d..eb95856c2d 100644 --- a/debug/pcprofile.c +++ b/debug/pcprofile.c @@ -1,5 +1,5 @@ /* Profile PC and write result to FIFO. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1999. @@ -23,6 +23,7 @@ #include #include #include +#include /* Nonzero if we are actually doing something. */ static int active; diff --git a/elf/soinit.c b/elf/soinit.c index 4e2a149d86..42e6cf1691 100644 --- a/elf/soinit.c +++ b/elf/soinit.c @@ -3,9 +3,11 @@ the `.ctors' and `.dtors' sections so the lists are terminated, and calling those lists of functions. */ -# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC +#include + +#ifdef HAVE_DWARF2_UNWIND_INFO_STATIC # include -# endif +#endif static void (*const __CTOR_LIST__[1]) (void) __attribute__ ((section (".ctors"))) diff --git a/gmon/gmon.c b/gmon/gmon.c index 45fe6e8ac4..a0c5714164 100644 --- a/gmon/gmon.c +++ b/gmon/gmon.c @@ -41,8 +41,7 @@ #include #include #include - -extern int __profile_frequency __P ((void)); +#include struct __bb *__bb_head; /* Head of basic-block list or NULL. */ diff --git a/include/libc-internal.h b/include/libc-internal.h index 0734191861..b7f630a807 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -21,5 +21,7 @@ extern void __cyg_profile_func_exit (void *this_fn, void *call_site); /* Get frequency of the system processor. */ extern unsigned long long int __get_clockfreq (void); +/* Free all allocated resources. */ +extern void __libc_freeres (void); #endif /* _LIBC_INTERNAL */ diff --git a/malloc/mtrace.c b/malloc/mtrace.c index 505389f3f8..0d170d62a0 100644 --- a/malloc/mtrace.c +++ b/malloc/mtrace.c @@ -36,6 +36,10 @@ #include +#ifdef _LIBC +# include +#endif + #ifdef USE_IN_LIBIO # include # define setvbuf(s, b, f, l) _IO_setvbuf (s, b, f, l) @@ -223,7 +227,6 @@ tr_reallochook (ptr, size, caller) #ifdef _LIBC -extern void __libc_freeres (void); /* This function gets called to make sure all memory the library allocates get freed and so does not irritate the user when studying diff --git a/malloc/set-freeres.c b/malloc/set-freeres.c index 814bc4a55e..169026cc86 100644 --- a/malloc/set-freeres.c +++ b/malloc/set-freeres.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ #include #include #include +#include DEFINE_HOOK (__libc_subfreeres, (void)); diff --git a/sysdeps/generic/enbl-secure.c b/sysdeps/generic/enbl-secure.c index 7dcd4391fa..fac79ea30e 100644 --- a/sysdeps/generic/enbl-secure.c +++ b/sysdeps/generic/enbl-secure.c @@ -1,5 +1,5 @@ /* Define and initialize the `__libc_enable_secure' flag. Generic version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,7 +21,7 @@ dl-sysdep.c defines and initializes __libc_enable_secure. */ #include - +#include /* Safest assumption, if somehow the initializer isn't run. */ int __libc_enable_secure = 1; diff --git a/sysdeps/generic/get_clockfreq.c b/sysdeps/generic/get_clockfreq.c index 210ba27d1e..94f233c557 100644 --- a/sysdeps/generic/get_clockfreq.c +++ b/sysdeps/generic/get_clockfreq.c @@ -17,6 +17,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + unsigned long long int __get_clockfreq (void) { diff --git a/sysdeps/generic/prof-freq.c b/sysdeps/generic/prof-freq.c index 43b421df54..0610534ad1 100644 --- a/sysdeps/generic/prof-freq.c +++ b/sysdeps/generic/prof-freq.c @@ -31,6 +31,7 @@ #include #include +#include int __profile_frequency (void) diff --git a/sysdeps/mach/hurd/profil.c b/sysdeps/mach/hurd/profil.c index 365b11bed3..f070d69e7a 100644 --- a/sysdeps/mach/hurd/profil.c +++ b/sysdeps/mach/hurd/profil.c @@ -1,5 +1,5 @@ /* Low-level statistical profiling support function. Mach/Hurd version. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,6 +25,8 @@ #include #include #include +#include + #define MAX_PC_SAMPLES 512 /* XXX ought to be exported in kernel hdr */ diff --git a/sysdeps/unix/i386/i586/clock_getres.c b/sysdeps/unix/i386/i586/clock_getres.c index 49986f85ab..dd0af535ef 100644 --- a/sysdeps/unix/i386/i586/clock_getres.c +++ b/sysdeps/unix/i386/i586/clock_getres.c @@ -18,6 +18,7 @@ #include #include +#include /* This implementation uses the TSC register in modern (i586 and up) IA-32 processors (most modern clones also provide it). Since we need the @@ -27,9 +28,6 @@ faster processors will not work without changes. */ -/* Function to determine processor frequency. */ -extern unsigned long long int __get_clockfreq (void); - /* Clock frequency of the processor. We make it a 64-bit variable because some jokers are already playing with processors with more than 4GHz. */ diff --git a/sysdeps/unix/i386/i586/clock_gettime.c b/sysdeps/unix/i386/i586/clock_gettime.c index 5d0e9f4c60..636744e4d6 100644 --- a/sysdeps/unix/i386/i586/clock_gettime.c +++ b/sysdeps/unix/i386/i586/clock_gettime.c @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ #include +#include /* This implementation uses the TSC register in modern (i586 and up) IA-32 processors (most modern clones also provide it). Since we need the @@ -26,9 +27,6 @@ faster processors will not work without changes. */ -/* Function to determine processor frequency. */ -extern unsigned long long int __get_clockfreq (void); - /* Clock frequency of the processor. We make it a 64-bit variable because some jokers are already playing with processors with more than 4GHz. */ diff --git a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c index 26784c6da0..ec6c174421 100644 --- a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c +++ b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c @@ -21,6 +21,7 @@ #include #include #include +#include unsigned long long int diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c index 0e5b4a287d..af4e9c6d54 100644 --- a/sysdeps/unix/sysv/linux/init-first.c +++ b/sysdeps/unix/sysv/linux/init-first.c @@ -26,14 +26,13 @@ #include #include #include "kernel-features.h" +#include #ifndef SHARED # include "dl-osinfo.h" #endif -extern void __libc_init_secure (void); extern void __libc_init (int, char **, char **); -extern void __libc_global_ctors (void); /* The function is called from assembly stubs the compiler can't see. */ static void init (int, char **, char **) __attribute__ ((unused));