summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Coopersmith <[email protected]>2009-03-23 20:35:09 -0700
committerAlan Coopersmith <[email protected]>2009-03-25 16:26:03 -0700
commit9cff0acb362bb8289207910cfa431006437e7a19 (patch)
tree5327c7cc9e6a28d64834b806e3dd9b19c4d810aa
parent791b59493ffeeecde8cca35529f66c2a3c734a7e (diff)
define __builtin_expect for non-gcc compilers in two more glx files
Signed-off-by: Alan Coopersmith <[email protected]>
-rw-r--r--src/glx/x11/indirect_vertex_program.c4
-rw-r--r--src/glx/x11/pixelstore.c4
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 865a4b1ba14..3313ac008a5 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 0eb31bf1e30..8b51b5d8b7f 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
*