Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 84920
Status: resolved
Priority: 0/
Queue: Encode

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

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



Subject: Encode.xs doesn't compile with Microsoft C compiler
Because it mixes declarations and executable code now. cl -c -IEncode -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -MD -Zi -DNDEBUG -O1 -DVERSION=\"2.50\" -DXS_VERSION=\"2.50\" "-IC:\tmp\perl-lkwoadasaskrmyflmttahhwhtqyhywgnybvwqxkoolctjpeoggif\lib\CORE" Encode.c Encode.c Encode.xs(109) : error C2143: syntax error : missing ';' before 'type' Encode.xs(110) : error C2275: 'STRLEN' : illegal use of this type as an expression C:\tmp\perl-lkwoadasaskrmyflmttahhwhtqyhywgnybvwqxkoolctjpeoggif\lib\CORE\perl.h(2398) : see declaration of 'STRLEN' Encode.xs(110) : error C2146: syntax error : missing ';' before identifier 'dlen' Encode.xs(110) : error C2065: 'dlen' : undeclared identifier Encode.xs(111) : error C2143: syntax error : missing ';' before 'type' Encode.xs(112) : error C2275: 'STRLEN' : illegal use of this type as an expression C:\tmp\perl-lkwoadasaskrmyflmttahhwhtqyhywgnybvwqxkoolctjpeoggif\lib\CORE\perl.h(2398) : see declaration of 'STRLEN' Encode.xs(112) : error C2146: syntax error : missing ';' before identifier 'trmlen' Encode.xs(112) : error C2065: 'trmlen' : undeclared identifier Encode.xs(113) : error C2275: 'U8' : illegal use of this type as an expression C:\tmp\perl-lkwoadasaskrmyflmttahhwhtqyhywgnybvwqxkoolctjpeoggif\lib\CORE\handy.h(181) : see declaration of 'U8' Encode.xs(113) : error C2065: 'trm' : undeclared identifier Encode.xs(131) : error C2065: 'code' : undeclared identifier Encode.xs(131) : error C2065: 'd' : undeclared identifier Encode.xs(131) : warning C4047: 'function' : 'unsigned char *' differs in levels of indirection from 'int ' Encode.xs(131) : warning C4024: 'do_encode' : different types for formal and actual parameter 4 Encode.xs(132) : warning C4047: 'function' : 'const unsigned char *' differs in levels of indirection from 'int ' Encode.xs(132) : warning C4024: 'do_encode' : different types for formal and actual parameter 8 Encode.xs(166) : warning C4047: '=' : 'int ' differs in levels of indirection from 'unsigned char *' Encode.xs(250) : warning C4047: '=' : 'int ' differs in levels of indirection from 'unsigned char *' NMAKE : fatal error U1077: 'cl' : return code '0x2'
The latest one should fix that but I do not have MSC handy so would you check it out? https://github.com/dankogai/p5-encode/commit/1df4b8583549ba4238772ea71e3c9d521334e122 Dan the Encode Maintainter On Mon Apr 29 16:01:04 2013, JDB wrote: Show quoted text
> Because it mixes declarations and executable code now. > > cl -c -IEncode -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 > -D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE > -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO > -D_USE_32BIT_TIME_T -MD -Zi -DNDEBUG -O1 -DVERSION=\"2.50\" > -DXS_VERSION=\"2.50\" "-IC:\tmp\perl- > lkwoadasaskrmyflmttahhwhtqyhywgnybvwqxkoolctjpeoggif\lib\CORE" > Encode.c > Encode.c > Encode.xs(109) : error C2143: syntax error : missing ';' before 'type' > Encode.xs(110) : error C2275: 'STRLEN' : illegal use of this type as > an expression > C:\tmp\perl- > lkwoadasaskrmyflmttahhwhtqyhywgnybvwqxkoolctjpeoggif\lib\CORE\perl.h(2398) > : see declaration of 'STRLEN' > Encode.xs(110) : error C2146: syntax error : missing ';' before > identifier 'dlen' > Encode.xs(110) : error C2065: 'dlen' : undeclared identifier > Encode.xs(111) : error C2143: syntax error : missing ';' before 'type' > Encode.xs(112) : error C2275: 'STRLEN' : illegal use of this type as > an expression > C:\tmp\perl- > lkwoadasaskrmyflmttahhwhtqyhywgnybvwqxkoolctjpeoggif\lib\CORE\perl.h(2398) > : see declaration of 'STRLEN' > Encode.xs(112) : error C2146: syntax error : missing ';' before > identifier 'trmlen' > Encode.xs(112) : error C2065: 'trmlen' : undeclared identifier > Encode.xs(113) : error C2275: 'U8' : illegal use of this type as an > expression > C:\tmp\perl- > lkwoadasaskrmyflmttahhwhtqyhywgnybvwqxkoolctjpeoggif\lib\CORE\handy.h(181) > : see declaration of 'U8' > Encode.xs(113) : error C2065: 'trm' : undeclared identifier > Encode.xs(131) : error C2065: 'code' : undeclared identifier > Encode.xs(131) : error C2065: 'd' : undeclared identifier > Encode.xs(131) : warning C4047: 'function' : 'unsigned char *' differs > in levels of indirection from 'int ' > Encode.xs(131) : warning C4024: 'do_encode' : different types for > formal and actual parameter 4 > Encode.xs(132) : warning C4047: 'function' : 'const unsigned char *' > differs in levels of indirection from 'int ' > Encode.xs(132) : warning C4024: 'do_encode' : different types for > formal and actual parameter 8 > Encode.xs(166) : warning C4047: '=' : 'int ' differs in levels of > indirection from 'unsigned char *' > Encode.xs(250) : warning C4047: '=' : 'int ' differs in levels of > indirection from 'unsigned char *' > NMAKE : fatal error U1077: 'cl' : return code '0x2'
On Mon Apr 29 18:13:09 2013, DANKOGAI wrote: Show quoted text
> The latest one should fix that but I do not have MSC handy so would > you check it out? > > https://github.com/dankogai/p5- > encode/commit/1df4b8583549ba4238772ea71e3c9d521334e122
Looks good; compiles and all tests pass (with VC 6 and Perl 5.16.2 on Win 2000)! Cheers, -Jan
Thank you. FYI 2.50 worked w/o problem on Strawberry Perl. Closing ticket now. Dan the Maintainer On Mon Apr 29 18:37:48 2013, JDB wrote: Show quoted text
> On Mon Apr 29 18:13:09 2013, DANKOGAI wrote:
> > The latest one should fix that but I do not have MSC handy so would > > you check it out? > > > > https://github.com/dankogai/p5- > > encode/commit/1df4b8583549ba4238772ea71e3c9d521334e122
> > Looks good; compiles and all tests pass (with VC 6 and Perl 5.16.2 on > Win 2000)! > > Cheers, > -Jan
On Mon Apr 29 19:09:16 2013, DANKOGAI wrote: Show quoted text
> Thank you. FYI 2.50 worked w/o problem on Strawberry Perl.
That's because Strawberry is using GCC, which has no problems with mixing declarations and executable code.