I've got it working on IRIX64 platform. Find the patch attached. I just
want to point out that this is a temporary workaround. "Temporary" means
that I'm ready with promised SHA rewrite but as the patch is big and the
team is eager to release 0.9.3 it makes sense to wait till next cycle
when I plan to persuade the team to make [LB]_ENDIAN autodetected:-)

Andy.
*** ./crypto/sha/sha1dgst.c.orig        Sun May  9 13:00:20 1999
--- ./crypto/sha/sha1dgst.c     Sun May 23 14:51:29 1999
***************
*** 216,222 ****
                data+=SHA_CBLOCK;
                sha1_block(c,p=c->data,1);
                len-=SHA_CBLOCK;
! #else /* little-endian */
  #define BE_COPY(dst,src,i)    {                               \
                                l = ((SHA_LONG *)src)[i];       \
                                Endian_Reverse32(l);            \
--- 216,222 ----
                data+=SHA_CBLOCK;
                sha1_block(c,p=c->data,1);
                len-=SHA_CBLOCK;
! #elif defined(L_ENDIAN)
  #define BE_COPY(dst,src,i)    {                               \
                                l = ((SHA_LONG *)src)[i];       \
                                Endian_Reverse32(l);            \
***************
*** 280,286 ****
        memcpy(p,b,SHA_CBLOCK);
        sha1_block(c,p,1);
        return;
! #else
        if (((unsigned long)b%sizeof(SHA_LONG)) == 0)
                {
                SHA_LONG *q;
--- 280,286 ----
        memcpy(p,b,SHA_CBLOCK);
        sha1_block(c,p,1);
        return;
! #elif defined(L_ENDIAN)
        if (((unsigned long)b%sizeof(SHA_LONG)) == 0)
                {
                SHA_LONG *q;
*** ./crypto/sha/sha_dgst.c.orig        Mon May 10 14:00:31 1999
--- ./crypto/sha/sha_dgst.c     Sun May 23 14:51:55 1999
***************
*** 211,217 ****
                data+=SHA_CBLOCK;
                sha_block(c,p=c->data,1);
                len-=SHA_CBLOCK;
! #else /* little-endian */
  #define BE_COPY(dst,src,i)    {                               \
                                l = ((SHA_LONG *)src)[i];       \
                                Endian_Reverse32(l);            \
--- 211,217 ----
                data+=SHA_CBLOCK;
                sha_block(c,p=c->data,1);
                len-=SHA_CBLOCK;
! #elif defined(L_ENDIAN)
  #define BE_COPY(dst,src,i)    {                               \
                                l = ((SHA_LONG *)src)[i];       \
                                Endian_Reverse32(l);            \
***************
*** 275,281 ****
        memcpy(p,b,SHA_CBLOCK);
        sha_block(c,p,1);
        return;
! #else
        if (((unsigned long)b%sizeof(SHA_LONG)) == 0)
                {
                SHA_LONG *q;
--- 275,281 ----
        memcpy(p,b,SHA_CBLOCK);
        sha_block(c,p,1);
        return;
! #elif defined(L_ENDIAN)
        if (((unsigned long)b%sizeof(SHA_LONG)) == 0)
                {
                SHA_LONG *q;
*** ./Configure.orig    Fri May 21 15:21:29 1999
--- ./Configure Fri May 21 17:35:18 1999
***************
*** 134,141 ****
  "irix-mips3-gcc","gcc:-mips3 -O2 -DTERMIOS -DB_ENDIAN:(unknown)::MD2_CHAR RC4_INDEX 
RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:::",
  "irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS 
-DB_ENDIAN:(unknown)::DES_PTR DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:::",
  "debug-irix-cc", "cc:-w2 -g -DCRYPTO_MDEBUG -DTERMIOS -DB_ENDIAN:(unknown):::::",
! # This is the n64 mode build. (Untested!)
! "irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const 
-DTERMIOS:(unknown)::DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT:::",
  
  # HPUX 9.X config.
  # Don't use the bundled cc.  It is broken.  Use HP ANSI C if possible, or gcc.
--- 134,141 ----
  "irix-mips3-gcc","gcc:-mips3 -O2 -DTERMIOS -DB_ENDIAN:(unknown)::MD2_CHAR RC4_INDEX 
RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:::",
  "irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS 
-DB_ENDIAN:(unknown)::DES_PTR DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:::",
  "debug-irix-cc", "cc:-w2 -g -DCRYPTO_MDEBUG -DTERMIOS -DB_ENDIAN:(unknown):::::",
! # This is the n64 mode build.
! "irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS 
-DB_ENDIAN:(unknown)::DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:::",
  
  # HPUX 9.X config.
  # Don't use the bundled cc.  It is broken.  Use HP ANSI C if possible, or gcc.

Reply via email to