Windows uses a different calling convention than linux for their public API 
(__stdcall vs __cdelc).

Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>
---
 src/utils/wflinfo.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c
index 54ff7f6..a76f9fc 100644
--- a/src/utils/wflinfo.c
+++ b/src/utils/wflinfo.c
@@ -220,10 +220,18 @@ enum {
 #define GL_CONTEXT_CORE_PROFILE_BIT       0x00000001
 #define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
 
-static GLenum (*glGetError)(void);
-static void (*glGetIntegerv)(GLenum pname, GLint *params);
-static const GLubyte * (*glGetString)(GLenum name);
-static const GLubyte * (*glGetStringi)(GLenum name, GLint i);
+#ifndef _WIN32
+#define APIENTRY
+#else
+#ifndef APIENTRY
+#define APIENTRY __stdcall
+#endif
+#endif
+
+static GLenum (APIENTRY *glGetError)(void);
+static void (APIENTRY *glGetIntegerv)(GLenum pname, GLint *params);
+static const GLubyte * (APIENTRY *glGetString)(GLenum name);
+static const GLubyte * (APIENTRY *glGetStringi)(GLenum name, GLint i);
 
 /// @brief Command line options.
 struct options {
-- 
2.0.0

_______________________________________________
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle

Reply via email to