From 87936cd0130414cccc8a7427498dd5491ec2664f Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 23 Mar 2011 17:08:07 +0100 Subject: errno and *_init cleanup Define a common view of __errno_location, __h_errno_location in common header and use that everywhere, __uClibc_main.c is no special. The rule adopted: for enabled threads we make in libc the __GI_x() variants strong, x() weak and (should) provide another strong x() in libpthread. If threads are disabled, even the __GI_x() variants are weak. _stdio_init,_stdio_term,_locale_init: make all hidden weak in common header Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libc/misc/internals/__uClibc_main.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'libc/misc/internals/__uClibc_main.c') diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index bda1bb8b4..9f7258d8a 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -15,9 +15,6 @@ */ #include -#ifndef __UCLIBC_HAS_THREADS_NATIVE__ -#define _ERRNO_H -#endif #include #include #include @@ -25,13 +22,13 @@ #include #include #include -#include -#include +#include +#include +#include #include #include #include #ifdef __UCLIBC_HAS_THREADS_NATIVE__ -#include #include #include #include @@ -39,6 +36,9 @@ #ifdef __UCLIBC_HAS_THREADS__ #include #endif +#ifdef __UCLIBC_HAS_LOCALE__ +#include +#endif #ifndef SHARED void *__libc_stack_end = NULL; @@ -116,12 +116,6 @@ static __always_inline int not_null_ptr(const void *p) /* * Prototypes. */ -extern int *weak_const_function __errno_location(void); -extern int *weak_const_function __h_errno_location(void); -extern void weak_function _stdio_init(void) attribute_hidden; -#ifdef __UCLIBC_HAS_LOCALE__ -extern void weak_function _locale_init(void) attribute_hidden; -#endif #ifdef __UCLIBC_HAS_THREADS__ #if !defined (__UCLIBC_HAS_THREADS_NATIVE__) || defined (SHARED) extern void weak_function __pthread_initialize_minimal(void); -- cgit v1.2.3