yagl_gles_ogl_macros.h: use APIENTRY wit function type prototypes
authorIgor Mitsyanko <i.mitsyanko@samsung.com>
Thu, 15 Nov 2012 13:31:52 +0000 (17:31 +0400)
committerEvgeny Voevodin <e.voevodin@samsung.com>
Mon, 26 Nov 2012 09:25:36 +0000 (13:25 +0400)
This should tell compilator how these functions behave when called.

Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
hw/yagl_drivers/gles_ogl/yagl_gles_ogl_macros.h

index 1d29ac5..d3dc350 100644 (file)
@@ -1,52 +1,54 @@
 #ifndef _QEMU_YAGL_GLES_OGL_MACROS_H
 #define _QEMU_YAGL_GLES_OGL_MACROS_H
 
+#include <GL/gl.h>
+
 /*
  * GLES OpenGL prototyping macros.
  * @{
  */
 
 #define YAGL_GLES_OGL_PROC0(func) \
-void (*func)(void);
+void (APIENTRY *func)(void);
 
 #define YAGL_GLES_OGL_PROC_RET0(ret_type, func) \
-ret_type (*func)(void);
+ret_type (APIENTRY *func)(void);
 
 #define YAGL_GLES_OGL_PROC1(func, arg0_type, arg0) \
-void (*func)(arg0_type arg0);
+void (APIENTRY *func)(arg0_type arg0);
 
 #define YAGL_GLES_OGL_PROC_RET1(ret_type, func, arg0_type, arg0) \
-ret_type (*func)(arg0_type arg0);
+ret_type (APIENTRY *func)(arg0_type arg0);
 
 #define YAGL_GLES_OGL_PROC2(func, arg0_type, arg1_type, arg0, arg1) \
-void (*func)(arg0_type arg0, arg1_type arg1);
+void (APIENTRY *func)(arg0_type arg0, arg1_type arg1);
 
 #define YAGL_GLES_OGL_PROC_RET2(ret_type, func, arg0_type, arg1_type, arg0, arg1) \
-ret_type (*func)(arg0_type arg0, arg1_type arg1);
+ret_type (APIENTRY *func)(arg0_type arg0, arg1_type arg1);
 
 #define YAGL_GLES_OGL_PROC3(func, arg0_type, arg1_type, arg2_type, arg0, arg1, arg2) \
-void (*func)(arg0_type arg0, arg1_type arg1, arg2_type arg2);
+void (APIENTRY *func)(arg0_type arg0, arg1_type arg1, arg2_type arg2);
 
 #define YAGL_GLES_OGL_PROC4(func, arg0_type, arg1_type, arg2_type, arg3_type, arg0, arg1, arg2, arg3) \
-void (*func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3);
+void (APIENTRY *func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3);
 
 #define YAGL_GLES_OGL_PROC5(func, arg0_type, arg1_type, arg2_type, arg3_type, arg4_type, arg0, arg1, arg2, arg3, arg4) \
-void (*func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4);
+void (APIENTRY *func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4);
 
 #define YAGL_GLES_OGL_PROC6(func, arg0_type, arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, arg0, arg1, arg2, arg3, arg4, arg5) \
-void (*func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3, \
+void (APIENTRY *func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3, \
      arg4_type arg4, arg5_type arg5);
 
 #define YAGL_GLES_OGL_PROC7(func, arg0_type, arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, arg0, arg1, arg2, arg3, arg4, arg5, arg6) \
-void (*func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3, \
+void (APIENTRY *func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3, \
      arg4_type arg4, arg5_type arg5, arg6_type arg6);
 
 #define YAGL_GLES_OGL_PROC8(func, arg0_type, arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, arg7_type, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
-void (*func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3, \
+void (APIENTRY *func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3, \
      arg4_type arg4, arg5_type arg5, arg6_type arg6, arg7_type arg7);
 
 #define YAGL_GLES_OGL_PROC9(func, arg0_type, arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, arg7_type, arg8_type, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \
-void (*func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3, \
+void (APIENTRY *func)(arg0_type arg0, arg1_type arg1, arg2_type arg2, arg3_type arg3, \
      arg4_type arg4, arg5_type arg5, arg6_type arg6, arg7_type arg7, \
      arg8_type arg8);