summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/compat
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-06-12 02:15:11 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-06-12 02:15:11 +0000
commit69c1f07506ef56973b543c3ec111a4673c11f16c (patch)
treec290e80a383f9013715f2ace3e8c49ae7490c654 /libpthread/nptl/compat
parent7910749bb6b82696ad718f2ef75e9e181f1ad6f4 (diff)
downloaduClibc-alpine-69c1f07506ef56973b543c3ec111a4673c11f16c.tar.bz2
uClibc-alpine-69c1f07506ef56973b543c3ec111a4673c11f16c.tar.xz
Changed files for glibc compatibility so that more NPTL files would build.
Diffstat (limited to 'libpthread/nptl/compat')
-rw-r--r--libpthread/nptl/compat/libc-internal.h3
-rw-r--r--libpthread/nptl/compat/libc-symbols.h31
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 \