diff options
Diffstat (limited to 'xdelta3/xdelta3-hash.h')
-rw-r--r-- | xdelta3/xdelta3-hash.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xdelta3/xdelta3-hash.h b/xdelta3/xdelta3-hash.h index 2919b98..c112b5a 100644 --- a/xdelta3/xdelta3-hash.h +++ b/xdelta3/xdelta3-hash.h | |||
@@ -72,6 +72,7 @@ xd3_checksum_hash (const xd3_hash_cfg *cfg, const usize_t cksum) | |||
72 | return (cksum >> cfg->shift) ^ (cksum & cfg->mask); | 72 | return (cksum >> cfg->shift) ^ (cksum & cfg->mask); |
73 | } | 73 | } |
74 | 74 | ||
75 | #if SIZEOF_USIZE_T == 4 | ||
75 | inline uint32_t | 76 | inline uint32_t |
76 | xd3_large32_cksum (xd3_hash_cfg *cfg, const uint8_t *base, const usize_t look) | 77 | xd3_large32_cksum (xd3_hash_cfg *cfg, const uint8_t *base, const usize_t look) |
77 | { | 78 | { |
@@ -88,7 +89,9 @@ xd3_large32_cksum_update (xd3_hash_cfg *cfg, const uint32_t cksum, | |||
88 | { | 89 | { |
89 | return xd3_hash_multiplier32 * cksum - cfg->multiplier * base[0] + base[look]; | 90 | return xd3_hash_multiplier32 * cksum - cfg->multiplier * base[0] + base[look]; |
90 | } | 91 | } |
92 | #endif | ||
91 | 93 | ||
94 | #if SIZEOF_USIZE_T == 8 | ||
92 | inline uint64_t | 95 | inline uint64_t |
93 | xd3_large64_cksum (xd3_hash_cfg *cfg, const uint8_t *base, const usize_t look) | 96 | xd3_large64_cksum (xd3_hash_cfg *cfg, const uint8_t *base, const usize_t look) |
94 | { | 97 | { |
@@ -105,6 +108,7 @@ xd3_large64_cksum_update (xd3_hash_cfg *cfg, const uint64_t cksum, | |||
105 | { | 108 | { |
106 | return xd3_hash_multiplier64 * cksum - cfg->multiplier * base[0] + base[look]; | 109 | return xd3_hash_multiplier64 * cksum - cfg->multiplier * base[0] + base[look]; |
107 | } | 110 | } |
111 | #endif | ||
108 | 112 | ||
109 | static usize_t | 113 | static usize_t |
110 | xd3_size_hashtable_bits (usize_t slots) | 114 | xd3_size_hashtable_bits (usize_t slots) |