aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/glapi
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/glapi')
-rw-r--r--mesalib/src/mesa/glapi/glapi.c7
-rw-r--r--mesalib/src/mesa/glapi/glapi.h13
-rw-r--r--mesalib/src/mesa/glapi/glapi_getproc.c3
3 files changed, 16 insertions, 7 deletions
diff --git a/mesalib/src/mesa/glapi/glapi.c b/mesalib/src/mesa/glapi/glapi.c
index 13de594aa..b913dc254 100644
--- a/mesalib/src/mesa/glapi/glapi.c
+++ b/mesalib/src/mesa/glapi/glapi.c
@@ -120,15 +120,18 @@ static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
#endif /* defined(THREADS) */
+#ifndef INSERVER
PUBLIC struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table;
PUBLIC void *_glapi_Context = NULL;
+#endif
#endif /* defined(GLX_USE_TLS) */
/*@}*/
+#ifndef INSERVER
#if defined(THREADS) && !defined(GLX_USE_TLS)
void
@@ -159,7 +162,6 @@ _glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex);
#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex)
#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex)
#endif
-
/**
* We should call this periodically from a function such as glXMakeCurrent
* in order to test if multiple threads are being used.
@@ -187,7 +189,6 @@ _glapi_check_multithread(void)
}
CHECK_MULTITHREAD_UNLOCK();
}
-
#else
void
@@ -201,6 +202,8 @@ _glapi_check_multithread(void) { }
#endif
+#endif /* INSERVER */
+
/**
diff --git a/mesalib/src/mesa/glapi/glapi.h b/mesalib/src/mesa/glapi/glapi.h
index 1ca2e4bef..8603317da 100644
--- a/mesalib/src/mesa/glapi/glapi.h
+++ b/mesalib/src/mesa/glapi/glapi.h
@@ -94,9 +94,14 @@ extern __thread void * _glapi_tls_Context
#else
-extern struct _glapi_table *_glapi_Dispatch;
+#ifdef INSERVER
+#define EXTERN _declspec(dllimport)
+#else
+#define EXTERN _declspec(dllexport)
+#endif
-extern void *_glapi_Context;
+EXTERN struct _glapi_table *_glapi_Dispatch;
+EXTERN void *_glapi_Context;
# ifdef THREADS
@@ -129,7 +134,7 @@ extern void
_glapi_destroy_multithread(void);
-extern void
+EXTERN void
_glapi_check_multithread(void);
@@ -153,7 +158,7 @@ extern unsigned int
_glapi_get_dispatch_table_size(void);
-extern int
+EXTERN int
_glapi_add_dispatch( const char * const * function_names,
const char * parameter_signature );
diff --git a/mesalib/src/mesa/glapi/glapi_getproc.c b/mesalib/src/mesa/glapi/glapi_getproc.c
index a6dbf173e..e0920f9a3 100644
--- a/mesalib/src/mesa/glapi/glapi_getproc.c
+++ b/mesalib/src/mesa/glapi/glapi_getproc.c
@@ -583,6 +583,7 @@ add_function_name( const char * funcName )
* the parameter signature of a static function.
*/
+#ifndef INSERVER
PUBLIC int
_glapi_add_dispatch( const char * const * function_names,
const char * parameter_signature )
@@ -677,7 +678,7 @@ _glapi_add_dispatch( const char * const * function_names,
return offset;
}
-
+#endif
/**
* Return offset of entrypoint for named function within dispatch table.