I'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'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't be including both the standard gl/egl headers and piglit-dispatch.h. It should be including just piglit-dispatch.h.
Perhaps it would be better to modify piglit-dispatch.h to do something like this: #ifdef GLAPIENTRY #error "when including piglit-dispatch.h, don't also include gl.h" #endif Along with a comment explaining the situation in more detail... On 21 May 2012 11:08, Pauli Nieminen <[email protected]> wrote: > APIENTRY and GLAPIENTRY are defined in gl or egl headers. To avoid > compiler warning guard the defines with ifdefs. > > Signed-off-by: Pauli Nieminen <[email protected]> > --- > tests/util/piglit-dispatch.h | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/tests/util/piglit-dispatch.h b/tests/util/piglit-dispatch.h > index ef2687a..002b8c0 100644 > --- a/tests/util/piglit-dispatch.h > +++ b/tests/util/piglit-dispatch.h > @@ -63,8 +63,12 @@ extern "C" { > #ifndef _WIN32 > > /* APIENTRY and GLAPIENTRY are not used on Linux or Mac. */ > +#ifndef APIENTRY > #define APIENTRY > +#endif > +#ifndef GLAPIENTRY > #define GLAPIENTRY > +#endif > > #else > > -- > 1.7.5.4 > > _______________________________________________ > Piglit mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/piglit >
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
