Re: Problems with DBI 1.617_903 on MSWin32

"Martin J. Evans" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Organization Easysoft Limited
Message-ID <[email protected]>
On 22/02/12 11:09, Dave Mitchell wrote:
> On Wed, Feb 22, 2012 at 10:04:45AM +0000, Martin J. Evans wrote:
>> DBI.xs(4291) : error C2275: 'SV' : illegal use of this type as an expression
>>          C:\Perl\lib\CORE\perl.h(2243) : see declaration of 'SV'
> ...
>> Lines 4291 and 4292 are:
>>      MY_CXT_INIT;
>>      (void)MY_CXT; /* avoid 'unused variable' warning */
>
> Hopefully the diff below should fix it. Need declarations before code!
>

It didn't:

BOOT:
     MY_CXT_INIT;
     
     (void)cv;  // THIS IS LINE 4291
     (void)items; /* avoid 'unused variable' warning */
     
     (void)MY_CXT; /* avoid 'unused variable' warning */
     dbi_bootinit(NULL);

DBI.xs(4291) : error C2275: 'SV' : illegal use of this type as an expression
         C:\Perl\lib\CORE\perl.h(2243) : see declaration of 'SV'
DBI.xs(4291) : error C2065: 'my_cxt_sv' : undeclared identifier
DBI.xs(4291) : error C2275: 'my_cxt_t' : illegal use of this type as an expressi
on
         DBI.xs(294) : see declaration of 'my_cxt_t'
DBI.xs(4291) : error C2065: 'my_cxtp' : undeclared identifier
DBI.xs(4291) : warning C4047: 'function' : 'SV *' differs in levels of indirecti
on from 'int'
DBI.xs(4291) : warning C4024: 'Perl_sv_setuv' : different types for formal and a
ctual parameter 2
DBI.xs(4292) : error C2100: illegal indirection
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
l.EXE"' : return code '0x2'
Stop.

It is possible the following is the relevant code after preprocessing:

#line 4344 "DBI.c"

void XS_DBI_constant(register PerlInterpreter* my_perl , CV* cv);
void XS_DBI_constant(register PerlInterpreter* my_perl , CV* cv)
{

     extern int Perl___notused ; SV **sp = (*Perl_Tstack_sp_ptr(my_perl)); I32 ax = (*(*Perl_Tmarkstack_ptr_ptr(my_perl))--); register SV **mark = (*Perl_Tstack_base_ptr(my_perl)) + ax++; I32 items = (I32)(sp - mark);


#line 4353 "DBI.c"
     I32 ix = ((XPVCV*)(cv)->sv_any)->xcv_xsubany.any_i32;
     if (items != 0)
        S_croak_xs_usage(my_perl, cv,"");
     {
	I32	RETVAL;
	SV * const targ = (((*Perl_Top_ptr(my_perl))->op_private & 32) ? ((*Perl_Tcurpad_ptr(my_perl))[(*Perl_Top_ptr(my_perl))->op_targ]) : Perl_sv_newmortal(my_perl));
#line 4387 "DBI.xs"
     RETVAL = ix;
#line 4362 "DBI.c"
	(sp = (*Perl_Tstack_base_ptr(my_perl)) + ax - 1); do { Perl_sv_setiv(my_perl, targ,(IV)((IV)RETVAL)); do { do { if (((targ)->sv_flags & 0x00004000)) Perl_mg_set(my_perl, targ); } while (0); (*++sp = (targ)); } while (0); } while (0);
     }
     do { const IV tmpXSoff = (1); (*Perl_Tstack_sp_ptr(my_perl)) = (*Perl_Tstack_base_ptr(my_perl)) + ax + (tmpXSoff - 1); return; } while (0);
}

but the lines numbers in the preprocessed output don't seem to match up.

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.