summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2008-05-28 13:39:52 +0000
committerMichael Natterer <mitch@src.gnome.org>2008-05-28 13:39:52 +0000
commit83b215f9eaa4ae3d0a53141549042a2a0f2dea69 (patch)
tree7c33ce46f21e634fade1d0263df7c5d1a0bc9435
parent2650257f3b369eaf587d68c2dcc32f436f85bc80 (diff)
downloadgtk+-83b215f9eaa4ae3d0a53141549042a2a0f2dea69.tar.gz
define GDK_PIXBUF_H_INSIDE around including all other headers.
2008-05-28 Michael Natterer <mitch@imendio.com> * gdk-pixbuf.h: define GDK_PIXBUF_H_INSIDE around including all other headers. * gdk-pixbuf-animation.h * gdk-pixbuf-core.h * gdk-pixbuf-enum-types.h.template * gdk-pixbuf-features.h.in * gdk-pixbuf-io.h * gdk-pixbuf-loader.h * gdk-pixbuf-simple-anim.h * gdk-pixbuf-transform.h: add single-include guards that #error out if GDK_PIXBUF_DISABLE_SINGLE_INCLUDES is defined and any of these files is included individually. * gdk-pixbuf-private.h: don't incude "gdk-pixbuf-io.h". * gdk-pixbuf-csource.c: #define __GTK_H_INSIDE__ around including "../gtk/gtkversion.h". Ugly but needed in this special case. svn path=/trunk/; revision=20214
-rw-r--r--gdk-pixbuf/ChangeLog21
-rw-r--r--gdk-pixbuf/gdk-pixbuf-animation.h5
-rw-r--r--gdk-pixbuf/gdk-pixbuf-core.h4
-rw-r--r--gdk-pixbuf/gdk-pixbuf-csource.c2
-rw-r--r--gdk-pixbuf/gdk-pixbuf-enum-types.h.template4
-rw-r--r--gdk-pixbuf/gdk-pixbuf-features.h.in4
-rw-r--r--gdk-pixbuf/gdk-pixbuf-io.h4
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.h4
-rw-r--r--gdk-pixbuf/gdk-pixbuf-private.h1
-rw-r--r--gdk-pixbuf/gdk-pixbuf-simple-anim.h4
-rw-r--r--gdk-pixbuf/gdk-pixbuf-transform.h4
-rw-r--r--gdk-pixbuf/gdk-pixbuf.h3
12 files changed, 58 insertions, 2 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index a83258cfcf..c45405715a 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,24 @@
+2008-05-28 Michael Natterer <mitch@imendio.com>
+
+ * gdk-pixbuf.h: define GDK_PIXBUF_H_INSIDE around including all
+ other headers.
+
+ * gdk-pixbuf-animation.h
+ * gdk-pixbuf-core.h
+ * gdk-pixbuf-enum-types.h.template
+ * gdk-pixbuf-features.h.in
+ * gdk-pixbuf-io.h
+ * gdk-pixbuf-loader.h
+ * gdk-pixbuf-simple-anim.h
+ * gdk-pixbuf-transform.h: add single-include guards that #error
+ out if GDK_PIXBUF_DISABLE_SINGLE_INCLUDES is defined and any of
+ these files is included individually.
+
+ * gdk-pixbuf-private.h: don't incude "gdk-pixbuf-io.h".
+
+ * gdk-pixbuf-csource.c: #define __GTK_H_INSIDE__ around including
+ "../gtk/gtkversion.h". Ugly but needed in this special case.
+
2008-05-27 Tor Lillqvist <tml@novell.com>
* io-*.c: Use explicit G_MODULE_EXPORT decoration when building
diff --git a/gdk-pixbuf/gdk-pixbuf-animation.h b/gdk-pixbuf/gdk-pixbuf-animation.h
index 145b24dcd0..32757ee764 100644
--- a/gdk-pixbuf/gdk-pixbuf-animation.h
+++ b/gdk-pixbuf/gdk-pixbuf-animation.h
@@ -24,10 +24,13 @@
* Boston, MA 02111-1307, USA.
*/
+#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
+#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
+#endif
+
#ifndef GDK_PIXBUF_ANIMATION_H
#define GDK_PIXBUF_ANIMATION_H
-#include <glib.h>
#include <glib-object.h>
#include <gdk-pixbuf/gdk-pixbuf-core.h>
diff --git a/gdk-pixbuf/gdk-pixbuf-core.h b/gdk-pixbuf/gdk-pixbuf-core.h
index 04f89b0008..b2563809ed 100644
--- a/gdk-pixbuf/gdk-pixbuf-core.h
+++ b/gdk-pixbuf/gdk-pixbuf-core.h
@@ -23,6 +23,10 @@
* Boston, MA 02111-1307, USA.
*/
+#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
+#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
+#endif
+
#ifndef GDK_PIXBUF_CORE_H
#define GDK_PIXBUF_CORE_H
diff --git a/gdk-pixbuf/gdk-pixbuf-csource.c b/gdk-pixbuf/gdk-pixbuf-csource.c
index b8c7bbffe2..597815e70a 100644
--- a/gdk-pixbuf/gdk-pixbuf-csource.c
+++ b/gdk-pixbuf/gdk-pixbuf-csource.c
@@ -18,7 +18,9 @@
*/
#include <config.h>
+#define __GTK_H_INSIDE__
#include "../gtk/gtkversion.h" /* versioning */
+#undef __GTK_H_INSIDE__
#include "gdk-pixbuf.h"
#include "gdk-pixdata.h"
#include <glib/gprintf.h>
diff --git a/gdk-pixbuf/gdk-pixbuf-enum-types.h.template b/gdk-pixbuf/gdk-pixbuf-enum-types.h.template
index 0df6adb1c1..7cdf233764 100644
--- a/gdk-pixbuf/gdk-pixbuf-enum-types.h.template
+++ b/gdk-pixbuf/gdk-pixbuf-enum-types.h.template
@@ -1,4 +1,8 @@
/*** BEGIN file-header ***/
+#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
+#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
+#endif
+
#ifndef __GDK_PIXBUF_ENUM_TYPES_H__
#define __GDK_PIXBUF_ENUM_TYPES_H__
diff --git a/gdk-pixbuf/gdk-pixbuf-features.h.in b/gdk-pixbuf/gdk-pixbuf-features.h.in
index 40f946a117..ea1674d577 100644
--- a/gdk-pixbuf/gdk-pixbuf-features.h.in
+++ b/gdk-pixbuf/gdk-pixbuf-features.h.in
@@ -1,3 +1,7 @@
+#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
+#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
+#endif
+
#ifndef GDK_PIXBUF_FEATURES_H
#define GDK_PIXBUF_FEATURES_H 1
diff --git a/gdk-pixbuf/gdk-pixbuf-io.h b/gdk-pixbuf/gdk-pixbuf-io.h
index 3fe9226c9e..b1a162f89c 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.h
+++ b/gdk-pixbuf/gdk-pixbuf-io.h
@@ -26,6 +26,10 @@
* Boston, MA 02111-1307, USA.
*/
+#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
+#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
+#endif
+
#ifndef GDK_PIXBUF_IO_H
#define GDK_PIXBUF_IO_H
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.h b/gdk-pixbuf/gdk-pixbuf-loader.h
index d9b2b7dc03..5d1f17cd1c 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.h
+++ b/gdk-pixbuf/gdk-pixbuf-loader.h
@@ -23,6 +23,10 @@
* Boston, MA 02111-1307, USA.
*/
+#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
+#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
+#endif
+
#ifndef GDK_PIXBUF_LOADER_H
#define GDK_PIXBUF_LOADER_H
diff --git a/gdk-pixbuf/gdk-pixbuf-private.h b/gdk-pixbuf/gdk-pixbuf-private.h
index 1687875896..c0220d36e5 100644
--- a/gdk-pixbuf/gdk-pixbuf-private.h
+++ b/gdk-pixbuf/gdk-pixbuf-private.h
@@ -28,7 +28,6 @@
#define GDK_PIXBUF_PRIVATE_H
#include "gdk-pixbuf.h"
-#include "gdk-pixbuf-io.h"
#include "gdk-pixbuf-i18n.h"
#include <stdio.h>
diff --git a/gdk-pixbuf/gdk-pixbuf-simple-anim.h b/gdk-pixbuf/gdk-pixbuf-simple-anim.h
index d262404261..ae77c202a5 100644
--- a/gdk-pixbuf/gdk-pixbuf-simple-anim.h
+++ b/gdk-pixbuf/gdk-pixbuf-simple-anim.h
@@ -21,6 +21,10 @@
* Boston, MA 02111-1307, USA.
*/
+#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
+#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
+#endif
+
#ifndef GDK_PIXBUF_SIMPLE_ANIM_H
#define GDK_PIXBUF_SIMPLE_ANIM_H
diff --git a/gdk-pixbuf/gdk-pixbuf-transform.h b/gdk-pixbuf/gdk-pixbuf-transform.h
index 6a1bb1e523..4965acf203 100644
--- a/gdk-pixbuf/gdk-pixbuf-transform.h
+++ b/gdk-pixbuf/gdk-pixbuf-transform.h
@@ -23,6 +23,10 @@
* Boston, MA 02111-1307, USA.
*/
+#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
+#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
+#endif
+
#ifndef GDK_PIXBUF_TRANSFORM_H
#define GDK_PIXBUF_TRANSFORM_H
diff --git a/gdk-pixbuf/gdk-pixbuf.h b/gdk-pixbuf/gdk-pixbuf.h
index 0d77b2bfd1..9a30131fb1 100644
--- a/gdk-pixbuf/gdk-pixbuf.h
+++ b/gdk-pixbuf/gdk-pixbuf.h
@@ -26,6 +26,8 @@
#ifndef GDK_PIXBUF_H
#define GDK_PIXBUF_H
+#define GDK_PIXBUF_H_INSIDE
+
#include <glib.h>
#include <gdk-pixbuf/gdk-pixbuf-features.h>
#include <glib-object.h>
@@ -38,5 +40,6 @@
#include <gdk-pixbuf/gdk-pixbuf-loader.h>
#include <gdk-pixbuf/gdk-pixbuf-enum-types.h>
+#undef GDK_PIXBUF_H_INSIDE
#endif /* GDK_PIXBUF_H */