From 2dd25a1a9e3721be518e9198201e328c56c64c2d Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Wed, 15 Feb 2012 15:03:26 +0000 Subject: Fix remaining glib deprecation and define compiler macros (bzr r10983) --- configure.ac | 6 ++++++ src/conn-avoid-ref.h | 2 +- src/libgdl/gdl-dock-object.c | 2 +- src/libgdl/gdl-dock-object.h | 2 +- src/ui/widget/spin-slider.cpp | 4 ++-- src/util/glib-list-iterators.h | 3 +-- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 47e1de9cb..69cdbf2a5 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,12 @@ if test "$GCC" = "yes"; then CPPFLAGS="-Wformat -Wformat-security $CPPFLAGS" # Enable all default warnings CPPFLAGS="-Wall $CPPFLAGS" + # Enforce including only (required since 2.31) + CPPFLAGS="-DG_DISABLE_SINGLE_INCLUDES $CPPFLAGS" + # Ensure that no deprecated glibmm symbols are introduced. + # lp:inkscape builds cleanly with this option at r10957 + CPPFLAGS="-DGLIBMM_DISABLE_DEPRECATED $CPPFLAGS" + CPPFLAGS="-DG_DISABLE_DEPRECATED $CPPFLAGS" # Test for -Werror=... (introduced some time post-4.0) # If we hit a format error -- it should be fatal. diff --git a/src/conn-avoid-ref.h b/src/conn-avoid-ref.h index 89e86ded7..4d38f2845 100644 --- a/src/conn-avoid-ref.h +++ b/src/conn-avoid-ref.h @@ -13,7 +13,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include +#include #include #include diff --git a/src/libgdl/gdl-dock-object.c b/src/libgdl/gdl-dock-object.c index 0fdae23e5..bfbe18aac 100644 --- a/src/libgdl/gdl-dock-object.c +++ b/src/libgdl/gdl-dock-object.c @@ -911,7 +911,7 @@ gdl_dock_object_register_init (void) g_relation_insert (dock_register, "placeholder", (gpointer) GDL_TYPE_DOCK_PLACEHOLDER); } -G_CONST_RETURN gchar * +const gchar * gdl_dock_object_nick_from_type (GType type) { GTuples *tuples; diff --git a/src/libgdl/gdl-dock-object.h b/src/libgdl/gdl-dock-object.h index d54e68c3c..eed66e97a 100644 --- a/src/libgdl/gdl-dock-object.h +++ b/src/libgdl/gdl-dock-object.h @@ -196,7 +196,7 @@ gboolean gdl_dock_object_child_placement (GdlDockObject *object, GType gdl_dock_param_get_type (void); /* functions for setting/retrieving nick names for serializing GdlDockObject types */ -G_CONST_RETURN gchar *gdl_dock_object_nick_from_type (GType type); +const gchar *gdl_dock_object_nick_from_type (GType type); GType gdl_dock_object_type_from_nick (const gchar *nick); GType gdl_dock_object_set_type_for_nick (const gchar *nick, GType type); diff --git a/src/ui/widget/spin-slider.cpp b/src/ui/widget/spin-slider.cpp index 688739db3..3e85f845e 100644 --- a/src/ui/widget/spin-slider.cpp +++ b/src/ui/widget/spin-slider.cpp @@ -8,8 +8,8 @@ * Released under GNU GPL. Read the file 'COPYING' for more information. */ -#include "glib/gstrfuncs.h" -#include "glibmm/i18n.h" +#include +#include #include "spin-slider.h" diff --git a/src/util/glib-list-iterators.h b/src/util/glib-list-iterators.h index 9883ae450..6244e5b18 100644 --- a/src/util/glib-list-iterators.h +++ b/src/util/glib-list-iterators.h @@ -17,8 +17,7 @@ #include #include -#include "glib/gslist.h" -#include "glib/glist.h" +#include namespace Inkscape { -- cgit v1.2.3