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.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/xorg-server/glx/glapi.c b/xorg-server/glx/glapi.c
index 65f3bc91b..a7913a3a1 100644
--- a/xorg-server/glx/glapi.c
+++ b/xorg-server/glx/glapi.c
@@ -35,13 +35,18 @@
#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 "dispatch.h"
@@ -124,7 +129,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 +149,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 +164,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 +187,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;
@@ -469,7 +474,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 +485,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;