Hack to include glib/gdatasetprivate.h directly

The gdatasetprivate.h header includes gatomic.h directly. It all works
well in GLib, but inside GObject it will trigger the single inclusion
guard.

Since this is a private header, and it's kind of a special case, one way
to fix it is to declare GLIB_COMPILATION around it and fool the single
inclusion guard in gatomic.h into thinking we're compiling GLib and not
GObject.
This commit is contained in:
Emmanuele Bassi 2010-09-04 17:22:39 +01:00
parent 82db1446b3
commit 01a46e5c65

View File

@ -26,7 +26,12 @@
#include <string.h>
#include <signal.h>
/* fool the single inclusion guard in gatomic.h, which is directly
* included by gdatasetprivate.h
*/
#define GLIB_COMPILATION
#include "glib/gdatasetprivate.h"
#undef GLIB_COMPILATION
#include "gobject.h"
#include "gvaluecollector.h"