summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFabian Groffen2011-01-08 19:49:38 +0100
committerKarel Zak2011-01-17 15:34:45 +0100
commitaabe2441765c632bba697945491e3e0ac29ac886 (patch)
treebf7e34cc148a94f8d4a5d3fc5e090d9710a5043a /lib
parentwall: add usage function (diff)
downloadkernel-qcow2-util-linux-aabe2441765c632bba697945491e3e0ac29ac886.tar.gz
kernel-qcow2-util-linux-aabe2441765c632bba697945491e3e0ac29ac886.tar.xz
kernel-qcow2-util-linux-aabe2441765c632bba697945491e3e0ac29ac886.zip
build-sys: use WORDS_BIGENDIAN to determine platform byte-order
Autoconf contains the right magic to determine the endianness on many platforms next to Linux. This reverses previous commits to move away from WORDS_BIGENDIAN: "use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN" This is necessary to compile on non Linux platforms like Darwin and Solaris. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/md5.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/md5.c b/lib/md5.c
index 6ad4b6845..071630f19 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -14,16 +14,11 @@
* needed on buffers full of bytes, and then call MD5Final, which
* will fill a supplied 16-byte array with the digest.
*/
-#include <endian.h>
#include <string.h> /* for memcpy() */
#include "md5.h"
-#if !defined __BYTE_ORDER || !(__BYTE_ORDER == __LITTLE_ENDIAN) && !(__BYTE_ORDER == __BIG_ENDIAN)
-#error missing __BYTE_ORDER
-#endif
-
-#if (__BYTE_ORDER == __LITTLE_ENDIAN)
+#if !defined(WORDS_BIGENDIAN)
#define byteReverse(buf, len) /* Nothing */
#else
void byteReverse(unsigned char *buf, unsigned longs);