diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-08-10 18:57:41 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-08-10 18:57:41 +0000 |
commit | efab9fbe8e9717a50168906434cbca296d7467ae (patch) | |
tree | cdff1707857c2d788e9266d30cbab89dc7ee5b4c /gtk/makegtkalias.pl | |
parent | 9c0208b2536f45e2942df66c3e8c973d592caa32 (diff) | |
download | gdk-pixbuf-efab9fbe8e9717a50168906434cbca296d7467ae.tar.gz |
Protect gtkalias.h by G_HAVE_GNUC_VISIBILITY.
2004-08-10 Matthias Clasen <mclasen@redhat.com>
* gdk/makegdkalias.pl:
* gtk/makegtkalias.pl: Protect gtkalias.h by G_HAVE_GNUC_VISIBILITY.
Diffstat (limited to 'gtk/makegtkalias.pl')
-rwxr-xr-x | gtk/makegtkalias.pl | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/gtk/makegtkalias.pl b/gtk/makegtkalias.pl index e057cad23..047b51fdb 100755 --- a/gtk/makegtkalias.pl +++ b/gtk/makegtkalias.pl @@ -1,9 +1,9 @@ #!/usr/bin/perl -w -my $preamble = <<EOF; +print <<EOF; /* Generated by makegtkalias.pl */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +#ifdef G_HAVE_GNUC_VISIBILITY #ifdef GTK_ENABLE_BROKEN #define WAS_BROKEN @@ -42,7 +42,22 @@ my $preamble = <<EOF; EOF -my $postamble = <<EOF; +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 <<EOF; #ifndef WAS_BROKEN #undef GTK_ENABLE_BROKEN @@ -66,24 +81,7 @@ my $postamble = <<EOF; #undef WAS_NO_G_DEPR #endif -#endif /* __GNUC__ > 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; |