Doing diffs in xlators/features/posix-locks/src/posix-locks.c.~1~: --- xlators/features/posix-locks/src/posix-locks.c.~1~ 2007-05-14 00:07:09.000000000 -0700 +++ xlators/features/posix-locks/src/posix-locks.c 2007-06-02 14:09:33.000000000 -0700 @@ -21,7 +21,6 @@ #include #include #include -#include /* for BITS_PER_LONG */ #include "glusterfs.h" #include "xlator.h" @@ -42,19 +41,11 @@ static int rw_allowable (posix_inode_t * linux source. See include/linux/hash.h in the source tree. */ -#if BITS_PER_LONG == 32 -/* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ -#define GOLDEN_RATIO_PRIME 0x9e370001UL -#elif BITS_PER_LONG == 64 -/* 2^63 + 2^61 - 2^57 + 2^54 - 2^51 - 2^18 + 1 */ -#define GOLDEN_RATIO_PRIME 0x9e37fffffffc0001UL -#else -#define GOLDEN_RATIO_PRIME 0x9e370001UL -#endif - static uint32_t integer_hash (uint32_t key, int size) { uint32_t hash = key; + /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ + unsigned long GOLDEN_RATIO_PRIME = 0x9e370001UL;; hash *= GOLDEN_RATIO_PRIME; return hash % size; } --------------