Some solaris-usparc MD5 fixes.
authorBodo Möller <bodo@openssl.org>
Thu, 20 May 1999 13:11:43 +0000 (13:11 +0000)
committerBodo Möller <bodo@openssl.org>
Thu, 20 May 1999 13:11:43 +0000 (13:11 +0000)
crypto/md32_common.h
crypto/md5/Makefile.ssl

index 8c0a085..f19e1bf 100644 (file)
@@ -468,7 +468,8 @@ void HASH_UPDATE (HASH_CTX *c, const unsigned char *data, unsigned long len)
                 */
                if ((((unsigned long)data)%4) == 0)
                        {
-                       HASH_BLOCK_DATA_ORDER_ALIGNED (c,data,sw);
+                       /* data is properly aligned so that we can cast it: */
+                       HASH_BLOCK_DATA_ORDER_ALIGNED (c,(HASH_LONG *)data,sw);
                        sw*=HASH_CBLOCK;
                        data+=sw;
                        len-=sw;
@@ -514,7 +515,8 @@ void HASH_TRANSFORM (HASH_CTX *c, const unsigned char *data)
        {
 #if defined(HASH_BLOCK_DATA_ORDER_ALIGNED) && HASH_BLOCK_DATA_ORDER_ALIGNED!=1
        if ((((unsigned long)data)%4) == 0)
-               HASH_BLOCK_DATA_ORDER_ALIGNED (c,data,1);
+               /* data is properly aligned so that we can cast it: */
+               HASH_BLOCK_DATA_ORDER_ALIGNED (c,(HASH_LONG *)data,1);
        else
 #if !defined(HASH_BLOCK_DATA_ORDER)
                {
index cb0c043..b9e658f 100644 (file)
@@ -67,11 +67,14 @@ asm/mx86unix.cpp: asm/md5-586.pl
        (cd asm; $(PERL) md5-586.pl cpp >mx86unix.cpp)
 
 # works for both SC and gcc
+# (PATH is changed because /usr/ccs/bin/as knows opcodes we need
+# that GNU as has never heard of)
 asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
-       $(CPP) -DULTRASPARC -DMD5_BLOCK_DATA_ORDER asm/md5-sparcv9.S | as -xarch=v8plus /dev/fd/0 -o asm/md5-sparcv8plus.o
+       $(CPP) -DULTRASPARC -DMD5_BLOCK_DATA_ORDER asm/md5-sparcv9.S | \
+       PATH=/usr/ccs/bin:$(PATH) as -xarch=v8plus /dev/fd/0 -o asm/md5-sparcv8plus.o
 
 asm/md5-sparcv9.o: asm/md5-sparcv9.S
-       $(CC) -xarch=v9 -DULTRASPARC -DMD5_BLOCK_DATA_ORDER -c asm/md5-sparcv9.S -o asm/md5-sparcv9.o
+       PATH=/usr/ccs/bin:$(PATH) $(CC) -xarch=v9 -DULTRASPARC -DMD5_BLOCK_DATA_ORDER -c asm/md5-sparcv9.S -o asm/md5-sparcv9.o
 
 
 files: