
12 changed files with 427 additions and 22 deletions
@ -0,0 +1,23 @@ |
|||
#!/bin/sh |
|||
# |
|||
# Copyright (c) 2004 The GLib Development Team. |
|||
# Copyright (c) 2005 Benedikt Meurer <benny@xfce.org>. |
|||
# |
|||
# This library is free software; you can redistribute it and/or |
|||
# modify it under the terms of the GNU Lesser General Public |
|||
# License as published by the Free Software Foundation; either |
|||
# version 2.1 of the License, or (at your option) any later version. |
|||
# |
|||
# This library is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
# Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public |
|||
# License along with this library; if not, write to the Free Software |
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|||
# |
|||
|
|||
cpp -P -DINCLUDE_INTERNAL_SYMBOLS -DINCLUDE_VARIABLES -DALL_FILES ${srcdir:-.}/libxfce4panel.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE//' | sort > expected-abi |
|||
nm -D .libs/libxfce4panel.so | grep " T\|R " | cut -d ' ' -f 3 | grep -v '^_.*' | sort > actual-abi |
|||
diff -u expected-abi actual-abi && rm expected-abi actual-abi |
@ -0,0 +1,128 @@ |
|||
/*- |
|||
* Copyright (c) 2009 Nick Schermer <nick@xfce.org> |
|||
* |
|||
* This library is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU Lesser General Public |
|||
* License as published by the Free Software Foundation; either |
|||
* version 2.1 of the License, or (at your option) any later version. |
|||
* |
|||
* This library is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public |
|||
* License along with this library; if not, write to the Free Software |
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|||
*/ |
|||
|
|||
/* This file lists all exported symbols. It is used to generate |
|||
* the libxfce4panel-alias.h/libxfce4panel-aliasdef.c files used |
|||
* to avoid PLT entries for internal uses of exported functions (see |
|||
* make-libxfce4panel-alias.pl). |
|||
* |
|||
* Every symbol must be included in the right |
|||
* #ifdef IN_HEADER(sym) #endif and |
|||
* #ifdef IN_SOURCE(sym) #endif sections. |
|||
*/ |
|||
|
|||
#ifdef ALL_FILES |
|||
#define IN_HEADER(x) 1 |
|||
#define IN_SOURCE(x) 1 |
|||
#endif |
|||
|
|||
/* xfce-arrow-button.h */ |
|||
#if IN_HEADER(__XFCE_ARROW_BUTTON_H__) |
|||
#if IN_SOURCE(__XFCE_ARROW_BUTTON_C__) |
|||
xfce_arrow_button_get_type G_GNUC_CONST |
|||
xfce_arrow_button_new G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT |
|||
xfce_arrow_button_get_arrow_type |
|||
xfce_arrow_button_set_arrow_type |
|||
xfce_arrow_button_get_blinking |
|||
xfce_arrow_button_set_blinking |
|||
#endif |
|||
#endif |
|||
|
|||
/* xfce-hvbox.h */ |
|||
#if IN_HEADER(__XFCE_HVBOX_H__) |
|||
#if IN_SOURCE(__XFCE_HVBOX_C__) |
|||
xfce_hvbox_get_type G_GNUC_CONST |
|||
xfce_hvbox_new G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT |
|||
xfce_hvbox_set_orientation |
|||
xfce_hvbox_get_orientation |
|||
#endif |
|||
#endif |
|||
|
|||
/* xfce-panel-convenience.h */ |
|||
#if IN_HEADER(__XFCE_PANEL_CONVENIENCE_H__) |
|||
#if IN_SOURCE(__XFCE_PANEL_CONVENIENCE_C__) |
|||
xfce_panel_create_button G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT |
|||
xfce_panel_create_toggle_button G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT |
|||
xfce_panel_allow_customization |
|||
#endif |
|||
#endif |
|||
|
|||
/* xfce-panel-image.h */ |
|||
#if IN_HEADER(__XFCE_PANEL_IMAGE_H__) |
|||
#if IN_SOURCE(__XFCE_PANEL_IMAGE_C__) |
|||
xfce_panel_image_get_type G_GNUC_CONST |
|||
xfce_panel_image_new G_GNUC_MALLOC |
|||
xfce_panel_image_new_from_pixbuf G_GNUC_MALLOC |
|||
xfce_panel_image_new_from_source G_GNUC_MALLOC |
|||
xfce_panel_image_set_from_pixbuf |
|||
xfce_panel_image_set_from_source |
|||
xfce_panel_image_clear |
|||
#endif |
|||
#endif |
|||
|
|||
/* xfce-panel-plugin.h */ |
|||
#if IN_HEADER(__XFCE_PANEL_PLUGIN_H__) |
|||
#if IN_SOURCE(__XFCE_PANEL_PLUGIN_C__) |
|||
xfce_panel_plugin_get_type G_GNUC_CONST |
|||
xfce_panel_plugin_get_name G_GNUC_PURE |
|||
xfce_panel_plugin_get_display_name G_GNUC_PURE |
|||
xfce_panel_plugin_get_comment G_GNUC_PURE |
|||
xfce_panel_plugin_get_unique_id G_GNUC_PURE |
|||
xfce_panel_plugin_get_property_base G_GNUC_PURE |
|||
xfce_panel_plugin_get_arguments G_GNUC_PURE |
|||
xfce_panel_plugin_get_size G_GNUC_PURE |
|||
xfce_panel_plugin_get_expand G_GNUC_PURE |
|||
xfce_panel_plugin_set_expand |
|||
xfce_panel_plugin_get_orientation G_GNUC_PURE |
|||
xfce_panel_plugin_get_screen_position G_GNUC_PURE |
|||
xfce_panel_plugin_take_window |
|||
xfce_panel_plugin_add_action_widget |
|||
xfce_panel_plugin_menu_insert_item |
|||
xfce_panel_plugin_menu_show_configure |
|||
xfce_panel_plugin_menu_show_about |
|||
xfce_panel_plugin_block_menu |
|||
xfce_panel_plugin_unblock_menu |
|||
xfce_panel_plugin_register_menu |
|||
xfce_panel_plugin_arrow_type |
|||
xfce_panel_plugin_position_widget |
|||
xfce_panel_plugin_position_menu |
|||
xfce_panel_plugin_focus_widget |
|||
xfce_panel_plugin_block_autohide |
|||
xfce_panel_plugin_lookup_rc_file G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT |
|||
xfce_panel_plugin_save_location G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT |
|||
#endif |
|||
#endif |
|||
|
|||
/* xfce-panel-plugin-provider.h */ |
|||
#if IN_HEADER(__XFCE_PANEL_PLUGIN_PROVIDER_H__) |
|||
#if IN_SOURCE(__XFCE_PANEL_PLUGIN_PROVIDER_C__) |
|||
xfce_panel_plugin_provider_get_type G_GNUC_CONST |
|||
xfce_panel_plugin_provider_get_name |
|||
xfce_panel_plugin_provider_get_unique_id |
|||
xfce_panel_plugin_provider_set_size |
|||
xfce_panel_plugin_provider_set_orientation |
|||
xfce_panel_plugin_provider_set_screen_position |
|||
xfce_panel_plugin_provider_save |
|||
xfce_panel_plugin_provider_emit_signal |
|||
xfce_panel_plugin_provider_get_show_configure |
|||
xfce_panel_plugin_provider_show_configure |
|||
xfce_panel_plugin_provider_get_show_about |
|||
xfce_panel_plugin_provider_show_about |
|||
xfce_panel_plugin_provider_remove |
|||
#endif |
|||
#endif |
@ -0,0 +1,154 @@ |
|||
#!/usr/bin/env perl -w |
|||
# |
|||
# Copyright (c) 2004 The GLib Development Team. |
|||
# Copyright (c) 2005 Benedikt Meurer <benny@xfce.org>. |
|||
# |
|||
# This library is free software; you can redistribute it and/or |
|||
# modify it under the terms of the GNU Lesser General Public |
|||
# License as published by the Free Software Foundation; either |
|||
# version 2.1 of the License, or (at your option) any later version. |
|||
# |
|||
# This library is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
# Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public |
|||
# License along with this library; if not, write to the Free Software |
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|||
# |
|||
|
|||
my $option_def = 0; |
|||
|
|||
if (($#ARGV >= 0) && ($ARGV[0] eq "-def")) |
|||
{ |
|||
shift; |
|||
$option_def = 1; |
|||
} |
|||
|
|||
print <<EOF; |
|||
/* Generated by make-libxfce4panel-alias.pl. Do not edit this file. */ |
|||
|
|||
#ifdef HAVE_GNUC_VISIBILITY |
|||
|
|||
#include <glib.h> |
|||
|
|||
EOF |
|||
|
|||
if ($option_def) |
|||
{ |
|||
print <<EOF |
|||
#undef IN_HEADER |
|||
#define IN_HEADER(x) 1 |
|||
|
|||
#undef IN_SOURCE |
|||
#define IN_SOURCE defined |
|||
|
|||
EOF |
|||
} |
|||
else |
|||
{ |
|||
print <<EOF |
|||
#define IN_HEADER defined |
|||
#define IN_SOURCE(x) 1 |
|||
|
|||
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|INCLUDE_INTERNAL_SYMBOLS|ALL_FILES)/) |
|||
{ |
|||
$in_skipped_section = 1; |
|||
} |
|||
|
|||
if ($in_skipped_section) |
|||
{ |
|||
next; |
|||
} |
|||
|
|||
if ($_ =~ /^\#ifn?def\s+G/) |
|||
{ |
|||
print $_; |
|||
next; |
|||
} |
|||
|
|||
if ($_ =~ /^\#if.*(IN_SOURCE|IN_HEADER)/) |
|||
{ |
|||
print $_; |
|||
next; |
|||
} |
|||
|
|||
chop; |
|||
my $line = $_; |
|||
my @words; |
|||
my $attributes = ""; |
|||
|
|||
@words = split (/ /, $line); |
|||
my $symbol = shift (@words); |
|||
chomp ($symbol); |
|||
my $alias = "IA__".$symbol; |
|||
|
|||
# Drop any Win32 specific .def file syntax, but keep attributes |
|||
foreach $word (@words) |
|||
{ |
|||
$attributes = "$attributes $word" unless $word eq "PRIVATE"; |
|||
} |
|||
|
|||
if (!$option_def) |
|||
{ |
|||
print <<EOF |
|||
extern __typeof ($symbol) $alias __attribute((visibility("hidden")))$attributes; |
|||
\#define $symbol $alias |
|||
|
|||
EOF |
|||
} |
|||
else |
|||
{ |
|||
print <<EOF |
|||
\#undef $symbol |
|||
extern __typeof ($symbol) $symbol __attribute((alias("$alias"), visibility("default"))); |
|||
|
|||
EOF |
|||
} |
|||
} |
|||
|
|||
print <<EOF; |
|||
|
|||
#endif /* HAVE_GNUC_VISIBILITY */ |
|||
EOF |
|||
|
|||
|
Loading…
Reference in new issue