public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* one more visibility tweak
@ 2002-03-16 12:10 Andreas Jaeger
  2002-03-16 13:45 ` Ulrich Drepper
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Jaeger @ 2002-03-16 12:10 UTC (permalink / raw)
  To: GNU libc hacker


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

It also removes duplicated code.

Ok to commit?

Andreas

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

	* libio/stdio.c: Use INTVARDEF for internal symbols.

============================================================
Index: libio/stdio.c
--- libio/stdio.c	2002/03/13 02:05:39	1.11
+++ libio/stdio.c	2002/03/16 20:08:07
@@ -39,11 +39,7 @@ _IO_FILE *stderr = (FILE *) &_IO_2_1_std
 #undef _IO_stdout
 #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")))
-AL(stdin);
-AL(stdout);
-AL(stderr);
+INTVARDEF(stdin);
+INTVARDEF(stdout);
+INTVARDEF(stderr);
 #endif

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: one more visibility tweak
  2002-03-16 12:10 one more visibility tweak Andreas Jaeger
@ 2002-03-16 13:45 ` Ulrich Drepper
  2002-03-16 22:40   ` Andreas Jaeger
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Drepper @ 2002-03-16 13:45 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hacker

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

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.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: one more visibility tweak
  2002-03-16 13:45 ` Ulrich Drepper
@ 2002-03-16 22:40   ` Andreas Jaeger
  2002-03-17  1:53     ` Ulrich Drepper
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Jaeger @ 2002-03-16 22:40 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GNU libc hacker

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: one more visibility tweak
  2002-03-16 22:40   ` Andreas Jaeger
@ 2002-03-17  1:53     ` Ulrich Drepper
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Drepper @ 2002-03-17  1:53 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hacker

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Sat, 2002-03-16 at 22:36, Andreas Jaeger wrote:

> Ok to commit?

Yes.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-03-17  9:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-16 12:10 one more visibility tweak Andreas Jaeger
2002-03-16 13:45 ` Ulrich Drepper
2002-03-16 22:40   ` Andreas Jaeger
2002-03-17  1:53     ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).