Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4380:7eef9a1c51c4 HEAD
MD4 was broken with 64bit systems. Added a few x86-64 optimizations. Patch
by Andrey Panin
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 16 Jun 2006 13:28:32 +0300 |
parents | 70f95d997c3b |
children | 8ca061f80b41 |
files | src/lib/md4.c src/lib/md5.c |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/md4.c Fri Jun 16 13:26:13 2006 +0300 +++ b/src/lib/md4.c Fri Jun 16 13:28:32 2006 +0300 @@ -42,7 +42,7 @@ * memory accesses is just an optimization. Nothing will break if it * doesn't work. */ -#if defined(__i386__) || defined(__vax__) +#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) #define SET(n) \ (*(const uint_fast32_t *)&ptr[(n) * 4]) #define GET(n) \ @@ -65,8 +65,8 @@ static const void *body(struct md4_context *ctx, const void *data, size_t size) { const unsigned char *ptr; - uint_fast32_t a, b, c, d; - uint_fast32_t saved_a, saved_b, saved_c, saved_d; + uint32_t a, b, c, d; + uint32_t saved_a, saved_b, saved_c, saved_d; ptr = data;
--- a/src/lib/md5.c Fri Jun 16 13:26:13 2006 +0300 +++ b/src/lib/md5.c Fri Jun 16 13:28:32 2006 +0300 @@ -46,7 +46,7 @@ * memory accesses is just an optimization. Nothing will break if it * doesn't work. */ -#if defined(__i386__) || defined(__vax__) +#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) #define SET(n) \ (*(const uint_fast32_t *)&ptr[(n) * 4]) #define GET(n) \