On Wed, 2 Feb 2000, Michael Smith wrote:
> Here is the history on those patches. We developed them because of
> the endian issue with the DES source code and sparcs.
>
> In theory for Solaris 7 x86, you should be able to apply the des.h
> patch (MINUS the change to the des_cblock) and do not apply the des.c patch.
> As I said, in theory. I've heard the phrase "porting from Solaris 2.x to
> Solaris 7" several times.
Ok FWIW, I did a little playing here, using your idea plus some
stuff I read elsewhere, I got it to compile and 'make test' properly on
Solaris 7 x86. These may be of use to somebody else, if not I at
least feel semi-useful for having figured it out. :)
These are my diffs of des.c, des.h, and DES.xs:
[ diff des.c-dist des.c ]
Renamed des_crypt to perl_des_crypt
Renamed des_expand_key to perl_des_expand_key
437c437
< des_crypt(des_cblock input, des_cblock output, des_ks ks, int encrypt)
--- > perl_des_crypt(des_cblock input, des_cblock output, des_ks ks, int encrypt) 513c513 < des_expand_key(des_user_key userKey, des_ks ks) --- > perl_des_expand_key(des_user_key userKey, des_ks ks)[ diff des.h-dist des.h } Added two typedef lines
2a3,5 > typedef unsigned char u_int8_t; > typedef unsigned long u_int32_t; >
[ diff DES.xs-dist DES.xs ] Renamed des_expand_key call to perl_des_expand_key (to match des.c) Renamed des_crypt call to perl_des_crypt (to match des.c)
26c26 < des_expand_key((u_int8_t *)key, ks); --- > perl_des_expand_key((u_int8_t *)key, ks); 57c57 < des_crypt((u_int32_t *)input, (u_int32_t *)SvGROW(output, output_len), (u_int32_t *)ks, enc_flag); --- > perl_des_crypt((u_int32_t *)input, (u_int32_t *)SvGROW(output, output_len), (u_int32_t *)ks, enc_flag);
[bwann reactor 574:/usr/local/src/CPAN/Crypt-DES-1.01]$ uname -a SunOS reactor 5.7 Generic_106542-08 i86pc i386 i86pc
[bwann reactor 575:/usr/local/src/CPAN/Crypt-DES-1.01]$ make test PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.00503/i86pc-solaris -I/usr/local/lib/perl5/5.00503 test.pl 1..4 ok 1 ok 2 ok 3 ok 4
--- Bryan Wann CWIS Internet Services http://www.cwis.net/
"No, I'm not lost, Sir. I run a little Internet start-up downstairs, and I just bought the building"
This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:35:18 EDT