[dovecot-cvs] dovecot/src/lib md4.c,1.1,1.1.2.1 md5.c,1.8,1.8.2.1
cras at dovecot.org
cras at dovecot.org
Fri Jun 16 13:28:33 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv20985/lib
Modified Files:
Tag: branch_1_0
md4.c md5.c
Log Message:
MD4 was broken with 64bit systems. Added a few x86-64 optimizations. Patch
by Andrey Panin
Index: md4.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/md4.c,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- md4.c 28 Jul 2004 15:39:30 -0000 1.1
+++ md4.c 16 Jun 2006 10:28:30 -0000 1.1.2.1
@@ -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;
Index: md5.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/md5.c,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -d -r1.8 -r1.8.2.1
--- md5.c 20 Jul 2004 12:44:29 -0000 1.8
+++ md5.c 16 Jun 2006 10:28:30 -0000 1.8.2.1
@@ -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) \
More information about the dovecot-cvs
mailing list