summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <dshaw@jabberwocky.com>2006-03-20 17:40:28 +0100
committerDavid Shaw <dshaw@jabberwocky.com>2006-03-20 17:40:28 +0100
commit70f1c32ffd3f3d00330d394b579ba4f68260c472 (patch)
tree922d2cd91be9fb89fc96d4059246cc95f48294af
parent* configure.ac: Improved --disable-endian-check that doesn't involve (diff)
downloadgnupg2-70f1c32ffd3f3d00330d394b579ba4f68260c472.tar.xz
gnupg2-70f1c32ffd3f3d00330d394b579ba4f68260c472.zip
* blowfish.c, md5.c, rmd160.c, sha1.c, sha256.c, sha512.c: Revert previous
change. It's now all done in configure.
-rw-r--r--cipher/ChangeLog5
-rw-r--r--cipher/blowfish.c6
-rw-r--r--cipher/md5.c4
-rw-r--r--cipher/rmd160.c4
-rw-r--r--cipher/sha1.c4
-rw-r--r--cipher/sha256.c4
-rw-r--r--cipher/sha512.c4
7 files changed, 18 insertions, 13 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index 10f56e1dc..bef85ee2e 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-20 David Shaw <dshaw@jabberwocky.com>
+
+ * blowfish.c, md5.c, rmd160.c, sha1.c, sha256.c, sha512.c: Revert
+ previous change. It's now all done in configure.
+
2006-03-19 David Shaw <dshaw@jabberwocky.com>
* blowfish.c, md5.c, rmd160.c, sha1.c, sha256.c, sha512.c: Use
diff --git a/cipher/blowfish.c b/cipher/blowfish.c
index 1d33bbb8d..1a1ce5678 100644
--- a/cipher/blowfish.c
+++ b/cipher/blowfish.c
@@ -251,7 +251,7 @@ function_F( BLOWFISH_context *bc, u32 x )
{
u16 a, b, c, d;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
a = ((byte*)&x)[0];
b = ((byte*)&x)[1];
c = ((byte*)&x)[2];
@@ -267,7 +267,7 @@ function_F( BLOWFISH_context *bc, u32 x )
}
#endif
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
#define F(x) ((( s0[((byte*)&x)[0]] + s1[((byte*)&x)[1]]) \
^ s2[((byte*)&x)[2]]) + s3[((byte*)&x)[3]] )
#else
@@ -528,7 +528,7 @@ do_bf_setkey( BLOWFISH_context *c, const byte *key, unsigned keylen )
}
for(i=j=0; i < BLOWFISH_ROUNDS+2; i++ ) {
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
((byte*)&data)[0] = key[j];
((byte*)&data)[1] = key[(j+1)%keylen];
((byte*)&data)[2] = key[(j+2)%keylen];
diff --git a/cipher/md5.c b/cipher/md5.c
index f8bd3abb9..270e3fe3e 100644
--- a/cipher/md5.c
+++ b/cipher/md5.c
@@ -100,7 +100,7 @@ transform( MD5_CONTEXT *ctx, byte *data )
u32 D = ctx->D;
u32 *cwp = correct_words;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
{ int i;
byte *p2, *p1;
for(i=0, p1=data, p2=(byte*)correct_words; i < 16; i++, p2 += 4 ) {
@@ -311,7 +311,7 @@ md5_final( MD5_CONTEXT *hd )
burn_stack (80+6*sizeof(void*));
p = hd->buf;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
#define X(a) do { *p++ = hd-> a ; *p++ = hd-> a >> 8; \
*p++ = hd-> a >> 16; *p++ = hd-> a >> 24; } while(0)
#else /* little endian */
diff --git a/cipher/rmd160.c b/cipher/rmd160.c
index 1f759aa88..7a7230f38 100644
--- a/cipher/rmd160.c
+++ b/cipher/rmd160.c
@@ -176,7 +176,7 @@ static void
transform( RMD160_CONTEXT *hd, byte *data )
{
u32 a,b,c,d,e,aa,bb,cc,dd,ee,t;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
u32 x[16];
{ int i;
byte *p2, *p1;
@@ -515,7 +515,7 @@ rmd160_final( RMD160_CONTEXT *hd )
burn_stack (108+5*sizeof(void*));
p = hd->buf;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
#define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \
*p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0)
#else /* little endian */
diff --git a/cipher/sha1.c b/cipher/sha1.c
index 63d6325da..d150fad1e 100644
--- a/cipher/sha1.c
+++ b/cipher/sha1.c
@@ -91,7 +91,7 @@ transform( SHA1_CONTEXT *hd, byte *data )
d = hd->h3;
e = hd->h4;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
memcpy( x, data, 64 );
#else
{ int i;
@@ -305,7 +305,7 @@ sha1_final(SHA1_CONTEXT *hd)
burn_stack (88+4*sizeof(void*));
p = hd->buf;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
#else /* little endian */
#define X(a) do { *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16; \
diff --git a/cipher/sha256.c b/cipher/sha256.c
index 7e864cc73..47c754101 100644
--- a/cipher/sha256.c
+++ b/cipher/sha256.c
@@ -111,7 +111,7 @@ transform( SHA256_CONTEXT *hd, byte *data )
g = hd->h6;
h = hd->h7;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
memcpy( w, data, 64 );
#else
{
@@ -257,7 +257,7 @@ sha256_final(SHA256_CONTEXT *hd)
burn_stack (328);
p = hd->buf;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
#else /* little endian */
#define X(a) do { *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16; \
diff --git a/cipher/sha512.c b/cipher/sha512.c
index 4b4018941..523579d25 100644
--- a/cipher/sha512.c
+++ b/cipher/sha512.c
@@ -171,7 +171,7 @@ transform( SHA512_CONTEXT *hd, byte *data )
g = hd->h6;
h = hd->h7;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
memcpy( w, data, 128 );
#else
{
@@ -332,7 +332,7 @@ sha512_final(SHA512_CONTEXT *hd)
burn_stack (768);
p = hd->buf;
-#if BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
#define X(a) do { *(u64*)p = hd->h##a ; p += 8; } while(0)
#else /* little endian */
#define X(a) do { *p++ = hd->h##a >> 56; *p++ = hd->h##a >> 48; \