gmacros.h: Add Private Macro _GLIB_DEFINE_AUTOPTR_CHAINUP
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 2 Feb 2015 15:21:35 +0000 (23:21 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 3 Feb 2015 10:11:30 +0000 (18:11 +0800)
commit696db7561560d9311dca93f0c849f96770f41d01
treef7b736946a96bdb5e49a179eb98102d4f9a9a8e7
parentccf696a6e1da37ed414f08edb745a99aba935211
gmacros.h: Add Private Macro _GLIB_DEFINE_AUTOPTR_CHAINUP

This is necessary as we are using _GLIB_AUTOPTR_TYPENAME and
_GLIB_AUTOPTR_FUNC_NAME in gtype.h for G_DECLARE_DERIVABLE_TYPE and
G_DECLARE_FINAL_TYPE, but _GLIB_AUTOPTR_TYPENAME and
_GLIB_AUTOPTR_FUNC_NAME expand to nothing on non-GCC, causing builds on
non-GCC to break, due to bad typedef and function definitions.

This patch defines a new private macro which does what is needed on GCC
builds and does nothing on non-GCC builds, thus fixing the build.

https://bugzilla.gnome.org/show_bug.cgi?id=743640
glib/gmacros.h