summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-02-15 15:03:26 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-02-15 15:03:26 +0000
commit2dd25a1a9e3721be518e9198201e328c56c64c2d (patch)
tree566c44c47c43f5aefe5f24770ecfd51b4e89e866
parentMove gtkmm headers that internally re-enable deprecated gtk symbols to top. ... (diff)
downloadinkscape-2dd25a1a9e3721be518e9198201e328c56c64c2d.tar.gz
inkscape-2dd25a1a9e3721be518e9198201e328c56c64c2d.zip
Fix remaining glib deprecation and define compiler macros
(bzr r10983)
-rw-r--r--configure.ac6
-rw-r--r--src/conn-avoid-ref.h2
-rw-r--r--src/libgdl/gdl-dock-object.c2
-rw-r--r--src/libgdl/gdl-dock-object.h2
-rw-r--r--src/ui/widget/spin-slider.cpp4
-rw-r--r--src/util/glib-list-iterators.h3
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 <glib.h> (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 <glib/gslist.h>
+#include <glib.h>
#include <stddef.h>
#include <sigc++/connection.h>
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 <glib.h>
+#include <glibmm/i18n.h>
#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 <cstddef>
#include <iterator>
-#include "glib/gslist.h"
-#include "glib/glist.h"
+#include <glib.h>
namespace Inkscape {