diff options
author | Murray Cumming <murrayc@murrayc.com> | 2011-10-26 12:33:43 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2011-10-26 12:33:43 +0200 |
commit | a7588ae238134222cc193488e5447b86550ccf66 (patch) | |
tree | 1b7cffd86a5b633b30beaeb009a3e827cf877be1 /glib/glibmm.h | |
parent | c97f8e8681e550ebe09af9ac5a366273b6d98673 (diff) | |
download | glibmm-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 'glib/glibmm.h')
-rw-r--r-- | glib/glibmm.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/glib/glibmm.h b/glib/glibmm.h index 4626fa2e..7cc5ad5c 100644 --- a/glib/glibmm.h +++ b/glib/glibmm.h @@ -81,6 +81,11 @@ #include <glibmmconfig.h> //#include <glibmm/i18n.h> //This must be included by the application, after system headers such as <iostream>. + +//Include this first because we need it to be the first thing to include <glib.h>, +//so we can do an undef trick to still use deprecated API in the header: +#include <glibmm/thread.h> + #include <glibmm/arrayhandle.h> #include <glibmm/balancedtree.h> #include <glibmm/checksum.h> @@ -122,7 +127,6 @@ #include <glibmm/slisthandle.h> #include <glibmm/spawn.h> #include <glibmm/stringutils.h> -#include <glibmm/thread.h> #include <glibmm/threadpool.h> #include <glibmm/timer.h> #include <glibmm/timeval.h> |