[Mesa-dev] [PATCH] mesa: Only undefine _P on IRIX.

Brian Paul brianp at vmware.com
Thu May 17 06:19:38 PDT 2012


On 05/17/2012 12:32 AM, Vinson Lee wrote:
> Per the comment _P is a macro on IRIX, so only undefine it on IRIX.
>
> This fixes a compiler error on Cygwin, which has a _P symbol defined and
> used in ctypes.h.
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
>   src/mesa/main/compiler.h |    2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
> index 25d9810..4c8892a 100644
> --- a/src/mesa/main/compiler.h
> +++ b/src/mesa/main/compiler.h
> @@ -286,9 +286,11 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
>
>
>   /* This is a macro on IRIX */
> +#ifdef sgi
>   #ifdef _P
>   #undef _P
>   #endif
> +#endif
>
>
>   /* Turn off macro checking systems used by other libraries */

How about removing that bit of code entirely?  I doubt anyone's 
compiling on IRIX anymore.

-Brian


More information about the mesa-dev mailing list