Module Name: xsrc
Committed By: rafal
Date: Sun Jan 24 15:38:47 UTC 2010
Modified Files:
xsrc/external/mit/MesaLib/dist/src/mesa/glapi: glapi.c glapi_getproc.c
glthread.c
Log Message:
Decorate some GL APIs with PUBLIC so they're available to link against;
otherwise e.g. the swrast DRI module can't find _glapi_check_multithread.
>From http://people.freedesktop.org/~krh/glapi.patch with some tweaks.
ok phone@
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c \
xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c
diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.2 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.2 Thu Jun 11 00:50:16 2009
+++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c Sun Jan 24 15:38:47 2010
@@ -221,7 +221,7 @@
* We should call this periodically from a function such as glXMakeCurrent
* in order to test if multiple threads are being used.
*/
-void
+PUBLIC void
_glapi_check_multithread(void)
{
#if defined(THREADS) && !defined(GLX_USE_TLS)
Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c
diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.2 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.2 Thu Jun 11 00:50:17 2009
+++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c Sun Jan 24 15:38:47 2010
@@ -36,7 +36,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "glthread.h"
-
+#include "main/glheader.h"
/*
* This file should still compile even when THREADS is not defined.
@@ -71,7 +71,7 @@
*/
#ifdef PTHREADS
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return (unsigned long) pthread_self();
@@ -125,7 +125,7 @@
#define USE_LOCK_FOR_KEY /* undef this to try a version without
lock for the global key... */
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
abort(); /* XXX not implemented yet */
@@ -203,7 +203,7 @@
DWORD dwErr=GetLastError();
}
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return GetCurrentThreadId();
@@ -304,7 +304,7 @@
*/
#ifdef BEOS_THREADS
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return (unsigned long) find_thread(NULL);
@@ -346,7 +346,7 @@
* no-op functions
*/
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return 0;
Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c
diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1 Thu Jun 11 00:50:16 2009
+++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c Sun Jan 24 15:38:47 2010
@@ -563,7 +563,7 @@
* in the name of static functions, try generating a new API entrypoint on
* the fly with assembly language.
*/
-_glapi_proc
+PUBLIC _glapi_proc
_glapi_get_proc_address(const char *funcName)
{
struct _glapi_function * entry;