diff options
Diffstat (limited to 'libpthread/nptl/compat')
-rw-r--r-- | libpthread/nptl/compat/libc-internal.h | 3 | ||||
-rw-r--r-- | libpthread/nptl/compat/libc-symbols.h | 31 |
2 files changed, 28 insertions, 6 deletions
diff --git a/libpthread/nptl/compat/libc-internal.h b/libpthread/nptl/compat/libc-internal.h index e5fd5337a..455e9b34b 100644 --- a/libpthread/nptl/compat/libc-internal.h +++ b/libpthread/nptl/compat/libc-internal.h @@ -5,6 +5,9 @@ # define _LIBC_INTERNAL 1 #include <hp-timing.h> +#ifdef __UCLIBC__ +#include <libc-symbols.h> +#endif /* Initialize the `__libc_enable_secure' flag. */ extern void __libc_init_secure (void); diff --git a/libpthread/nptl/compat/libc-symbols.h b/libpthread/nptl/compat/libc-symbols.h index f2db6a416..9c7cc6238 100644 --- a/libpthread/nptl/compat/libc-symbols.h +++ b/libpthread/nptl/compat/libc-symbols.h @@ -1,12 +1,31 @@ #ifndef _LIBC_SYMBOLS_H #define _LIBC_SYMBOLS_H 1 -/* - * NPTL - These definitions were taken from 'include/libc-symbols.h' - * in glibc. We are going to use the empty macros for now - * until we run into other compile errors that force us to - * do otherwise. - */ +/* Handling on non-exported internal names. We have to do this only + for shared code. */ +#ifdef SHARED +# define INTUSE(name) name##_internal +# define INTDEF(name) strong_alias (name, name##_internal) +# define INTVARDEF(name) \ + _INTVARDEF (name, name##_internal) +# if defined HAVE_VISIBILITY_ATTRIBUTE +# define _INTVARDEF(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((alias (#name), \ + visibility ("hidden"))); +# else +# define _INTVARDEF(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((alias (#name))); +# endif +# define INTDEF2(name, newname) strong_alias (name, newname##_internal) +# define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal) +#else +# define INTUSE(name) name +# define INTDEF(name) +# define INTVARDEF(name) +# define INTDEF2(name, newname) +# define INTVARDEF2(name, newname) +#endif + #if 0 # ifndef __ASSEMBLER__ # if !defined HAVE_VISIBILITY_ATTRIBUTE \ |