Re: Installing Crypt-DES-1.01 on Solaris

From: Michael Smith (msmith@staff.texas.net)
Date: Wed Feb 02 2000 - 15:23:41 EST


Here are the patches need to make CPAN's Crypt::DES 1.01 compile and
work on Solaris. Enjoy.

----CUT HERE----
*** ../Crypt-DES-1.01/des.h Sat May 22 15:30:39 1999
--- des.h Tue Jan 11 11:13:53 2000
***************
*** 1,7 ****
  #include <sys/types.h>
  
  typedef u_int8_t des_user_key[8];
! typedef u_int32_t des_cblock[2];
  typedef u_int32_t des_ks[32];
  
  void des_crypt(des_cblock in, des_cblock out, des_ks key, int encrypt);
--- 1,10 ----
  #include <sys/types.h>
  
+ typedef unsigned char u_int8_t;
+ typedef unsigned long u_int32_t;
+
  typedef u_int8_t des_user_key[8];
! typedef u_int8_t des_cblock[8];
  typedef u_int32_t des_ks[32];
  
  void des_crypt(des_cblock in, des_cblock out, des_ks key, int encrypt);
*** ../Crypt-DES-1.01/des.c Sat May 22 15:30:39 1999
--- des.c Tue Jan 11 11:12:04 2000
***************
*** 443,450 ****
          static int i;
          static unsigned long * s;
  
! l=input[0];
! r=input[1];
  
          /* do IP */
          PERM_OP(r,l,t, 4,0x0f0f0f0f);
--- 443,450 ----
          static int i;
          static unsigned long * s;
  
! c2l( input, l );
! c2l( input, r );
  
          /* do IP */
          PERM_OP(r,l,t, 4,0x0f0f0f0f);
***************
*** 505,512 ****
          PERM_OP(l,r,t,16,0x0000ffff);
          PERM_OP(r,l,t, 4,0x0f0f0f0f);
  
! output[0]=l;
! output[1]=r;
  }
  
  void
--- 505,512 ----
          PERM_OP(l,r,t,16,0x0000ffff);
          PERM_OP(r,l,t, 4,0x0f0f0f0f);
  
! l2c( l, output );
! l2c( r, output );
  }
  
  void
----CUT HERE----

On Wed, Feb 02, 2000 at 01:24:36PM -0600, Bryan Wann wrote:
> On Wed, 2 Feb 2000, Luis Moreno wrote:
>
> > Hello, I'm new on the list, but I' have seen that various persons have
> > problems installing this Module of Perl.
> >
> > I' have this: SunOS Generic_105181-12 sun4u sparc SUNW,Ultra-250Solaris
> > and already have installed the Module Digest::MD5.
> >
> > DES.xs: In function `XS_Crypt__DES_crypt':
> > DES.xs:47: `des_ks' undeclared (first use in this function)
> > DES.xs:57: `u_int32_t' undeclared (first use in this function)
> > DES.xs:57: parse error before `)'
> > make: Fatal error: Command failed for target `DES.o'
>
>
> We see the same problem on our Solaris machines, (SPARC 2.5.1,
> 2.6, 2.7, x86 2.7). By reading various dribblets from the list, I started
> playing with my #includes in des.h, including various header files, but
> none seemed to work. The closest I had gotten was when I #included
> <sys/bitypes.h> on a Solaris 2.5.1 machine, which compiled without error,
> but then failed tests 3 & 4 on 'make test'.
>
> For the heck of it, I tried to use the same bitypes.h on my
> Solaris 2.6/2.7 boxes, which caused the compiling to die a horrible
> screaming death.
>
> Any other ideas for getting this to work on Sun would be great.
> (and no, Linux is not an option).
>
>
>
> ---
> 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"

-- 
      +---------------------------------+--------------------------------+
      | Michael Smith                   |        TECHNICAL SUPPORT       |
      | Engineer (Austin)               | San Antonio: (210) 357-9202    |
      | msmith@texas.net                | Austin     : (512) 427-1652    |
      | Texas Networking, Inc.          | Houston    : (713) 222-2260    |
      | Hours Of Phone Support          | Boerne     : (830) 249-7058    |
      | Monday - Friday   :8am to 12am  | Dripping Sp: (512) 858-5092    |
      | Saturday - Sunday :10am to 7pm  | Georgetown : (512) 869-5947    |
      | http://lonestar.texas.net       | Dallas     : (214) 953-1005    |
      +---------------------------------+--------------------------------+



This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:35:18 EDT