This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: one more visibility tweak


Ulrich Drepper <drepper@redhat.com> writes:

> On Sat, 2002-03-16 at 12:09, Andreas Jaeger wrote:
>
>> This fixes:
>> 
>> stdio.c:46: warning: `visibility' attribute directive ignored
>> stdio.c:47: warning: `visibility' attribute directive ignored
>> stdio.c:48: warning: `visibility' attribute directive ignored
>
> But it's completely wrong.  There is a reason why I haven't used
> INTVARDEF.  The alias has a completely different name.

You're right, I oversaw that but noticed it later.

Here's a tested and fixed patch.

Ok to commit?

Andreas

2002-03-17  Andreas Jaeger  <aj@suse.de>

	* libio/stdio.c (AL2): Define variant when visibility attribute is
	not supported.

============================================================
Index: libio/stdio.c
--- libio/stdio.c	2002/03/13 02:05:39	1.11
+++ libio/stdio.c	2002/03/17 06:19:27
@@ -40,9 +40,14 @@ _IO_FILE *stderr = (FILE *) &_IO_2_1_std
 #undef _IO_stderr
 #ifdef _LIBC
 # define AL(name) AL2 (name, _IO_##name)
-# define AL2(name, al) \
-  extern __typeof (name) al __attribute__ ((alias (#name),		      \
-					    visibility ("hidden")))
+# if defined HAVE_VISIBILITY_ATTRIBUTE
+#  define AL2(name, al) \
+  extern __typeof (name) al __attribute__ ((alias (#name),                    \
+                                            visibility ("hidden")))
+# else
+#  define AL2(name, al) \
+  extern __typeof (name) al __attribute__ ((alias (#name)))
+# endif
 AL(stdin);
 AL(stdout);
 AL(stderr);

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]