summaryrefslogtreecommitdiff
path: root/thunarx
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis@xfce.org>2009-09-26 22:19:50 +0200
committerJannis Pohlmann <jannis@xfce.org>2009-09-26 22:19:50 +0200
commit4553fba65237ae56bbcc632145abbacfe718a727 (patch)
tree429f131a732cb2f0e94ee3ead068923be9abd0b7 /thunarx
parentaf1ad121adfd30ef35b295fd664101868d43499e (diff)
downloadthunar-4553fba65237ae56bbcc632145abbacfe718a727.tar.gz
Use -export-symbols-regex instead of XDT_FEATURE_VISIBILITY.
XDT_FEATURE_VISIBILITY() breaks plugins as it strips thunar_extension* functions from the final shared library files. An alternative way to XDT_FEATURE_VISIBILITY() and the old visibility configure code used in Thunar is to define -export-symbols-regex (e.g. by setting it to "^thunar_extension.*") in Makefile.am of each plugin. This also removes the alias stuff in Thunarx, as we no longer need to define which symbols to export or not via the alias header. All symbols starting with _ are now automatically marked as private and are not exported. Additionally, G_GNUC_INTERNAL can be used to hide symbols. thunarx.symbols is preserved for ABI checks and still has to be updated when new symbols are added. Hope all this is ok. Double-checkers to the rescue!
Diffstat (limited to 'thunarx')
-rw-r--r--thunarx/Makefile.am23
-rwxr-xr-xthunarx/make-thunarx-alias.pl155
-rw-r--r--thunarx/thunarx-config.c6
-rw-r--r--thunarx/thunarx-file-info.c6
-rw-r--r--thunarx/thunarx-menu-provider.c6
-rw-r--r--thunarx/thunarx-preferences-provider.c6
-rw-r--r--thunarx/thunarx-property-page-provider.c6
-rw-r--r--thunarx/thunarx-property-page.c6
-rw-r--r--thunarx/thunarx-provider-factory.c6
-rw-r--r--thunarx/thunarx-provider-module.c6
-rw-r--r--thunarx/thunarx-provider-plugin.c6
-rw-r--r--thunarx/thunarx-renamer-provider.c6
-rw-r--r--thunarx/thunarx-renamer.c6
-rw-r--r--thunarx/thunarx.symbols55
14 files changed, 2 insertions, 297 deletions
diff --git a/thunarx/Makefile.am b/thunarx/Makefile.am
index 4bd7e25e..e6d052cb 100644
--- a/thunarx/Makefile.am
+++ b/thunarx/Makefile.am
@@ -7,10 +7,6 @@ INCLUDES = \
-DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
$(PLATFORM_CPPFLAGS)
-libthunarx_built_sources = \
- thunarx-alias.h \
- thunarx-aliasdef.c
-
libthunarx_headers = \
thunarx.h \
thunarx-config.h \
@@ -34,7 +30,6 @@ lib_LTLIBRARIES = \
libthunarx-2.la
libthunarx_2_la_SOURCES = \
- $(libthunarx_built_sources) \
$(libthunarx_headers) \
thunarx-config.c \
thunarx-file-info.c \
@@ -73,10 +68,7 @@ pkgconfig_DATA = thunarx-2.pc
EXTRA_DIST = \
abicheck.sh \
- make-thunarx-alias.pl \
- thunarx.symbols \
- thunarx-alias.h \
- thunarx-aliasdef.c
+ thunarx.symbols
##
## Rules to auto-generate built sources
@@ -92,22 +84,9 @@ CLEANFILES = \
actual-abi \
expected-abi
-DISTCLEANFILES = \
- $(libthunarx_built_sources)
-
-BUILT_SOURCES = \
- $(libthunarx_built_sources)
-
-if HAVE_GNUC_VISIBILITY
TESTS = \
abicheck.sh
-endif
-
-thunarx-alias.h: make-thunarx-alias.pl thunarx.symbols
- $(PERL) $(srcdir)/make-thunarx-alias.pl < $(srcdir)/thunarx.symbols > thunarx-alias.h
-thunarx-aliasdef.c: make-thunarx-alias.pl thunarx.symbols
- $(PERL) $(srcdir)/make-thunarx-alias.pl -def < $(srcdir)/thunarx.symbols > thunarx-aliasdef.c
endif
# required for gtk-doc
diff --git a/thunarx/make-thunarx-alias.pl b/thunarx/make-thunarx-alias.pl
deleted file mode 100755
index 69c569d1..00000000
--- a/thunarx/make-thunarx-alias.pl
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/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 Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 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
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-#
-
-my $option_def = 0;
-
-if (($#ARGV >= 0) && ($ARGV[0] eq "-def"))
- {
- shift;
- $option_def = 1;
- }
-
-print <<EOF;
-/* Generated by make-thunarx-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
-
-
diff --git a/thunarx/thunarx-config.c b/thunarx/thunarx-config.c
index c4412511..c0fb1200 100644
--- a/thunarx/thunarx-config.c
+++ b/thunarx/thunarx-config.c
@@ -23,7 +23,6 @@
#endif
#include <thunarx/thunarx-config.h>
-#include <thunarx/thunarx-alias.h>
@@ -124,8 +123,3 @@ thunarx_check_version (guint required_major,
{
return NULL;
}
-
-
-
-#define __THUNARX_CONFIG_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx-file-info.c b/thunarx/thunarx-file-info.c
index c1d45e8f..56460244 100644
--- a/thunarx/thunarx-file-info.c
+++ b/thunarx/thunarx-file-info.c
@@ -25,7 +25,6 @@
#include <thunarx/thunarx-file-info.h>
#include <thunarx/thunarx-private.h>
-#include <thunarx/thunarx-alias.h>
@@ -444,8 +443,3 @@ thunarx_file_info_list_free (GList *file_infos)
g_list_foreach (file_infos, (GFunc) g_object_unref, NULL);
g_list_free (file_infos);
}
-
-
-
-#define __THUNARX_FILE_INFO_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx-menu-provider.c b/thunarx/thunarx-menu-provider.c
index c7cc5804..ea3f3e9c 100644
--- a/thunarx/thunarx-menu-provider.c
+++ b/thunarx/thunarx-menu-provider.c
@@ -24,7 +24,6 @@
#include <thunarx/thunarx-menu-provider.h>
#include <thunarx/thunarx-private.h>
-#include <thunarx/thunarx-alias.h>
@@ -229,8 +228,3 @@ thunarx_menu_provider_get_dnd_actions (ThunarxMenuProvider *provider,
return actions;
}
-
-
-
-#define __THUNARX_MENU_PROVIDER_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx-preferences-provider.c b/thunarx/thunarx-preferences-provider.c
index 922ddb22..41ac7479 100644
--- a/thunarx/thunarx-preferences-provider.c
+++ b/thunarx/thunarx-preferences-provider.c
@@ -24,7 +24,6 @@
#include <thunarx/thunarx-preferences-provider.h>
#include <thunarx/thunarx-private.h>
-#include <thunarx/thunarx-alias.h>
@@ -104,8 +103,3 @@ thunarx_preferences_provider_get_actions (ThunarxPreferencesProvider *provider,
return actions;
}
-
-
-
-#define __THUNARX_PREFERENCES_PROVIDER_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx-property-page-provider.c b/thunarx/thunarx-property-page-provider.c
index b56b7e8f..aac8671f 100644
--- a/thunarx/thunarx-property-page-provider.c
+++ b/thunarx/thunarx-property-page-provider.c
@@ -24,7 +24,6 @@
#include <thunarx/thunarx-private.h>
#include <thunarx/thunarx-property-page-provider.h>
-#include <thunarx/thunarx-alias.h>
@@ -126,8 +125,3 @@ thunarx_property_page_provider_get_pages (ThunarxPropertyPageProvider *provider,
return pages;
}
-
-
-
-#define __THUNARX_PROPERTY_PAGE_PROVIDER_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx-property-page.c b/thunarx/thunarx-property-page.c
index 7d59299e..68bae2b5 100644
--- a/thunarx/thunarx-property-page.c
+++ b/thunarx/thunarx-property-page.c
@@ -26,7 +26,6 @@
#include <thunarx/thunarx-private.h>
#include <thunarx/thunarx-property-page.h>
-#include <thunarx/thunarx-alias.h>
@@ -390,8 +389,3 @@ thunarx_property_page_set_label_widget (ThunarxPropertyPage *property_page,
g_object_notify (G_OBJECT (property_page), "label-widget");
g_object_thaw_notify (G_OBJECT (property_page));
}
-
-
-
-#define __THUNARX_PROPERTY_PAGE_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx-provider-factory.c b/thunarx/thunarx-provider-factory.c
index 4cbdde1e..f2588eb3 100644
--- a/thunarx/thunarx-provider-factory.c
+++ b/thunarx/thunarx-provider-factory.c
@@ -28,7 +28,6 @@
#include <thunarx/thunarx-provider-factory.h>
#include <thunarx/thunarx-provider-module.h>
#include <thunarx/thunarx-provider-plugin.h>
-#include <thunarx/thunarx-alias.h>
@@ -336,8 +335,3 @@ thunarx_provider_factory_list_providers (ThunarxProviderFactory *factory,
return providers;
}
-
-
-
-#define __THUNARX_PROVIDER_FACTORY_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx-provider-module.c b/thunarx/thunarx-provider-module.c
index b68e4c16..4f96ffdd 100644
--- a/thunarx/thunarx-provider-module.c
+++ b/thunarx/thunarx-provider-module.c
@@ -27,7 +27,6 @@
#include <thunarx/thunarx-private.h>
#include <thunarx/thunarx-provider-module.h>
#include <thunarx/thunarx-provider-plugin.h>
-#include <thunarx/thunarx-alias.h>
@@ -299,8 +298,3 @@ thunarx_provider_module_list_types (const ThunarxProviderModule *module,
(*module->list_types) (types, n_types);
}
-
-
-
-#define __THUNARX_PROVIDER_MODULE_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx-provider-plugin.c b/thunarx/thunarx-provider-plugin.c
index 7096ccbe..53493173 100644
--- a/thunarx/thunarx-provider-plugin.c
+++ b/thunarx/thunarx-provider-plugin.c
@@ -26,7 +26,6 @@
#include <thunarx/thunarx-private.h>
#include <thunarx/thunarx-provider-plugin.h>
-#include <thunarx/thunarx-alias.h>
@@ -242,8 +241,3 @@ thunarx_provider_plugin_register_flags (ThunarxProviderPlugin *plugin,
return (*THUNARX_PROVIDER_PLUGIN_GET_IFACE (plugin)->register_flags) (plugin, name, const_static_values);
}
-
-
-
-#define __THUNARX_PROVIDER_PLUGIN_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx-renamer-provider.c b/thunarx/thunarx-renamer-provider.c
index 78c10194..56fcfcef 100644
--- a/thunarx/thunarx-renamer-provider.c
+++ b/thunarx/thunarx-renamer-provider.c
@@ -24,7 +24,6 @@
#include <thunarx/thunarx-renamer-provider.h>
#include <thunarx/thunarx-private.h>
-#include <thunarx/thunarx-alias.h>
@@ -107,8 +106,3 @@ thunarx_renamer_provider_get_renamers (ThunarxRenamerProvider *provider)
/* and return the list of renamers */
return renamers;
}
-
-
-
-#define __THUNARX_RENAMER_PROVIDER_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx-renamer.c b/thunarx/thunarx-renamer.c
index 28acabe6..09cebbd8 100644
--- a/thunarx/thunarx-renamer.c
+++ b/thunarx/thunarx-renamer.c
@@ -26,7 +26,6 @@
#include <thunarx/thunarx-renamer.h>
#include <thunarx/thunarx-private.h>
-#include <thunarx/thunarx-alias.h>
@@ -706,8 +705,3 @@ thunarx_renamer_changed (ThunarxRenamer *renamer)
g_return_if_fail (THUNARX_IS_RENAMER (renamer));
g_signal_emit (G_OBJECT (renamer), renamer_signals[CHANGED], 0);
}
-
-
-
-#define __THUNARX_RENAMER_C__
-#include <thunarx/thunarx-aliasdef.c>
diff --git a/thunarx/thunarx.symbols b/thunarx/thunarx.symbols
index c0424a23..a5b7d78d 100644
--- a/thunarx/thunarx.symbols
+++ b/thunarx/thunarx.symbols
@@ -20,34 +20,15 @@
*/
/* This file lists all exported symbols. It is used to generate
- * the thunarx.def file used to control exports on Windows and the
- * thunarx-alias.h/thunarx-aliasdef.c files used to avoid PLT
- * entries for * internal uses of exported functions (see
- * make-thunarx-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_SOURCE(x) 1
-#define IN_HEADER(x) 1
-#endif
+ * for ABI compatibility checks. */
/* thunarx-config symbols */
-#if IN_HEADER(__THUNARX_CONFIG_H__)
-#if IN_SOURCE(__THUNARX_CONFIG_C__)
thunarx_major_version
thunarx_minor_version
thunarx_micro_version
thunarx_check_version
-#endif
-#endif
/* ThunarxFileInfo methods */
-#if IN_HEADER(__THUNARX_FILE_INFO_H__)
-#if IN_SOURCE(__THUNARX_FILE_INFO_C__)
thunarx_file_info_get_type G_GNUC_CONST
thunarx_file_info_get_name
thunarx_file_info_get_uri
@@ -64,30 +45,18 @@ thunarx_file_info_renamed
thunarx_file_info_list_get_type
thunarx_file_info_list_copy
thunarx_file_info_list_free
-#endif
-#endif
/* ThunarxMenuProvider methods */
-#if IN_HEADER(__THUNARX_MENU_PROVIDER_H__)
-#if IN_SOURCE(__THUNARX_MENU_PROVIDER_C__)
thunarx_menu_provider_get_type G_GNUC_CONST
thunarx_menu_provider_get_file_actions G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT
thunarx_menu_provider_get_folder_actions G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT
thunarx_menu_provider_get_dnd_actions G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT
-#endif
-#endif
/* ThunarxPreferencesProvider methods */
-#if IN_HEADER(__THUNARX_PREFERENCES_PROVIDER_H__)
-#if IN_SOURCE(__THUNARX_PREFERENCES_PROVIDER_C__)
thunarx_preferences_provider_get_type G_GNUC_CONST
thunarx_preferences_provider_get_actions
-#endif
-#endif
/* ThunarxPropertyPage methods */
-#if IN_HEADER(__THUNARX_PROPERTY_PAGE_H__)
-#if IN_SOURCE(__THUNARX_PROPERTY_PAGE_C__)
thunarx_property_page_get_type G_GNUC_CONST
thunarx_property_page_new G_GNUC_MALLOC
thunarx_property_page_new_with_label_widget G_GNUC_MALLOC
@@ -95,29 +64,17 @@ thunarx_property_page_get_label
thunarx_property_page_set_label
thunarx_property_page_get_label_widget
thunarx_property_page_set_label_widget
-#endif
-#endif
/* ThunarxPropertyPageProvider methods */
-#if IN_HEADER(__THUNARX_PROPERTY_PAGE_PROVIDER_H__)
-#if IN_SOURCE(__THUNARX_PROPERTY_PAGE_PROVIDER_C__)
thunarx_property_page_provider_get_type G_GNUC_CONST
thunarx_property_page_provider_get_pages
-#endif
-#endif
/* ThunarxProviderFactory methods */
-#if IN_HEADER(__THUNARX_PROVIDER_FACTORY_H__)
-#if IN_SOURCE(__THUNARX_PROVIDER_FACTORY_C__)
thunarx_provider_factory_get_type G_GNUC_CONST
thunarx_provider_factory_get_default
thunarx_provider_factory_list_providers G_GNUC_MALLOC
-#endif
-#endif
/* ThunarxProviderPlugin methods */
-#if IN_HEADER(__THUNARX_PROVIDER_PLUGIN_H__)
-#if IN_SOURCE(__THUNARX_PROVIDER_PLUGIN_C__)
thunarx_provider_plugin_get_type G_GNUC_CONST
thunarx_provider_plugin_get_resident
thunarx_provider_plugin_set_resident
@@ -125,12 +82,8 @@ thunarx_provider_plugin_register_type
thunarx_provider_plugin_add_interface
thunarx_provider_plugin_register_enum
thunarx_provider_plugin_register_flags
-#endif
-#endif
/* ThunarxRenamer methods */
-#if IN_HEADER(__THUNARX_RENAMER_H__)
-#if IN_SOURCE(__THUNARX_RENAMER_C__)
thunarx_renamer_get_type G_GNUC_CONST
thunarx_renamer_get_help_url
thunarx_renamer_set_help_url
@@ -141,14 +94,8 @@ thunarx_renamer_save
thunarx_renamer_load
thunarx_renamer_get_actions G_GNUC_MALLOC
thunarx_renamer_changed
-#endif
-#endif
/* ThunarxRenamerProvider methods */
-#if IN_HEADER(__THUNARX_RENAMER_PROVIDER_H__)
-#if IN_SOURCE(__THUNARX_RENAMER_PROVIDER_C__)
thunarx_renamer_provider_get_type G_GNUC_CONST
thunarx_renamer_provider_get_renamers G_GNUC_MALLOC
-#endif
-#endif