Browse Source

add missing prototypes

Add some missing prototypes

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Peter S. Mazinger 13 years ago
parent
commit
f00e553e4b

+ 6 - 0
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

+ 5 - 2
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
 

+ 4 - 0
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

+ 1 - 0
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)
 {

+ 14 - 2
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;
 

+ 1 - 0
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.  */

+ 3 - 0
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
+weak_function
+#endif
 __pthread_unwind (__pthread_unwind_buf_t *buf)
 {
   struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;