<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
<BODY>
<DIV>
<DIV style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Sorry for the weekly delay to answer, I am currently very busy.<BR><BR>>> Hello,<BR>>><BR>>> You can find attached a patch to apply on the include/GL/gl.h file.<BR>>><BR>>> This patch aims to fix a build issue with GCC when using the -DGL_GLEXT_LEGACY, -Werror and -Wundef flags. I have remarked the problem with Qt 5.1.1 (which I am packaging for NixOS) but it will occur on any build which combines these three flags.<BR>>><BR>>> To clarify things:<BR>>><BR>>> -Wundef tells the compiler to warn on any use of an undefined definition (#define THE_DEFINITION).<BR>>> -Werror tells the compiler to transform any warning as an error.<BR>>><BR>>> With these options, you cannot do:<BR>>><BR>>> #if THE_DEFINITION<BR>>><BR>>> when THE_DEFINITION has not been previously defined.<BR>>><BR>>> You must do:<BR>>><BR>>> #if defined(THE_DEFINITION) && THE_DEFINITION<BR>>><BR>>><BR>>> Feel free to ask me anything about this ;-)<BR><BR>>><BR>>> diff -rupN Mesa-9.2.0-orig/include/GL/gl.h Mesa-9.2.0/include/GL/gl.h<BR>>> --- Mesa-9.2.0-orig/include/GL/gl.h   2013-08-14 03:34:42.000000000 +0200<BR>>> +++ Mesa-9.2.0/include/GL/gl.h        2013-09-24 19:34:58.319140812 +0200<BR>>> @@ -2088,7 +2088,7 @@ typedef void (APIENTRYP PFNGLMULTITEXCOO<BR>>><BR>>><BR>>><BR>>> -#if GL_ARB_shader_objects<BR>>> +#if defined(GL_ARB_shaders_objects) && GL_ARB_shader_objects<BR>>><BR>>>  #ifndef GL_MESA_shader_debug<BR>>>  #define GL_MESA_shader_debug 1<BR>> <BR>> Actually, I think it could be safely changed to just<BR>> <BR>> #ifdef GL_ARB_shader_objects<BR>><BR>> Would that be OK?<BR><BR>As long as you are OK with the facts that defining GL_ARB_shader_objects to 0 will result to entering such a condition, it's also OK for me.<BR>In my patch, I only wanted to ensure a backward compatibility which even works with this uncommon case.<BR><BR>> Going further, I think we could just remove all the <BR>GL_MESA_shader_debug stuff from Mesa.  It's an old extension that's <BR>never really been used.  I'll put it on my to-do list.<BR><BR>As I rarely develop shaders, I cannot really  give you an interesting opinion about such a removal. As it seems that you already proceeded, let's see if someone really needed it ;-)<BR><BR>Thanks for your answer and downstream-openness.<BR><BR>Baptist</DIV></DIV></BODY></HTML>