summaryrefslogtreecommitdiff
path: root/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'hash.h')
-rw-r--r--hash.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/hash.h b/hash.h
index acf17bb8..3e7854b1 100644
--- a/hash.h
+++ b/hash.h
@@ -13,6 +13,13 @@
* them can use shifts and additions instead of multiplications for
* 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