Skip Menu |

This queue is for tickets about the Cache-Memcached-XS CPAN distribution.

Report information
The Basics
Id: 21054
Status: new
Priority: 0/
Queue: Cache-Memcached-XS

People
Owner: Nobody in particular
Requestors: MSCHILLI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Replace INIT/PREINIT to allow compilation with older compilers
On systems with older compilers, which don't handle variable declarations mid-code, 'make' will stop compiling Cache::Memcached::XS with the following message: XS.xs: In function `XS_Cache__Memcached__XS_mc_set': XS.xs:103: parse error before `char' XS.xs:106: `val' undeclared (first use in this function) ... The attached patch fixes this by replacing all INIT: sections in XS.xs containing variable declarations by PREINIT: sections. -- Mike Mike Schilli
Subject: patch.txt
diff -Naur XS.xs XS.xs --- XS.xs Sun Jul 2 15:55:00 2006 +++ XS.xs Thu Aug 17 12:46:21 2006 @@ -99,7 +99,7 @@ SV *val_sv; int exp; int flags; - INIT: + PREINIT: char *val; int len; CODE: @@ -115,7 +115,7 @@ SV *val_sv; int exp; int flags; - INIT: + PREINIT: char *val; int len; CODE: @@ -131,7 +131,7 @@ SV *val_sv; int exp; int flags; - INIT: + PREINIT: char *val; int len; CODE: