Mesa (gallium-mesa-7.4): define __builtin_expect for non-gcc compilers in two more glx files
Alan Hourihane
alanh at kemper.freedesktop.org
Thu Mar 26 17:36:07 UTC 2009
Module: Mesa
Branch: gallium-mesa-7.4
Commit: 9cff0acb362bb8289207910cfa431006437e7a19
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9cff0acb362bb8289207910cfa431006437e7a19
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Mon Mar 23 20:35:09 2009 -0700
define __builtin_expect for non-gcc compilers in two more glx files
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
---
src/glx/x11/indirect_vertex_program.c | 4 ++++
src/glx/x11/pixelstore.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/glx/x11/indirect_vertex_program.c b/src/glx/x11/indirect_vertex_program.c
index 865a4b1..3313ac0 100644
--- a/src/glx/x11/indirect_vertex_program.c
+++ b/src/glx/x11/indirect_vertex_program.c
@@ -30,6 +30,10 @@
#include "indirect_vertex_array.h"
#include <GL/glxproto.h>
+#if !defined __GNUC__ || __GNUC__ < 3
+# define __builtin_expect(x, y) x
+#endif
+
static void
do_vertex_attrib_enable(GLuint index, GLboolean val)
{
diff --git a/src/glx/x11/pixelstore.c b/src/glx/x11/pixelstore.c
index 0eb31bf..8b51b5d 100644
--- a/src/glx/x11/pixelstore.c
+++ b/src/glx/x11/pixelstore.c
@@ -31,6 +31,10 @@
#include "glxclient.h"
#include "indirect.h"
+#if !defined __GNUC__ || __GNUC__ < 3
+# define __builtin_expect(x, y) x
+#endif
+
/**
* Send glPixelStore command to the server
*
More information about the mesa-commit
mailing list