From efab9fbe8e9717a50168906434cbca296d7467ae Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 10 Aug 2004 18:57:41 +0000 Subject: [PATCH] Protect gtkalias.h by G_HAVE_GNUC_VISIBILITY. 2004-08-10 Matthias Clasen * gdk/makegdkalias.pl: * gtk/makegtkalias.pl: Protect gtkalias.h by G_HAVE_GNUC_VISIBILITY. --- ChangeLog | 3 +++ ChangeLog.pre-2-10 | 3 +++ ChangeLog.pre-2-6 | 3 +++ ChangeLog.pre-2-8 | 3 +++ gdk/makegdkalias.pl | 41 +++++++++++++++++++---------------------- gtk/makegtkalias.pl | 40 +++++++++++++++++++--------------------- 6 files changed, 50 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7662ca054..008a769573 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-08-10 Matthias Clasen + * gdk/makegdkalias.pl: + * gtk/makegtkalias.pl: Protect gtkalias.h by G_HAVE_GNUC_VISIBILITY. + * gtk/Makefile.am: Include gtkalias.h in the generated sources gtkmarhalers.c and gtkmarshal.c. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a7662ca054..008a769573 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2004-08-10 Matthias Clasen + * gdk/makegdkalias.pl: + * gtk/makegtkalias.pl: Protect gtkalias.h by G_HAVE_GNUC_VISIBILITY. + * gtk/Makefile.am: Include gtkalias.h in the generated sources gtkmarhalers.c and gtkmarshal.c. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a7662ca054..008a769573 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,8 @@ 2004-08-10 Matthias Clasen + * gdk/makegdkalias.pl: + * gtk/makegtkalias.pl: Protect gtkalias.h by G_HAVE_GNUC_VISIBILITY. + * gtk/Makefile.am: Include gtkalias.h in the generated sources gtkmarhalers.c and gtkmarshal.c. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a7662ca054..008a769573 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,8 @@ 2004-08-10 Matthias Clasen + * gdk/makegdkalias.pl: + * gtk/makegtkalias.pl: Protect gtkalias.h by G_HAVE_GNUC_VISIBILITY. + * gtk/Makefile.am: Include gtkalias.h in the generated sources gtkmarhalers.c and gtkmarshal.c. diff --git a/gdk/makegdkalias.pl b/gdk/makegdkalias.pl index 3f04a52a16..6d56268829 100755 --- a/gdk/makegdkalias.pl +++ b/gdk/makegdkalias.pl @@ -1,9 +1,9 @@ #!/usr/bin/perl -w -my $preamble = < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +#ifdef G_HAVE_GNUC_VISIBILITY #ifdef GDK_ENABLE_BROKEN #define WAS_BROKEN @@ -31,7 +31,22 @@ my $preamble = <) { + + # ignore empty lines + next if /^\s*$/; + + my $str = $_; + chomp($str); + my $alias = $str."__internal_alias"; + + print "extern __typeof ($str) $alias __attribute((visibility(\"hidden\"))); \n"; + print "extern __typeof ($str) $str __attribute((alias(\"$alias\"), visibility(\"default\"))); \n"; + print "#define $str $alias \n"; + print "\n"; +} + +print < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) */ +#endif /* G_HAVE_GNUC_VISIBILITY */ EOF -print $preamble; -while (<>) { - - # ignore empty lines - next if /^\s*$/; - - my $str = $_; - chomp($str); - my $alias = $str."__internal_alias"; - - print "extern __typeof ($str) $alias __attribute((visibility(\"hidden\"))); \n"; - print "extern __typeof ($str) $str __attribute((alias(\"$alias\"), visibility(\"default\"))); \n"; - print "#define $str $alias \n"; - print "\n"; -} - -print $postamble; - diff --git a/gtk/makegtkalias.pl b/gtk/makegtkalias.pl index e057cad236..047b51fdb5 100755 --- a/gtk/makegtkalias.pl +++ b/gtk/makegtkalias.pl @@ -1,9 +1,9 @@ #!/usr/bin/perl -w -my $preamble = < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +#ifdef G_HAVE_GNUC_VISIBILITY #ifdef GTK_ENABLE_BROKEN #define WAS_BROKEN @@ -42,7 +42,22 @@ my $preamble = <) { + + # ignore empty lines + next if /^\s*$/; + + my $str = $_; + chomp($str); + my $alias = $str."__internal_alias"; + + print "extern __typeof ($str) $alias __attribute((visibility(\"hidden\"))); \n"; + print "extern __typeof ($str) $str __attribute((alias(\"$alias\"), visibility(\"default\"))); \n"; + print "#define $str $alias \n"; + print "\n"; +} + +print < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) */ +#endif /* G_HAVE_GNUC_VISIBILITY */ EOF -print $preamble; -while (<>) { - - # ignore empty lines - next if /^\s*$/; - - my $str = $_; - chomp($str); - my $alias = $str."__internal_alias"; - - print "extern __typeof ($str) $alias __attribute((visibility(\"hidden\"))); \n"; - print "extern __typeof ($str) $str __attribute((alias(\"$alias\"), visibility(\"default\"))); \n"; - print "#define $str $alias \n"; - print "\n"; -} - -print $postamble;