X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fjhash.h;h=d2560af4258878fb43c854120344efd091fc4e28;hb=baa8acf3af23bc5d9373144bef8147744b5ae01f;hp=4941b945a1f96b32e3f19034f414a79413cdb062;hpb=1698631bb3fbab41277b3953e193dd2fd4a74afa;p=lttng-ust.git diff --git a/src/common/jhash.h b/src/common/jhash.h index 4941b945..d2560af4 100644 --- a/src/common/jhash.h +++ b/src/common/jhash.h @@ -41,10 +41,10 @@ do { \ c ^= b; c -= rot(b, 24); \ } -#if (BYTE_ORDER == LITTLE_ENDIAN) -#define HASH_LITTLE_ENDIAN 1 +#if (LTTNG_UST_BYTE_ORDER == LTTNG_UST_LITTLE_ENDIAN) +#define HASH_LTTNG_UST_LITTLE_ENDIAN 1 #else -#define HASH_LITTLE_ENDIAN 0 +#define HASH_LTTNG_UST_LITTLE_ENDIAN 0 #endif /* @@ -85,7 +85,7 @@ uint32_t hashlittle(const void *key, size_t length, uint32_t initval) a = b = c = 0xdeadbeef + ((uint32_t)length) + initval; u.ptr = key; - if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) { + if (HASH_LTTNG_UST_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) { const uint32_t *k = (const uint32_t *) key; /* read 32-bit chunks */ /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */ @@ -128,7 +128,7 @@ uint32_t hashlittle(const void *key, size_t length, uint32_t initval) } } - } else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) { + } else if (HASH_LTTNG_UST_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) { const uint16_t *k = (const uint16_t *) key; /* read 16-bit chunks */ const uint8_t *k8;