]> granicus.if.org Git - libjpeg-turbo/commitdiff
Fix md5cmp on AmigaOS 4 (PowerPC big-endian)
authorDRC <information@libjpeg-turbo.org>
Fri, 2 Dec 2016 00:23:32 +0000 (18:23 -0600)
committerDRC <information@libjpeg-turbo.org>
Fri, 2 Dec 2016 00:23:32 +0000 (18:23 -0600)
+ Document AmigaOS support in the change log.

Based on:
https://github.com/chris-y/libjpeg-turbo/commit/b4f3b757970cd9dd448af9d2713b6bcdd9929147

Closes #119

ChangeLog.md
md5/md5.c

index 75bb04039bd8668d33b1a0be86726e031bcf77d1..2740c81865aaf39215423461b88b0a758fafd483 100644 (file)
@@ -13,6 +13,9 @@ code in libjpeg-turbo from building.
 version of TJBench from outputting any reference images (the `-nowrite` switch
 was accidentally enabled by default.)
 
+4. libjpeg-turbo should now build and run on AmigaOS 4 (with full AltiVec
+SIMD acceleration.)
+
 
 1.5.1
 =====
index 087f4b02ac66f01fca010374f58fd4d2fed0ffbe..4b5ba5ecbf6a7f97d506639fcc694f210e7b6e08 100644 (file)
--- a/md5/md5.c
+++ b/md5/md5.c
 
 #include "./md5.h"
 
+#ifdef __amigaos4__
+#include <machine/endian.h>
+#define le32toh(x) (((x & 0xff) << 24) | \
+                    ((x & 0xff00) << 8) | \
+                    ((x & 0xff0000) >> 8) | \
+                    ((x & 0xff000000) >> 24))
+#define htole32(x) le32toh(x)
+#endif
+
 static void MD5Transform(unsigned int [4], const unsigned char [64]);
 
 #if (BYTE_ORDER == LITTLE_ENDIAN)