Mesa (10.3): st/wgl: add WINAPI qualifiers on wgl function typedefs

Emil Velikov evelikov at kemper.freedesktop.org
Mon Oct 13 01:03:16 UTC 2014


Module: Mesa
Branch: 10.3
Commit: 745a0bfd62356b70716eca92634f5e2cc128ecbf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=745a0bfd62356b70716eca92634f5e2cc128ecbf

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Oct  3 09:55:34 2014 -0600

st/wgl: add WINAPI qualifiers on wgl function typedefs

Fixes a release build segfault when wglCreateContextAttribsARB()
calls the wglCreateContext() function.

Cc: "10.3" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Matthew McClure <mcclurem at vmware.com>
(cherry picked from commit 90dc71b454296c1950c83a4243352890cdbcf26e)

---

 src/gallium/state_trackers/wgl/stw_ext_context.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/wgl/stw_ext_context.c b/src/gallium/state_trackers/wgl/stw_ext_context.c
index bc8d5c2..451f330 100644
--- a/src/gallium/state_trackers/wgl/stw_ext_context.c
+++ b/src/gallium/state_trackers/wgl/stw_ext_context.c
@@ -50,8 +50,8 @@
 HGLRC WINAPI
 wglCreateContextAttribsARB(HDC hDC, HGLRC hShareContext, const int *attribList)
 {
-   typedef HGLRC (*wglCreateContext_t)(HDC hdc);
-   typedef BOOL (*wglDeleteContext_t)(HGLRC hglrc);
+   typedef HGLRC (WINAPI *wglCreateContext_t)(HDC hdc);
+   typedef BOOL (WINAPI *wglDeleteContext_t)(HGLRC hglrc);
    HGLRC context;
    static HMODULE opengl_lib = 0;
    static wglCreateContext_t wglCreateContext_func = 0;




More information about the mesa-commit mailing list