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 --- include/netdb.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/netdb.h') diff --git a/include/netdb.h b/include/netdb.h index 10669b9a5..0bf79c0e3 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -59,6 +59,11 @@ __BEGIN_DECLS /* Function to get address of global `h_errno' variable. */ extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); +#ifdef _LIBC +# ifndef __UCLIBC_HAS_THREADS__ +extern int weak_const_function *__h_errno_location(void); +# endif +#endif libc_hidden_proto(__h_errno_location) /* Macros for accessing h_errno from inside libc. */ -- cgit v1.2.3