Skip to content

Commit

Permalink
Fix md5cmp on AmigaOS 4 (PowerPC big-endian)
Browse files Browse the repository at this point in the history
+ Document AmigaOS support in the change log.

Based on:
chris-y@b4f3b75

Closes libjpeg-turbo#119
  • Loading branch information
dcommander committed Dec 2, 2016
1 parent 3582ce9 commit 82bf7f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
=====
Expand Down
9 changes: 9 additions & 0 deletions md5/md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@

#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)
Expand Down

0 comments on commit 82bf7f5

Please sign in to comment.