summaryrefslogtreecommitdiff
path: root/include/hashtab.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-05-07 14:07:58 -0400
committerJason Merrill <jason@gcc.gnu.org>2003-05-07 14:07:58 -0400
commit5cc5a0d00d1029843f58d42743c5c97aee40b75a (patch)
tree44f4d6fd3046412557aa8c248e6d948fe847e7be /include/hashtab.h
parent54350d487d9a5b2c4f8af39fd4c3517dbd5fb832 (diff)
downloadgcc-5cc5a0d00d1029843f58d42743c5c97aee40b75a.tar.gz
hashtab.c (burtle_hash): New fn.
libiberty/ * hashtab.c (burtle_hash): New fn. * configure.in: Add AC_C_BIGENDIAN_CROSS. * aclocal.m4: Include accross.m4. * configure, config.in: Regenerate. include/ * hashtab.h (burtle_hash): Prototype. (burtle_hash_object): New macro. From-SVN: r66565
Diffstat (limited to 'include/hashtab.h')
-rw-r--r--include/hashtab.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hashtab.h b/include/hashtab.h
index 7acb5eb2859..b86bb29b801 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -183,6 +183,11 @@ extern htab_eq htab_eq_pointer;
/* A hash function for null-terminated strings. */
extern hashval_t htab_hash_string PARAMS ((const PTR));
+/* An iterative hash function for arbitrary data. */
+extern hashval_t burtle_hash PARAMS ((const PTR, size_t, hashval_t));
+/* Shorthand for hashing something with an intrinsic size. */
+#define burtle_hash_object(OB,INIT) burtle_hash (&OB, sizeof (OB), INIT)
+
#ifdef __cplusplus
}
#endif /* __cplusplus */