summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@gmail.com>2015-07-01 00:33:14 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-07-08 13:18:42 +0100
commitc7f3657450683827446072ad6b1e8fce04078162 (patch)
treeb0ec37198c7b0e6f0642513d62af77ba9d5ad90f /configure.ac
parent64cb014037551c4b7bbed1cf2ca8f1126c970146 (diff)
darwin: Suppress type conversion warnings for GLhandleARB
This patch and its description are inspired from Jose Fonseca explanations and suggestions. With this patch the following logic applies and only if __APPLE__: When building mesa, GLhandleARB is defined as unsigned long and at some point casted to GLuint in gl fuction implementations. These exact points are where these errors and warnings appear. When building an application GLhandleARB is defined as void*. Later when calling a gl function, for example glBindAttribLocationARB, it will be dispatched to _mesa_BindAttribLocation. So internally void* will be treated as unsigned long which has the same size. So the same truncation happens when casting it to GLuint. Same when GLhandleARB appears as return value. For mesa it will be GLuint -> unsigned long. For an application it will be GLuint -> unsigned long -> void*. Note that the value will be preserved when casting back to GLuint. When GLhandleARB appears as a pointer there are also separate entry-points, i.e. _mesa_FuncNameARB. So the same logic can be applied. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66346 Signed-off-by: Julien Isorce <julien.isorce@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index d240c060573..d819beffa50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1354,7 +1354,7 @@ if test "x$enable_dri" = xyes; then
fi
;;
darwin*)
- DEFINES="$DEFINES -DGLX_ALIAS_UNSUPPORTED"
+ DEFINES="$DEFINES -DGLX_ALIAS_UNSUPPORTED -DBUILDING_MESA"
if test "x$with_dri_drivers" = "xyes"; then
with_dri_drivers="swrast"
fi