xserver: Branch 'master' - 4 commits
Keith Packard
keithp at kemper.freedesktop.org
Sun Mar 27 18:13:33 PDT 2011
configure.ac | 5 ++++-
glx/glapi.c | 4 ++--
glx/glapi.h | 2 +-
glx/glthread.h | 2 +-
hw/xquartz/applewm.c | 2 +-
hw/xquartz/threadSafety.h | 2 +-
hw/xquartz/xpr/xprScreen.c | 2 ++
include/dix-config.h.in | 3 +++
8 files changed, 15 insertions(+), 7 deletions(-)
New commits:
commit cb5d4b416a0fc850a1c119755a9cc3c4f0d7a545
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Wed Mar 23 12:10:15 2011 -0700
XQuartz: applewm: Don't check if requested window level is < 0 because it is unsigned (-Wtautological-compare)
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index ec20534..2f26e61 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -437,7 +437,7 @@ ProcAppleWMSetWindowLevel(register ClientPtr client)
DixReadAccess))
return BadValue;
- if (stuff->level < 0 || stuff->level >= AppleWMNumWindowLevels) {
+ if (stuff->level >= AppleWMNumWindowLevels) {
return BadValue;
}
commit c116e32dc2799c4abcf38d22bc773b755387c89a
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Wed Mar 23 12:07:36 2011 -0700
XQuartz: Put ifdef guards around have_depth label (-Wunused-label)
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 972278b..f6a7129 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -326,7 +326,9 @@ xprAddScreen(int index, ScreenPtr pScreen)
#endif
}
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
have_depth:
+#endif
switch(depth) {
case 8: // pseudo-working
dfb->visuals = PseudoColorMask;
commit 1a583f7940e18a8ef28ca14e74e85e0785d39067
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Wed Mar 23 12:05:05 2011 -0700
XQuartz: Properly comment extra tokens (-Wextra-tokens) after endif
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/threadSafety.h b/hw/xquartz/threadSafety.h
index 7b00910..3ff9eaf 100644
--- a/hw/xquartz/threadSafety.h
+++ b/hw/xquartz/threadSafety.h
@@ -53,4 +53,4 @@ const char *threadSafetyID(pthread_t tid);
#define TA_APPKIT()
#endif
-#endif _XQ_THREAD_SAFETY_H_
+#endif /* _XQ_THREAD_SAFETY_H_ */
commit c55baebf4ebf1887262cc16899eb297b9f284f6e
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Tue Mar 22 19:01:48 2011 -0700
GLX: Support TLS with better portability
AX_TLS detects when toolchains support __thread or __declspec(thread),
but existing code assumed __thread.
This also adds a check to configure.ac to error out if TLS is requested
but unsupported.
Found-by: Tinderbox
http://tinderbox.x.org/builds/2011-03-22-0007
Regression-from: 82b1eaa6cad20f39dbf15573bdb3d62acbcd91f9
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
Reviewed-by: Tom Fogal <tfogal at alumni.unh.edu>
Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
diff --git a/configure.ac b/configure.ac
index b681163..9e04ff0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -590,7 +590,10 @@ AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerate
[AIGLX=yes])
AX_TLS
AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: auto)]),
- [GLX_USE_TLS=$enableval],
+ [GLX_USE_TLS=$enableval
+ if test "x$GLX_USE_TLS" = "xyes" && test "${ac_cv_tls}" = "none" ; then
+ AC_MSG_ERROR([GLX with TLS support requested, but the compiler does not support it.])
+ fi],
[GLX_USE_TLS=no
if test "${ac_cv_tls}" != "none" ; then
GLX_USE_TLS=yes
diff --git a/glx/glapi.c b/glx/glapi.c
index 209ae50..19576a7 100644
--- a/glx/glapi.c
+++ b/glx/glapi.c
@@ -184,11 +184,11 @@ static GLint NoOpUnused(void)
/*@{*/
#if defined(GLX_USE_TLS)
-PUBLIC __thread struct _glapi_table * _glapi_tls_Dispatch
+PUBLIC TLS struct _glapi_table * _glapi_tls_Dispatch
__attribute__((tls_model("initial-exec")))
= (struct _glapi_table *) __glapi_noop_table;
-PUBLIC __thread void * _glapi_tls_Context
+PUBLIC TLS void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL;
diff --git a/glx/glapi.h b/glx/glapi.h
index 80b53aa..dec8328 100644
--- a/glx/glapi.h
+++ b/glx/glapi.h
@@ -83,7 +83,7 @@ typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
const extern void *_glapi_Context;
const extern struct _glapi_table *_glapi_Dispatch;
-extern __thread void * _glapi_tls_Context
+extern TLS void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context
diff --git a/glx/glthread.h b/glx/glthread.h
index 28793fc..140e2aa 100644
--- a/glx/glthread.h
+++ b/glx/glthread.h
@@ -233,7 +233,7 @@ _glthread_SetTSD(_glthread_TSD *, void *);
#if defined(GLX_USE_TLS)
-extern __thread struct _glapi_table * _glapi_tls_Dispatch
+extern TLS struct _glapi_table * _glapi_tls_Dispatch
__attribute__((tls_model("initial-exec")));
#define GET_DISPATCH() _glapi_tls_Dispatch
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index fc93f3e..fd9ecce 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -444,6 +444,9 @@
/* Define to 1 if you have the `ffs' function. */
#undef HAVE_FFS
+/* If the compiler supports a TLS storage class define it to that here */
+#undef TLS
+
/* Correctly set _XSERVER64 for OSX fat binaries */
#ifdef __APPLE__
#include "dix-config-apple-verbatim.h"
More information about the xorg-commit
mailing list