[mutter] cogl: Don't undef __INSIDE_COGL_H__ in file not defining it



commit e2f557939101d65c29538648bc8481631b209506
Author: Jonas Ådahl <jadahl gmail com>
Date:   Thu May 5 15:16:01 2016 +0800

    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

 cogl/cogl/cogl-egl.h                       |    6 +++---
 cogl/cogl/cogl-gles2.h                     |    6 +++---
 cogl/cogl/cogl-glx.h                       |    7 ++++---
 cogl/cogl/cogl-wayland-server.h            |    6 +++---
 cogl/cogl/cogl-xlib-renderer.h             |    6 +++---
 cogl/cogl/winsys/cogl-texture-pixmap-x11.h |    6 +++---
 6 files changed, 19 insertions(+), 18 deletions(-)
---
diff --git a/cogl/cogl/cogl-egl.h b/cogl/cogl/cogl-egl.h
index cea7b10..787feab 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 84c9ba1..e947117 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 15918bb..69963d7 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 9c1f35f..2712601 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 d33f830..9e5a84d 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 6340bb5..c3590ec 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 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]