summaryrefslogtreecommitdiff
path: root/pkgtools/digest/files/tiger.c
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-07-27 17:08:27 +0000
committerjoerg <joerg@pkgsrc.org>2007-07-27 17:08:27 +0000
commit315daaa372a79e9445e9346ee4d91ee71b311a97 (patch)
tree04b0df35e84312b14be0d3878afe546274817891 /pkgtools/digest/files/tiger.c
parentced3f1307929ac30b898ac89bfdab63a4546a3cf (diff)
downloadpkgsrc-315daaa372a79e9445e9346ee4d91ee71b311a97.tar.gz
As reported by tnn@, the old approach to find the byte order
doesn't work on HP-UX/Itanium. Use the standard approach using AC_C_BIGENDIAN. Tested by myself on i386, he@ on SPARC and tnn@ on HP-UX.
Diffstat (limited to 'pkgtools/digest/files/tiger.c')
-rw-r--r--pkgtools/digest/files/tiger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgtools/digest/files/tiger.c b/pkgtools/digest/files/tiger.c
index 3e2c08f2a36..cf781a95ee6 100644
--- a/pkgtools/digest/files/tiger.c
+++ b/pkgtools/digest/files/tiger.c
@@ -661,7 +661,7 @@ TIGERUpdate(tiger_context_t *tp, const uint8_t *data, uint32_t len)
uint8_t temp[64];
for (i = len; i >= 64; i -= 64) {
-#if BYTE_ORDER == BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
for (j = 0; j < 64; j++) {
temp[j ^ 7] = ((uint8_t *) str)[j];
}
@@ -672,7 +672,7 @@ TIGERUpdate(tiger_context_t *tp, const uint8_t *data, uint32_t len)
str += 8;
}
-#if BYTE_ORDER == BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
for (j = 0; j < i; j++) {
temp[j ^ 7] = ((uint8_t *) str)[j];
}