Blob Blame History Raw
From 3fb4fea6743c660401b78f1f08afda731d32192e Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@gnome.org>
Date: Fri, 3 Mar 2017 14:41:15 +0000
Subject: [PATCH 1/6] Add C++ guards around generated headers

Commit 0625a74d69f762df8d411bc0451927424aee1f2c moved the C++ guards
after the inclusion of the generated headers, which was an unintended
behavioural change and now requires header guards around the inclusion
of Epoxy headers.

Fixes: #106
---
 include/epoxy/egl.h | 4 ++--
 include/epoxy/gl.h  | 4 ++--
 include/epoxy/glx.h | 4 ++--
 include/epoxy/wgl.h | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/epoxy/egl.h b/include/epoxy/egl.h
index d5083da..b5f8ee0 100644
--- a/include/epoxy/egl.h
+++ b/include/epoxy/egl.h
@@ -41,10 +41,10 @@
 #define __eglext_h_
 #endif
 
-#include "epoxy/egl_generated.h"
-
 EPOXY_BEGIN_DECLS
 
+#include "epoxy/egl_generated.h"
+
 EPOXY_PUBLIC bool epoxy_has_egl_extension(EGLDisplay dpy, const char *extension);
 EPOXY_PUBLIC int epoxy_egl_version(EGLDisplay dpy);
 EPOXY_PUBLIC bool epoxy_has_egl(void);
diff --git a/include/epoxy/gl.h b/include/epoxy/gl.h
index 078ecee..88b9a15 100644
--- a/include/epoxy/gl.h
+++ b/include/epoxy/gl.h
@@ -84,10 +84,10 @@
 #define GLAPIENTRYP GLAPIENTRY *
 #endif
 
-#include "epoxy/gl_generated.h"
-
 EPOXY_BEGIN_DECLS
 
+#include "epoxy/gl_generated.h"
+
 EPOXY_PUBLIC bool epoxy_has_gl_extension(const char *extension);
 EPOXY_PUBLIC bool epoxy_is_desktop_gl(void);
 EPOXY_PUBLIC int epoxy_gl_version(void);
diff --git a/include/epoxy/glx.h b/include/epoxy/glx.h
index a06b13d..8517063 100644
--- a/include/epoxy/glx.h
+++ b/include/epoxy/glx.h
@@ -44,10 +44,10 @@
 #define __glxext_h_
 #endif
 
-#include "epoxy/glx_generated.h"
-
 EPOXY_BEGIN_DECLS
 
+#include "epoxy/glx_generated.h"
+
 EPOXY_PUBLIC bool epoxy_has_glx_extension(Display *dpy, int screen, const char *extension);
 EPOXY_PUBLIC int epoxy_glx_version(Display *dpy, int screen);
 EPOXY_PUBLIC bool epoxy_has_glx(Display *dpy);
diff --git a/include/epoxy/wgl.h b/include/epoxy/wgl.h
index 503f899..7c85dec 100644
--- a/include/epoxy/wgl.h
+++ b/include/epoxy/wgl.h
@@ -49,10 +49,10 @@
 #define wglUseFontBitmaps wglUseFontBitmapsA
 #endif
 
-#include "epoxy/wgl_generated.h"
-
 EPOXY_BEGIN_DECLS
 
+#include "epoxy/wgl_generated.h"
+
 EPOXY_PUBLIC bool epoxy_has_wgl_extension(HDC hdc, const char *extension);
 EPOXY_PUBLIC void epoxy_handle_external_wglMakeCurrent(void);
 
-- 
2.12.0