In GLX_USE_TLS builds, make GET_CURRENT_CONTEXT use the TLS verion of the
variable.  Without this, GET_CURRENT_CONTEXT would *always* result in a call
to _glapi_get_context (because _glapi_Context is a const pointer to NULL in
TLS builds).
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index 615d169..291485d 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -64,9 +64,10 @@
 #define GLTHREAD_H
 
 
-#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || \
-	defined(XTHREADS) || defined(BEOS_THREADS)
-#define THREADS
+#if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\
+     defined(WIN32_THREADS) || defined(XTHREADS) || defined(BEOS_THREADS)) \
+    && !defined(THREADS)
+# define THREADS
 #endif
 
 #ifdef VMS