[Mesa-dev] [PATCH] mapi: remove Xlib/xcb include in gl_marshal.py

Emil Velikov emil.l.velikov at gmail.com
Thu Mar 16 11:09:41 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

The only use of it was to provide the _X_INLINE macro. We already
require (and provide where needed) 'inline', not to mention that it's
used in the file already.

So replace the macro and drop the include. This fixes the build on
platforms which lack the headers - from X-less Linuxes to Androids.

Cc: Timothy Arceri <tarceri at itsqueeze.com>
Cc: Tapani Pälli <tapani.palli at intel.com>
Cc: Vinson Lee <vlee at freedesktop.org>
Reported-by: Vinson Lee <vlee at freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100223
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/mapi/glapi/gen/gl_marshal.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py
index fe030901859..c89d3970c20 100644
--- a/src/mapi/glapi/gen/gl_marshal.py
+++ b/src/mapi/glapi/gen/gl_marshal.py
@@ -68,9 +68,7 @@ class PrintCode(gl_XML.gl_print_base):
         print header
         print '#ifdef HAVE_PTHREAD'
         print
-        print '#include <X11/Xlib-xcb.h>'
-        print
-        print 'static _X_INLINE int safe_mul(int a, int b)'
+        print 'static inline int safe_mul(int a, int b)'
         print '{'
         print '    if (a < 0 || b < 0) return -1;'
         print '    if (a == 0 || b == 0) return 0;'
-- 
2.11.1



More information about the mesa-dev mailing list