Mesa (mesa_7_2_branch): __builtin_expect is a gcc 3.x feature. define it out for gcc 2.95.
Brian Paul
brianp at kemper.freedesktop.org
Sun Jan 11 23:57:04 UTC 2009
Module: Mesa
Branch: mesa_7_2_branch
Commit: 4015b48b210e169015bbbd3eec33b9366a796e34
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4015b48b210e169015bbbd3eec33b9366a796e34
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Sat Sep 13 19:07:28 2008 +0200
__builtin_expect is a gcc 3.x feature. define it out for gcc 2.95.
Patch suggested by miod at . Thanks.
---
src/mesa/glapi/glthread.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index e2765ce..27ccd2e 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -298,6 +298,10 @@ _glthread_GetTSD(_glthread_TSD *);
extern void
_glthread_SetTSD(_glthread_TSD *, void *);
+#if !defined __GNUC__ || __GNUC__ < 3
+# define __builtin_expect(x, y) x
+#endif
+
#if defined(GLX_USE_TLS)
extern __thread struct _glapi_table * _glapi_tls_Dispatch
More information about the mesa-commit
mailing list