aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/hashtab.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index 0c7208e..7c424e8 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -841,6 +841,13 @@ htab_hash_string (const PTR p)
return r;
}
+/* An equality function for null-terminated strings. */
+int
+htab_eq_string (const void *a, const void *b)
+{
+ return strcmp ((const char *) a, (const char *) b) == 0;
+}
+
/* DERIVED FROM:
--------------------------------------------------------------------
lookup2.c, by Bob Jenkins, December 1996, Public Domain.