diff options
Diffstat (limited to 'libpthread')
| -rw-r--r-- | libpthread/nptl/compat/libc-internal.h | 3 | ||||
| -rw-r--r-- | libpthread/nptl/compat/libc-symbols.h | 31 | ||||
| -rw-r--r-- | libpthread/nptl/pt-system.c | 5 | ||||
| -rw-r--r-- | libpthread/nptl/sem_open.c | 14 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/mips/tls.h | 4 | 
5 files changed, 49 insertions, 8 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 \ diff --git a/libpthread/nptl/pt-system.c b/libpthread/nptl/pt-system.c index b3b45ab93..c43c1edbb 100644 --- a/libpthread/nptl/pt-system.c +++ b/libpthread/nptl/pt-system.c @@ -22,6 +22,11 @@  #include <sysdep.h>  #include "pthreadP.h" +/* Compatibility define. */ +#ifdef __UCLIBC__ +#include <sysdep-cancel.h> +#define __libc_system	system +#endif  int  system (const char *line) diff --git a/libpthread/nptl/sem_open.c b/libpthread/nptl/sem_open.c index a4b2f5b3a..1fb72d2d4 100644 --- a/libpthread/nptl/sem_open.c +++ b/libpthread/nptl/sem_open.c @@ -18,6 +18,9 @@     02111-1307 USA.  */  #include <errno.h> +#ifdef __PTHREADS_NATIVE__ +#define __USE_GNU +#endif  #include <fcntl.h>  #include <mntent.h>  #include <paths.h> @@ -36,6 +39,17 @@  #include "semaphoreP.h" +/* Compatibility defines. */ +#if __UCLIBC__ +#define __endmntent			endmntent +#define __fxstat64(vers, fd, buf)	fstat64(fd, buf) +#define __getmntent_r			getmntent_r +#define __setmntent			setmntent +#define __statfs			statfs +#define __libc_close			close +#define __libc_open			open +#define __libc_write			write +#endif  /* Information about the mount point.  */  struct mountpoint_info mountpoint attribute_hidden; diff --git a/libpthread/nptl/sysdeps/mips/tls.h b/libpthread/nptl/sysdeps/mips/tls.h index dde10be60..3adfebccf 100644 --- a/libpthread/nptl/sysdeps/mips/tls.h +++ b/libpthread/nptl/sysdeps/mips/tls.h @@ -59,7 +59,7 @@ typedef union dtv  /* We require TLS support in the tools.  */  /*   * NPTL - These defines would normally be handled by the top-level - *        configure script in glibc. We define them ourselves. + *        configure script in glibc.   */  #ifdef __PTHREADS_NATIVE__  #define HAVE_TLS_SUPPORT		1 @@ -84,7 +84,7 @@ typedef union dtv  /* Get the thread descriptor definition.  */  #ifdef __UCLIBC__ -# include <descr.h> +# include <../../descr.h>  #else  # include <nptl/descr.h>  #endif  | 
