|
Posted by Steven N. Hirsch on June 8, 2005, 9:00 am
Please log in for more thread options
This is a multi-part message in MIME format.
--------------000800040001070805060503
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Brian McCauley wrote:
>> When trying to install XML::LibXML, I get the following error:
>>
>> perl-libxml-mm.c: In function `nodeC2Sv':
>> perl-libxml-mm.c:968: parse error before `*'
>> perl-libxml-mm.c:972: `decoded' undeclared (first use in this function)
>> perl-libxml-mm.c:972: (Each undeclared identifier is reported only once
>> perl-libxml-mm.c:972: for each function it appears in.)
>> make: *** [perl-libxml-mm.o] Error 1
> Gee, is that still not fixed.
Apparently not..
> Look at the offending line, you'll see it's trying to do variable
> declaration and assignment in one statement (C++ style). Some C
> compliers allow this. In strict C all the variable declarations must
> come directly after the opening brace of a block. Separate the
> statement into a separate declaration and assignment and move the
> declaration up to just after the start of the enclosing block.
Or, just apply the attached patch.
Steve
--------------000800040001070805060503
Content-Type: text/x-patch;
name="perl-libxml-mm.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="perl-libxml-mm.c.patch"
--- perl-libxml-mm.c.orig 2004-03-31 14:32:08.000000000 -0500
+++ perl-libxml-mm.c 2004-08-20 14:42:05.000000000 -0400
@@ -959,15 +959,17 @@
if ( refnode != NULL ) {
xmlDocPtr real_doc = refnode->doc;
if ( real_doc != NULL && real_doc->encoding != NULL ) {
+ xmlChar *decoded;
+
xs_warn( " encode node !!" );
/* The following statement is to handle bad
values set by XML::LibXSLT */
if ( PmmNodeEncoding(real_doc) == XML_CHAR_ENCODING_NONE ) {
PmmNodeEncoding(real_doc) = XML_CHAR_ENCODING_UTF8;
}
- xmlChar * decoded = PmmFastDecodeString( PmmNodeEncoding(real_doc) ,
- (const xmlChar *)string,
- (const
xmlChar*)real_doc->encoding);
+ decoded = PmmFastDecodeString( PmmNodeEncoding(real_doc) ,
+ (const xmlChar *)string,
+ (const xmlChar*)real_doc->encoding);
xs_warn( "push decoded string into SV" );
len = xmlStrlen( decoded );
retval = newSVpvn( (const char *)decoded, len );
--------------000800040001070805060503--
|