gtk/gdk-pixbuf/makegdkpixbufalias.pl

57 lines
992 B
Perl
Raw Normal View History

#!/usr/bin/perl -w
print <<EOF;
/* Generated by makegdkpixbufalias.pl */
#include <glib.h>
#ifdef G_HAVE_GNUC_VISIBILITY
#ifdef GDK_PIXBUF_DISABLE_DEPRECATED
#define WAS_NO_DEPR
#endif
#undef GDK_PIXBUF_DISABLE_DEPRECATED
#ifdef G_DISABLE_DEPRECATED
#define WAS_NO_G_DEPR
#endif
#undef G_DISABLE_DEPRECATED
#include "gdk-pixbuf.h"
#include "gdk-pixdata.h"
#include "gdk-pixbuf-marshal.h"
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;
#ifdef WAS_NO_DEPR
#define GDK_PIXBUF_DISABLE_DEPRECATED
#undef WAS_NO_DEPR
#endif
#ifdef WAS_NO_G_DEPR
#define G_DISABLE_DEPRECATED
#undef WAS_NO_G_DEPR
#endif
#endif /* G_HAVE_GNUC_VISIBILITY */
EOF