Mesa (master): glapi: define GL_API to be KEYWORD1 in glapi_dispatch.c (v2)

Brian Paul brianp at kemper.freedesktop.org
Fri Mar 30 20:35:36 UTC 2018


Module: Mesa
Branch: master
Commit: 1bf201ddce12adfd5b06e46b8111b89300d58b4e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1bf201ddce12adfd5b06e46b8111b89300d58b4e

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Mar 27 12:56:49 2018 -0600

glapi: define GL_API to be KEYWORD1 in glapi_dispatch.c (v2)

This fixes a Windows build warning where the prototypes for the ES
function in the header file don't match the prototypes in this file
because the GL_API and GLAPI macros are defined differently.

v2: defined GL_API to KEYWORD1 instead of GLAPI, per Mathias.

Reviewed-by: Mathias Fröhlich <mathias.froehlich at web.de>

---

 src/mapi/glapi/glapi_dispatch.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/mapi/glapi/glapi_dispatch.c b/src/mapi/glapi/glapi_dispatch.c
index 323952366d..ca15449ed0 100644
--- a/src/mapi/glapi/glapi_dispatch.c
+++ b/src/mapi/glapi/glapi_dispatch.c
@@ -97,6 +97,13 @@
  */
 #include <GLES/glplatform.h>
 
+
+/* Redefine GL_API to avoid MSVC/MinGW warnings about different dllimport
+ * attributes for these prototypes vs those in the GLES/gl.h header.
+ */
+#undef GL_API
+#define GL_API KEYWORD1
+
 GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
 GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation);
 GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);




More information about the mesa-commit mailing list