[git commit master 1/1] add missing prototypes

Carmelo AMOROSO carmelo.amoroso at st.com
Fri Mar 4 12:03:28 UTC 2011


On 3/3/2011 6:22 PM, Peter S.Mazinger wrote:
> 
> commit: 
> http://git.uclibc.org/uClibc/commit/?id=f00e553e4b084007781df5e4b5accc2e152da231
> branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
> 
> Add some missing prototypes
> 
> Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
> ---
> include/signal.h | 6 ++++++
> libc/misc/internals/__uClibc_main.c | 7 +++++--
> libc/sysdeps/linux/common/longjmp.c | 4 ++++
> libpthread/nptl/init.c | 1 +
> libpthread/nptl/pthreadP.h | 16 ++++++++++++++--
> libpthread/nptl/sysdeps/generic/libc-tls.c | 1 +
> libpthread/nptl/unwind.c | 3 +++
> 7 files changed, 34 insertions(+), 4 deletions(-)
> 
> diff --git a/include/signal.h b/include/signal.h
> index 0a09c7a..80e4ede 100644
> --- a/include/signal.h
> +++ b/include/signal.h
> @@ -310,6 +310,9 @@ extern int sigwait (__const sigset_t *__restrict __set, int 
> *__restrict __sig)
> __THROW. */
> extern int sigwaitinfo (__const sigset_t *__restrict __set,
> siginfo_t *__restrict __info) __nonnull ((1));
> +#ifdef _LIBC
> +extern __typeof(sigwaitinfo) __sigwaitinfo attribute_hidden;
> +#endif
> libc_hidden_proto(sigwaitinfo)
> 
> /* Select any of pending signals from SET and place information in INFO.
> @@ -321,6 +324,9 @@ extern int sigtimedwait (__const sigset_t *__restrict __set,
> siginfo_t *__restrict __info,
> __const struct timespec *__restrict __timeout)
> __nonnull ((1));
> +#ifdef _LIBC
> +extern __typeof(sigtimedwait) __sigtimedwait attribute_hidden;
> +#endif
> libc_hidden_proto(sigtimedwait)
> 
> /* Send signal SIG to the process PID. Associate data in VAL with the
> diff --git a/libc/misc/internals/__uClibc_main.c 
> b/libc/misc/internals/__uClibc_main.c
> index 58f6643..da29ef6 100644
> --- a/libc/misc/internals/__uClibc_main.c
> +++ b/libc/misc/internals/__uClibc_main.c
> @@ -313,6 +313,11 @@ void __uClibc_fini(void)
> }
> libc_hidden_def(__uClibc_fini)
> 
> +#ifndef SHARED
> +extern void __nptl_deallocate_tsd (void) __attribute ((weak));
> +extern unsigned int __nptl_nthreads __attribute ((weak));
> +#endif
> +
> /* __uClibc_main is the new main stub for uClibc. This function is
> * called from crt1 (version 0.9.28 or newer), after ALL shared libraries
> * are initialized, just before we call the application's main function.
> @@ -481,7 +486,6 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc,
> # ifdef SHARED
> __libc_pthread_functions.ptr__nptl_deallocate_tsd ();
> # else
> - extern void __nptl_deallocate_tsd (void) __attribute ((weak));
> __nptl_deallocate_tsd ();
> # endif
> 
> @@ -491,7 +495,6 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc,
> # ifdef SHARED
> unsigned int *const ptr = __libc_pthread_functions.ptr_nthreads;
> # else
> - extern unsigned int __nptl_nthreads __attribute ((weak));
> unsigned int *const ptr = &__nptl_nthreads;
> # endif
> 
> diff --git a/libc/sysdeps/linux/common/longjmp.c 
> b/libc/sysdeps/linux/common/longjmp.c
> index 4d14424..b07eced 100644
> --- a/libc/sysdeps/linux/common/longjmp.c
> +++ b/libc/sysdeps/linux/common/longjmp.c
> @@ -24,6 +24,10 @@
> extern void __longjmp (__jmp_buf __env, int __val) attribute_noreturn;
> libc_hidden_proto(__longjmp)
> 
> +#if 0
> +extern void _longjmp_unwind (jmp_buf env, int val);
> +#endif
> +
> extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
> /* Set the signal mask to the one specified in ENV, and jump
> to the position specified in ENV, causing the setjmp
> diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c
> index 911293a..c8ca096 100644
> --- a/libpthread/nptl/init.c
> +++ b/libpthread/nptl/init.c
> @@ -257,6 +257,7 @@ extern void **__libc_dl_error_tsd (void) __attribute__ 
> ((const));
> /* This can be set by the debugger before initialization is complete. */
> static bool __nptl_initial_report_events __attribute_used__;
> 
> +void __pthread_initialize_minimal_internal (void) attribute_hidden;
> void
> __pthread_initialize_minimal_internal (void)
> {
> diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h
> index fbac7d0..fb354ea 100644
> --- a/libpthread/nptl/pthreadP.h
> +++ b/libpthread/nptl/pthreadP.h
> @@ -179,7 +179,13 @@ extern struct pthread_key_struct 
> __pthread_keys[PTHREAD_KEYS_MAX];
> hidden_proto (__pthread_keys)
> 
> /* Number of threads running. */
> -extern unsigned int __nptl_nthreads attribute_hidden;
> +extern unsigned int __nptl_nthreads
> +#ifdef SHARED
> + attribute_hidden
> +#else
> + __attribute ((weak))
> +#endif
> + ;
> 
> #ifndef __ASSUME_SET_ROBUST_LIST
> /* Negative if we do not have the system call and we can use it. */
> @@ -563,7 +569,13 @@ extern void _pthread_cleanup_push_defer (struct 
> _pthread_cleanup_buffer *buffer,
> extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer,
> int execute);
> 
> -extern void __nptl_deallocate_tsd (void) attribute_hidden;
> +extern void __nptl_deallocate_tsd (void)
> +#ifdef SHARED
> + attribute_hidden
> +#else
> + __attribute ((weak))
> +#endif
> + ;
> 
> extern int __nptl_setxid (struct xid_command *cmdp) attribute_hidden;
> 
> diff --git a/libpthread/nptl/sysdeps/generic/libc-tls.c 
> b/libpthread/nptl/sysdeps/generic/libc-tls.c
> index c45e761..e14fc26 100644
> --- a/libpthread/nptl/sysdeps/generic/libc-tls.c
> +++ b/libpthread/nptl/sysdeps/generic/libc-tls.c
> @@ -242,6 +242,7 @@ _dl_tls_setup (void)
> return 0;
> }
> 
> +extern void __pthread_initialize_minimal(void) __attribute__((weak));
> 
> /* This is the minimal initialization function used when libpthread is
> not used. */
> diff --git a/libpthread/nptl/unwind.c b/libpthread/nptl/unwind.c
> index 0322a60..8f60ae4 100644
> --- a/libpthread/nptl/unwind.c
> +++ b/libpthread/nptl/unwind.c
> @@ -117,6 +117,9 @@ unwind_cleanup (_Unwind_Reason_Code reason, struct 
> _Unwind_Exception *exc)
> void
> attribute_protected
> __cleanup_fct_attribute __attribute ((noreturn))
> +#if !defined SHARED && !defined IS_IN_LIBPTHREAD

it should be IS_IN_libpthread (lower case)

cheers,
carmelo

> +weak_function
> +#endif
> __pthread_unwind (__pthread_unwind_buf_t *buf)
> {
> struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;
> --
> 1.7.3.4
> 
> _______________________________________________
> uClibc-cvs mailing list
> uClibc-cvs at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc-cvs
> 


More information about the uClibc-cvs mailing list