From 5b16e4cac0c78b070c3386c568c7153987b478f6 Mon Sep 17 00:00:00 2001 From: miod <> Date: Wed, 16 Apr 2014 04:38:11 +0000 Subject: Remove _CRAY references. Note that this pleads for the use of fixed-width types instead of choosing int or long depending upon what we think the architecture support. --- src/lib/libcrypto/bf/blowfish.h | 9 +-------- src/lib/libcrypto/des/qud_cksm.c | 14 -------------- src/lib/libcrypto/md4/md4.h | 9 +-------- src/lib/libcrypto/md5/md5.h | 9 +-------- src/lib/libcrypto/ripemd/ripemd.h | 2 +- src/lib/libcrypto/sha/sha.h | 2 +- src/lib/libssl/src/crypto/bf/blowfish.h | 9 +-------- src/lib/libssl/src/crypto/des/qud_cksm.c | 14 -------------- src/lib/libssl/src/crypto/md4/md4.h | 9 +-------- src/lib/libssl/src/crypto/md5/md5.h | 9 +-------- src/lib/libssl/src/crypto/ripemd/ripemd.h | 2 +- src/lib/libssl/src/crypto/sha/sha.h | 2 +- 12 files changed, 10 insertions(+), 80 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/bf/blowfish.h b/src/lib/libcrypto/bf/blowfish.h index 65685f478c..289c55b3af 100644 --- a/src/lib/libcrypto/bf/blowfish.h +++ b/src/lib/libcrypto/bf/blowfish.h @@ -81,16 +81,9 @@ extern "C" { #if defined(__LP32__) #define BF_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#elif defined(__ILP64__) #define BF_LONG unsigned long #define BF_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ #else #define BF_LONG unsigned int #endif diff --git a/src/lib/libcrypto/des/qud_cksm.c b/src/lib/libcrypto/des/qud_cksm.c index dac201227e..c1e11e5fe1 100644 --- a/src/lib/libcrypto/des/qud_cksm.c +++ b/src/lib/libcrypto/des/qud_cksm.c @@ -80,18 +80,10 @@ DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[], int i; long l; const unsigned char *cp; -#ifdef _CRAY - 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]); @@ -124,14 +116,8 @@ 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); diff --git a/src/lib/libcrypto/md4/md4.h b/src/lib/libcrypto/md4/md4.h index c3ed9b3f75..b241ea1e9b 100644 --- a/src/lib/libcrypto/md4/md4.h +++ b/src/lib/libcrypto/md4/md4.h @@ -79,16 +79,9 @@ extern "C" { #if defined(__LP32__) #define MD4_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#elif defined(__ILP64__) #define MD4_LONG unsigned long #define MD4_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ #else #define MD4_LONG unsigned int #endif diff --git a/src/lib/libcrypto/md5/md5.h b/src/lib/libcrypto/md5/md5.h index 4cbf84386b..747bd929fd 100644 --- a/src/lib/libcrypto/md5/md5.h +++ b/src/lib/libcrypto/md5/md5.h @@ -79,16 +79,9 @@ extern "C" { #if defined(__LP32__) #define MD5_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#elif defined(__ILP64__) #define MD5_LONG unsigned long #define MD5_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ #else #define MD5_LONG unsigned int #endif diff --git a/src/lib/libcrypto/ripemd/ripemd.h b/src/lib/libcrypto/ripemd/ripemd.h index 5942eb6180..f32cfae311 100644 --- a/src/lib/libcrypto/ripemd/ripemd.h +++ b/src/lib/libcrypto/ripemd/ripemd.h @@ -72,7 +72,7 @@ extern "C" { #if defined(__LP32__) #define RIPEMD160_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#elif defined(__ILP64__) #define RIPEMD160_LONG unsigned long #define RIPEMD160_LONG_LOG2 3 #else diff --git a/src/lib/libcrypto/sha/sha.h b/src/lib/libcrypto/sha/sha.h index 7cbca26ff9..435352c208 100644 --- a/src/lib/libcrypto/sha/sha.h +++ b/src/lib/libcrypto/sha/sha.h @@ -79,7 +79,7 @@ extern "C" { #if defined(__LP32__) #define SHA_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#elif defined(__ILP64__) #define SHA_LONG unsigned long #define SHA_LONG_LOG2 3 #else diff --git a/src/lib/libssl/src/crypto/bf/blowfish.h b/src/lib/libssl/src/crypto/bf/blowfish.h index 65685f478c..289c55b3af 100644 --- a/src/lib/libssl/src/crypto/bf/blowfish.h +++ b/src/lib/libssl/src/crypto/bf/blowfish.h @@ -81,16 +81,9 @@ extern "C" { #if defined(__LP32__) #define BF_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#elif defined(__ILP64__) #define BF_LONG unsigned long #define BF_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ #else #define BF_LONG unsigned int #endif diff --git a/src/lib/libssl/src/crypto/des/qud_cksm.c b/src/lib/libssl/src/crypto/des/qud_cksm.c index dac201227e..c1e11e5fe1 100644 --- a/src/lib/libssl/src/crypto/des/qud_cksm.c +++ b/src/lib/libssl/src/crypto/des/qud_cksm.c @@ -80,18 +80,10 @@ DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[], int i; long l; const unsigned char *cp; -#ifdef _CRAY - 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]); @@ -124,14 +116,8 @@ 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); diff --git a/src/lib/libssl/src/crypto/md4/md4.h b/src/lib/libssl/src/crypto/md4/md4.h index c3ed9b3f75..b241ea1e9b 100644 --- a/src/lib/libssl/src/crypto/md4/md4.h +++ b/src/lib/libssl/src/crypto/md4/md4.h @@ -79,16 +79,9 @@ extern "C" { #if defined(__LP32__) #define MD4_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#elif defined(__ILP64__) #define MD4_LONG unsigned long #define MD4_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ #else #define MD4_LONG unsigned int #endif diff --git a/src/lib/libssl/src/crypto/md5/md5.h b/src/lib/libssl/src/crypto/md5/md5.h index 4cbf84386b..747bd929fd 100644 --- a/src/lib/libssl/src/crypto/md5/md5.h +++ b/src/lib/libssl/src/crypto/md5/md5.h @@ -79,16 +79,9 @@ extern "C" { #if defined(__LP32__) #define MD5_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#elif defined(__ILP64__) #define MD5_LONG unsigned long #define MD5_LONG_LOG2 3 -/* - * _CRAY note. I could declare short, but I have no idea what impact - * does it have on performance on none-T3E machines. I could declare - * int, but at least on C90 sizeof(int) can be chosen at compile time. - * So I've chosen long... - * - */ #else #define MD5_LONG unsigned int #endif diff --git a/src/lib/libssl/src/crypto/ripemd/ripemd.h b/src/lib/libssl/src/crypto/ripemd/ripemd.h index 5942eb6180..f32cfae311 100644 --- a/src/lib/libssl/src/crypto/ripemd/ripemd.h +++ b/src/lib/libssl/src/crypto/ripemd/ripemd.h @@ -72,7 +72,7 @@ extern "C" { #if defined(__LP32__) #define RIPEMD160_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#elif defined(__ILP64__) #define RIPEMD160_LONG unsigned long #define RIPEMD160_LONG_LOG2 3 #else diff --git a/src/lib/libssl/src/crypto/sha/sha.h b/src/lib/libssl/src/crypto/sha/sha.h index 7cbca26ff9..435352c208 100644 --- a/src/lib/libssl/src/crypto/sha/sha.h +++ b/src/lib/libssl/src/crypto/sha/sha.h @@ -79,7 +79,7 @@ extern "C" { #if defined(__LP32__) #define SHA_LONG unsigned long -#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) +#elif defined(__ILP64__) #define SHA_LONG unsigned long #define SHA_LONG_LOG2 3 #else -- cgit v1.2.3-55-g6feb