summaryrefslogtreecommitdiff
path: root/cogl
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2016-05-05 15:16:01 +0800
committerJonas Ådahl <jadahl@gmail.com>2016-07-20 14:23:48 +0800
commite2f557939101d65c29538648bc8481631b209506 (patch)
tree568ce4a1b783cbe3d3754b46f1d4d9dadf01714e /cogl
parent90de521799aa181fd612325460b99a0b4a0a2c93 (diff)
downloadmutter-e2f557939101d65c29538648bc8481631b209506.tar.gz
cogl: Don't undef __INSIDE_COGL_H__ in file not defining it
If you include a file that might define __INSIDE_COGL_H__, don't undefine it if it wasn't defined in that file. This makes it possible to include for example cogl-gles2.h from some other file which defines __INSIDE_COGL_H__. https://bugzilla.gnome.org/show_bug.cgi?id=768976
Diffstat (limited to 'cogl')
-rw-r--r--cogl/cogl/cogl-egl.h6
-rw-r--r--cogl/cogl/cogl-gles2.h6
-rw-r--r--cogl/cogl/cogl-glx.h7
-rw-r--r--cogl/cogl/cogl-wayland-server.h6
-rw-r--r--cogl/cogl/cogl-xlib-renderer.h6
-rw-r--r--cogl/cogl/winsys/cogl-texture-pixmap-x11.h6
6 files changed, 19 insertions, 18 deletions
diff --git a/cogl/cogl/cogl-egl.h b/cogl/cogl/cogl-egl.h
index cea7b1038..787feabf3 100644
--- a/cogl/cogl/cogl-egl.h
+++ b/cogl/cogl/cogl-egl.h
@@ -49,7 +49,7 @@
* __COGL_H_INSIDE__ */
#ifndef __COGL_H_INSIDE__
#define __COGL_H_INSIDE__
-#define __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#define __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_EGL__
#endif
#endif /* COGL_COMPILATION */
@@ -109,10 +109,10 @@ COGL_END_DECLS
* a commandline argument for the scanner which means we must be
* careful not to undefine it in a header...
*/
-#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_EGL__
#undef __COGL_H_INSIDE__
#undef __COGL_EGL_H_INSIDE__
-#undef __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#undef __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_EGL__
#endif
#endif /* __COGL_EGL_H__ */
diff --git a/cogl/cogl/cogl-gles2.h b/cogl/cogl/cogl-gles2.h
index 84c9ba15d..e947117cb 100644
--- a/cogl/cogl/cogl-gles2.h
+++ b/cogl/cogl/cogl-gles2.h
@@ -47,7 +47,7 @@
* __COGL_H_INSIDE__ */
#ifndef __COGL_H_INSIDE__
#define __COGL_H_INSIDE__
-#define __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#define __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_GLES2__
#endif
#endif /* COGL_COMPILATION */
@@ -411,9 +411,9 @@ COGL_END_DECLS
* a commandline argument for the scanner which means we must be
* careful not to undefine it in a header...
*/
-#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_GLES2__
#undef __COGL_H_INSIDE__
-#undef __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#undef __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_GLES2__
#endif
#endif /* __COGL_GLES2_H__ */
diff --git a/cogl/cogl/cogl-glx.h b/cogl/cogl/cogl-glx.h
index 15918bba7..69963d7c2 100644
--- a/cogl/cogl/cogl-glx.h
+++ b/cogl/cogl/cogl-glx.h
@@ -49,7 +49,7 @@
* __COGL_H_INSIDE__ */
#ifndef __COGL_H_INSIDE__
#define __COGL_H_INSIDE__
-#define __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#define __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_GLX_
#endif
#endif /* COGL_COMPILATION */
@@ -86,10 +86,11 @@ COGL_END_DECLS
* a commandline argument for the scanner which means we must be
* careful not to undefine it in a header...
*/
-#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_GLX_
+#warning
#undef __COGL_H_INSIDE__
#undef __COGL_GLX_H_INSIDE__
-#undef __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#undef __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_GLX_
#endif
#endif /* __COGL_GLX_H__ */
diff --git a/cogl/cogl/cogl-wayland-server.h b/cogl/cogl/cogl-wayland-server.h
index 9c1f35fa0..271260191 100644
--- a/cogl/cogl/cogl-wayland-server.h
+++ b/cogl/cogl/cogl-wayland-server.h
@@ -44,7 +44,7 @@
* __COGL_H_INSIDE__ */
#ifndef __COGL_H_INSIDE__
#define __COGL_H_INSIDE__
-#define __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#define __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_WAYLAND_SERVER_
#endif
#endif /* COGL_COMPILATION */
@@ -155,9 +155,9 @@ COGL_END_DECLS
* a commandline argument for the scanner which means we must be
* careful not to undefine it in a header...
*/
-#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_WAYLAND_SERVER_
#undef __COGL_H_INSIDE__
-#undef __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#undef __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_WAYLAND_SERVER_
#endif
#endif /* __COGL_WAYLAND_SERVER_H */
diff --git a/cogl/cogl/cogl-xlib-renderer.h b/cogl/cogl/cogl-xlib-renderer.h
index d33f83052..9e5a84d28 100644
--- a/cogl/cogl/cogl-xlib-renderer.h
+++ b/cogl/cogl/cogl-xlib-renderer.h
@@ -48,7 +48,7 @@
* __COGL_H_INSIDE__ */
#ifndef __COGL_H_INSIDE__
#define __COGL_H_INSIDE__
-#define __COGL_XLIB_RENDERER_H_MUST_UNDEF_COGL_H_INSIDE__
+#define __COGL_XLIB_RENDERER_H_MUST_UNDEF_COGL_H_INSIDE_COGL_XLIB_RENDERER_
#endif
#endif /* COGL_COMPILATION */
@@ -224,9 +224,9 @@ COGL_END_DECLS
* a commandline argument for the scanner which means we must be
* careful not to undefine it in a header...
*/
-#ifdef __COGL_XLIB_RENDERER_H_MUST_UNDEF_COGL_H_INSIDE__
+#ifdef __COGL_XLIB_RENDERER_H_MUST_UNDEF_COGL_H_INSIDE_COGL_XLIB_RENDERER_
#undef __COGL_H_INSIDE__
-#undef __COGL_XLIB_RENDERER_H_MUST_UNDEF_COGL_H_INSIDE__
+#undef __COGL_XLIB_RENDERER_H_MUST_UNDEF_COGL_H_INSIDE_COGL_XLIB_RENDERER_
#endif
#endif /* __COGL_XLIB_RENDERER_H__ */
diff --git a/cogl/cogl/winsys/cogl-texture-pixmap-x11.h b/cogl/cogl/winsys/cogl-texture-pixmap-x11.h
index 6340bb54e..c3590ecd0 100644
--- a/cogl/cogl/winsys/cogl-texture-pixmap-x11.h
+++ b/cogl/cogl/winsys/cogl-texture-pixmap-x11.h
@@ -43,7 +43,7 @@
* __COGL_H_INSIDE__ */
#ifndef __COGL_H_INSIDE__
#define __COGL_H_INSIDE__
-#define __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#define __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_TEXTURE_PIXMAP_X11_
#endif
#endif /* COGL_COMPILATION */
@@ -286,9 +286,9 @@ COGL_END_DECLS
* a commandline argument for the scanner which means we must be
* careful not to undefine it in a header...
*/
-#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_TEXTURE_PIXMAP_X11_
#undef __COGL_H_INSIDE__
-#undef __COGL_MUST_UNDEF_COGL_H_INSIDE__
+#undef __COGL_MUST_UNDEF_COGL_H_INSIDE_COGL_TEXTURE_PIXMAP_X11_
#endif
#endif /* __COGL_TEXTURE_PIXMAP_X11_H */