From: DRC Date: Sat, 30 Aug 2014 13:55:08 +0000 (+0000) Subject: Fix build on OS X PowerPC platforms X-Git-Tag: 1.4.0~27^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=339589f3cd4fddf4198d80f0577f80d2e1c4a6db;p=libjpeg-turbo Fix build on OS X PowerPC platforms git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1397 632fc199-4ca6-4c93-a231-07263d6284db --- diff --git a/ChangeLog.txt b/ChangeLog.txt index 36046f9..927286a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -25,6 +25,9 @@ test program specifically designed to make the bug occur (by injecting random high-frequency YUV data into the compressor), it was reproducible only once in about every 25 million iterations. +[6] Fixed a build issue on OS X PowerPC platforms (md5cmp failed to build +because OS X does not provide the le32toh() and htole32() functions.) + 1.3.1 ===== diff --git a/md5/md5.c b/md5/md5.c index 7193e95..b30df97 100644 --- a/md5/md5.c +++ b/md5/md5.c @@ -38,6 +38,15 @@ static void MD5Transform(unsigned int [4], const unsigned char [64]); #define Decode memcpy #else +/* + * OS X doesn't have le32toh() or htole32() + */ +#ifdef __APPLE__ +#include +#define le32toh(x) OSSwapLittleToHostInt32(x) +#define htole32(x) OSSwapHostToLittleInt32(x) +#endif + /* * Encodes input (unsigned int) into output (unsigned char). Assumes len is * a multiple of 4.