[Xfce4-commits] <libxfce4util:master> Revert removing the alias code.
Nick Schermer
noreply at xfce.org
Fri Oct 23 16:56:01 CEST 2009
Updating branch refs/heads/master
to 3e1475533f00ad96a3388ff140b70130264d2124 (commit)
from da1a58c522d82082250907f98f7eb8dcdeb48024 (commit)
commit 3e1475533f00ad96a3388ff140b70130264d2124
Author: Nick Schermer <nick at xfce.org>
Date: Fri Oct 23 16:53:30 2009 +0200
Revert removing the alias code.
This reverts parts of commit da1a58c522d82082250907f98f7eb8dcdeb48024
and 56f2002c0c26333f7d4a14fa067c738552033de7.
autogen.sh | 2 +-
configure.in.in | 45 ++++++++-
docs/Makefile.am | 2 +-
libxfce4util/Makefile.am | 31 ++++--
libxfce4util/libxfce4util-config.c | 6 +
libxfce4util/libxfce4util-private.c | 6 +
libxfce4util/libxfce4util-private.h | 2 +-
libxfce4util/libxfce4util.symbols | 104 +++++++++++++++++----
libxfce4util/make-libxfce4util-alias.pl | 155 ++++++++++++++++++++++++++++++
libxfce4util/xfce-desktopentry.c | 6 +
libxfce4util/xfce-fileutils.c | 6 +
libxfce4util/xfce-i18n.c | 12 +-
libxfce4util/xfce-i18n.h | 2 +-
libxfce4util/xfce-kiosk.c | 6 +
libxfce4util/xfce-license.c | 6 +
libxfce4util/xfce-miscutils.c | 12 ++-
libxfce4util/xfce-posix-signal-handler.c | 8 ++-
libxfce4util/xfce-posix-signal-handler.h | 6 +-
libxfce4util/xfce-rc-config.c | 6 +
libxfce4util/xfce-rc-private.h | 127 ++++++++++++------------
libxfce4util/xfce-rc-simple.c | 6 +
libxfce4util/xfce-rc.c | 6 +
libxfce4util/xfce-resource.c | 8 ++-
libxfce4util/xfce-utf8.c | 6 +
xfce4-kiosk-query/main.c | 2 +-
25 files changed, 465 insertions(+), 113 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 26212d7..6dd7849 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -18,6 +18,6 @@ EOF
exit 1
}
-XDT_AUTOGEN_REQUIRED_VERSION="4.7.2" exec xdt-autogen $@
+XDT_AUTOGEN_REQUIRED_VERSION="4.7.0" exec xdt-autogen $@
# vi:set ts=2 sw=2 et ai:
diff --git a/configure.in.in b/configure.in.in
index fe4d41d..00fac3a 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -30,7 +30,7 @@ dnl # YOU ARE DOING.
dnl ********************************************
-dnl *** Full debug support for GIT snapshots ***
+dnl *** Full debug support for SVN snapshots ***
dnl ********************************************
m4_define([libxfce4util_debug_default], [ifelse(libxfce4util_version_tag(), [git], [full], [minimum])])
@@ -52,8 +52,7 @@ dnl ***************************
LIBXFCE4UTIL_VERSION=libxfce4util_version()
AM_INIT_AUTOMAKE([libxfce4util], [$LIBXFCE4UTIL_VERSION])
AM_CONFIG_HEADER([config.h])
-AM_MAINTAINER_MODE()
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AM_MAINTAINER_MODE
dnl **************************
dnl *** Libtool versioning ***
@@ -158,6 +157,36 @@ dnl *** Check for linker optimizations ***
dnl **************************************
XDT_FEATURE_LINKER_OPTS()
+dnl ****************************************
+dnl *** Check for ELF visibility support ***
+dnl ****************************************
+AC_ARG_ENABLE([visibility], AC_HELP_STRING([--disable-visibility], [Do not use ELF visibility attributes]), [], [enable_visibility=yes])
+have_gnuc_visibility=no
+if test x"$enable_visibility" != x"no"; then
+ dnl Check whether the compiler supports the visibility attribute
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wall -Werror"
+ AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
+ AC_COMPILE_IFELSE(AC_LANG_SOURCE(
+ [
+ void __attribute__ ((visibility("default"))) test_default (void) {}
+ void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
+ int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
+ ]),
+ [
+ have_gnuc_visibility=yes
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ ])
+ CFLAGS="$save_CFLAGS"
+fi
+if test x"$have_gnuc_visibility" = x"yes"; then
+ CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
+fi
+AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test x"$have_gnuc_visibility" = x"yes"])
+
dnl *************************************
dnl *** Compensate for broken gtk-doc ***
dnl *************************************
@@ -178,3 +207,13 @@ libxfce4util/Makefile
po/Makefile.in
xfce4-kiosk-query/Makefile
])
+
+dnl ***************************
+dnl *** Print configuration ***
+dnl ***************************
+echo
+echo "Build Configuration:"
+echo
+echo "* Debug Support: $enable_debug"
+echo "* GNU Visibility: $have_gnuc_visibility"
+echo
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 2849247..91427f3 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -45,7 +45,7 @@ GTKDOC_CFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
$(CPPFLAGS) \
- $(GOBJECT_CFLAGS) \
+ $(GOBJECT_CFLAGS) \
$(GTK_DOC_EXTRA_CFLAGS)
GTKDOC_LIBS = \
diff --git a/libxfce4util/Makefile.am b/libxfce4util/Makefile.am
index 052f764..4eb6175 100644
--- a/libxfce4util/Makefile.am
+++ b/libxfce4util/Makefile.am
@@ -13,8 +13,7 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"libxfce4util\" \
-DKIOSKDIR=\"$(sysconfdir)/xdg/xfce4/kiosk\" \
-DKIOSKDEF=\"ALL\" \
- -DLIBXFCE4UTIL_COMPILATION \
- $(PLATFORM_CPPFLAGS)
+ -DLIBXFCE4UTIL_COMPILATION
lib_LTLIBRARIES = \
libxfce4util.la
@@ -41,6 +40,8 @@ libxfce4util_built_public_sources = \
libxfce4util_built_sources = \
$(libxfce4util_built_public_sources) \
+ libxfce4util-alias.h \
+ libxfce4util-aliasdef.c \
libxfce4util-enum-types.c
libxfce4utilincludedir = $(includedir)/xfce4/libxfce4util
@@ -72,15 +73,13 @@ libxfce4util_la_SOURCES = \
xfce-utf8.c
libxfce4util_la_CFLAGS = \
- $(GOBJECT_CFLAGS) \
- $(PLATFORM_CFLAGS)
+ $(GOBJECT_CFLAGS)
libxfce4util_la_LDFLAGS = \
-export-dynamic \
-version-info $(LIBXFCE4UTIL_VERINFO) \
-export-symbols-regex "^[^_].*" \
- -no-undefined \
- $(PLATFORM_LDFLAGS)
+ -no-undefined
libxfce4util_la_LIBADD = \
$(GOBJECT_LIBS)
@@ -112,13 +111,21 @@ DISTCLEANFILES = \
BUILT_SOURCES = \
$(libxfce4util_built_sources)
+if HAVE_GNUC_VISIBILITY
TESTS = \
abicheck.sh
+endif
+
+libxfce4util-alias.h: make-libxfce4util-alias.pl libxfce4util.symbols
+ $(PERL) $(srcdir)/make-libxfce4util-alias.pl < $(srcdir)/libxfce4util.symbols > libxfce4util-alias.h
+
+libxfce4util-aliasdef.c: make-libxfce4util-alias.pl libxfce4util.symbols
+ $(PERL) $(srcdir)/make-libxfce4util-alias.pl -def < $(srcdir)/libxfce4util.symbols > libxfce4util-aliasdef.c
libxfce4util-enum-types.h: stamp-libxfce4util-enum-types.h
@true
stamp-libxfce4util-enum-types.h: $(libxfce4util_headers) Makefile
- $(AM_V_GEN) ( cd $(srcdir) && glib-mkenums \
+ ( cd $(srcdir) && glib-mkenums \
--fhead "#ifndef __LIBXFCE4UTIL_ENUM_TYPES_H__\n#define __LIBXFCE4UTIL_ENUM_TYPES_H__\n#include <glib-object.h>\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name at _get_type (void) G_GNUC_CONST;\n#define XFCE_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" \
@@ -129,12 +136,13 @@ stamp-libxfce4util-enum-types.h: $(libxfce4util_headers) Makefile
&& echo timestamp > $(@F)
libxfce4util-enum-types.c: $(libxfce4util_headers) Makefile
- $(AM_V_GEN) ( cd $(srcdir) && glib-mkenums \
- --fhead "#include <libxfce4util/libxfce4util.h>\n" \
+ ( cd $(srcdir) && glib-mkenums \
+ --fhead "#include <libxfce4util/libxfce4util.h>\n#include <libxfce4util/libxfce4util-alias.h>\n" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n at enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G at Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n etype = g_ at type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
+ --ftail "\n#define __LIBXFCE4UTIL_ENUM_TYPES_C__\n#include <libxfce4util/libxfce4util-aliasdef.c>\n" \
$(libxfce4util_headers) ) >> xgen-letc \
&& cp xgen-letc libxfce4util-enum-types.c \
&& rm -f xgen-letc
@@ -145,6 +153,9 @@ dist-hook: all
EXTRA_DIST = \
abicheck.sh \
- libxfce4util.symbols
+ libxfce4util.symbols \
+ libxfce4util-alias.h \
+ libxfce4util-aliasdef.c \
+ make-libxfce4util-alias.pl
# vi:set ts=8 sw=8 noet ai nocindent:
diff --git a/libxfce4util/libxfce4util-config.c b/libxfce4util/libxfce4util-config.c
index 2585194..fecedb7 100644
--- a/libxfce4util/libxfce4util-config.c
+++ b/libxfce4util/libxfce4util-config.c
@@ -24,9 +24,15 @@
#endif
#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util-alias.h>
const guint libxfce4util_major_version = LIBXFCE4UTIL_MAJOR_VERSION;
const guint libxfce4util_minor_version = LIBXFCE4UTIL_MINOR_VERSION;
const guint libxfce4util_micro_version = LIBXFCE4UTIL_MICRO_VERSION;
+
+
+
+#define __LIBXFCE4UTIL_CONFIG_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/libxfce4util-private.c b/libxfce4util/libxfce4util-private.c
index fdb97f0..ccecd40 100644
--- a/libxfce4util/libxfce4util-private.c
+++ b/libxfce4util/libxfce4util-private.c
@@ -24,6 +24,7 @@
#endif
#include <libxfce4util/libxfce4util-private.h>
+#include <libxfce4util/libxfce4util-alias.h>
@@ -37,3 +38,8 @@ _xfce_i18n_init (void)
{
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, NULL);
}
+
+
+
+#define __LIBXFCE4UTIL_PRIVATE_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/libxfce4util-private.h b/libxfce4util/libxfce4util-private.h
index 15be6e9..afead80 100644
--- a/libxfce4util/libxfce4util-private.h
+++ b/libxfce4util/libxfce4util-private.h
@@ -30,7 +30,7 @@
G_BEGIN_DECLS;
-void _xfce_i18n_init (void);
+G_GNUC_INTERNAL void _xfce_i18n_init (void);
G_END_DECLS;
diff --git a/libxfce4util/libxfce4util.symbols b/libxfce4util/libxfce4util.symbols
index d9892f9..15f7fd6 100644
--- a/libxfce4util/libxfce4util.symbols
+++ b/libxfce4util/libxfce4util.symbols
@@ -18,80 +18,142 @@
* Boston, MA 02111-1307, USA.
*/
+/* This file lists all exported symbols. It is used to generate
+ * the gobject.def file used to control exports on Windows and the
+ * libxfce4util-alias.h/libxfce4util-aliasdef.c files used to
+ * avoid PLT entries for internal uses of exported functions (see
+ * make-libxfce4util-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
+
/* libxfce4util-config variables */
+#if IN_HEADER(__LIBXFCE4UTIL_CONFIG_H__)
+#if IN_SOURCE(__LIBXFCE4UTIL_CONFIG_C__)
+#ifdef INCLUDE_VARIABLES
libxfce4util_major_version
libxfce4util_minor_version
libxfce4util_micro_version
+#endif
+#endif
+#endif
/* libxfce4util-enum-types functions */
+#if IN_HEADER(__LIBXFCE4UTIL_ENUM_TYPES_H__)
+#if IN_SOURCE(__LIBXFCE4UTIL_ENUM_TYPES_C__)
xfce_license_text_type_get_type G_GNUC_CONST
xfce_resource_type_get_type G_GNUC_CONST
+#endif
+#endif
/* XfceDesktopEntry methods */
+#if IN_HEADER(__XFCE_DESKTOPENTRY_H__)
+#if IN_SOURCE(__XFCE_DESKTOPENTRY_C__)
xfce_desktop_entry_get_type G_GNUC_CONST
-xfce_desktop_entry_new
-xfce_desktop_entry_new_from_data
+xfce_desktop_entry_new G_GNUC_MALLOC
+xfce_desktop_entry_new_from_data G_GNUC_MALLOC
xfce_desktop_entry_get_file
xfce_desktop_entry_get_int
xfce_desktop_entry_get_string
xfce_desktop_entry_has_translated_entry
+#endif
+#endif
/* xfce-fileutils functions */
+#if IN_HEADER(__XFCE_FILEUTILS_H__)
+#if IN_SOURCE(__XFCE_FILEUTILS_C__)
xfce_mkdirhier
+#endif
+#endif
/* xfce-i18n functions */
+#if IN_HEADER(__XFCE_I18N_H__)
+#if IN_SOURCE(__XFCE_I18N_C__)
xfce_textdomain
xfce_strip_context
-xfce_get_file_localized
+xfce_get_file_localized G_GNUC_MALLOC
xfce_get_file_localized_r
-xfce_get_dir_localized
+xfce_get_dir_localized G_GNUC_MALLOC
xfce_get_dir_localized_r
xfce_get_path_localized
xfce_locale_match
+#endif
+#endif
/* xfce-kiosk functions */
-xfce_kiosk_new
+#if IN_HEADER(__XFCE_KIOSK_H__)
+#if IN_SOURCE(__XFCE_KIOSK_C__)
+xfce_kiosk_new G_GNUC_MALLOC
xfce_kiosk_query
xfce_kiosk_free
+#endif
+#endif
/* xfce-license variables/functions */
+#if IN_HEADER(__XFCE_LICENSE_H__)
+#if IN_SOURCE(__XFCE_LICENSE_C__)
+#ifdef INCLUDE_VARIABLES
xfce_builtin_license_BSD
xfce_builtin_license_GPL
xfce_builtin_license_LGPL
+#endif
xfce_get_license_text G_GNUC_PURE
+#endif
+#endif
/* xfce-miscutils functions */
+#if IN_HEADER(__XFCE_MISCUTILS_H__)
+#if IN_SOURCE(__XFCE_MISCUTILS_C__)
xfce_version_string G_GNUC_PURE
xfce_get_homedir G_GNUC_PURE
xfce_get_homefile_r
xfce_get_userdir G_GNUC_PURE
xfce_get_userfile_r
-xfce_strjoin
-xfce_gethostname
+xfce_strjoin G_GNUC_MALLOC
+xfce_gethostname G_GNUC_MALLOC
xfce_putenv
xfce_setenv
xfce_unsetenv
-xfce_expand_variables
+xfce_expand_variables G_GNUC_MALLOC
+#endif
+#endif
/* xfce-posix-signal-handler functions */
+#if IN_HEADER(__XFCE_POSIX_SIGNAL_HANDLER_H__)
+#if IN_SOURCE(__XFCE_POSIX_SIGNAL_HANDLER_C__)
xfce_posix_signal_handler_init
xfce_posix_signal_handler_shutdown
xfce_posix_signal_handler_set_handler
xfce_posix_signal_handler_restore_handler
+#endif
+#endif
/* xfce-resource functions */
-xfce_resource_dirs
-xfce_resource_lookup
-xfce_resource_lookup_all
-xfce_resource_match
-xfce_resource_match_custom
+#if IN_HEADER(__XFCE_RESOURCE_H__)
+#if IN_SOURCE(__XFCE_RESOURCE_C__)
+xfce_resource_dirs G_GNUC_MALLOC
+xfce_resource_lookup G_GNUC_MALLOC
+xfce_resource_lookup_all G_GNUC_MALLOC
+xfce_resource_match G_GNUC_MALLOC
+xfce_resource_match_custom G_GNUC_MALLOC
xfce_resource_push_path
xfce_resource_pop_path
-xfce_resource_save_location
+xfce_resource_save_location G_GNUC_MALLOC
+#endif
+#endif
/* xfce-rc functions */
-xfce_rc_simple_open
-xfce_rc_config_open
+#if IN_HEADER(__XFCE_RC_H__)
+#if IN_SOURCE(__XFCE_RC_C__)
+xfce_rc_simple_open G_GNUC_MALLOC
+xfce_rc_config_open G_GNUC_MALLOC
xfce_rc_close
xfce_rc_flush
xfce_rc_rollback
@@ -110,13 +172,19 @@ xfce_rc_read_entry
xfce_rc_read_entry_untranslated
xfce_rc_read_bool_entry
xfce_rc_read_int_entry
-xfce_rc_read_list_entry
+xfce_rc_read_list_entry G_GNUC_MALLOC
xfce_rc_write_entry
xfce_rc_write_bool_entry
xfce_rc_write_int_entry
xfce_rc_write_list_entry
+#endif
+#endif
/* xfce-utf8 functions */
+#if IN_HEADER(__XFCE_UTF8_H__)
+#if IN_SOURCE(__XFCE_UTF8_C__)
xfce_utf8_remove_controls
-xfce_utf8_strndup
+xfce_utf8_strndup G_GNUC_MALLOC
+#endif
+#endif
diff --git a/libxfce4util/make-libxfce4util-alias.pl b/libxfce4util/make-libxfce4util-alias.pl
new file mode 100644
index 0000000..2b2ddda
--- /dev/null
+++ b/libxfce4util/make-libxfce4util-alias.pl
@@ -0,0 +1,155 @@
+#!/usr/bin/env perl -w
+#
+# Copyright (c) 2004 The GLib Development Team.
+# Copyright (c) 2005-2006 Benedikt Meurer <benny at 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-libxfce4util-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/libxfce4util/xfce-desktopentry.c b/libxfce4util/xfce-desktopentry.c
index ab728c9..3548d33 100644
--- a/libxfce4util/xfce-desktopentry.c
+++ b/libxfce4util/xfce-desktopentry.c
@@ -42,6 +42,7 @@
#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util-alias.h>
@@ -596,3 +597,8 @@ xfce_desktop_entry_has_translated_entry (XfceDesktopEntry *desktop_entry,
return TRUE;
}
+
+
+
+#define __XFCE_DESKTOPENTRY_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-fileutils.c b/libxfce4util/xfce-fileutils.c
index d407d27..a096964 100644
--- a/libxfce4util/xfce-fileutils.c
+++ b/libxfce4util/xfce-fileutils.c
@@ -38,6 +38,7 @@
#endif
#include <libxfce4util/libxfce4util-private.h>
+#include <libxfce4util/libxfce4util-alias.h>
@@ -155,3 +156,8 @@ xfce_mkdirhier (const gchar *whole_path,
return retval;
}
+
+
+
+#define __XFCE_FILEUTILS_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-i18n.c b/libxfce4util/xfce-i18n.c
index 3f0c1f4..9fe3739 100644
--- a/libxfce4util/xfce-i18n.c
+++ b/libxfce4util/xfce-i18n.c
@@ -45,6 +45,7 @@
#endif
#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util-alias.h>
@@ -178,12 +179,6 @@ xfce_textdomain (const gchar *package,
*
* Deprecated:4.4: Use g_strip_context() instead.
**/
-#ifdef XFCE_DISABLE_DEPRECATED
-/* work around compiler warning */
-G_CONST_RETURN gchar *xfce_strip_context (const gchar *msgid,
- const gchar *msgval);
-#endif
-
G_CONST_RETURN gchar*
xfce_strip_context (const gchar *msgid,
const gchar *msgval)
@@ -524,3 +519,8 @@ xfce_locale_match (const gchar *locale1,
return XFCE_LOCALE_NO_MATCH;
}
+
+
+
+#define __XFCE_I18N_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-i18n.h b/libxfce4util/xfce-i18n.h
index 3ed0075..a4580c3 100644
--- a/libxfce4util/xfce-i18n.h
+++ b/libxfce4util/xfce-i18n.h
@@ -69,7 +69,7 @@ void xfce_textdomain (const gchar *package,
const gchar *localedir,
const gchar *encoding);
-#if !defined(XFCE_DISABLE_DEPRECATED)
+#if defined(LIBXFCE4UTIL_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
G_CONST_RETURN gchar* xfce_strip_context (const gchar *msgid,
const gchar *msgval);
#endif
diff --git a/libxfce4util/xfce-kiosk.c b/libxfce4util/xfce-kiosk.c
index 14e075f..6af2430 100644
--- a/libxfce4util/xfce-kiosk.c
+++ b/libxfce4util/xfce-kiosk.c
@@ -50,6 +50,7 @@
#endif
#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util-alias.h>
@@ -341,3 +342,8 @@ mtime (const gchar *path)
return sb.st_mtime;
}
+
+
+
+#define __XFCE_KIOSK_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-license.c b/libxfce4util/xfce-license.c
index f1ded5b..bcd34c4 100644
--- a/libxfce4util/xfce-license.c
+++ b/libxfce4util/xfce-license.c
@@ -24,6 +24,7 @@
#endif
#include <libxfce4util/libxfce4util-private.h>
+#include <libxfce4util/libxfce4util-alias.h>
@@ -108,3 +109,8 @@ xfce_get_license_text (XfceLicenseTextType license_type)
default: return _(xfce_builtin_license_LGPL);
}
}
+
+
+
+#define __XFCE_LICENSE_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-miscutils.c b/libxfce4util/xfce-miscutils.c
index 6aefa2f..56db56e 100644
--- a/libxfce4util/xfce-miscutils.c
+++ b/libxfce4util/xfce-miscutils.c
@@ -60,6 +60,7 @@
#endif
#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util-alias.h>
#define XFCE4DIR ".xfce4"
@@ -118,11 +119,11 @@ internal_initialize(void)
static gchar*
internal_get_file_r (const gchar *dir,
gchar *buffer,
- size_t len,
+ gsize len,
const gchar *format,
va_list ap)
{
- size_t n;
+ gsize n;
g_return_val_if_fail(buffer != NULL, NULL);
g_return_val_if_fail(format != NULL, NULL);
@@ -134,7 +135,7 @@ internal_get_file_r (const gchar *dir,
if ((n = g_strlcat(buffer, G_DIR_SEPARATOR_S, len)) >= len)
return NULL;
- if ((size_t) g_vsnprintf(buffer + n, len - n, format, ap) >= len - n)
+ if ((gsize) g_vsnprintf(buffer + n, len - n, format, ap) >= len - n)
return NULL;
return buffer;
@@ -608,3 +609,8 @@ xfce_expand_variables (const gchar *command,
return g_strdup (buffer);
}
+
+
+
+#define __XFCE_MISCUTILS_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-posix-signal-handler.c b/libxfce4util/xfce-posix-signal-handler.c
index 29ed49f..9d01a8d 100644
--- a/libxfce4util/xfce-posix-signal-handler.c
+++ b/libxfce4util/xfce-posix-signal-handler.c
@@ -42,6 +42,7 @@
#include <glib.h>
#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util-alias.h>
#define SIGNAL_PIPE_READ __signal_pipe[0]
#define SIGNAL_PIPE_WRITE __signal_pipe[1]
@@ -55,7 +56,7 @@ typedef struct
} XfcePosixSignalHandlerData;
static gboolean __inited = FALSE;
-static gint __signal_pipe[2] = { -1, -1 };
+static int __signal_pipe[2] = { -1, -1 };
static GHashTable *__handlers = NULL;
static GIOChannel *__signal_io = NULL;
static guint __io_watch_id = 0;
@@ -252,3 +253,8 @@ xfce_posix_signal_handler_restore_handler(gint signal_id)
g_hash_table_remove(__handlers, GINT_TO_POINTER(signal_id));
}
+
+
+
+#define __XFCE_POSIX_SIGNAL_HANDLER_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-posix-signal-handler.h b/libxfce4util/xfce-posix-signal-handler.h
index 002c3a2..1799825 100644
--- a/libxfce4util/xfce-posix-signal-handler.h
+++ b/libxfce4util/xfce-posix-signal-handler.h
@@ -28,16 +28,16 @@
G_BEGIN_DECLS
-typedef void (*XfcePosixSignalHandler)(gint signal_id, gpointer user_data);
+typedef void (*XfcePosixSignalHandler)(gint signal, gpointer user_data);
gboolean xfce_posix_signal_handler_init(GError **error);
void xfce_posix_signal_handler_shutdown(void);
-gboolean xfce_posix_signal_handler_set_handler(gint signal_id,
+gboolean xfce_posix_signal_handler_set_handler(gint signal,
XfcePosixSignalHandler handler,
gpointer user_data,
GError **error);
-void xfce_posix_signal_handler_restore_handler(gint signal_id);
+void xfce_posix_signal_handler_restore_handler(gint signal);
G_END_DECLS
diff --git a/libxfce4util/xfce-rc-config.c b/libxfce4util/xfce-rc-config.c
index db0a019..7f8320d 100644
--- a/libxfce4util/xfce-rc-config.c
+++ b/libxfce4util/xfce-rc-config.c
@@ -33,6 +33,7 @@
#include <libxfce4util/xfce-private.h>
#include <libxfce4util/xfce-rc-private.h>
+#include <libxfce4util/libxfce4util-alias.h>
@@ -419,3 +420,8 @@ _xfce_rc_config_write_entry (XfceRc *rc,
if (!_xfce_rc_simple_is_readonly (XFCE_RC (config->save)))
_xfce_rc_simple_write_entry (XFCE_RC (config->save), key, value);
}
+
+
+
+#define __XFCE_RC_CONFIG_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-rc-private.h b/libxfce4util/xfce-rc-private.h
index ae3fab6..6b3726d 100644
--- a/libxfce4util/xfce-rc-private.h
+++ b/libxfce4util/xfce-rc-private.h
@@ -61,70 +61,71 @@ struct _XfceRc
#define XFCE_RC_SIMPLE_CONST(obj) ((const XfceRcSimple *) (obj))
-void _xfce_rc_init (XfceRc *rc);
+G_GNUC_INTERNAL void _xfce_rc_init (XfceRc *rc);
-XfceRcSimple* _xfce_rc_simple_new (XfceRcSimple *shared,
- const gchar *filename,
- gboolean readonly);
-gboolean _xfce_rc_simple_parse (XfceRcSimple *simple);
-void _xfce_rc_simple_close (XfceRc *rc);
-void _xfce_rc_simple_flush (XfceRc *rc);
-void _xfce_rc_simple_rollback (XfceRc *rc);
-gboolean _xfce_rc_simple_is_dirty (const XfceRc *rc) G_GNUC_CONST;
-gboolean _xfce_rc_simple_is_readonly (const XfceRc *rc) G_GNUC_CONST;
-const gchar* _xfce_rc_simple_get_filename (const XfceRc *rc) G_GNUC_CONST;
-gchar** _xfce_rc_simple_get_groups (const XfceRc *rc) G_GNUC_CONST;
-gchar** _xfce_rc_simple_get_entries (const XfceRc *rc,
- const gchar *name) G_GNUC_CONST;
-void _xfce_rc_simple_delete_group (XfceRc *rc,
- const gchar *name,
- gboolean global);
-const gchar* _xfce_rc_simple_get_group (const XfceRc *rc) G_GNUC_CONST;
-gboolean _xfce_rc_simple_has_group (const XfceRc *rc,
- const gchar *name) G_GNUC_CONST;
-void _xfce_rc_simple_set_group (XfceRc *rc,
- const gchar *name);
-void _xfce_rc_simple_delete_entry (XfceRc *rc,
- const gchar *key,
- gboolean global);
-gboolean _xfce_rc_simple_has_entry (const XfceRc *rc,
- const gchar *key) G_GNUC_CONST;
-const gchar* _xfce_rc_simple_read_entry (const XfceRc *rc,
- const gchar *key,
- gboolean translated) G_GNUC_CONST;
-void _xfce_rc_simple_write_entry (XfceRc *rc,
- const gchar *key,
- const gchar *value);
+G_GNUC_INTERNAL XfceRcSimple* _xfce_rc_simple_new (XfceRcSimple *shared,
+ const gchar *filename,
+ gboolean readonly);
+G_GNUC_INTERNAL gboolean _xfce_rc_simple_parse (XfceRcSimple *simple);
+G_GNUC_INTERNAL void _xfce_rc_simple_close (XfceRc *rc);
+G_GNUC_INTERNAL void _xfce_rc_simple_flush (XfceRc *rc);
+G_GNUC_INTERNAL void _xfce_rc_simple_rollback (XfceRc *rc);
+G_GNUC_INTERNAL gboolean _xfce_rc_simple_is_dirty (const XfceRc *rc) G_GNUC_CONST;
+G_GNUC_INTERNAL gboolean _xfce_rc_simple_is_readonly (const XfceRc *rc) G_GNUC_CONST;
+G_GNUC_INTERNAL const gchar* _xfce_rc_simple_get_filename(const XfceRc *rc) G_GNUC_CONST;
+G_GNUC_INTERNAL gchar** _xfce_rc_simple_get_groups (const XfceRc *rc) G_GNUC_CONST;
+G_GNUC_INTERNAL gchar** _xfce_rc_simple_get_entries (const XfceRc *rc,
+ const gchar *name) G_GNUC_CONST;
+G_GNUC_INTERNAL void _xfce_rc_simple_delete_group(XfceRc *rc,
+ const gchar *name,
+ gboolean global);
+const gchar* _xfce_rc_simple_get_group (const XfceRc *rc) G_GNUC_CONST;
+G_GNUC_INTERNAL gboolean _xfce_rc_simple_has_group (const XfceRc *rc,
+ const gchar *name) G_GNUC_CONST;
+G_GNUC_INTERNAL void _xfce_rc_simple_set_group (XfceRc *rc,
+ const gchar *name);
+G_GNUC_INTERNAL void _xfce_rc_simple_delete_entry(XfceRc *rc,
+ const gchar *key,
+ gboolean global);
+G_GNUC_INTERNAL gboolean _xfce_rc_simple_has_entry (const XfceRc *rc,
+ const gchar *key) G_GNUC_CONST;
+G_GNUC_INTERNAL const gchar* _xfce_rc_simple_read_entry (const XfceRc *rc,
+ const gchar *key,
+ gboolean translated) G_GNUC_CONST;
+G_GNUC_INTERNAL void _xfce_rc_simple_write_entry (XfceRc *rc,
+ const gchar *key,
+ const gchar *value);
+
+G_GNUC_INTERNAL XfceRcConfig* _xfce_rc_config_new (XfceResourceType type,
+ const gchar *resource,
+ gboolean readonly);
+G_GNUC_INTERNAL void _xfce_rc_config_close (XfceRc *rc);
+G_GNUC_INTERNAL void _xfce_rc_config_flush (XfceRc *rc);
+G_GNUC_INTERNAL void _xfce_rc_config_rollback (XfceRc *rc);
+G_GNUC_INTERNAL gboolean _xfce_rc_config_is_dirty (const XfceRc *rc) G_GNUC_CONST;
+G_GNUC_INTERNAL gboolean _xfce_rc_config_is_readonly (const XfceRc *rc) G_GNUC_CONST;
+G_GNUC_INTERNAL gchar** _xfce_rc_config_get_groups (const XfceRc *rc) G_GNUC_CONST;
+G_GNUC_INTERNAL gchar** _xfce_rc_config_get_entries (const XfceRc *rc,
+ const gchar *name) G_GNUC_CONST;
+G_GNUC_INTERNAL void _xfce_rc_config_delete_group(XfceRc *rc,
+ const gchar *name,
+ gboolean global);
+G_GNUC_INTERNAL const gchar* _xfce_rc_config_get_group (const XfceRc *rc) G_GNUC_CONST;
+G_GNUC_INTERNAL gboolean _xfce_rc_config_has_group (const XfceRc *rc,
+ const gchar *name) G_GNUC_CONST;
+G_GNUC_INTERNAL void _xfce_rc_config_set_group (XfceRc *rc,
+ const gchar *name);
+G_GNUC_INTERNAL void _xfce_rc_config_delete_entry(XfceRc *rc,
+ const gchar *key,
+ gboolean global);
+G_GNUC_INTERNAL gboolean _xfce_rc_config_has_entry (const XfceRc *rc,
+ const gchar *key) G_GNUC_CONST;
+G_GNUC_INTERNAL const gchar* _xfce_rc_config_read_entry (const XfceRc *rc,
+ const gchar *key,
+ gboolean translated) G_GNUC_CONST;
+G_GNUC_INTERNAL void _xfce_rc_config_write_entry (XfceRc *rc,
+ const gchar *key,
+ const gchar *value);
-XfceRcConfig* _xfce_rc_config_new (XfceResourceType type,
- const gchar *resource,
- gboolean readonly);
-void _xfce_rc_config_close (XfceRc *rc);
-void _xfce_rc_config_flush (XfceRc *rc);
-void _xfce_rc_config_rollback (XfceRc *rc);
-gboolean _xfce_rc_config_is_dirty (const XfceRc *rc) G_GNUC_CONST;
-gboolean _xfce_rc_config_is_readonly (const XfceRc *rc) G_GNUC_CONST;
-gchar** _xfce_rc_config_get_groups (const XfceRc *rc) G_GNUC_CONST;
-gchar** _xfce_rc_config_get_entries (const XfceRc *rc,
- const gchar *name) G_GNUC_CONST;
-void _xfce_rc_config_delete_group (XfceRc *rc,
- const gchar *name,
- gboolean global);
-const gchar* _xfce_rc_config_get_group (const XfceRc *rc) G_GNUC_CONST;
-gboolean _xfce_rc_config_has_group (const XfceRc *rc,
- const gchar *name) G_GNUC_CONST;
-void _xfce_rc_config_set_group (XfceRc *rc,
- const gchar *name);
-void _xfce_rc_config_delete_entry (XfceRc *rc,
- const gchar *key,
- gboolean global);
-gboolean _xfce_rc_config_has_entry (const XfceRc *rc,
- const gchar *key) G_GNUC_CONST;
-const gchar* _xfce_rc_config_read_entry (const XfceRc *rc,
- const gchar *key,
- gboolean translated) G_GNUC_CONST;
-void _xfce_rc_config_write_entry (XfceRc *rc,
- const gchar *key,
- const gchar *value);
#endif /* !__LIBXFCE4UTIL_XFCE_RC_PRIVATE_H__ */
diff --git a/libxfce4util/xfce-rc-simple.c b/libxfce4util/xfce-rc-simple.c
index 636dfee..2f83703 100644
--- a/libxfce4util/xfce-rc-simple.c
+++ b/libxfce4util/xfce-rc-simple.c
@@ -39,6 +39,7 @@
#include <libxfce4util/xfce-private.h>
#include <libxfce4util/xfce-rc-private.h>
+#include <libxfce4util/libxfce4util-alias.h>
#ifndef PATH_MAX
@@ -1077,3 +1078,8 @@ _xfce_rc_simple_write_entry (XfceRc *rc,
if (G_LIKELY (result != NULL))
simple->dirty = TRUE;
}
+
+
+
+#define __XFCE_RC_SIMPLE_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-rc.c b/libxfce4util/xfce-rc.c
index 91b6124..ecf12e0 100644
--- a/libxfce4util/xfce-rc.c
+++ b/libxfce4util/xfce-rc.c
@@ -47,6 +47,7 @@
#include <libxfce4util/libxfce4util.h>
#include <libxfce4util/xfce-private.h>
#include <libxfce4util/xfce-rc-private.h>
+#include <libxfce4util/libxfce4util-alias.h>
@@ -761,3 +762,8 @@ xfce_rc_write_list_entry (XfceRc *rc,
xfce_rc_write_entry (rc, key, list);
g_free (list);
}
+
+
+
+#define __XFCE_RC_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-resource.c b/libxfce4util/xfce-resource.c
index 214ccd3..0e9fe84 100644
--- a/libxfce4util/xfce-resource.c
+++ b/libxfce4util/xfce-resource.c
@@ -31,6 +31,7 @@
#endif
#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util-alias.h>
@@ -41,7 +42,7 @@
-#define TYPE_VALID(t) (((gint) t) >= XFCE_RESOURCE_DATA && (t) <= XFCE_RESOURCE_THEMES)
+#define TYPE_VALID(t) ((gint)(t) >= XFCE_RESOURCE_DATA && (t) <= XFCE_RESOURCE_THEMES)
@@ -795,3 +796,8 @@ xfce_resource_save_location (XfceResourceType type,
return path;
}
+
+
+
+#define __XFCE_RESOURCE_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/libxfce4util/xfce-utf8.c b/libxfce4util/xfce-utf8.c
index f6276bb..b78d523 100644
--- a/libxfce4util/xfce-utf8.c
+++ b/libxfce4util/xfce-utf8.c
@@ -25,6 +25,7 @@
#endif
#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util-alias.h>
@@ -93,3 +94,8 @@ xfce_utf8_strndup (const gchar *src,
return g_strndup (src, s - src);
}
+
+
+
+#define __XFCE_UTF8_C__
+#include <libxfce4util/libxfce4util-aliasdef.c>
diff --git a/xfce4-kiosk-query/main.c b/xfce4-kiosk-query/main.c
index f6543c8..4cb318a 100644
--- a/xfce4-kiosk-query/main.c
+++ b/xfce4-kiosk-query/main.c
@@ -34,7 +34,7 @@
#include <libxfce4util/libxfce4util.h>
-G_GNUC_NORETURN static void
+static void
usage (gboolean error)
{
FILE *fp = error ? stderr : stdout;
More information about the Xfce4-commits
mailing list