1
1
#!/usr/bin/env perl -w
3
3
# Copyright (c) 2004 The GLib Development Team.
4
# Copyright (c) 2007 Nick Schermer <nick@xfce.org>
4
# Copyright (c) 2005 Benedikt Meurer <benny@xfce.org>.
6
6
# This library is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU Library General Public
7
# modify it under the terms of the GNU Lesser General Public
8
8
# License as published by the Free Software Foundation; either
9
# version 2 of the License, or (at your option) any later version.
9
# version 2.1 of the License, or (at your option) any later version.
11
11
# This library is distributed in the hope that it will be useful,
12
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
# Library General Public License for more details.
14
# Lesser General Public License for more details.
16
# You should have received a copy of the GNU Library General Public
17
# License along with this library; if not, write to the
18
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
# Boston, MA 02111-1307, USA.
16
# You should have received a copy of the GNU Lesser General Public
17
# License along with this library; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
21
my $option_def = 0;
24
23
if (($#ARGV >= 0) && ($ARGV[0] eq "-def"))
31
30
/* Generated by make-libxfce4panel-alias.pl. Do not edit this file. */
46
45
#define IN_SOURCE defined
53
52
#define IN_HEADER defined
54
53
#define IN_SOURCE(x) 1
59
58
my $in_comment = 0;
60
59
my $in_skipped_section = 0;
64
63
# ignore empty lines
68
67
if ($_ =~ /^\s*\/\*/)
75
74
if ($_ =~ /\*\/\s$/)
83
82
if ($_ =~ /^\#endif/)
85
84
if (!$in_skipped_section)
90
89
$in_skipped_section = 0;
94
93
if ($_ =~ /^\#ifdef\s+(INCLUDE_VARIABLES|INCLUDE_INTERNAL_SYMBOLS|ALL_FILES)/)
96
95
$in_skipped_section = 1;
99
98
if ($in_skipped_section)
104
103
if ($_ =~ /^\#ifn?def\s+G/)
110
109
if ($_ =~ /^\#if.*(IN_SOURCE|IN_HEADER)/)
122
121
my $symbol = shift (@words);
124
123
my $alias = "IA__".$symbol;
126
125
# Drop any Win32 specific .def file syntax, but keep attributes
127
126
foreach $word (@words)
129
128
$attributes = "$attributes $word" unless $word eq "PRIVATE";
132
131
if (!$option_def)
135
134
extern __typeof ($symbol) $alias __attribute((visibility("hidden")))$attributes;
136
135
\#define $symbol $alias
144
143
extern __typeof ($symbol) $symbol __attribute((alias("$alias"), visibility("default")));