summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2011-10-26 12:33:43 +0200
committerMurray Cumming <murrayc@murrayc.com>2011-10-26 12:33:43 +0200
commita7588ae238134222cc193488e5447b86550ccf66 (patch)
tree1b7cffd86a5b633b30beaeb009a3e827cf877be1 /tools
parentc97f8e8681e550ebe09af9ac5a366273b6d98673 (diff)
downloadglibmm-a7588ae238134222cc193488e5447b86550ccf66.tar.gz
thread.h: Allow use of this without causing deprecation compiler warnings.
* glib/src/thread.hg: undef and then redefine G_DISABLE_DEPRECATED, and define GLIB_DISABLE_DEPRECATION_WARNINGS, if G_DISABLE_DEPRECATED is defined, so we can use the deprecated API in this header (though only in our own deprecated API). * tools/generate_wrap_init.pl.in: Include glibmm.h instead of glib.h so we can include thread.h first (via glibmm.h) instead of only later. This seems more logical than explicitly including thread.h in all (even non-glibmm) generated wrap_init.cc files. * tools/m4/base.m4: * glib/glibmm.h: * glib/glibmm/dispatcher.cc: * glib/glibmm/exceptionhandler.cc: * glib/glibmm/main.cc: * examples/thread/thread.cc: * examples/thread/threadpool.cc: Adjust the includes to include thread.h first.
Diffstat (limited to 'tools')
-rw-r--r--tools/generate_wrap_init.pl.in2
-rw-r--r--tools/m4/base.m43
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/generate_wrap_init.pl.in b/tools/generate_wrap_init.pl.in
index 2d409c84..89f9165d 100644
--- a/tools/generate_wrap_init.pl.in
+++ b/tools/generate_wrap_init.pl.in
@@ -195,7 +195,7 @@ while ($ARGV[0])
print << "EOF";
-#include <glib.h>
+#include <glibmm.h>
// Disable the 'const' function attribute of the get_type() functions.
// GCC would optimize them out because we don't use the return value.
diff --git a/tools/m4/base.m4 b/tools/m4/base.m4
index 6594aa2a..68431253 100644
--- a/tools/m4/base.m4
+++ b/tools/m4/base.m4
@@ -311,11 +311,12 @@ _IMPORT(SECTION_CC_PRE_INCLUDES)
_DEPRECATE_IFDEF_CLASS_START
+#include <glibmm.h>
+
#include <__MODULE__/__FILE__.h>
#include <__MODULE__/private/__FILE__`'_p.h>
_IMPORT(SECTION_CC_INCLUDES)
-#include <glibmm.h>
_IMPORT(SECTION_SRC_CUSTOM)