removed _glapi_ThreadSafe
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index ed1a0c9..97cb1c8 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -1,4 +1,4 @@
-/* $Id: glapi.c,v 1.18 1999/12/17 14:51:28 brianp Exp $ */
+/* $Id: glapi.c,v 1.19 2000/01/05 04:36:17 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -49,7 +49,7 @@
 
 
 /* Flag to indicate whether thread-safe dispatch is enabled */
-GLboolean _glapi_ThreadSafe = GL_FALSE;
+static GLboolean ThreadSafe = GL_FALSE;
 
 /* This is used when thread safety is disabled */
 static struct _glapi_table *Dispatch = &__glapi_noop_table;
@@ -95,7 +95,7 @@
 _glapi_check_multithread(void)
 {
 #if defined(THREADS)
-   if (!_glapi_ThreadSafe) {
+   if (!ThreadSafe) {
       static unsigned long knownID;
       static GLboolean firstCall = GL_TRUE;
       if (firstCall) {
@@ -103,10 +103,10 @@
          firstCall = GL_FALSE;
       }
       else if (knownID != _glthread_GetID()) {
-         _glapi_ThreadSafe = GL_TRUE;
+         ThreadSafe = GL_TRUE;
       }
    }
-   if (_glapi_ThreadSafe) {
+   if (ThreadSafe) {
       /* make sure that this thread's dispatch pointer isn't null */
       if (!_glapi_get_dispatch()) {
          _glapi_set_dispatch(NULL);
@@ -127,7 +127,7 @@
 {
 #if defined(THREADS)
    _glthread_SetTSD(&ContextTSD, context, context_thread_init);
-   if (_glapi_ThreadSafe)
+   if (ThreadSafe)
       _glapi_CurrentContext = NULL;  /* to help with debugging */
    else
       _glapi_CurrentContext = context;
@@ -147,7 +147,7 @@
 _glapi_get_current_context(void)
 {
 #if defined(THREADS)
-   if (_glapi_ThreadSafe) {
+   if (ThreadSafe) {
       return _glthread_GetTSD(&ContextTSD);
    }
    else {
@@ -178,7 +178,7 @@
 
 #if defined(THREADS)
    _glthread_SetTSD(&DispatchTSD, (void*) dispatch, dispatch_thread_init);
-   if (_glapi_ThreadSafe)
+   if (ThreadSafe)
       Dispatch = NULL;  /* to help with debugging */
    else
       Dispatch = dispatch;
@@ -196,7 +196,7 @@
 _glapi_get_dispatch(void)
 {
 #if defined(THREADS)
-   if (_glapi_ThreadSafe) {
+   if (ThreadSafe) {
       return (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD);
    }
    else {
@@ -505,14 +505,9 @@
 #define NAME(func)  gl##func
 #endif
 
-#define DISPATCH_SETUP			\
-   const struct _glapi_table *dispatch;	\
-   if (_glapi_ThreadSafe) {		\
-      dispatch = _glapi_get_dispatch();	\
-   }					\
-   else {				\
-      dispatch = Dispatch;		\
-   }
+#define DISPATCH_SETUP						\
+   const struct _glapi_table *dispatch;				\
+   dispatch = Dispatch ? Dispatch : _glapi_get_dispatch();
 
 #define DISPATCH(FUNC, ARGS) (dispatch->FUNC) ARGS