I&#39;m a little concerned about this.  The idea of piglit-dispatch.h is that it implements the same interface as the gl and egl headers, but in an implementation-agnostic way so that we can choose at run time whether to dispatch a test through GL or EGL.  (I haven&#39;t implemented EGL support in piglit-dispatch yet though--I was waiting until Chad had made more progress with Waffle).  So piglit source files shouldn&#39;t be including both the standard gl/egl headers and piglit-dispatch.h.  It should be including just piglit-dispatch.h.<br>

<br>Perhaps it would be better to modify piglit-dispatch.h to do something like this:<br><br>#ifdef GLAPIENTRY<br>#error &quot;when including piglit-dispatch.h, don&#39;t also include gl.h&quot;<br>#endif<br><br>Along with a comment explaining the situation in more detail...  <br>

<br><div class="gmail_quote">On 21 May 2012 11:08, Pauli Nieminen <span dir="ltr">&lt;<a href="mailto:pauli.nieminen@linux.intel.com" target="_blank">pauli.nieminen@linux.intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

APIENTRY and GLAPIENTRY are defined in gl or egl headers. To avoid<br>
compiler warning guard the defines with ifdefs.<br>
<br>
Signed-off-by: Pauli Nieminen &lt;<a href="mailto:pauli.nieminen@linux.intel.com" target="_blank">pauli.nieminen@linux.intel.com</a>&gt;<br>
---<br>
 tests/util/piglit-dispatch.h |    4 ++++<br>
 1 files changed, 4 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/tests/util/piglit-dispatch.h b/tests/util/piglit-dispatch.h<br>
index ef2687a..002b8c0 100644<br>
--- a/tests/util/piglit-dispatch.h<br>
+++ b/tests/util/piglit-dispatch.h<br>
@@ -63,8 +63,12 @@ extern &quot;C&quot; {<br>
 #ifndef _WIN32<br>
<br>
 /* APIENTRY and GLAPIENTRY are not used on Linux or Mac. */<br>
+#ifndef APIENTRY<br>
 #define APIENTRY<br>
+#endif<br>
+#ifndef GLAPIENTRY<br>
 #define GLAPIENTRY<br>
+#endif<br>
<br>
 #else<br>
<span><font color="#888888"><br>
--<br>
1.7.5.4<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org" target="_blank">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br>