egl: Add a test for MESA_EGL_NO_X11_HEADERS.
authorChia-I Wu <olv@lunarg.com>
Fri, 18 Jun 2010 16:21:39 +0000 (00:21 +0800)
committerChia-I Wu <olv@lunarg.com>
Wed, 23 Jun 2010 07:15:00 +0000 (15:15 +0800)
When the macro is defined, X11 headers will not be included.

include/EGL/eglplatform.h

index c625088d6cba07c23eecd2abde15d6007c1ed918..33a3e5f889135bd83558e516c2e8c0b21e6cb7c7 100644 (file)
@@ -80,6 +80,14 @@ typedef void *EGLNativePixmapType;
 
 #elif defined(__unix__) || defined(__unix)
 
+#ifdef MESA_EGL_NO_X11_HEADERS
+
+typedef void            *EGLNativeDisplayType;
+typedef khronos_uint32_t EGLNativePixmapType;
+typedef khronos_uint32_t EGLNativeWindowType;
+
+#else
+
 /* X11 (tentative)  */
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -88,6 +96,8 @@ typedef Display *EGLNativeDisplayType;
 typedef Pixmap   EGLNativePixmapType;
 typedef Window   EGLNativeWindowType;
 
+#endif /* MESA_EGL_NO_X11_HEADERS */
+
 #else
 #error "Platform not recognized"
 #endif