From 76188d3690a992d6a980a9daa5e8e8d5f1442107 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Mon, 19 Jun 2006 20:43:42 +0000 Subject: Check whether DestroyNotify is defined, so we can warn about including 2006-06-19 Murray Cumming * glib/glibmm/object.h: Check whether DestroyNotify is defined, so we can warn about including X11/Xlib.h before this header, which will break things. Bug #316726 from Mert Tugcu and Javeed Shaikh. --- ChangeLog | 6 ++++++ glib/glibmm/object.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3a83d510..aa096c89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-06-19 Murray Cumming + + * glib/glibmm/object.h: Check whether DestroyNotify is defined, so we can warn about + including X11/Xlib.h before this header, which will break things. + Bug #316726 from Mert Tugcu and Javeed Shaikh. + 2006-06-09 Cedric Gustin * glib/glibmm/objectbase.h : Inline the set_property and diff --git a/glib/glibmm/object.h b/glib/glibmm/object.h index a1cc756f..60de61a8 100644 --- a/glib/glibmm/object.h +++ b/glib/glibmm/object.h @@ -20,6 +20,12 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +//X11 defines DestroyNotify and some other non-prefixed stuff, and it's too late to change that now, +//so let's give people a clue about the compilation errors that they will see: +#ifdef DestroyNotify + #error "X11/Xlib.h seems to have been included before this header. Due to some commonly-named macros in X11/Xlib.h, it may only be included after any glibmm, gdkmm, or gtkmm headers." +#endif //DestroyNotify + #include #include #include -- cgit v1.2.1