mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
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
This commit is contained in:
parent
90de521799
commit
e2f5579391
@ -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__ */
|
||||
|
@ -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__ */
|
||||
|
@ -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__ */
|
||||
|
@ -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 */
|
||||
|
@ -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__ */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user