aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glapi.c')
-rw-r--r--xorg-server/glx/glapi.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/xorg-server/glx/glapi.c b/xorg-server/glx/glapi.c
index 9e219f680..481d59f81 100644
--- a/xorg-server/glx/glapi.c
+++ b/xorg-server/glx/glapi.c
@@ -35,18 +35,24 @@
#include <dix-config.h>
#include <X11/Xfuncproto.h>
#include <os.h>
+#ifdef _MSC_VER
+#define PUBLIC _declspec(dllexport)
+#else
#define PUBLIC _X_EXPORT
+#endif
#include <stdlib.h>
#include <string.h>
#ifdef DEBUG
#include <assert.h>
#endif
+#include <unistd.h>
#include "glapi.h"
-#include "glapioffsets.h"
#include "glapitable.h"
+#define _gloffset_FIRST_DYNAMIC (sizeof(struct _glapi_table) / sizeof(void *))
+
#if defined(PTHREADS) || defined(GLX_USE_TLS)
static void init_glapi_relocs(void);
#endif
@@ -122,7 +128,7 @@ _glapi_check_multithread(void)
* The context pointer is an opaque type which should be cast to
* void from the real context pointer type.
*/
-PUBLIC void
+void
_glapi_set_context(void *context)
{
#if defined(GLX_USE_TLS)
@@ -142,7 +148,7 @@ _glapi_set_context(void *context)
* The context pointer is an opaque type which should be cast from
* void to the real context pointer type.
*/
-PUBLIC void *
+void *
_glapi_get_context(void)
{
#if defined(GLX_USE_TLS)
@@ -157,7 +163,7 @@ _glapi_get_context(void)
/**
* Set the global or per-thread dispatch table pointer.
*/
-PUBLIC void
+void
_glapi_set_dispatch(struct _glapi_table *dispatch)
{
#if defined(PTHREADS) || defined(GLX_USE_TLS)
@@ -180,7 +186,7 @@ _glapi_set_dispatch(struct _glapi_table *dispatch)
/**
* Return pointer to current dispatch table for calling thread.
*/
-PUBLIC struct _glapi_table *
+struct _glapi_table *
_glapi_get_dispatch(void)
{
struct _glapi_table * api;
@@ -200,7 +206,7 @@ _glapi_get_dispatch(void)
***/
#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 16
+# define DISPATCH_FUNCTION_SIZE 16
#elif defined(USE_X86_ASM)
# if defined(THREADS) && !defined(GLX_USE_TLS)
# define DISPATCH_FUNCTION_SIZE 32
@@ -467,7 +473,7 @@ _glapi_add_dispatch( const char * const * function_names,
* glXGetProcAddress doesn't exist in the protocol, the drivers never call
* this themselves, and neither does the server. warn if it happens though.
*/
-PUBLIC _glapi_proc
+_GLAPI_EXPORT _glapi_proc
_glapi_get_proc_address(const char *funcName)
{
ErrorF("_glapi_get_proc_address called!\n");
@@ -478,7 +484,7 @@ _glapi_get_proc_address(const char *funcName)
* Return size of dispatch table struct as number of functions (or
* slots).
*/
-PUBLIC GLuint
+GLuint
_glapi_get_dispatch_table_size(void)
{
return DISPATCH_TABLE_SIZE;