From daaa166fb4d4869882885094d8b8ad44f6d159ce Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 4 Nov 2009 13:56:13 +0100 Subject: [PATCH] Move BITS_PER_LONG define to arch Signed-off-by: Jens Axboe --- arch/arch.h | 2 ++ hash.h | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arch.h b/arch/arch.h index 87db222e..c4c0ef7f 100644 --- a/arch/arch.h +++ b/arch/arch.h @@ -1,6 +1,8 @@ #ifndef ARCH_H #define ARCH_H +#define BITS_PER_LONG __WORDSIZE + enum { arch_x86_64, arch_i386, diff --git a/hash.h b/hash.h index 3e7854b1..73f961b7 100644 --- a/hash.h +++ b/hash.h @@ -1,5 +1,8 @@ #ifndef _LINUX_HASH_H #define _LINUX_HASH_H + +#include "arch/arch.h" + /* Fast hashing routine for a long. (C) 2002 William Lee Irwin III, IBM */ @@ -14,12 +17,6 @@ * machines where multiplications are slow. */ -#ifdef __WORDSIZE -#define BITS_PER_LONG __WORDSIZE -#else -#define BITS_PER_LONG 32 -#endif - #if BITS_PER_LONG == 32 /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ #define GOLDEN_RATIO_PRIME 0x9e370001UL -- 2.25.1