Quoting Flavio Cruz (2016-02-07 15:03:10)
> * ftpfs/ftpfs.h: Add dir_locp for each directory entry and replace the table
> with a libihash table.
> * ftpfs/dir.c: Modify the code to use libihash. Remove several functions such
> as rehash and insert.
Cool!
> -/* Calculate NAME's hash value. */
> -static size_t
> -hash (const char *name)
> +/* Calculate NAME_PTR's hash value. */
> +static hurd_ihash_key_t
> +ihash_hash (const void *name_ptr)
> {
> + const char *name = (const char *) name_ptr;
> size_t hv = 0;
> while (*name)
> hv = ((hv << 5) + *name++) & 0xFFFFFF;
> return hv;
> }
While you are at it, please replace this with hurd_ihash_hash32.
Justus