summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorAlexander von Gluck IV <kallisti5@unixzen.com>2015-05-13 17:13:37 -0500
committerAlexander von Gluck IV <kallisti5@unixzen.com>2015-05-14 14:08:37 -0400
commit8362068c1b28eb2d3e334abc980c4711957d61fd (patch)
tree18022327791b5e8899bcd0442ce48c3c2640a616 /src/egl/main
parent175cbb447ae85b93b8b0244f345064763131481f (diff)
downloadexternal_mesa3d-8362068c1b28eb2d3e334abc980c4711957d61fd.zip
external_mesa3d-8362068c1b28eb2d3e334abc980c4711957d61fd.tar.gz
external_mesa3d-8362068c1b28eb2d3e334abc980c4711957d61fd.tar.bz2
egl: Add needed extern "C" for C++ access
* Haiku's egl driver is C++ due to the interface natively being C++ Reviewed-⁠by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglapi.h10
-rw-r--r--src/egl/main/eglarray.h8
-rw-r--r--src/egl/main/eglcompiler.h8
-rw-r--r--src/egl/main/eglconfig.h8
-rw-r--r--src/egl/main/eglcontext.h8
-rw-r--r--src/egl/main/eglcurrent.h8
-rw-r--r--src/egl/main/egldefines.h6
-rw-r--r--src/egl/main/egldisplay.h9
-rw-r--r--src/egl/main/egldriver.h10
-rw-r--r--src/egl/main/eglimage.h9
-rw-r--r--src/egl/main/egllog.h8
-rw-r--r--src/egl/main/eglsurface.h8
-rw-r--r--src/egl/main/egltypedefs.h10
13 files changed, 110 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h
index 066a416..e07970f 100644
--- a/src/egl/main/eglapi.h
+++ b/src/egl/main/eglapi.h
@@ -31,6 +31,11 @@
#ifndef EGLAPI_INCLUDED
#define EGLAPI_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* A generic function ptr type
*/
@@ -209,4 +214,9 @@ struct _egl_api
#endif
};
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLAPI_INCLUDED */
diff --git a/src/egl/main/eglarray.h b/src/egl/main/eglarray.h
index 228f6c3..29b7128 100644
--- a/src/egl/main/eglarray.h
+++ b/src/egl/main/eglarray.h
@@ -34,6 +34,10 @@
#include "egltypedefs.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef EGLBoolean (*_EGLArrayForEach)(void *elem, void *foreach_data);
@@ -83,4 +87,8 @@ _eglGetArraySize(_EGLArray *array)
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLARRAY_INCLUDED */
diff --git a/src/egl/main/eglcompiler.h b/src/egl/main/eglcompiler.h
index b457a40..9804ca4 100644
--- a/src/egl/main/eglcompiler.h
+++ b/src/egl/main/eglcompiler.h
@@ -30,9 +30,17 @@
#ifndef EGLCOMPILER_INCLUDED
#define EGLCOMPILER_INCLUDED
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define STATIC_ASSERT(COND) \
do { \
(void) sizeof(char [1 - 2*!(COND)]); \
} while (0)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLCOMPILER_INCLUDED */
diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h
index dc59ea3..84cb227 100644
--- a/src/egl/main/eglconfig.h
+++ b/src/egl/main/eglconfig.h
@@ -39,6 +39,10 @@
#include "egltypedefs.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* update _eglValidationTable and _eglOffsetOfConfig before updating this
* struct */
struct _egl_config
@@ -225,4 +229,8 @@ extern EGLBoolean
_eglGetConfigs(_EGLDriver *drv, _EGLDisplay *dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLCONFIG_INCLUDED */
diff --git a/src/egl/main/eglcontext.h b/src/egl/main/eglcontext.h
index 241917f..69bf77d 100644
--- a/src/egl/main/eglcontext.h
+++ b/src/egl/main/eglcontext.h
@@ -37,6 +37,10 @@
#include "egldisplay.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* "Base" class for device driver contexts.
*/
@@ -150,4 +154,8 @@ _eglGetContextHandle(_EGLContext *ctx)
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLCONTEXT_INCLUDED */
diff --git a/src/egl/main/eglcurrent.h b/src/egl/main/eglcurrent.h
index 3343755..1e386ac 100644
--- a/src/egl/main/eglcurrent.h
+++ b/src/egl/main/eglcurrent.h
@@ -34,6 +34,10 @@
#include "egltypedefs.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define _EGL_API_ALL_BITS \
(EGL_OPENGL_ES_BIT | \
EGL_OPENVG_BIT | \
@@ -115,4 +119,8 @@ extern EGLBoolean
_eglError(EGLint errCode, const char *msg);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLCURRENT_INCLUDED */
diff --git a/src/egl/main/egldefines.h b/src/egl/main/egldefines.h
index 4c9e014..a32cab2 100644
--- a/src/egl/main/egldefines.h
+++ b/src/egl/main/egldefines.h
@@ -34,6 +34,9 @@
#ifndef EGLDEFINES_INCLUDED
#define EGLDEFINES_INCLUDED
+#ifdef __cplusplus
+extern "C" {
+#endif
#define _EGL_MAX_EXTENSIONS_LEN 1000
@@ -41,5 +44,8 @@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+#ifdef __cplusplus
+}
+#endif
#endif /* EGLDEFINES_INCLUDED */
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 36f50b9..6862e2f 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -39,6 +39,10 @@
#include "eglarray.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum _egl_platform_type {
_EGL_PLATFORM_WINDOWS,
_EGL_PLATFORM_X11,
@@ -270,4 +274,9 @@ _eglGetWaylandDisplay(struct wl_display *native_display,
const EGLint *attrib_list);
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLDISPLAY_INCLUDED */
diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h
index 11300ce..cd95cd3 100644
--- a/src/egl/main/egldriver.h
+++ b/src/egl/main/egldriver.h
@@ -38,6 +38,11 @@
#include "eglapi.h"
#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* Define an inline driver typecast function.
*
@@ -124,4 +129,9 @@ _eglSearchPathForEach(EGLBoolean (*callback)(const char *, size_t, void *),
void *callback_data);
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* EGLDRIVER_INCLUDED */
diff --git a/src/egl/main/eglimage.h b/src/egl/main/eglimage.h
index 50a87a1..d06f91c 100644
--- a/src/egl/main/eglimage.h
+++ b/src/egl/main/eglimage.h
@@ -35,6 +35,11 @@
#include "egltypedefs.h"
#include "egldisplay.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct _egl_image_attrib_int
{
EGLint Value;
@@ -161,4 +166,8 @@ _eglGetImageHandle(_EGLImage *img)
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLIMAGE_INCLUDED */
diff --git a/src/egl/main/egllog.h b/src/egl/main/egllog.h
index 12a477e..cf58525 100644
--- a/src/egl/main/egllog.h
+++ b/src/egl/main/egllog.h
@@ -34,6 +34,10 @@
#include "egltypedefs.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define _EGL_FATAL 0 /* unrecoverable error */
#define _EGL_WARNING 1 /* recoverable error/problem */
#define _EGL_INFO 2 /* just useful info */
@@ -55,4 +59,8 @@ extern void
_eglLog(EGLint level, const char *fmtStr, ...);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLLOG_INCLUDED */
diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h
index 438e27c..74c429a 100644
--- a/src/egl/main/eglsurface.h
+++ b/src/egl/main/eglsurface.h
@@ -37,6 +37,10 @@
#include "egldisplay.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* "Base" class for device driver surfaces.
*/
@@ -174,4 +178,8 @@ _eglGetSurfaceHandle(_EGLSurface *surf)
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLSURFACE_INCLUDED */
diff --git a/src/egl/main/egltypedefs.h b/src/egl/main/egltypedefs.h
index e90959a..82064a7 100644
--- a/src/egl/main/egltypedefs.h
+++ b/src/egl/main/egltypedefs.h
@@ -38,6 +38,11 @@
#include "eglcompiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct _egl_api _EGLAPI;
typedef struct _egl_array _EGLArray;
@@ -68,4 +73,9 @@ typedef struct _egl_sync _EGLSync;
typedef struct _egl_thread_info _EGLThreadInfo;
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EGLTYPEDEFS_INCLUDED */