8 #if defined(__GNUC__) && defined(__GNUC_MINOR__)
9 #define __GNUC_PREREQ(maj, min) \
10 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
12 #define __GNUC_PREREQ(maj, min) 0
16 struct ext2fs_hashmap;
18 struct ext2fs_hashmap_entry {
22 struct ext2fs_hashmap_entry *next;
23 struct ext2fs_hashmap_entry *list_next;
24 struct ext2fs_hashmap_entry *list_prev;
27 struct ext2fs_hashmap *ext2fs_hashmap_create(
28 uint32_t(*hash_fct)(const void*, size_t),
29 void(*free_fct)(void*), size_t size);
30 void ext2fs_hashmap_add(struct ext2fs_hashmap *h, void *data, const void *key,
32 void *ext2fs_hashmap_lookup(struct ext2fs_hashmap *h, const void *key,
34 void *ext2fs_hashmap_iter_in_order(struct ext2fs_hashmap *h,
35 struct ext2fs_hashmap_entry **it);
36 void ext2fs_hashmap_del(struct ext2fs_hashmap *h,
37 struct ext2fs_hashmap_entry *e);
38 void ext2fs_hashmap_free(struct ext2fs_hashmap *h);
40 uint32_t ext2fs_djb2_hash(const void *str, size_t size);
42 #endif /* !HASHMAP_H */