summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bbs.h1
-rw-r--r--include/fnv_hash.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/bbs.h b/include/bbs.h
index 4931ef99..43352242 100644
--- a/include/bbs.h
+++ b/include/bbs.h
@@ -53,6 +53,7 @@ typedef time_t time4_t;
#include "modes.h"
#include "chess.h"
#include "proto.h"
+#include "fnv_hash.h"
#ifdef ASSESS
#include "assess.h"
diff --git a/include/fnv_hash.h b/include/fnv_hash.h
index 9d8851bd..837fd66c 100644
--- a/include/fnv_hash.h
+++ b/include/fnv_hash.h
@@ -1,3 +1,5 @@
+#ifndef _FNV_HASH_H_
+#define _FNV_HASH_H_
/*
* Fowler / Noll / Vo Hash (FNV Hash)
* http://www.isthe.com/chongo/tech/comp/fnv/
@@ -105,3 +107,6 @@ fnv1a_64_strcase(const char *str, Fnv64_t hval)
}
return hval;
}
+
+#define FNV1A_CHAR(c,hval) do { hval^=(unsigned char)c; hval*=FNV_32_PRIME; } while(0)
+#endif