X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fhashfunc.h;h=b2b03e941a3e1c139f7d8e2b4cb85aed3d63a928;hb=bdccfb6b49a17a2ac0e1fb3063df3766cd4abd5c;hp=355acd48cf10c8b857b6e3fafe3666023a0532f1;hpb=e58b2156463441119a13359cdb03c7a4fe521c72;p=libucw.git diff --git a/ucw/hashfunc.h b/ucw/hashfunc.h index 355acd48..b2b03e94 100644 --- a/ucw/hashfunc.h +++ b/ucw/hashfunc.h @@ -11,7 +11,17 @@ #ifndef _UCW_HASHFUNC_H #define _UCW_HASHFUNC_H -#include "ucw/lib.h" +#include + +#ifdef CONFIG_UCW_CLEAN_ABI +#define hash_block ucw_hash_block +#define hash_block_aligned ucw_hash_block_aligned +#define hash_string ucw_hash_string +#define hash_string_aligned ucw_hash_string_aligned +#define hash_string_nocase ucw_hash_string_nocase +#define str_len ucw_str_len +#define str_len_aligned ucw_str_len_aligned +#endif /*** === String hashes [[strhash]] ***/ @@ -20,7 +30,10 @@ uns str_len_aligned(const char *str) PURE; /** Get the string length (not a real uns hash_string_aligned(const char *str) PURE; /** Hash the string. The string must be aligned to sizeof(uns). For unaligned see @hash_string(). **/ uns hash_block_aligned(const byte *buf, uns len) PURE; /** Hash arbitrary data. They must be aligned to sizeof(uns). For unaligned see @hash_block(). **/ -#ifdef CPU_ALLOW_UNALIGNED +#ifdef CPU_ALLOW_UNALIGNED +#undef str_len +#undef hash_string +#undef hash_block #define str_len(str) str_len_aligned(str) #define hash_string(str) hash_string_aligned(str) #define hash_block(str, len) hash_block_aligned(str, len)