]> git.marmaro.de Git - mmh/commitdiff
Change this to use "uint32_t" for a 32-bit type, otherwise we can get
authorKen Hornstein <kenh@pobox.com>
Mon, 5 Mar 2012 18:21:04 +0000 (13:21 -0500)
committerKen Hornstein <kenh@pobox.com>
Mon, 5 Mar 2012 18:21:04 +0000 (13:21 -0500)
wrong MD5 checksums on 64-bit systems.  Score another one for the
test suite!

h/md5.h

diff --git a/h/md5.h b/h/md5.h
index e49ef4e054bad2ac9ca647e1f57b138c21869238..ff52413e440acd3278f8ead89617e7bb25cb37f4 100644 (file)
--- a/h/md5.h
+++ b/h/md5.h
 
 #include <h/nmh.h>
 
+/*
+ * We need this for uint32_t
+ */
+
+#include <inttypes.h>
+
 /*
  * Use prototypes for nmh/mh
  */
@@ -35,7 +41,7 @@ typedef unsigned char *POINTER;
 typedef unsigned short int UINT2;
 
 /* UINT4 defines a four byte word */
-typedef unsigned long int UINT4;
+typedef uint32_t UINT4;
 
 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it