]> granicus.if.org Git - openssl/commitdiff
On Unicos, shorts are 8 bytes, so instead, use a structure with 2 32-bit ints, just...
authorRichard Levitte <levitte@openssl.org>
Thu, 3 Aug 2000 21:58:56 +0000 (21:58 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 3 Aug 2000 21:58:56 +0000 (21:58 +0000)
crypto/des/qud_cksm.c

index 5f0ec5387fab0a00bc79cbed6c0594267453f7b2..9fff989edbca001ee4c35991fe8608fd37d845d7 100644 (file)
@@ -81,13 +81,17 @@ DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[],
        long l;
        const unsigned char *cp;
 #ifdef _CRAY
-       short *lp;
+       struct lp_st { int a:32; int b:32; } *lp;
 #else
        DES_LONG *lp;
 #endif
 
        if (out_count < 1) out_count=1;
+#ifdef _CRAY
+       lp = (struct lp_st *) &(output[0])[0];
+#else
        lp = (DES_LONG *) &(output[0])[0];
+#endif
 
        z0=Q_B0((*seed)[0])|Q_B1((*seed)[1])|Q_B2((*seed)[2])|Q_B3((*seed)[3]);
        z1=Q_B0((*seed)[4])|Q_B1((*seed)[5])|Q_B2((*seed)[6])|Q_B3((*seed)[7]);
@@ -120,8 +124,14 @@ DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[],
                        {
                        /* The MIT library assumes that the checksum is
                         * composed of 2*out_count 32 bit ints */
+#ifdef _CRAY
+                       (*lp).a = z0;
+                       (*lp).b = z1;
+                       lp++;
+#else
                        *lp++ = z0;
                        *lp++ = z1;
+#endif
                        }
                }
        return(z0);