about summary refs log tree commit diff
path: root/include/libc-symbols.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libc-symbols.h')
-rw-r--r--include/libc-symbols.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 22f7d854c1..bc1c24033f 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -349,15 +349,27 @@
   strong_alias(real, name)
 #endif
 
+#if defined HAVE_VISIBILITY_ATTRIBUTE && defined SHARED
+# define attribute_hidden __attribute__ ((visibility ("hidden")))
+#else
+# define attribute_hidden
+#endif
+
 /* 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 INTDEF2(name, newname) strong_alias (name, newname##_internal);
+# define INTDEF(name) strong_alias (name, name##_internal)
+# define INTVARDEF(name) \
+  _INTVARDEF(name, name##_internal)
+# define _INTVARDEF(name, aliasname) \
+  extern __typeof (name) aliasname __attribute__ ((visibility ("hidden"))); \
+  strong_alias (name, name##_internal)
+# define INTDEF2(name, newname) strong_alias (name, newname##_internal)
 #else
 # define INTUSE(name) name
 # define INTDEF(name)
+# define INTVARDEF(name)
 # define INTDEF2(name, newname)
 #endif