Message: previous - next
Month: June 2012

Bug 1063: glib upstream changes to header inclusion (with patch)

From: "David C. Rankin" <drankinatty@...>
Date: Fri, 22 Jun 2012 14:24:13 -0500
Tim, All,

  Upsteam glib changes have resulted in build failures giving the message:

#error "Only <glib.h> can be included directly."

  The simply changes required mean exactly what the error says "Only <glib.h>
can be included directly". What that means to us is that all header files that
include reference to old glib headers in the form

#include <glib/_whatever_.h>

  must simply be rewritten as:

#include <glib.h>

  Here is the first patch for gtk-qt-engine. I opened bug to track and collect
patches for the apps that Darrell or Tim can then push after they are signed off on.


--- gtk-qt-engine/src/qt_theme_draw.c
+++ gtk-qt-engine/src/qt_theme_draw.c   2012-06-22 14:02:18.691510787 -0500
@@ -3,7 +3,7 @@
 #include <gtk/gtkprogressbar.h>
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
-#include <glib/glist.h>
+#include <glib.h>

 #include <libbonobo.h>

  We will want to add preprocessor directives on glib version as well to prevent
borking builds on older glib. Also, what about a global fix with sed?

David C. Rankin, J.D.,P.E.