egl: Add needed extern "C" for C++ access
authorAlexander von Gluck IV <kallisti5@unixzen.com>
Wed, 13 May 2015 22:13:37 +0000 (17:13 -0500)
committerAlexander von Gluck IV <kallisti5@unixzen.com>
Thu, 14 May 2015 18:08:37 +0000 (14:08 -0400)
* Haiku's egl driver is C++ due to the interface natively being C++

Reviewed-⁠by: Brian Paul <brianp@vmware.com>

14 files changed:
src/egl/main/eglapi.h
src/egl/main/eglarray.h
src/egl/main/eglcompiler.h
src/egl/main/eglconfig.h
src/egl/main/eglcontext.h
src/egl/main/eglcurrent.h
src/egl/main/egldefines.h
src/egl/main/egldisplay.h
src/egl/main/egldriver.h
src/egl/main/eglimage.h
src/egl/main/egllog.h
src/egl/main/eglsurface.h
src/egl/main/egltypedefs.h
src/loader/loader.h

index 066a416b3e30a35c44a0a12936f19dba749fad8c..e07970f8b1cf381b68891a39ccc42d1a5fd1b7f7 100644 (file)
 #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 */
index 228f6c3d2cab4383c25d4768d1f5eac94307cf4e..29b7128b68d5a838f6ae4e68225cee2933638dfd 100644 (file)
 #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 */
index b457a40a32a82f964f7057d5c337aece54f55385..9804ca4f281b229a6a3a26b5d68f274eb07ec502 100644 (file)
 #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 */
index dc59ea3f72f864a0e0f000a1b26566c250f4e44c..84cb2276b707e60bc14c5914301bf7fda54b153a 100644 (file)
 #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 */
index 241917f3bead6df77675da829bb62d6c9448a3da..69bf77d8aff7702c6af787fa5ee6b350d21de929 100644 (file)
 #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 */
index 3343755c9854642246c4002007f035882b0ca8e6..1e386acdafb9c0550801536da02e2af85f56bcb6 100644 (file)
 #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 */
index 4c9e014fcea911f5062843690cc2f48bf0180d50..a32cab2640802fa9eb3d36c5e2c22824b361a84b 100644 (file)
@@ -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 */
index 36f50b97cb3e4ee7d2a8c03a1c5631f24d97343c..6862e2f51b7116ea86dea388dbc10cac6febc1fe 100644 (file)
 #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 */
index 11300ce1ee2c21a17626f2a20cf78af4c92ded89..cd95cd305f8a43060b2f4f7c7baeb3f238c1ce96 100644 (file)
 #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 */
index 50a87a1889079d27c1c034785ad39fdadb2e46e5..d06f91cd1a49623763a4e8fc0a7a51e110098758 100644 (file)
 #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 */
index 12a477ee05434403802e8377d922df3f2be90b43..cf58525005eed872826f9761b340cdbbbd956b97 100644 (file)
 #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 */
index 438e27cebc844d8f4c68f24526cb4ab67b8093f9..74c429a9628b50fab751ef15c9aab0d97d7e800e 100644 (file)
 #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 */
index e90959affae1fc7035d75f33a7c0e5946f409f38..82064a71fc04e0fcd801280ec29a65ee0b86588f 100644 (file)
 
 #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 */
index 810e7da7f9f280ff78a15e933b7be5ab6a0291fd..60c58f2f8fc59ee7a68d440b9d3ced121c3ade6e 100644 (file)
 #ifndef LOADER_H
 #define LOADER_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Helpers to figure out driver and device name, eg. from pci-id, etc. */
 
 #define _LOADER_DRI          (1 << 0)
@@ -61,4 +65,9 @@ loader_get_user_preferred_fd(int default_fd, int *different_device);
 void
 loader_set_logger(void (*logger)(int level, const char *fmt, ...));
 
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LOADER_H */