summaryrefslogtreecommitdiff
path: root/gtk/makegtkalias.pl
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-08-17 18:24:06 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-08-17 18:24:06 +0000
commit54fb7a7b0d8761a0f5e38d94b35cfbaac4695d1f (patch)
tree75aae9b46fef1ac234624c133258d3fb6019e529 /gtk/makegtkalias.pl
parent3cc0ae605a10eb7f24bc6083e2388a7103a4aeb4 (diff)
downloadgtk+-54fb7a7b0d8761a0f5e38d94b35cfbaac4695d1f.tar.gz
No need for INCLUDE_INTERNAL_SYMBOLS anymore.
2004-08-17 Matthias Clasen <mclasen@redhat.com> * gtk/abicheck.sh: No need for INCLUDE_INTERNAL_SYMBOLS anymore. * gdk/gdk.symbols: Don't use #if defined(). * gdk/Makefile.am (gdkalias.h): * gtk/Makefile.am (gtkalias.h): Don't use cpp to filter gtk.symbols. * gdk/makegdkalias.pl: * gtk/makegtkalias.pl: Move the #ifdef processing into the perl script, and keep the #ifdefs which differentiate between platforms. * gtk/Makefile.am (gtk_private_h_sources): Remove gtkinternals.h, it is no longer needed.
Diffstat (limited to 'gtk/makegtkalias.pl')
-rwxr-xr-xgtk/makegtkalias.pl66
1 files changed, 61 insertions, 5 deletions
diff --git a/gtk/makegtkalias.pl b/gtk/makegtkalias.pl
index 170832fc40..9fb298b578 100755
--- a/gtk/makegtkalias.pl
+++ b/gtk/makegtkalias.pl
@@ -30,9 +30,13 @@ print <<EOF;
#include "gtk.h"
#include "gtkfilesystem.h"
+#ifdef G_OS_UNIX
#include "gtkfilesystemunix.h"
+#endif
+#ifdef G_OS_WIN32
+#include "gtkfilesystemwin32.h"
+#endif
#include "gtkhsv.h"
-#include "gtkinternals.h"
#include "gtkpathbar.h"
#include "gtktextdisplay.h"
#include "gtktextlayout.h"
@@ -43,19 +47,71 @@ print <<EOF;
EOF
+my $in_comment = 0;
+my $in_skipped_section = 0;
+
while (<>) {
# ignore empty lines
next if /^\s*$/;
+ # skip comments
+ if ($_ =~ /^\s*\/\*/)
+ {
+ $in_comment = 1;
+ }
+
+ if ($in_comment)
+ {
+ if ($_ =~ /\*\/\s$/)
+ {
+ $in_comment = 0;
+ }
+
+ next;
+ }
+
+ # handle ifdefs
+ if ($_ =~ /^\#endif/)
+ {
+ if (!$in_skipped_section)
+ {
+ print $_;
+ }
+
+ $in_skipped_section = 0;
+
+ next;
+ }
+
+ if ($_ =~ /^\#ifdef\s+INCLUDE_VARIABLES/)
+ {
+ $in_skipped_section = 1;
+ }
+
+ if ($in_skipped_section)
+ {
+ next;
+ }
+
+ if ($_ =~ /^\#ifdef\s+G/)
+ {
+ print $_;
+
+ next;
+ }
+
+
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
+extern __typeof ($str) $alias __attribute((visibility("hidden")));
+extern __typeof ($str) $str __attribute((alias("$alias"), visibility("default")));
+\#define $str $alias
+
+EOF
}
print <<EOF;