Fix Handling of visibility attribute with older gccs
Andreas Jaeger
aj@suse.de
Sat Mar 16 11:57:00 GMT 2002
With GCC 2.95.3 I get these warnings when compiling glibc from CVS:
itoa-digits.c:23: warning: `visibility' attribute directive ignored
Ok to commit the appended patch?
Andreas
2002-03-16 Andreas Jaeger <aj@suse.de>
* include/libc-symbols.h (_INTVARDEF): Define variant when
visibility attribute is not supported.
============================================================
Index: include/libc-symbols.h
--- include/libc-symbols.h 2002/03/14 00:46:29 1.32
+++ include/libc-symbols.h 2002/03/16 19:53:40
@@ -362,9 +362,14 @@
# define INTDEF(name) strong_alias (name, name##_internal)
# define INTVARDEF(name) \
_INTVARDEF (name, name##_internal)
-# define _INTVARDEF(name, aliasname) \
+# 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
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Libc-hacker
mailing list