On Mon, Nov 15, 2004 at 06:22:04AM -0800, Brad Miele wrote:
>
> I am midway through the install of 2.5.2 on my machines,
>
> I get the following error when running make in the perl directory:
>
> su-2.05b# gmake
> cc -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing
> -I/usr/local/include -O -DVERSION=\"0.03\" -DXS_VERSION=\"0.03\" -DPIC
> -fPIC "-I/usr/local/lib/perl5/5.8.1/i386-freebsd/CORE" API.c
> API.xs: In function `XS_SWISH__API_push_meta_list':
> API.xs:378: syntax error before `*'
> API.xs:379: `o' undeclared (first use in this function)
> API.xs:379: (Each undeclared identifier is reported only once
> API.xs:379: for each function it appears in.)
> gmake: *** [API.o] Error 1
That's a syntax error.
> su-2.05b#
>
> line 378, where the trouble seems to begin, is:
>
> SV *o = sv_newmortal();
Can't declare the variable in the middle of a block.
> i am sure that this is something that I am doing wrong (standard
> disclaimer) any thoughts?
You can edit API.xs and just move where that variable is declared up.
I'm curious why my gcc isn't reporting that error, though.
Index: API.xs
===================================================================
RCS file: /cvsroot/swishe/swish-e/perl/API.xs,v
retrieving revision 1.15
diff -u -B -r1.15 API.xs
--- API.xs 5 Nov 2004 11:56:45 -0000 1.15
+++ API.xs 15 Nov 2004 16:30:09 -0000
@@ -364,6 +364,8 @@
while ( *meta_list )
{
+ SV *o;
+
/* Create a new structure for storing the meta description and the parent SV */
META_OBJ *object = (META_OBJ *)safemalloc(sizeof(META_OBJ));
@@ -375,7 +377,7 @@
SvREFCNT_inc( object->handle_sv );
/* And create the Perl object and assign the object to it */
- SV *o = sv_newmortal();
+ o = sv_newmortal();
sv_setref_pv( o, class, (void *)object );
/* and push onto list */
--
Bill Moseley
moseley@hank.org
Unsubscribe from or help with the swish-e list:
http://swish-e.org/Discussion/
Help with Swish-e:
http://swish-e.org/current/docs
swish-e@sunsite.berkeley.edu
Received on Mon Nov 15 08:31:23 2004