diff options
Diffstat (limited to 'xorg-server/glx/glapi.c')
-rw-r--r-- | xorg-server/glx/glapi.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/xorg-server/glx/glapi.c b/xorg-server/glx/glapi.c index d5275dc81..5174124d9 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
@@ -124,7 +130,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)
@@ -144,7 +150,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)
@@ -159,7 +165,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)
@@ -182,7 +188,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;
@@ -202,7 +208,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
@@ -469,7 +475,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");
@@ -480,7 +486,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;
|