+ while ((c = *str++)) {
+ hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
+ }
+
+# elif defined(XBT_FNV_HASH_FUNCTION)
+ unsigned int hash = 0x811c9dc5;
+
+ while (*str) {
+ /* multiply by the 32 bit FNV magic prime mod 2^32 */
+ hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);
+
+ /* xor the bottom with the current byte */
+ hash ^= (unsigned int) *str++;
+ }