[Xfce4-commits] <libxfce4util:master> Use new xdt macros.

Nick Schermer noreply at xfce.org
Mon Oct 19 15:40:01 CEST 2009


Updating branch refs/heads/master
         to 56f2002c0c26333f7d4a14fa067c738552033de7 (commit)
       from 104b24d4685ee5995b1feb4d1248ff33fb00c5de (commit)

commit 56f2002c0c26333f7d4a14fa067c738552033de7
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Oct 19 15:36:05 2009 +0200

    Use new xdt macros.

 autogen.sh                               |    2 +-
 configure.in.in                          |   73 +++------------
 docs/Makefile.am                         |    3 +-
 libxfce4util/Makefile.am                 |   22 +----
 libxfce4util/libxfce4util-config.c       |    6 -
 libxfce4util/libxfce4util-private.c      |    6 -
 libxfce4util/libxfce4util.symbols        |  104 ++++-----------------
 libxfce4util/make-libxfce4util-alias.pl  |  155 ------------------------------
 libxfce4util/xfce-desktopentry.c         |    6 -
 libxfce4util/xfce-fileutils.c            |    6 -
 libxfce4util/xfce-i18n.c                 |   16 ++--
 libxfce4util/xfce-kiosk.c                |   14 +--
 libxfce4util/xfce-license.c              |    6 -
 libxfce4util/xfce-miscutils.c            |   10 +--
 libxfce4util/xfce-posix-signal-handler.c |   54 +++++------
 libxfce4util/xfce-posix-signal-handler.h |    6 +-
 libxfce4util/xfce-rc-config.c            |    6 -
 libxfce4util/xfce-rc-simple.c            |   10 +--
 libxfce4util/xfce-rc.c                   |    6 -
 libxfce4util/xfce-resource.c             |   10 +--
 libxfce4util/xfce-utf8.c                 |    6 -
 xfce4-kiosk-query/main.c                 |    2 +-
 22 files changed, 84 insertions(+), 445 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 6dd7849..26212d7 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -18,6 +18,6 @@ EOF
   exit 1
 }
 
-XDT_AUTOGEN_REQUIRED_VERSION="4.7.0" exec xdt-autogen $@
+XDT_AUTOGEN_REQUIRED_VERSION="4.7.2" exec xdt-autogen $@
 
 # vi:set ts=2 sw=2 et ai:
diff --git a/configure.in.in b/configure.in.in
index 726a0ec..fe4d41d 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -30,7 +30,7 @@ dnl # YOU ARE DOING.
 
 
 dnl ********************************************
-dnl *** Full debug support for SVN snapshots ***
+dnl *** Full debug support for GIT snapshots ***
 dnl ********************************************
 m4_define([libxfce4util_debug_default], [ifelse(libxfce4util_version_tag(), [git], [full], [minimum])])
 
@@ -52,7 +52,8 @@ dnl ***************************
 LIBXFCE4UTIL_VERSION=libxfce4util_version()
 AM_INIT_AUTOMAKE([libxfce4util], [$LIBXFCE4UTIL_VERSION])
 AM_CONFIG_HEADER([config.h])
-AM_MAINTAINER_MODE
+AM_MAINTAINER_MODE()
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 dnl **************************
 dnl *** Libtool versioning ***
@@ -100,7 +101,7 @@ dnl ***************************************
 AC_HEADER_STDC()
 AC_CHECK_HEADERS([err.h errno.h grp.h limits.h locale.h pwd.h \
                   signal.h sys/stat.h sys/types.h sys/utsname.h \
-                  sys/wait.h time.h unistd.h])
+                  sys/wait.h time.h unistd.h varargs.h])
 AC_CHECK_FUNCS([gethostname getpwnam setenv setlocale strdup unsetenv])
 
 dnl ******************************
@@ -120,7 +121,7 @@ GTK_DOC_CHECK([1.0])
 
 dnl ****************************************************************************
 dnl *** Check for a broken putenv(3) implementation that requires strings    ***
-dnl *** to be malloc'd and not freed after a successfully call to putenv(3). ***
+dnl *** to be malloced and not freed after a successfully call to putenv(3). ***
 dnl *** Solaris is known to have such an implementation, also glibc seems to ***
 dnl *** be hit by this problem.                                              ***
 dnl ****************************************************************************
@@ -150,66 +151,18 @@ AC_MSG_RESULT([$with_broken_putenv])
 dnl ***********************************
 dnl *** Check for debugging support ***
 dnl ***********************************
-AC_ARG_ENABLE([debug],
-AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@], [Turn on debugging @<:@default=libxfce4util_debug_default@:>@]),
-  [], [enable_debug=libxfce4util_debug_default])
-AC_MSG_CHECKING([whether to enable debugging support])
-if test x"$enable_debug" = x"yes" -o x"$enable_debug" = x"full"; then
-  if test x"$GCC" = x"yes"; then
-    CFLAGS="$CFLAGS -O0 -g3 -Werror -Wall"
-  fi
-else
-  CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"
-
-  if test x"$enable_debug" = x"no"; then
-    CFLAGS="$CFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
-  fi
-fi
-AC_MSG_RESULT([$enable_debug])
+XDT_FEATURE_DEBUG([libxfce4util_debug_default])
 
 dnl **************************************
 dnl *** Check for linker optimizations ***
 dnl **************************************
-AC_MSG_CHECKING([whether $LD accepts -O1])
-case `$LD -O1 -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  LDFLAGS="$LDFLAGS -Wl,-O1"
-  AC_MSG_RESULT([yes])
-  ;;
-*)
-  AC_MSG_RESULT([no])
-  ;;
-esac
-
-dnl ****************************************
-dnl *** Check for ELF visibility support ***
-dnl ****************************************
-AC_ARG_ENABLE([visibility], AC_HELP_STRING([--disable-visibility], [Don't 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"])
+XDT_FEATURE_LINKER_OPTS()
+
+dnl *************************************
+dnl *** Compensate for broken gtk-doc ***
+dnl *************************************
+XDT_SUPPORTED_FLAGS([GTK_DOC_EXTRA_CFLAGS], [-Wno-sign-compare])
+AC_SUBST([GTK_DOC_EXTRA_CFLAGS])
 
 dnl *****************************
 dnl *** Generate output files ***
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 9627057..2849247 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -45,7 +45,8 @@ GTKDOC_CFLAGS = 					\
 	-I$(top_srcdir) 				\
 	-I$(top_builddir) 				\
 	$(CPPFLAGS)					\
-	$(GOBJECT_CFLAGS)
+	$(GOBJECT_CFLAGS) 				\
+	$(GTK_DOC_EXTRA_CFLAGS)
 
 GTKDOC_LIBS =  						\
 	$(top_builddir)/libxfce4util/libxfce4util.la
diff --git a/libxfce4util/Makefile.am b/libxfce4util/Makefile.am
index 4eb6175..7cf688a 100644
--- a/libxfce4util/Makefile.am
+++ b/libxfce4util/Makefile.am
@@ -40,8 +40,6 @@ 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
@@ -111,21 +109,13 @@ 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
-	( cd $(srcdir) && glib-mkenums \
+	$(AM_V_GEN) ( 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" \
@@ -136,13 +126,12 @@ stamp-libxfce4util-enum-types.h: $(libxfce4util_headers) Makefile
 	&& echo timestamp > $(@F)
 
 libxfce4util-enum-types.c: $(libxfce4util_headers) Makefile
-	( cd $(srcdir) && glib-mkenums \
-		--fhead "#include <libxfce4util/libxfce4util.h>\n#include <libxfce4util/libxfce4util-alias.h>\n" \
+	$(AM_V_GEN) ( cd $(srcdir) && glib-mkenums \
+		--fhead "#include <libxfce4util/libxfce4util.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
@@ -153,9 +142,6 @@ dist-hook: all
 
 EXTRA_DIST =								\
 	abicheck.sh							\
-	libxfce4util.symbols						\
-	libxfce4util-alias.h						\
-	libxfce4util-aliasdef.c						\
-	make-libxfce4util-alias.pl
+	libxfce4util.symbols
 
 # vi:set ts=8 sw=8 noet ai nocindent:
diff --git a/libxfce4util/libxfce4util-config.c b/libxfce4util/libxfce4util-config.c
index fecedb7..2585194 100644
--- a/libxfce4util/libxfce4util-config.c
+++ b/libxfce4util/libxfce4util-config.c
@@ -24,15 +24,9 @@
 #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 ccecd40..fdb97f0 100644
--- a/libxfce4util/libxfce4util-private.c
+++ b/libxfce4util/libxfce4util-private.c
@@ -24,7 +24,6 @@
 #endif
 
 #include <libxfce4util/libxfce4util-private.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 
@@ -38,8 +37,3 @@ _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.symbols b/libxfce4util/libxfce4util.symbols
index 15f7fd6..d9892f9 100644
--- a/libxfce4util/libxfce4util.symbols
+++ b/libxfce4util/libxfce4util.symbols
@@ -18,142 +18,80 @@
  * 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 G_GNUC_MALLOC
-xfce_desktop_entry_new_from_data G_GNUC_MALLOC
+xfce_desktop_entry_new
+xfce_desktop_entry_new_from_data
 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 G_GNUC_MALLOC
+xfce_get_file_localized
 xfce_get_file_localized_r
-xfce_get_dir_localized G_GNUC_MALLOC
+xfce_get_dir_localized
 xfce_get_dir_localized_r
 xfce_get_path_localized
 xfce_locale_match
-#endif
-#endif
 
 /* xfce-kiosk functions */
-#if IN_HEADER(__XFCE_KIOSK_H__)
-#if IN_SOURCE(__XFCE_KIOSK_C__)
-xfce_kiosk_new G_GNUC_MALLOC
+xfce_kiosk_new
 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 G_GNUC_MALLOC
-xfce_gethostname G_GNUC_MALLOC
+xfce_strjoin
+xfce_gethostname
 xfce_putenv
 xfce_setenv
 xfce_unsetenv
-xfce_expand_variables G_GNUC_MALLOC
-#endif
-#endif
+xfce_expand_variables
 
 /* 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 */
-#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_dirs
+xfce_resource_lookup
+xfce_resource_lookup_all
+xfce_resource_match
+xfce_resource_match_custom
 xfce_resource_push_path
 xfce_resource_pop_path
-xfce_resource_save_location G_GNUC_MALLOC
-#endif
-#endif
+xfce_resource_save_location
 
 /* xfce-rc functions */
-#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_simple_open
+xfce_rc_config_open
 xfce_rc_close
 xfce_rc_flush
 xfce_rc_rollback
@@ -172,19 +110,13 @@ xfce_rc_read_entry
 xfce_rc_read_entry_untranslated
 xfce_rc_read_bool_entry
 xfce_rc_read_int_entry
-xfce_rc_read_list_entry G_GNUC_MALLOC
+xfce_rc_read_list_entry
 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 G_GNUC_MALLOC
-#endif
-#endif
+xfce_utf8_strndup
 
diff --git a/libxfce4util/make-libxfce4util-alias.pl b/libxfce4util/make-libxfce4util-alias.pl
deleted file mode 100644
index 2b2ddda..0000000
--- a/libxfce4util/make-libxfce4util-alias.pl
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/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 3548d33..ab728c9 100644
--- a/libxfce4util/xfce-desktopentry.c
+++ b/libxfce4util/xfce-desktopentry.c
@@ -42,7 +42,6 @@
 
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 
@@ -597,8 +596,3 @@ 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 a096964..d407d27 100644
--- a/libxfce4util/xfce-fileutils.c
+++ b/libxfce4util/xfce-fileutils.c
@@ -38,7 +38,6 @@
 #endif
 
 #include <libxfce4util/libxfce4util-private.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 
@@ -156,8 +155,3 @@ 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 15fc0ce..3f0c1f4 100644
--- a/libxfce4util/xfce-i18n.c
+++ b/libxfce4util/xfce-i18n.c
@@ -45,7 +45,6 @@
 #endif
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 
@@ -81,7 +80,7 @@ xfce_localize_path_internal (gchar       *buffer,
   const gchar       *lang;
   gchar             *langext;
   gchar             *p;
-  gint               n;
+  guint              n;
 
 #ifdef HAVE_SETLOCALE
   lang = setlocale (LC_MESSAGES, NULL);
@@ -179,6 +178,12 @@ 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)
@@ -319,7 +324,7 @@ xfce_get_path_localized (gchar       *dst,
   gchar             *d = dst;
   gchar             *langext;
   gchar             *buffer;
-  gint               n;
+  guint              n;
 
   g_return_val_if_fail (paths != NULL, NULL);
   g_return_val_if_fail (dst != NULL, NULL);
@@ -519,8 +524,3 @@ 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-kiosk.c b/libxfce4util/xfce-kiosk.c
index 71b1cb6..14e075f 100644
--- a/libxfce4util/xfce-kiosk.c
+++ b/libxfce4util/xfce-kiosk.c
@@ -50,7 +50,6 @@
 #endif
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 
@@ -251,18 +250,18 @@ xfce_kiosk_init (void)
   int            gidsetlen;
   int            n;
   int            m;
-  time_t         time;
+  time_t         timestamp;
 
   G_LOCK (kiosk_lock);
 
   /* reload kioskrc */
-  time = mtime (KIOSKRC);
-  if (time > kiosktime || kioskdef == NULL)
+  timestamp = mtime (KIOSKRC);
+  if (timestamp > kiosktime || kioskdef == NULL)
     {
       if (kioskrc != NULL)
         xfce_rc_close (kioskrc);
 
-      kiosktime = time;
+      kiosktime = timestamp;
       kioskrc = xfce_rc_simple_open (KIOSKRC, TRUE);
       if (kioskrc != NULL)
         {
@@ -342,8 +341,3 @@ 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 bcd34c4..f1ded5b 100644
--- a/libxfce4util/xfce-license.c
+++ b/libxfce4util/xfce-license.c
@@ -24,7 +24,6 @@
 #endif
 
 #include <libxfce4util/libxfce4util-private.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 
@@ -109,8 +108,3 @@ 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 f52af5e..6aefa2f 100644
--- a/libxfce4util/xfce-miscutils.c
+++ b/libxfce4util/xfce-miscutils.c
@@ -45,7 +45,7 @@
 #endif
 #ifdef HAVE_STAD_ARG_H
 #include <stdarg.h>
-#elif HAVE_VARARGS_H
+#elif defined (HAVE_VARARGS_H)
 #include <varargs.h>
 #endif
 #include <stdio.h>
@@ -60,7 +60,6 @@
 #endif
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 #define XFCE4DIR		".xfce4"
@@ -135,7 +134,7 @@ internal_get_file_r (const gchar *dir,
   if ((n = g_strlcat(buffer, G_DIR_SEPARATOR_S, len)) >= len)
     return NULL;
 
-  if (g_vsnprintf(buffer + n, len - n, format, ap) >= len - n)
+  if ((size_t) g_vsnprintf(buffer + n, len - n, format, ap) >= len - n)
     return NULL;
 
   return buffer;
@@ -609,8 +608,3 @@ 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 db66a05..29ed49f 100644
--- a/libxfce4util/xfce-posix-signal-handler.c
+++ b/libxfce4util/xfce-posix-signal-handler.c
@@ -42,21 +42,20 @@
 #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]
 
 typedef struct
 {
-    gint signal;
+    gint signal_id;
     XfcePosixSignalHandler handler;
     gpointer user_data;
     struct sigaction old_sa;
 } XfcePosixSignalHandlerData;
 
 static gboolean __inited = FALSE;
-static int __signal_pipe[2] = { -1, -1 };
+static gint __signal_pipe[2] = { -1, -1 };
 static GHashTable *__handlers = NULL;
 static GIOChannel *__signal_io = NULL;
 static guint __io_watch_id = 0;
@@ -68,7 +67,7 @@ xfce_posix_signal_handler_data_free(XfcePosixSignalHandlerData *hdata)
     if(!hdata)
         return;
     
-    sigaction(hdata->signal, &hdata->old_sa, NULL);
+    sigaction(hdata->signal_id, &hdata->old_sa, NULL);
     g_free(hdata);
 }
 
@@ -77,26 +76,26 @@ xfce_posix_signal_handler_pipe_io(GIOChannel *source,
                                   GIOCondition condition,
                                   gpointer data)
 {
-    int signal = 0;
+    gint signal_id = 0;
     GError *error = NULL;
     gsize bin = 0;
     XfcePosixSignalHandlerData *hdata;
     
-    if(G_IO_STATUS_NORMAL == g_io_channel_read_chars(source, (gchar *)&signal,
-                                                     sizeof(signal), &bin,
+    if(G_IO_STATUS_NORMAL == g_io_channel_read_chars(source, (gchar *)&signal_id,
+                                                     sizeof(signal_id), &bin,
                                                      &error)
-       && bin == sizeof(signal))
+       && bin == sizeof(signal_id))
     {
-        hdata = g_hash_table_lookup(__handlers, GINT_TO_POINTER(signal));
+        hdata = g_hash_table_lookup(__handlers, GINT_TO_POINTER(signal_id));
         if(hdata)
-            hdata->handler(signal, hdata->user_data);
+            hdata->handler(signal_id, hdata->user_data);
     } else {
         if(error) {
             g_critical("Signal pipe read failed: %s\n", error->message);
             g_error_free(error);
         } else {
             g_critical("Short read from signal pipe (expected %d, got %d)\n",
-                       (int)sizeof(signal), (int)bin);
+                       (int)sizeof(signal_id), (int)bin);
         }
     }
     
@@ -104,9 +103,9 @@ xfce_posix_signal_handler_pipe_io(GIOChannel *source,
 }
 
 static void
-xfce_posix_signal_handler(int signal)
+xfce_posix_signal_handler(gint signal_id)
 {
-    write(SIGNAL_PIPE_WRITE, &signal, sizeof(signal));
+    write(SIGNAL_PIPE_WRITE, &signal_id, sizeof(signal_id));
 }
 
 
@@ -155,7 +154,7 @@ xfce_posix_signal_handler_init(GError **error)
  * and restores all default signal handlers.
  **/
 void
-xfce_posix_signal_handler_shutdown()
+xfce_posix_signal_handler_shutdown(void)
 {
     if(G_UNLIKELY(!__inited))
         return;
@@ -178,7 +177,7 @@ xfce_posix_signal_handler_shutdown()
 
 /**
  * xfce_posix_signal_handler_set_handler:
- * @signal: A POSIX signal id number.
+ * @signal_id: A POSIX signal id number.
  * @handler: A callback function.
  * @user_data: Arbitrary data that will be passed to @handler.
  * @error: Location of a #GError to store any possible errors.
@@ -191,7 +190,7 @@ xfce_posix_signal_handler_shutdown()
  *          @error will be set.
  **/
 gboolean
-xfce_posix_signal_handler_set_handler(gint signal,
+xfce_posix_signal_handler_set_handler(gint signal_id,
                                       XfcePosixSignalHandler handler,
                                       gpointer user_data,
                                       GError **error)
@@ -209,15 +208,15 @@ xfce_posix_signal_handler_set_handler(gint signal,
     
     if(!handler) {
         g_warning("NULL signal handler supplied; removing existing handler");
-        xfce_posix_signal_handler_restore_handler(signal);
+        xfce_posix_signal_handler_restore_handler(signal_id);
         return TRUE;
     }
     
-    if(g_hash_table_lookup(__handlers, GINT_TO_POINTER(signal)))
-        xfce_posix_signal_handler_restore_handler(signal);
+    if(g_hash_table_lookup(__handlers, GINT_TO_POINTER(signal_id)))
+        xfce_posix_signal_handler_restore_handler(signal_id);
     
     hdata = g_new0(XfcePosixSignalHandlerData, 1);
-    hdata->signal = signal;
+    hdata->signal_id = signal_id;
     hdata->handler = handler;
     hdata->user_data = user_data;
     
@@ -225,7 +224,7 @@ xfce_posix_signal_handler_set_handler(gint signal,
     sa.sa_handler = xfce_posix_signal_handler;
     sa.sa_flags = SA_RESTART;
     
-    if(sigaction(signal, &sa, &hdata->old_sa)) {
+    if(sigaction(signal_id, &sa, &hdata->old_sa)) {
         if(error) {
             g_set_error(error, G_FILE_ERROR, g_file_error_from_errno(errno),
                         _("sigaction() failed: %s\n"), strerror(errno));
@@ -234,27 +233,22 @@ xfce_posix_signal_handler_set_handler(gint signal,
         return FALSE;
     }
     
-    g_hash_table_insert(__handlers, GINT_TO_POINTER(signal), hdata);
+    g_hash_table_insert(__handlers, GINT_TO_POINTER(signal_id), hdata);
     
     return TRUE;
 }
 
 /**
  * xfce_posix_signal_handler_restore_handler:
- * @signal: A POSIX signal id number.
+ * @signal_id: A POSIX signal id number.
  *
  * Restores the default handler for @signal.
  **/
 void
-xfce_posix_signal_handler_restore_handler(gint signal)
+xfce_posix_signal_handler_restore_handler(gint signal_id)
 {
     if(G_UNLIKELY(!__inited))
         return;
     
-    g_hash_table_remove(__handlers, GINT_TO_POINTER(signal));
+    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 1799825..002c3a2 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, gpointer user_data);
+typedef void (*XfcePosixSignalHandler)(gint signal_id, 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,
+gboolean xfce_posix_signal_handler_set_handler(gint signal_id,
                                                XfcePosixSignalHandler handler,
                                                gpointer user_data,
                                                GError **error);
-void xfce_posix_signal_handler_restore_handler(gint signal);
+void xfce_posix_signal_handler_restore_handler(gint signal_id);
 
 G_END_DECLS
 
diff --git a/libxfce4util/xfce-rc-config.c b/libxfce4util/xfce-rc-config.c
index 7f8320d..db0a019 100644
--- a/libxfce4util/xfce-rc-config.c
+++ b/libxfce4util/xfce-rc-config.c
@@ -33,7 +33,6 @@
 
 #include <libxfce4util/xfce-private.h>
 #include <libxfce4util/xfce-rc-private.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 
@@ -420,8 +419,3 @@ _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-simple.c b/libxfce4util/xfce-rc-simple.c
index d022fc8..636dfee 100644
--- a/libxfce4util/xfce-rc-simple.c
+++ b/libxfce4util/xfce-rc-simple.c
@@ -39,7 +39,6 @@
 
 #include <libxfce4util/xfce-private.h>
 #include <libxfce4util/xfce-rc-private.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 #ifndef PATH_MAX
@@ -73,7 +72,7 @@ static gboolean simple_parse_line (gchar        *line,
                                    gchar       **value,
                                    gchar       **locale);
 static gchar*   simple_escape     (gchar        *buffer,
-                                   gsize         size,
+                                   gssize        size,
                                    const gchar  *string);
 static gboolean simple_write      (XfceRcSimple *simple,
                                    const gchar  *filename);
@@ -431,7 +430,7 @@ simple_parse_line (gchar  *line,
 
 
 static gchar*
-simple_escape (gchar *buffer, gsize size, const gchar *string)
+simple_escape (gchar *buffer, gssize size, const gchar *string)
 {
   const gchar *s;
   gchar       *p;
@@ -1078,8 +1077,3 @@ _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 ecf12e0..91b6124 100644
--- a/libxfce4util/xfce-rc.c
+++ b/libxfce4util/xfce-rc.c
@@ -47,7 +47,6 @@
 #include <libxfce4util/libxfce4util.h>
 #include <libxfce4util/xfce-private.h>
 #include <libxfce4util/xfce-rc-private.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 
@@ -762,8 +761,3 @@ 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 d14ac02..214ccd3 100644
--- a/libxfce4util/xfce-resource.c
+++ b/libxfce4util/xfce-resource.c
@@ -31,7 +31,6 @@
 #endif
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 
@@ -42,7 +41,7 @@
 
 
 
-#define TYPE_VALID(t) ((t) >= XFCE_RESOURCE_DATA && (t) <= XFCE_RESOURCE_THEMES)
+#define TYPE_VALID(t) (((gint) t) >= XFCE_RESOURCE_DATA && (t) <= XFCE_RESOURCE_THEMES)
 
 
 
@@ -130,7 +129,7 @@ _res_remove_trailing_slashes (GList *list)
   GList       *ll = NULL;
   GList       *lp;
   const gchar *path;
-  gint         len;
+  gsize        len;
 
   for (lp = list; lp != NULL; lp = lp->next)
     {
@@ -796,8 +795,3 @@ 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 b78d523..f6276bb 100644
--- a/libxfce4util/xfce-utf8.c
+++ b/libxfce4util/xfce-utf8.c
@@ -25,7 +25,6 @@
 #endif
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfce4util/libxfce4util-alias.h>
 
 
 
@@ -94,8 +93,3 @@ 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 4cb318a..f6543c8 100644
--- a/xfce4-kiosk-query/main.c
+++ b/xfce4-kiosk-query/main.c
@@ -34,7 +34,7 @@
 #include <libxfce4util/libxfce4util.h>
 
 
-static void
+G_GNUC_NORETURN static void
 usage (gboolean error)
 {
   FILE *fp = error ? stderr : stdout;



More information about the Xfce4-commits mailing list