Subject: | [PATCH] Crypt-IDEA 1.07 fails to build under win32 |
Hi,
I'm running perl 5.8.8, built with mingw 3.4.5, on windows XP.
Attached are patches for the files _idea.c and idea.h, to get it to build.
With these patches, all tests pass OK.
I've also tested the patch on a linux box, and it still builds and all
tests pass.
Here is the error output:
Show quoted text
>perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Crypt::IDEA
Show quoted text>dmake
cp ._test.pl blib\lib\Crypt\._test.pl
cp IDEA.pod blib\lib\Crypt\IDEA.pod
cp IDEA.pm blib\lib\Crypt\IDEA.pm
C:\strawberry-perl\perl\bin\perl.exe
C:\strawberry-perl\perl\lib\ExtUtils\xsubpp
-typemap C:\strawberry-perl\perl\lib\ExtUtils\typemap -typemap typemap
IDEA.x
s > IDEA.xsc && C:\strawberry-perl\perl\bin\perl.exe -MExtUtils::Command
-e mv I
DEA.xsc IDEA.c
Please specify prototyping behavior for IDEA.xs (see perlxs manual)
gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT
-DPERL_
IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2
-DVERSION=\"1.
07\" -DXS_VERSION=\"1.07\" "-IC:\strawberry-perl\perl\lib\CORE" IDEA.c
In file included from IDEA.xs:10:
idea.h:9: error: syntax error before "idea_cblock"
idea.h:9: warning: data definition has no type or storage class
idea.h:10: error: syntax error before "idea_user_key"
idea.h:10: warning: data definition has no type or storage class
idea.h:11: error: syntax error before "idea_ks"
idea.h:11: warning: data definition has no type or storage class
idea.h:13: error: syntax error before "in"
idea.h:14: error: syntax error before "key"
idea.h:15: error: syntax error before "userKey"
IDEA.xs: In function `XS_Crypt__IDEA_expand_key':
IDEA.xs:24: error: syntax error before "ks"
IDEA.xs:30: error: `u_int16_t' undeclared (first use in this function)
IDEA.xs:30: error: (Each undeclared identifier is reported only once
IDEA.xs:30: error: for each function it appears in.)
IDEA.xs:30: error: syntax error before ')' token
IDEA.xs:32: error: `ks' undeclared (first use in this function)
IDEA.xs: In function `XS_Crypt__IDEA_invert_key':
IDEA.xs:41: error: `u_int16_t' undeclared (first use in this function)
IDEA.xs:41: error: syntax error before "iks"
IDEA.xs:47: error: syntax error before ')' token
IDEA.xs:49: error: `iks' undeclared (first use in this function)
IDEA.xs: In function `XS_Crypt__IDEA_crypt':
IDEA.xs:77: error: `u_int16_t' undeclared (first use in this function)
IDEA.xs:77: error: syntax error before ')' token
dmake: Error code 129, while making 'IDEA.o'
Show quoted text>perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=de
fine
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags =' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT
-DPERL_IMPLICIT_CONTE
XT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX',
optimize='-s -O2',
cppflags='-DWIN32'
ccversion='', gccversion='3.4.5', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long
long', lseek
size=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++', ldflags ='-s -L"c:\strawberry-perl\perl\lib\CORE"
-L"C:\strawberry
-perl\MinGW\lib"'
libpth=C:\strawberry-perl\MinGW\lib
libs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr
-lwinmm
-lversion -lodbc32 -lodbccp32
perllibs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdl
g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32
-lmpr -lw
inmm -lversion -lodbc32 -lodbccp32
libc=-lmsvcrt, so=dll, useshrplib=yes, libperl=libperl58.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -s
-L"c:\strawberry-perl\perl\lib\CORE" -L"
C:\strawberry-perl\MinGW\lib"'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_IMPLICIT_SYS PERL_MALLOC_WRAP
PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES
USE_PERLIO
Built under MSWin32
Compiled at Apr 20 2006 09:23:28
@INC:
c:/strawberry-perl/perl/lib
c:/strawberry-perl/perl/site/lib
.
Subject: | idea.h.patch |
5c5
< #if defined(__osf__) || defined(__sun) || defined(__hpux)
---
> #if defined(__osf__) || defined(__sun) || defined(__hpux) || defined(WIN32)
Subject: | _idea.c.patch |
7a8,10
> #ifdef WIN32
> #include <wininet.h>
> #else
8a12
> #endif