[Xcb] Generated extensions (e.g., render.c) fail to build on Sol.

Jamey Sharp jamey at minilop.net
Fri Apr 1 22:47:12 PST 2005


On Fri, Apr 01, 2005 at 06:20:57PM -0800, Travis Spencer wrote:
> The C code that XML-XCB generates fails to build on Solaris 9.  The
> code that is creates causes a parsing error when compiled w/ gcc 3.4.
> I've attached a diff of what I had to change to get it to compile.
> I'm not sure if the altered code will break other things or not.
> 
> The general form of the errant code is this:
> 
> XCBExtension XCBXevieId = { "{@extension-xname" }};
> 
> The extra closing brace causes the compilation to fail.  I would
> suspect that line should read
> 
> XCBExtension XCBXevieId = { "{@extension-xname}" };
> 
> I'm not sure why this is happening on Solaris and not Linux.  Perhaps
> its the version of xsltproc that I'm using.  My version "was compiled
> against libxml 20423, libxslt 10019 and libexslt 710" (from the output
> of xsltproc when run w/ the --version flag).  I'll get a new version
> of xsltproc if you guys suspect that this is the cause.

I wouldn't be shocked, but would you try applying the attached patch to
XCB first? I could believe that other XSLT processors will have trouble
with that particular construct too.

FWIW, patches to files in xcb/src/extensions are never really useful,
since those files are entirely auto-generated during the build process.

--Jamey
-------------- next part --------------
Index: src/c-client.xsl
===================================================================
RCS file: /cvs/xcb/xcb/src/c-client.xsl,v
retrieving revision 1.48
diff -u -r1.48 c-client.xsl
--- src/c-client.xsl	8 Feb 2005 20:31:42 -0000	1.48
+++ src/c-client.xsl	2 Apr 2005 06:42:18 -0000
@@ -90,8 +90,9 @@
     <xcb>
       <xsl:copy-of select="@*" />
       <xsl:if test="$ext">
-        <constant type="XCBExtension" name="XCB{$ext}Id"
-                  value='{{ "{@extension-xname}" }}' />
+        <constant type="XCBExtension" name="XCB{$ext}Id">
+          <xsl:attribute name="value">{ "<xsl:value-of select="@extension-xname" />" }</xsl:attribute>
+        </constant>
         <function type="const XCBQueryExtensionRep *" name="XCB{$ext}Init">
           <field type="XCBConnection *" name="c" />
           <l>return XCBGetExtensionData(c, &amp;XCB<!--


More information about the xcb mailing list