[Mesa-dev] [PATCH 1/4] mesa: Add an ifndef guard around the definition of the INLINE macro

Brian Paul brianp at vmware.com
Wed Jul 20 07:35:43 PDT 2011

On 07/19/2011 05:59 PM, Paul Berry wrote:
> On 19 July 2011 13:15, Ian Romanick<idr at freedesktop.org>  wrote:
>>> src/egl/main/eglcompiler.h
>>> src/gallium/include/pipe/p_compiler.h
>>> src/mapi/mapi/u_compiler.h
>>> src/mesa/main/compiler.h
>> None of those headers should ever cross paths.  The only one of those
>> that anything under src/mesa/main or src/glsl should *ever* hit is
>> src/mesa/main/compiler.h.  Where did the colliding definition come from?
> The colliding definition was in src/mapi/mapi/u_compiler.h.  At least
> one of the conflicting paths is:
> glsl/link_functions.cpp includes
> mesa/main/core.h, which includes
> mesa/main/mtypes.h, which includes
> mapi/glapi/glapi.h, which includes
> mapi/glapi/glthread.h, which includes
> mapi/mapi/u_thread.h, which includes
> mapi/mapi/u_compiler.h
> mesa/main/core.h also includes
> mesa/main/compiler.h
> I don't know whether there are other conflicting paths.
> This conflict doesn't lead to compile errors right now (presumably
> because mesa/main/compiler.h gets included first, and the definition
> of INLINE in mapi/mapi/u_compiler.h only happens if INLINE is not
> already defined).  However, in patch 2/4 of this patch series, I had
> to make glsl/glsl_parser_extras.h include main/mtypes.h (so that I
> could add a function to glsl_parser_extras.h that referred to gl_api).
>   That must have changed the order in which the files get included so
> that mapi/mapi/u_compiler.h got included first.

Thanks for the explanation.  I'm OK with your original patch.  I don't 
think any of us has time for more elaborate refactoring right now.


More information about the mesa-dev mailing list