summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>2014-02-07 15:06:19 +0000
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>2014-02-07 15:06:19 +0000
commit5d827a1f40373f41d2bce6b59719b930bcd646bd (patch)
treeda77b04ae77d9255691a0a7fbcf6919fba2841bb
parented81f3a98bf6c5e141e84514ca7c4ccddb82bc6b (diff)
downloadlibpam-radius-auth-5d827a1f40373f41d2bce6b59719b930bcd646bd.tar.gz
libpam-radius-auth-5d827a1f40373f41d2bce6b59719b930bcd646bd.zip
Check GCC byte order macros as well
-rw-r--r--md5.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/md5.c b/md5.c
index 3d6bbc0..da3692b 100644
--- a/md5.c
+++ b/md5.c
@@ -42,14 +42,16 @@
#include <string.h>
#include "md5.h"
-#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
-#define HIGHFIRST
+#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+# define HIGHFIRST
+#elif defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
+# define HIGHFIRST
#elif defined(__sparc) || defined(__mips)
-#define HIGHFIRST
+# define HIGHFIRST
#endif
#ifndef HIGHFIRST
-#define byteReverse(buf, len) /* Nothing */
+# define byteReverse(buf, len) /* Nothing */
#else
void byteReverse(unsigned char *buf, unsigned longs);