aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-09 17:05:56 +0100
committermarha <marha@users.sourceforge.net>2011-11-09 17:05:56 +0100
commit72d7f8d5af476f12dc75eab4fa9d59364cbec190 (patch)
tree1efac13a52811bfd28ae51538b15f87cbfaf8939 /mesalib/src/mapi
parenta3d796bcc7de83fd88b42e09c6a82a8df4f9b836 (diff)
parenta8e5f06fe01732fbd643bc435dd3b8eaa602defe (diff)
downloadvcxsrv-72d7f8d5af476f12dc75eab4fa9d59364cbec190.tar.gz
vcxsrv-72d7f8d5af476f12dc75eab4fa9d59364cbec190.tar.bz2
vcxsrv-72d7f8d5af476f12dc75eab4fa9d59364cbec190.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/mapi/glapi/glapi.h
Diffstat (limited to 'mesalib/src/mapi')
-rw-r--r--mesalib/src/mapi/glapi/glapi.h6
-rw-r--r--mesalib/src/mapi/glapi/glthread.h8
-rw-r--r--mesalib/src/mapi/mapi/u_thread.h22
3 files changed, 32 insertions, 4 deletions
diff --git a/mesalib/src/mapi/glapi/glapi.h b/mesalib/src/mapi/glapi/glapi.h
index 8ef654636..f0955fce4 100644
--- a/mesalib/src/mapi/glapi/glapi.h
+++ b/mesalib/src/mapi/glapi/glapi.h
@@ -44,9 +44,13 @@
#ifndef _GLAPI_H
#define _GLAPI_H
+#include "glapi/glthread.h"
+
+
#ifdef __cplusplus
extern "C" {
#endif
+
#ifdef _GLAPI_NO_EXPORTS
# define _GLAPI_EXPORT
#else /* _GLAPI_NO_EXPORTS */
@@ -84,7 +88,6 @@ typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
#define _glapi_Dispatch _mglapi_Dispatch
#endif
-
/*
* Number of extension functions which we can dynamically add at runtime.
*/
@@ -181,6 +184,7 @@ extern struct _glapi_table *
_glapi_create_table_from_handle(void *handle, const char *symbol_prefix);
#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/mesalib/src/mapi/glapi/glthread.h b/mesalib/src/mapi/glapi/glthread.h
index fc4ece7c3..1c3f4e2bf 100644
--- a/mesalib/src/mapi/glapi/glthread.h
+++ b/mesalib/src/mapi/glapi/glthread.h
@@ -3,6 +3,10 @@
#include "mapi/u_thread.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define _glthread_DECLARE_STATIC_MUTEX(name) u_mutex_declare_static(name)
#define _glthread_INIT_MUTEX(name) u_mutex_init(name)
#define _glthread_DESTROY_MUTEX(name) u_mutex_destroy(name)
@@ -17,4 +21,8 @@
typedef struct u_tsd _glthread_TSD;
typedef u_mutex _glthread_Mutex;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GLTHREAD_H */
diff --git a/mesalib/src/mapi/mapi/u_thread.h b/mesalib/src/mapi/mapi/u_thread.h
index 4405ec9c5..7db22b793 100644
--- a/mesalib/src/mapi/mapi/u_thread.h
+++ b/mesalib/src/mapi/mapi/u_thread.h
@@ -44,12 +44,25 @@
#include "u_compiler.h"
-#if defined(PTHREADS) || defined(WIN32)
+#if defined(PTHREADS)
+#include <pthread.h> /* POSIX threads headers */
+#endif
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
+#if defined(PTHREADS) || defined(_WIN32)
#ifndef THREADS
#define THREADS
#endif
#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/*
* POSIX threads. This should be your choice in the Unix world
* whenever possible. When building with POSIX threads, be sure
@@ -60,7 +73,6 @@
* proper compiling for MT-safe libc etc.
*/
#if defined(PTHREADS)
-#include <pthread.h> /* POSIX threads headers */
struct u_tsd {
pthread_key_t key;
@@ -86,7 +98,6 @@ typedef pthread_mutex_t u_mutex;
* used!
*/
#ifdef WIN32
-#include <windows.h>
struct u_tsd {
DWORD key;
@@ -142,4 +153,9 @@ u_tsd_get(struct u_tsd *tsd);
void
u_tsd_set(struct u_tsd *tsd, void *ptr);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _U_THREAD_H_ */