From: Julien Isorce Date: Thu, 2 Jul 2015 22:10:38 +0000 (+0100) Subject: egl: use unix defines on osx with clang X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d642442d9339e5b65c30802c44091816cdf18be;p=mesa.git egl: use unix defines on osx with clang I also created an bug in Khronos 's bugzilla as you suggested: https://www.khronos.org/bugzilla/show_bug.cgi?id=1356 I'll let you know if I get feedback from this bug or else where. Patch with updated error messages: [PATCH] eglplatform: treat __APPLE__ the same way as __unix__ to handle X11 types CC eglapi.lo ./egldisplay.h:258:19: error: unknown type name 'Display' _eglGetX11Display(Display *native_display, const EGLint *attrib_list); eglapi.c:290:4: error: array size is negative STATIC_ASSERT(sizeof(void*) == sizeof(nativeDisplay)); eglapi.c:291:25: warning: cast to 'void *' from smaller integer type 'EGLNativeDisplayType' (aka 'int') [-Wint-to-void-pointer-cast] native_display_ptr = (void*) nativeDisplay; eglapi.c:307:32: error: use of undeclared identifier 'Display' dpy = _eglGetX11Display((Display*) native_display, attrib_list); eglapi.c:776:35: error: use of undeclared identifier 'Window' native_window = (void*) (* (Window*) native_window); eglapi.c:847:35: error: use of undeclared identifier 'Pixmap' native_pixmap = (void*) (* (Pixmap*) native_pixmap); Bugzilla Mesa: https://bugs.freedesktop.org/show_bug.cgi?id=90249 Bugzilla Khronos: https://www.khronos.org/bugzilla/show_bug.cgi?id=1356 Signed-off-by: Julien Isorce Reviewed-by: Emil Velikov --- diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index 7802542ad0f..b376e642822 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -77,7 +77,7 @@ typedef HDC EGLNativeDisplayType; typedef HBITMAP EGLNativePixmapType; typedef HWND EGLNativeWindowType; -#elif defined(__APPLE__) || defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ +#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ typedef int EGLNativeDisplayType; typedef void *EGLNativeWindowType; @@ -105,7 +105,7 @@ typedef struct ANativeWindow* EGLNativeWindowType; typedef struct egl_native_pixmap_t* EGLNativePixmapType; typedef void* EGLNativeDisplayType; -#elif defined(__unix__) +#elif defined(__unix__) || defined(__APPLE__) #if defined(MESA_EGL_NO_X11_HEADERS)